diff --git a/config/scripts.cfg b/config/scripts.cfg index 737d4930..6e1bfe8a 100644 --- a/config/scripts.cfg +++ b/config/scripts.cfg @@ -7,84 +7,90 @@ // Note: The editent command can NOT define rotation/yaw inside the command! // However, the current yaw of the player will define the rotation/yaw when // using the command! -alias editent [ - if (strcmp (getenttype) "mapmodel") [ - saycommand "/entset" (getenttype) (getentattr 1) (getentattr 2) (getentattr 3) - ] [ - if (> (findlist "light sound clip plclip" (getenttype)) -1) [ - saycommand "/entset" (getenttype) (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) - ] [ - saycommand "/entset" (getenttype) (getentattr ((> (findlist "playerstart ctf-flag" (getenttype)) -1))) - ] ] ] +editent = [ + if (strcmp (getenttype) "mapmodel") [ + saycommand "/entset" (getenttype) (getentattr 1) (getentattr 2) (getentattr 3) + ] [ + if (> (findlist "light sound clip plclip" (getenttype)) -1) [ + saycommand "/entset" (getenttype) (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) + ] [ + saycommand "/entset" (getenttype) (getentattr ((> (findlist "playerstart ctf-flag" (getenttype)) -1))) + ] + ] +] // "convertclips" command: // This command automatically changes the a "clip" to a "plclip" entity or vice-versa. -alias convertclips [ +convertclips = [ if (strcmp (getenttype) "clip") [ entset plclip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) ] [ - if (strcmp (getenttype) "plclip") [ - entset clip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) - ] [ - echo "No changes made. This entity isn't a clip or a plclip." - echo "Try using the /closestenttype command to find a specific entity." - ] ] ] + if (strcmp (getenttype) "plclip") [ + entset clip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3) + ] [ + echo "No changes made. This entity isn't a clip or a plclip." + echo "Try using the /closestenttype command to find a specific entity." + ] + ] +] // "gibsgore" command: // This command controls gib Speed/Number/TTL all in one variable. -alias gibsgore [ - if (= $arg1 4) [ // Unrealistic +gibsgore = [ + if (= $arg1 4) [ // Unrealistic + gib 1 + gibspeed 40 + gibnum 100 + gibttl 2500 // Turn TTL down to minimise lag... + __gibsgore = 4 + ] [ + if (= $arg1 3) [ // Messy + gib 1 + gibspeed 15 + gibnum 65 + gibttl 10000 + __gibsgore = 3 + ] [ + if (= $arg1 2) [ // Good gib 1 - gibspeed 40 - gibnum 100 - gibttl 2500 // Turn TTL down to minimise lag... - alias __gibsgore 4 + gibspeed 30 + gibnum 75 + gibttl 5000 + __gibsgore = 2 ] [ - if (= $arg1 3) [ // Messy + if (= $arg1 1) [ // Normal gib 1 - gibspeed 15 - gibnum 65 - gibttl 10000 - alias __gibsgore 3 + gibspeed 30 + gibnum 6 + gibttl 5000 + __gibsgore = 1 ] [ - if (= $arg1 2) [ // Good - gib 1 - gibspeed 30 - gibnum 75 - gibttl 5000 - alias __gibsgore 2 - ] [ - if (= $arg1 1) [ // Normal - gib 1 - gibspeed 30 - gibnum 6 - gibttl 5000 - alias __gibsgore 1 - ] [ - if (= $arg1 0) [ // Off - gib 0 - alias __gibsgore 0 - ] ] ] ] ] ] - + if (= $arg1 0) [ // Off + gib 0 + __gibsgore = 0 + ] + ] + ] + ] + ] +] // "fullscreenscript" command: // This command allows swapping of fullscreen mode to be bound to a key. -alias fullscreenscript [ if $fullscreen [ fullscreen 0 ] [ fullscreen 1 ] ] +fullscreenscript = [ if $fullscreen [ fullscreen 0 ] [ fullscreen 1 ] ] -alias editmapmsg [ saycommand ( concatword [/mapmsg ] ["] (getmapmsg) ["] ) ] +editmapmsg = [ saycommand ( concatword [/mapmsg ] ["] (getmapmsg) ["] ) ] -alias run [ exec (concatword config/ $arg1 .cfg) ] +run = [ exec (concatword config/ $arg1 .cfg) ] // Auto-completions -alias mapcomplete [complete $arg1 "packages/maps/official packages/maps" cgz] +mapcomplete = [complete $arg1 "packages/maps/official packages/maps" cgz] mapcommands = "map tdm coop dm lms ts ctf pf lss osok tosok htf vip tktf ktf sendmap" -loop i (listlen $mapcommands) [ - mapcomplete (at $mapcommands $i) -] +loop i (listlen $mapcommands) [ mapcomplete (at $mapcommands $i) ] complete demo "demos" dmo -alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip plclip helmet"] +entcomplete = [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip plclip helmet"] entcomplete newent entcomplete clearents entcomplete closestenttype @@ -111,86 +117,84 @@ gamemodedesc 14 [Team Keep the Flag: There is only one flag. Get the flag and ke gamemodedesc 15 [Keep the Flag: Get the flag and keep it. You score one point every 15 seconds. Everybody else will want to destroy you!] // "resetbinds" command. -alias resetbinds [ exec config/resetbinds.cfg; echo (c 3)All binds have been reset to default values! ] +resetbinds = [ exec config/resetbinds.cfg; echo (c 3)All binds have been reset to default values! ] // "changeteam" command. -alias changeteam [ if (< (curteam) 4) [ team (at "RVSF CLA RVSF-SPECT CLA-SPECT" (curteam)) ] ] +changeteam = [ if (< (curteam) 4) [ team (at "RVSF CLA RVSF-SPECT CLA-SPECT" (curteam)) ] ] // "spectate" command -alias spectate [ suicide; sleep 500 [ team SPECTATOR ] ] +spectate = [ suicide; sleep 500 [ team SPECTATOR ] ] // Mode/map-setting aliases. -alias votemap [ mode $arg1; map $arg2 ] +votemap = [ mode $arg1; map $arg2 ] -alias tdm [ votemap 0 $arg1 ] -alias coop [ votemap 1 $arg1 ] -alias dm [ votemap 2 $arg1 ] -alias lms [ votemap 3 $arg1 ] -alias ts [ votemap 4 $arg1 ] -alias ctf [ votemap 5 $arg1 ] -alias pf [ votemap 6 $arg1 ] -alias lss [ votemap 9 $arg1 ] -alias osok [ votemap 10 $arg1 ] -alias tosok [ votemap 11 $arg1 ] -alias htf [ votemap 13 $arg1 ] -alias vip [ votemap 13 $arg1 ] -alias tktf [ votemap 14 $arg1 ] -alias ktf [ votemap 15 $arg1 ] +tdm = [ votemap 0 $arg1 ] +coop = [ votemap 1 $arg1 ] +dm = [ votemap 2 $arg1 ] +lms = [ votemap 3 $arg1 ] +ts = [ votemap 4 $arg1 ] +ctf = [ votemap 5 $arg1 ] +pf = [ votemap 6 $arg1 ] +lss = [ votemap 9 $arg1 ] +osok = [ votemap 10 $arg1 ] +tosok = [ votemap 11 $arg1 ] +htf = [ votemap 13 $arg1 ] +vip = [ votemap 13 $arg1 ] +tktf = [ votemap 14 $arg1 ] +ktf = [ votemap 15 $arg1 ] // Weapon switching/action utilities. -alias primary [ weapon (currentprimary) ] -alias secondary [ weapon 1 ] -alias melee [ weapon 0 ] -alias grenades [ weapon 8 ] +primary = [ weapon (currentprimary) ] +secondary = [ weapon 1 ] +melee = [ weapon 0 ] +grenades = [ weapon 8 ] -alias altaction [ - (concatword altaction_ (curweapon)) -] +altaction = [ (concatword altaction_ (curweapon)) ] -alias quicknadethrow_old [ - if (> (magcontent 8) 0) [ - if (!= (curweapon) 7) [grenades] - attack - ] - onrelease [ sleep 1 [ if (= (curweapon) 7) [weapon (prevweapon)] ] ] +quicknadethrow_old = [ + if (> (magcontent 8) 0) [ + if (!= (curweapon) 7) [grenades] + attack + ] + onrelease [ sleep 1 [ if (= (curweapon) 7) [weapon (prevweapon)] ] ] ] loop i 10 [ alias (concatword altaction_ $i) quicknadethrow ] // Quick nade throw is default -alias altaction_5 [ setscope 1; onrelease [ setscope 0 ] ] // Sniper -alias altaction_7 [ setburst 1; onrelease [ setburst 0 ] ] // Combat pistol -//alias altaction_8 [ attack ] // Grenade // with this comment, you throw the nade and the nade is unselected : Brahma +altaction_5 = [ setscope 1; onrelease [ setscope 0 ] ] // Sniper +altaction_7 = [ setburst 1; onrelease [ setburst 0 ] ] // Combat pistol +// altaction_8 = [ attack ] // Grenade // with this comment, you throw the nade and the nade is unselected : Brahma -alias oldsens $sensitivity +oldsens = $sensitivity -alias zoom [ - if (= $arg1 1) [ - if (=f $sensitivity (scopesens)) [] [ - alias oldsens $sensitivity - // avoid error if using 0.001 as sensitivity - newsens = (scopesens) - if (> (*f 1 1000) $newsens) [ - if (< 1000 $newsens) [ - sensitivity (scopesens) - ] [] - ] [] - setscope 1 - ] - ] [ - sensitivity $oldsens - setscope 0 +zoom = [ + if (= $arg1 1) [ + if (=f $sensitivity (scopesens)) [] [ + oldsens = $sensitivity + // avoid error if using 0.001 as sensitivity + newsens = (scopesens) + if (> (*f 1 1000) $newsens) [ + if (< 1000 $newsens) [ + sensitivity (scopesens) + ] [] + ] [] + setscope 1 ] + ] [ + sensitivity $oldsens + setscope 0 + ] ] -alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] -alias delta_spect_0 [ changefollowplayer $arg1 ] +delta_game_0 = [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ] +delta_spect_0 = [ changefollowplayer $arg1 ] // Map editing using the mousewheel... -alias modifier 0 -alias domodifier [ alias modifier $arg1; onrelease [ alias modifier 0 ] ] +modifier = 0 +domodifier = [ modifier = $arg1; onrelease [ modifier = 0 ] ] alias universaldelta [ - if $editing [ alias s "edit" ] [ - if (alive) [ alias s "game" ] [ alias s "spect" ] + if $editing [ s = "edit" ] [ + if (alive) [ s = "game" ] [ s = "spect" ] ] (concatword delta _ $s _ $modifier) ] @@ -199,19 +203,19 @@ alias universaldelta [ // use them, simply hold the key that the "domodifier" is bound // to and then scroll backwards/forwards while looking at the // floor/ceiling. -alias delta_edit_0 [ editheight $flrceil $arg1 ] // Move cubes... -alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ] // Change heightfielding... -alias delta_edit_2 [ edittex $flrceil $arg1 ] // Change floor/ceiling textures... -alias delta_edit_3 [ edittex (+ $flrceil 1) $arg1 ] // Change wall/upper-wall textures... -alias delta_edit_4 [ equalize $flrceil ] // Equalize floor/ceiling... -alias delta_edit_5 [ entproperty 0 $arg1 ] // Changes the first value on entities... -alias delta_edit_6 [ entproperty $editaxis $arg1 ] // Move map entity... -alias delta_edit_7 [ entproperty 1 $arg1 ] // Changes the second value on entities... -alias delta_edit_8 [ entproperty 2 $arg1 ] // Changes the third value on entities... -alias delta_edit_9 [ entproperty 3 $arg1 ] // Changes the fourth value on entities... +delta_edit_0 = [ editheight $flrceil $arg1 ] // Move cubes... +delta_edit_1 = [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ] // Change heightfielding... +delta_edit_2 = [ edittex $flrceil $arg1 ] // Change floor/ceiling textures... +delta_edit_3 = [ edittex (+ $flrceil 1) $arg1 ] // Change wall/upper-wall textures... +delta_edit_4 = [ equalize $flrceil ] // Equalize floor/ceiling... +delta_edit_5 = [ entproperty 0 $arg1 ] // Changes the first value on entities... +delta_edit_6 = [ entproperty $editaxis $arg1 ] // Move map entity... +delta_edit_7 = [ entproperty 1 $arg1 ] // Changes the second value on entities... +delta_edit_8 = [ entproperty 2 $arg1 ] // Changes the third value on entities... +delta_edit_9 = [ entproperty 3 $arg1 ] // Changes the fourth value on entities... // HUD toggles -alias toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ] +toggleshowmap = [ showmap 1; onrelease [ showmap 0 ] ] // convenient connecting from the serverbrowser // sbconnect arg list: @@ -222,10 +226,10 @@ alias toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ] // arg6 1: banned, 2: blacklisted 3: both // arg7 "server description" // TODO: interpret a#3,4,5,6 [ft:any1:2010apr04] -alias sbconnect [ echo connecting to $arg7 ; connect $arg1 $arg2 ] +sbconnect = [ echo connecting to $arg7 ; connect $arg1 $arg2 ] // For those players who use IRC too much... -alias join "connect $arg1 $arg2 $arg3" +join = [ connect $arg1 $arg2 $arg3 ] add2alias = [ if (strcmp "" (getalias $arg1)) [ $arg1 = $arg2 @@ -274,9 +278,17 @@ megabind = [ // Simple claim-admin script for one single-server. // Fill in the 3 aliases below, and uncomment the below line to activate. // bind F3 "customclaimadminscript" -alias _CAS_serverip "IP ADDRESS" -alias _CAS_serverpass "PASSWORD" -alias _CAS_servername "SERVER NAME" -alias customclaimadminscript [ if (strcmp (curserver 1) $_CAS_serverip) [ - if (! (currole)) [ setadmin 1 $_CAS_serverpass ] [ setadmin 0; echo "you relinquished admin status" ] ] [ - echo (concat (c 3)Error: (c 5)you're not connected to $_CAS_servername servers) ] ] \ No newline at end of file +_CAS_serverip = "IP ADDRESS" +_CAS_serverpass = "PASSWORD" +_CAS_servername = "SERVER NAME" +customclaimadminscript = [ + if (strcmp (curserver 1) $_CAS_serverip) [ + if (! (currole)) [ + setadmin 1 $_CAS_serverpass + ] [ + setadmin 0; echo "you relinquished admin status" + ] + ] [ + echo (concat (c 3)Error: (c 5)you're not connected to $_CAS_servername servers) + ] +] \ No newline at end of file