20 Jun 11, 07:43AM
I have not touched my autoexec.cfg since 4/28/2011 8:59 p.m.
[SELECT ALL] Code:
// This file gets executed every time you start AssaultCube.
// This is where you should put any scripts you may have created for AC.
execdir scripts
HEXADECIMAL = "0 1 2 3 4 5 6 7 8 9 A B C D E F"
HEXLENGTH = (listlen $HEXADECIMAL)
curfogcolor = "F F 0 0 0 0"
hexupdate = [
tmparg = (getalias $arg1)
tmpindex = (findlist $HEXADECIMAL (at $tmparg))
if $arg2 [
if (< (findlist $HEXADECIMAL (at $tmparg 1)) (- $HEXLENGTH 1)) [
tmpindex = (concat $tmpindex (+ (findlist $HEXADECIMAL (at $tmparg 1)) 1)) ] [
tmpindex = (concat (+ $tmpindex 1) 0) ] ] [
if (> (findlist $HEXADECIMAL (at $tmparg 1))) [
tmpindex = (concat $tmpindex (- (findlist $HEXADECIMAL (at $tmparg 1)) 1)) ] [
tmpindex = (concat (- $tmpindex 1) (- $HEXLENGTH 1)) ] ]
$arg1 = (concat (at $HEXADECIMAL (at $tmpindex)) (at $HEXADECIMAL (at $tmpindex 1))) ]
isf = [ result (&& [ strcmp (at $arg1) "F" ] [ strcmp (at $arg1 1) "F" ]) ]
iszero = [ result (&& [ strcmp (at $arg1) "0" ] [ strcmp (at $arg1 1) "0" ]) ]
rave = [
fogr = (concat (at $curfogcolor) (at $curfogcolor 1))
fogg = (concat (at $curfogcolor 2) (at $curfogcolor 3))
fogb = (concat (at $curfogcolor 4) (at $curfogcolor 5))
if (isf $fogr) [
if (isf $fogg) [ hexupdate fogr 0 ] [
if (iszero $fogb) [ hexupdate fogg 1 ] [ hexupdate fogb 0 ] ] ] [
if (isf $fogg) [
if (isf $fogb) [ hexupdate fogg 0 ] [
if (iszero $fogr) [ hexupdate fogb 1 ] [ hexupdate fogr 0 ] ] ] [
if (isf $fogb) [
if (isf $fogr) [ hexupdate fogb 0 ] [
if (iszero $fogg) [ hexupdate fogr 1 ] [ hexupdate fogg 0 ] ] ] ] ]
curfogcolor = (concat $fogr $fogg $fogb)
tmpcurfogcolor = (at $curfogcolor)
loop i (- (listlen $curfogcolor) 1) [
tmpcurfogcolor = (concatword $tmpcurfogcolor (at $curfogcolor (+ $i 1))) ]
fogcolour (concatword "0x" $tmpcurfogcolor)
sleep 0 rave ]
AFK_NAME = "|AFK|Yarukinasu" // replace this with the AFK name
CUR_NAME = "|FOX|Yarukinasu" // replace this with the original name
lastmoved = (millis)
afk = [
if (> (- (millis) $lastmoved) 300000) [
if (strcmp $curname $CUR_NAME) [ name $AFK_NAME ] ] [
if (strcmp $curname $AFK_NAME) [ name $CUR_NAME ] ]
sleep 0 afk ]
altaction_5 = [
setscope 1
scoping = 1
onrelease [ setscope 0; scopefov 60; scopesensscale 0.5; scoping = 0 ] ]
claimadmin = [
if (strcmp (curserver 1) "192.168.1.1") [ tmppassword = "trolololol" ] [
if (strcmp (curserver 1) "127.0.0.1") [ tmppassword = "desudesudesu" ] ]
setadmin 1 $tmppassword ]
listen_for_hit = [
my_pstat_weap = (pstat_weap (findcn $curname))
if (checkalias old_pstat_weap) [
if (! (strcmp $my_pstat_weap $old_pstat_weap)) [
curweapindex = (+ (* (curweapon) 2) 1)
if (> (at $my_pstat_weap $curweapindex) (at $old_pstat_weap $curweapindex)) [
loadcrosshair dot_wide-hit.png // replace this with the "hit" crosshair
sleep 50 [
loadcrosshair dot_wide.png // the default crosshair
loadcrosshair teammate.png teammate
loadcrosshair red_dot.png scope ] ] ] ]
old_pstat_weap = $my_pstat_weap
sleep 0 listen_for_hit ]
ragequit = [ say "OMG YOU GUYS ARE HACKERS!!!"; disconnect ]
scoping = 0
selfdestruct = [ // by |FOX|Thrawn
tmpseconds = (+ $arg1 1)
seconds = $tmpseconds
loop secnum $tmpseconds [
sleep (* $secnum 1000) [
-= seconds 1
if $seconds [ me (format "will self-destruct in %1..." $seconds) ] ] ]
sleep (* $arg1 1000) [ suicide ] ]
slowspamforceteam = [
spamcn = $arg1
loop i $arg2 [
sleep (* $i 5000) [ if (strnot (findpn $spamcn)) [ forceteam $spamcn ] ] ] ]
spamchangeteam = [
loop i $arg1 [ sleep (* $i 60) [ changeteam ] ] ]
spamforceteam = [
spamcn = $arg1
loop i $arg2 [
sleep (* $i 60) [ if (strnot (findpn $spamcn)) [ forceteam $spamcn ] ] ] ]
you = [
tmpname = $curname
tmpmessage = $arg2
if (> $numargs 2) [
loop i (- $numargs 2) [
tmpmessage = (concat $tmpmessage (getalias (format "arg%1" (+ $i 3)))) ] ]
name $arg1
me $tmpmessage
name $tmpname ]
add2conloop [ if_conline_has "connected: " [ whois (findcn (at $conline 1)) ] [ ] ]
addcheck_msa [ afk; listen_for_hit; rave ]
bind MOUSE4 [
if $scoping [
if (> $scopefov 5) [
-= scopefov 5
scopesensscale (+f (*f (*f (divf 0.5 (tan (toradians (divf $fov 2)))) (tan (toradians (divf $scopefov 2)))) (divf $scopefov 20.37)) 0.009) ] ] [ universaldelta 1 ] ]
bind MOUSE5 [
if $scoping [
if (< $scopefov 60) [
+= scopefov 5
scopesensscale (+f (*f (*f (divf 0.5 (tan (toradians (divf $fov 2)))) (tan (toradians (divf $scopefov 2)))) (divf $scopefov 20.37)) 0.009) ] ] [ universaldelta -1 ] ]
bind F [ if $editing [ solid 1 ] [ quicknadethrow ] ]
bind R [ // something useless made by |FOX|Yarukinasu...
reload
if (|| [ ! (curweapon) ] [ = (curweapon) 8 ]) [ // avoid failure
echo (c 3) "LOL FAIL" ] [ // accept success
echo (c 3) "reloading..."
if (|| [ = (curweapon) 1 ] [ = (curweapon) 9 ]) [ // PISTOL OR AKIMBO
reloadtime = 1400 ] [
if (= (curweapon) 2) [ // CARBINE
reloadtime = 1800 ] [
if (= (curweapon) 3) [ // PRO GUN
reloadtime = 2400 ] [
if (= (curweapon) 4) [ // SUBMACHINE GUN
reloadtime = 1650 ] [
if (= (curweapon) 5) [ // NOOB GUN
reloadtime = 1950 ] [
if (= (curweapon) 6) [ // ASSAULT RIFLE
reloadtime = 2000 ] ] ] ] ] ] ]
sleep $reloadtime [ echo (c 0) "reloaded" ] ]
bind Z [ if $editing [ domodifier 2 ] [ say "that's what she said" ] ]
bind CAPSLOCK [ sound 50; onrelease [ sound 52 ] ]
bind F1 [ && (vote 1) [ echo (c 3) "you pressed F1" ] ]
bind F2 [ && (vote 2) [ echo (c 3) "you pressed F2" ] ]
loop i (listlen $keylist) [ add2bind (at $keylist $i) [ lastmoved = (millis) ] ]