git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3210 e016b1c5-ed68-44aa-a2f7-31cac88cffde
136 lines
5.2 KiB
INI
136 lines
5.2 KiB
INI
// CubeScript placed in this file is automatically executed on each startup.
|
|
|
|
// editent command
|
|
alias editent [
|
|
alias enttype (getenttype)
|
|
if (! (strcmp enttype "")) [
|
|
saycommand "/entset" $enttype (getentattr 0) (getentattr 1) (getentattr 2) (getentattr 3)
|
|
]
|
|
]
|
|
|
|
// Auto-completions
|
|
alias mapcomplete [complete $arg1 "packages/maps" cgz]
|
|
|
|
mapcommands = "map tdm coop dm lms ts ctf pf lss osok tosok htf vip tktf ktf"
|
|
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 trigger ladder ctf-flag sound clip"]
|
|
|
|
entcomplete newent
|
|
|
|
// Game mode descriptions...
|
|
gamemodedesc 0 [Team Deathmatch: Find the enemy team and destroy them!]
|
|
gamemodedesc 1 [Co-operative edit: Use this mode to edit maps with others online!]
|
|
gamemodedesc 2 [Deathmatch: Destroy anything that moves! Everyone for themselves!]
|
|
gamemodedesc 3 [Survivor: Everyone for themselves! Once you die, you must wait for the round to restart.]
|
|
gamemodedesc 4 [Team Survivor: Find the enemy team, destory them. Once everyone on the enemy team is gone... repeat!]
|
|
gamemodedesc 5 [Capture the Flag: Steal the enemy flag and bring it to your home base. Don't let your own flag get stolen.]
|
|
gamemodedesc 6 [Pistol Frenzy: Can you make your enemy eat lead with the most simple of weapons?]
|
|
gamemodedesc 7 [Bot Team Deathmatch: Find the enemy team and destroy them!]
|
|
gamemodedesc 8 [Bot Deathmatch: It's every man and A.I for themselves! Dismantle those bots! ]
|
|
gamemodedesc 9 [Last Swiss Standing: Knive and bomb the enemy!]
|
|
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.]
|
|
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.]
|
|
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.]
|
|
gamemodedesc 13 [Hunt the Flag: Find the enemy flag, frag the flag bearer and collect the flag to score. Protect your own team flag.]
|
|
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.]
|
|
gamemodedesc 15 [Keep the Flag: Get the flag and keep it. You score one point every 15 seconds. Everybody is will want to destroy you!]
|
|
|
|
// "resetbinds" command.
|
|
alias resetbinds [ exec config/resetbinds.cfg; echo "3All binds have been reset to default values!" ]
|
|
|
|
// "changeteam" command.
|
|
alias changeteam [ if (= (curteam) 1) [ team CLA; echo "You are now on team 3CLA" ] [ team RVSF; echo "You are now on team 1RVSF" ] ]
|
|
|
|
// Mode/map-setting aliases.
|
|
|
|
alias 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 ]
|
|
|
|
// Weapon switching/action utilities.
|
|
|
|
alias primary [ weapon (currentprimary) ]
|
|
alias secondary [ weapon 1 ]
|
|
alias melee [ weapon 0 ]
|
|
alias grenades [ weapon 6 ]
|
|
|
|
alias altaction [
|
|
(concatword altaction_ (curweapon))
|
|
]
|
|
|
|
alias quicknadethrow [
|
|
if (> (magcontent 6) 0) [
|
|
if (!= (curweapon) 6) [grenades]
|
|
attack
|
|
]
|
|
onrelease [ sleep 1 [ if (= (curweapon) 6) [weapon (prevweapon)] ] ]
|
|
]
|
|
|
|
loop i 8 [ alias (concatword altaction_ $i) quicknadethrow ] // quick nade throw is default
|
|
alias altaction_4 [ zoom 1; onrelease [ zoom 0 ] ] // sniper
|
|
alias altaction_6 [ attack ] // grenade
|
|
|
|
alias oldsens $sensitivity
|
|
|
|
alias zoom [
|
|
if (= $arg1 1) [
|
|
if (= $sensitivity $scopesens) [] [
|
|
alias oldsens $sensitivity
|
|
sensitivity (scopesens)
|
|
setscope 1
|
|
]
|
|
] [
|
|
sensitivity $oldsens
|
|
setscope 0
|
|
]
|
|
]
|
|
|
|
//--------------------- editing -------------------------------
|
|
|
|
// The below is for editing using your mouse wheel. See the page 1 of the
|
|
// map editing guide for details on what's used for what.
|
|
|
|
alias modifier 0
|
|
alias domodifier [ alias modifier $arg1; onrelease [ alias modifier 0 ] ]
|
|
|
|
alias universaldelta [
|
|
if $editing [ alias s "edit" ] [
|
|
if (alive) [ alias s "game" ] [ alias s "spect" ]
|
|
]
|
|
(concatword delta _ $s _ $modifier)
|
|
]
|
|
|
|
alias delta_edit_0 [ editheight $flrceil $arg1 ]
|
|
alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ]
|
|
alias delta_edit_2 [ edittex $flrceil $arg1 ]
|
|
alias delta_edit_3 [ edittex (+ $flrceil 1) $arg1 ]
|
|
alias delta_edit_4 [ equalize $flrceil ]
|
|
alias delta_edit_5 [ entproperty 0 $arg1 ]
|
|
// End of using your mouse to edit
|
|
// ------------------------------
|
|
|
|
alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ]
|
|
alias delta_spect_0 [ changefollowplayer $arg1 ]
|
|
|
|
// HUD toggles
|
|
alias toggleshowmap [ showmap 1; onrelease [ showmap 0 ] ]
|
|
|