Weapon scripts

From QWiki
Revision as of 16:00, 29 November 2013 by *>Jissse
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Weapon scripts are a very common phenomenon in Quakeworld today as people have a bit (but only a bit) more liberal approach to things than 10 years ago. Some people still say weapon scripts are a cheat and refuse to use them, while most of the players today actually use them.

What are weapon scripts then and what are they good for? The basic idea with these scripts is that you bind several weapon commands (and maybe an attack command) to one single button to gain certain advantages. One advantage is that you obviously will save a button if you bind Super Nailgun and the regular Nailgun to the same key for example.


Consider the script below:

alias +rl "impulse 7; +attack"

alias -rl "-attack; impulse 2"

bind mouse1 "+rl"


This script consists of two aliases: +rl and -rl. When executing +rl, the client will automatically execute the command impulse 7 (switch to Rocket Launcher) and then +attack (FIRE!). The -rl command executes -attack (stop firing) and impulse 2 (change to Shotgun). We decide to bind this script to mouse1 and this means that when we press and hold mouse1, the +rl alias will be executed and when we release mouse1, the -rl command will be executed. This whole script is what many refer to as a "boomstick script". The advantages with a boomstick script is that you don't have to bother changing weapon when you have a good one but are low on health. The prime use of weapon scripts are in 4on4 games. The reason for this is that when you die in Quakeworld you leave a pack with the last used weapon in it. If you die when you had your Rocket Launcher selected, the enemy will get the pack and thus the Rocket Launcher in it. This is unacceptable in 4on4 but could very well happen if you are low on health, carrying around your Rocket Launcher.

The aforementioned script could of course be expanded upon. With a little more knowledge about the impulse command we realize that we can set priorities on what weapon we want to select. Let's say that we want to fire a grenade if we don't have the Rocket Launcher. Also, if we don't have the Grenade Launcher either, let's shred people to pieces with the Super Nailgun!


alias +weapons "impulse 7 6 5 2; +attack"

alias -weapons "-attack; impulse 2;"

bind mouse1 "+weapons"


The major difference here is the use of the impulse command in our first alias. In Quakeworld, the basic weapon commands are Impulse 1-7 (1 = axe, 2 = shotgun, 3 = super shotgun, 4 = nailgun, 5 = super nailgun, 6 = grenade launcher, 7 = rocket launcher, 8 = lightning gun) and those are the numbers used in the alias. We first try to select RL, then GL, then SNG and last SG and fire.

Example set of weapon scripts

The most common approach is to make one such script for every weapon class you can come to think of. A set of such scripts can be ripped from below:

alias +rl "impulse 7 5 3 2 4; +attack"

alias -rl "-attack; impulse 2"

alias +sng "impulse 5 4 3 2; +attack";

alias -sng "-attack; impulse 2";

alias +ssg "impulse 3 2 5 4; +attack";

alias -ssg "-attack; impulse 2;

alias +lg "impulse 8 3 5 2 4;+attack"

alias -lg "-attack; impulse 2"

alias +gl "impulse 6 5 3 2 4;+attack"

alias -gl "-attack; impulse 2"

Note that you could set all the release commands (-rl for example) to use impulse 1 instead, which is the axe, but this might give opponents an advantage. If they see you switch to axe after an RL fight, they will know that you left a pack as axe is the only weapon that has a different model!

External