Page 1 of 1

Weapon Binds

Posted: Wed Nov 15, 2017 2:13 am
by DeathStar
Here are some highly requested weapon binds.

1) Download and unzip wepscript.cfg.zip
2) Put wepscript.cfg in gamedata
3) Open sauerbraten/autoexec.cfg and on a newline put:

Code: Select all

exec wepscript.cfg
4) open wepscript.cfg to see what the script can do

Credit to Degrave for the original script, modified by DeathStar.

Code: Select all

//Definitions
nogun = [ weapon 0 ]
fi = [ setweapon FI; attack;  ]
sg = [ setweapon SG; attack; ]
cg = [ setweapon CG; attack; ]
rl = [ setweapon RL; attack; ]
gl = [ setweapon GL; attack;  ]
ri = [ setweapon RI; attack;  ]
pi = [ setweapon PI; attack;  ]
s = [ showgui servers ] 
 
//Weapon scripts
fast_shot = [ lastwep = (getweapon); if (= $lastwep $arg1) [] [ weapon $arg1 ]; attack; onrelease [ setweapon $lastwep ] ]
 
//Efficbinds
bind "Q" [cycleweapon 2 3]
bind "F" [cycleweapon 2 4]
bind "E" [fast_shot 5]
bind "2" [fast_shot 1]
bind "M" [dropflag]
bind "G" [thirdperson (= $thirdperson 0); if (= $thirdperson 0) [echo thirdperson OFF] [ echo thirdperson ON] ]//You should change your say command to another key
bind "K" [echo "^f4Commiting suicide efficently..."; kill]