Bukz

Concept scripts.cfg update...

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