AssaultCube: Auto Sorry, Mate on TK

Found what I’ve been looking for recently. I wanted a script to auto say (with voicecom) an apology if I TK.

// This file gets executed every time you start AssaultCube.
// This is where you should put any scripts you may have created for AC.
// On TK message script by DES|Bukz. Little mod by Kirin. Some ideas and help from |BC|Wolf & DES|V-Man.
    if (! (strstr $mapstartalways tkchk)) [add2alias mapstartalways [sleep 1000 [tkchk]]] []
    if (checkalias srymsg) [] [srymsg = "Sorry Man, I didn't want to kill you..."]
    tkchk = [
        if (= $connected 1) [ // Only apologize to real people :p
            if (! (strcmp (at $conline 0) " 3you")) [] [ // Workaround for stupid people who use "you" in their nicks
            if (strstr $conline "you fragged teammate ") [sleep 1000 [say (concatword % $srymsg);voicecom sorry]; conline [ ]] []
            if (strstr $conline "you gibbed teammate ") [sleep 1000 [say (concatword % $srymsg);voicecom sorry]; conline [ ]] []
            if (strstr $conline "you splattered teammate ") [sleep 1000 [say (concatword % $srymsg);voicecom sorry]; conline [ ]] []
            if (strstr $conline "you slashed teammate ") [sleep 1000 [say (concatword % $srymsg);voicecom sorry]; conline [ ]] []
            if (strstr $conline "you headshot teammate ") [sleep 1000 [say (concatword % $srymsg);voicecom sorry]; conline [ ]] []
        ]
        sleep 1 [tkchk]
    ][]]
    newmenu "sorrymsg"
    menuitemtextinput "Auto-sorry upon TK msg: " "result $srymsg" "srymsg = $arg1"
    alias si [
                 if (= (currole) 0) [
                    claimadmin
                    sleep 150 [vote 1]
                                    sleep 1500 [setadmin 0]
                    ][
                    sleep 150 [vote 1]
                                    sleep 1500 [setadmin 0]
                    ]
           ]
    alias no [
                 if (= (currole) 0) [
                    claimadmin
                    sleep 150 [vote 2]
                                    sleep 1500 [setadmin 0]
                    ][
                    sleep 150 [vote 2]
                                    sleep 1500 [setadmin 0]
                    ]
           ]

Published by

Rich

Just another IT guy.

Leave a Reply

Your email address will not be published. Required fields are marked *