I'm not the greatest Lua coder, but I know my way around, but I'd need some help with global variables and usage in aliases.
First example, it's for Aardwolf MUD if that makes a difference:
I usually wield a harp(!) and dual-wield a dirk, but sometimes I use a shield.
I've written this in pseudo code, $foo = a variable, I need the variables to be global as I want to use them in other scripts.
$dualwield = boolean, true if not using a shield
$weaponprimary = harp
$weapondual = dirk
$shield = wreath
edit: made mud commands bold, for easier readingalias portal ($destination):
if ($dualwield) {
dual remove
}
get $portal $container
hold $portal
enter
if ($dualwield) {
dual $weapondual
} else {
hold $shield
}
put $portal $container
end