I am using the following:
The ***** line was to test to see what was going on. Seems that Mushclient is doing this:
1. You type command and hit enter.
2. Client clears the input window.
3. Client processes the alias and calls the script.
4. Script tries to use setcommand, but fails since it still thinks 'tf somemob' is in there.
5. Client finally gets around to blanking its internal memory of the command.
I am guessing that instead of checking to see if the actually 'input' window is blank it is instead checking a variable that it uses to execute additional aliases/commands? This kind of makes 'setcommand' a bit pointless.
<aliases>
<alias
name="TwiCast"
script="Flagcast"
match="tf *"
enabled="y"
>
</alias>
</aliases>
sub Flagcast (AName, Output, Wildcards)
dim Teststr
Teststr = Trim(Wildcards(1))
world.note getcommand '*****
if Teststr <> "koryo" and Teststr <> "slave" then
if AName = "Flagcast" then
world.setcommand "lig"
world.send "flag " & Teststr
world.send "lightning " & Teststr
else
world.setcommand "twi"
world.send "flag " & Teststr
world.send "twister " & Teststr
end if
else
world.note "Oops, you almost attacked your slave!!!"
end if
end subThe ***** line was to test to see what was going on. Seems that Mushclient is doing this:
1. You type command and hit enter.
2. Client clears the input window.
3. Client processes the alias and calls the script.
4. Script tries to use setcommand, but fails since it still thinks 'tf somemob' is in there.
5. Client finally gets around to blanking its internal memory of the command.
I am guessing that instead of checking to see if the actually 'input' window is blank it is instead checking a variable that it uses to execute additional aliases/commands? This kind of makes 'setcommand' a bit pointless.