Bukz

Minor scripts.cfg updates...

Mar 26th, 2011
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 10.28 KB | None | 0 0
  1. // CubeScript placed in this file is automatically executed on each startup.
  2.  
  3. // "editent" command:
  4. // This command collects all the attributes of the nearest entity, and then
  5. // prompts that into a handy command that allows you to edit that entities
  6. // attributes easily.
  7. // Note: The editent command can NOT define rotation/yaw inside the command!
  8. // However, the current yaw of the player will define the rotation/yaw when
  9. // using the command!
  10. alias editent [
  11.     if (strcmp (getenttype) "mapmodel")  [
  12.             saycommand "/entset" (getenttype) (getentattr 1) (getentattr 2) (getentattr 3)
  13.         ] [
  14.         if (> (findlist "light sound clip plclip" (getenttype)) -1) [
  15.             saycommand "/entset" (getenttype) (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
  16.         ] [
  17.         saycommand "/entset" (getenttype) (getentattr ((> (findlist "playerstart ctf-flag" (getenttype)) -1)))
  18.     ] ] ]
  19.  
  20. // "convertclips" command:
  21. // This command automatically changes the a "clip" to a "plclip" entity or vice-versa.
  22. alias convertclips [
  23.     if (strcmp (getenttype) "clip") [
  24.         entset plclip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
  25.     ] [
  26.     if (strcmp (getenttype) "plclip") [
  27.         entset clip (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
  28.     ] [
  29.         echo "No changes made. This entity isn't a clip or a plclip."
  30.         echo "Try using the /closestenttype command to find a specific entity."
  31.     ] ] ]
  32.  
  33. // "gibsgore" command:
  34. // This command controls gib Speed/Number/TTL all in one variable.
  35. alias gibsgore [
  36.     if (= $arg1 4) [        // Unrealistic
  37.         gib 1
  38.         gibspeed 40
  39.         gibnum 100
  40.         gibttl 2500     // Turn TTL down to minimise lag...
  41.         alias __gibsgore 4
  42.       ] [
  43.         if (= $arg1 3) [    // Messy
  44.           gib 1
  45.           gibspeed 15
  46.           gibnum 65
  47.           gibttl 10000
  48.           alias __gibsgore 3
  49.         ] [
  50.           if (= $arg1 2) [  // Good
  51.             gib 1
  52.             gibspeed 30
  53.             gibnum 75
  54.             gibttl 5000
  55.             alias __gibsgore 2
  56.           ] [
  57.             if (= $arg1 1) [    // Normal
  58.               gib 1
  59.               gibspeed 30
  60.               gibnum 6
  61.               gibttl 5000
  62.               alias __gibsgore 1
  63.             ] [
  64.               if (= $arg1 0) [  // Off
  65.               gib 0
  66.               alias __gibsgore 0
  67.   ]  ]  ]  ]  ]  ]
  68.  
  69.  
  70. // "fullscreenscript" command:
  71. // This command allows swapping of fullscreen mode to be bound to a key.
  72. alias fullscreenscript [ if $fullscreen [ fullscreen 0 ] [ fullscreen 1 ] ]
  73.  
  74. alias editmapmsg [ saycommand ( concatword [/mapmsg ] ["] (getmapmsg) ["] ) ]
  75.  
  76. alias run [ exec (concatword config/ $arg1 .cfg) ]
  77.  
  78. // Auto-completions
  79. alias mapcomplete [complete $arg1 "packages/maps/official packages/maps" cgz]
  80. mapcommands = "map tdm coop dm lms ts ctf pf lss osok tosok htf vip tktf ktf sendmap"
  81. loop i (listlen $mapcommands) [
  82.     mapcomplete (at $mapcommands $i)
  83. ]
  84.  
  85. complete demo "demos" dmo
  86.  
  87. alias entcomplete [listcomplete $arg1 "light playerstart pistol ammobox grenades health armour akimbo mapmodel ladder ctf-flag sound clip plclip helmet"]
  88. entcomplete newent
  89. entcomplete clearents
  90. entcomplete closestenttype
  91.  
  92. // TODO:FIXME change all occurrence of SPECT(ator) to GHOST
  93. listcomplete team "CLA RVSF CLA-SPECT RVSF-SPECT SPECTATOR"
  94.  
  95. // Game mode descriptions...
  96. gamemodedesc 0 [Team Deathmatch: Find the enemy team and destroy them!]
  97. gamemodedesc 1 [Co-operative edit: Use this mode to edit maps with others online!]
  98. gamemodedesc 2 [Deathmatch: Destroy anything that moves! Everyone for themselves!]
  99. gamemodedesc 3 [Survivor: Everyone for themselves! Once you die, you must wait for the round to restart.]
  100. gamemodedesc 4 [Team Survivor: Find the enemy team, destroy them. Once everyone on the enemy team is gone... repeat!]
  101. gamemodedesc 5 [Capture the Flag: Steal the enemy flag and bring it to your home base. Don't let your own flag get stolen.]
  102. gamemodedesc 6 [Pistol Frenzy: Can you make your enemy eat lead with the most simple of weapons?]
  103. gamemodedesc 7 [Bot Team Deathmatch: Find the enemy team and destroy them!]
  104. gamemodedesc 8 [Bot Deathmatch: It's every man and A.I for themselves! Dismantle those bots!  ]
  105. gamemodedesc 9 [Last Swiss Standing: Knive and bomb the enemy!]
  106. gamemodedesc 10 [One Shot, One Kill: You and your opponents start with 1hp, a sniper rifle, a knife and no pickups. Survive with your sniper, or humiliate with your swiss steel.]
  107. gamemodedesc 11 [Team One Shot, One Kill: Your team starts with 1hp, a sniper rifle, a knife and no pickups. Survive with your sniper, or humiliate with your swiss steel.]
  108. gamemodedesc 12 [Bot One-Shot, One Kill: You and the bots start with 1hp, a sniper rifle, a knife and no pickups. Survive with your sniper, or humiliate with your swiss steel.]
  109. gamemodedesc 13 [Hunt the Flag: Find the enemy flag, frag the flag bearer and collect the flag to score. Protect your own team flag. If the flag bearer collects the enemy flag, they gain a 1 point bonus.]
  110. gamemodedesc 14 [Team Keep the Flag: There is only one flag. Get the flag and keep it. You score one point every 15 seconds. If your teammate has the flag, protect him. If the flag bearer collects the enemy flag, they gain a 1 point bonus.]
  111. 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!]
  112.  
  113. // "resetbinds" command.
  114. alias resetbinds [ exec config/resetbinds.cfg; echo (c 3)All binds have been reset to default values! ]
  115.  
  116. // "changeteam" command.
  117. alias changeteam [ if (< (curteam) 4) [ team (at "RVSF CLA RVSF-SPECT CLA-SPECT" (curteam)) ] ]
  118.  
  119. // "spectate" command
  120. alias spectate [ suicide; sleep 500 [ team SPECTATOR ] ]
  121.  
  122. // Mode/map-setting aliases.
  123. alias votemap [ mode $arg1; map $arg2 ]
  124.  
  125. alias tdm   [ votemap 0 $arg1 ]
  126. alias coop  [ votemap 1 $arg1 ]
  127. alias dm    [ votemap 2 $arg1 ]
  128. alias lms   [ votemap 3 $arg1 ]
  129. alias ts    [ votemap 4 $arg1 ]
  130. alias ctf   [ votemap 5 $arg1 ]
  131. alias pf    [ votemap 6 $arg1 ]
  132. alias lss   [ votemap 9 $arg1 ]
  133. alias osok  [ votemap 10 $arg1 ]
  134. alias tosok [ votemap 11 $arg1 ]
  135. alias htf   [ votemap 13 $arg1 ]
  136. alias vip   [ votemap 13 $arg1 ]
  137. alias tktf  [ votemap 14 $arg1 ]
  138. alias ktf   [ votemap 15 $arg1 ]
  139.  
  140. // Weapon switching/action utilities.
  141. alias primary [ weapon (currentprimary) ]
  142. alias secondary [ weapon 1 ]
  143. alias melee [ weapon 0 ]
  144. alias grenades [ weapon 8 ]
  145.  
  146. alias altaction [
  147.     (concatword altaction_ (curweapon))
  148. ]
  149.  
  150. alias quicknadethrow_old [
  151.     if (> (magcontent 8) 0) [
  152.         if (!= (curweapon) 7) [grenades]
  153.         attack
  154.     ]
  155.     onrelease [ sleep 1 [ if (= (curweapon) 7) [weapon (prevweapon)] ] ]
  156. ]
  157.  
  158. loop i 10 [ alias (concatword altaction_ $i) quicknadethrow ] // Quick nade throw is default
  159. alias altaction_5 [ setscope 1; onrelease [ setscope 0 ] ] // Sniper
  160. alias altaction_7 [ setburst 1; onrelease [ setburst 0 ] ] // Combat pistol
  161. //alias altaction_8 [ attack ] // Grenade // with this comment, you throw the nade and the nade is unselected : Brahma
  162.  
  163. alias oldsens $sensitivity
  164.  
  165. alias zoom [
  166.     if (= $arg1 1) [
  167.         if (=f $sensitivity (scopesens)) [] [
  168.             alias oldsens $sensitivity
  169.             // avoid error if using 0.001 as sensitivity
  170.             newsens = (scopesens)
  171.             if (> (*f 1 1000) $newsens) [
  172.                 if (< 1000 $newsens) [
  173.                 sensitivity (scopesens)
  174.                 ] []
  175.             ] []
  176.             setscope  1
  177.         ]
  178.     ] [
  179.         sensitivity $oldsens
  180.         setscope 0
  181.     ]
  182. ]
  183.  
  184. alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ]
  185. alias delta_spect_0 [ changefollowplayer $arg1 ]
  186.  
  187. // Map editing using the mousewheel...
  188. alias modifier 0
  189. alias domodifier [ alias modifier $arg1; onrelease [ alias modifier 0 ] ]
  190.  
  191. alias universaldelta [
  192.   if $editing [ alias s "edit" ] [
  193.     if (alive) [ alias s "game" ] [ alias s "spect" ]
  194.   ]
  195.   (concatword delta _ $s _ $modifier)
  196. ]
  197. // To utilize the below, you will need to bind "domodifier X"
  198. // (replace X with the number of the delta_edit) to a key. To
  199. // use them, simply hold the key that the "domodifier" is bound
  200. // to and then scroll backwards/forwards while looking at the
  201. // floor/ceiling.
  202. alias delta_edit_0 [ editheight $flrceil $arg1 ]                // Move cubes...
  203. alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ]  // Change heightfielding...
  204. alias delta_edit_2 [ edittex $flrceil $arg1 ]                   // Change floor/ceiling textures...
  205. alias delta_edit_3 [ edittex (+ $flrceil 1) $arg1 ]             // Change wall/upper-wall textures...
  206. alias delta_edit_4 [ equalize $flrceil ]                    // Equalize floor/ceiling...
  207. alias delta_edit_5 [ entproperty 0 $arg1 ]                  // Changes the first value on entities...
  208. alias delta_edit_6 [ entproperty $editaxis $arg1 ]              // Move map entity...
  209. alias delta_edit_7 [ entproperty 1 $arg1 ]                  // Changes the second value on entities...
  210. alias delta_edit_8 [ entproperty 2 $arg1 ]                  // Changes the third value on entities...
  211. alias delta_edit_9 [ entproperty 3 $arg1 ]                  // Changes the fourth value on entities...
  212.  
  213. // HUD toggles
  214. alias toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ]
  215.  
  216. // convenient connecting from the serverbrowser
  217. // sbconnect arg list:
  218. // arg1 IP, arg2 port,
  219. // arg3 1: server full
  220. // arg4 1: password protected
  221. // arg5 1: private mode
  222. // arg6 1: banned, 2: blacklisted 3: both
  223. // arg7 "server description"
  224. // TODO: interpret a#3,4,5,6 [ft:any1:2010apr04]
  225. alias sbconnect [ echo connecting to $arg7 ; connect $arg1 $arg2 ]
  226.  
  227. // For those players who use IRC too much...
  228. alias join "connect $arg1 $arg2 $arg3"
  229. add2alias = [
  230.     if (strcmp "" (getalias $arg1)) [
  231.         $arg1 = $arg2
  232.     ] [
  233.         $arg1 = (concat (concatword (getalias $arg1) ";") $arg2)
  234.     ]
  235. ]
  236.  
  237. addOnLoadOnce = [ add2alias mapstartonce $arg1 ]
  238. addOnLoadAlways = [ add2alias mapstartalways $arg1 ]
  239. addOnQuit = [ add2alias onQuit $arg1 ]
  240.  
  241. run tutorial
  242.  
  243. // Simple claim-admin script for one single-server.
  244. // Fill in the 3 aliases below, and uncomment the below line to activate.
  245. // bind F3 "customclaimadminscript"
  246. alias _CAS_serverip "IP ADDRESS"
  247. alias _CAS_serverpass "PASSWORD"
  248. alias _CAS_servername "SERVER NAME"
  249. alias customclaimadminscript [ if (strcmp (curserver 1) $_CAS_serverip) [
  250.     if (! (currole)) [ setadmin 1 $_CAS_serverpass ] [ setadmin 0; echo "you relinquished admin status" ] ] [
  251.     echo (concat (c 3)Error: (c 5)you're not connected to $_CAS_servername servers) ] ]
Advertisement
Add Comment
Please, Sign In to add comment