Page 1 of 1

Web UI: change weapon alias

Posted: 21 Feb 2018 22:08
by bashere
/* alias 'cw' . -- or whatever you want..
Summary:
Used to change weapons while wearing a shield.

I noticed I was spending too much time removing my shield in order to switch to a
right-handed weapon, then un-wielding my left-handed weapon, so I could
wear my shield on the left arm.

This alias will remove shield, unwield args[1], wield args[2], then wear
the shield again.

Usage: cw 'weapon' 'new weapon'
Author: Bashere
*/

// cut n' paste the following under 'javascript' in an alias:

if (args['*'] == ''){
gwc.output.append('Enter \'old weapon\' with \'new weapon\'');
return;
}

gwc.connection.send('remove shield');
gwc.connection.send('unwield ' + args[1]);
gwc.connection.send('wield ' + args[2]);
gwc.connection.send('wear shield');