I think I know what you are trying to accomplish. I do the same thing often, though without using delays between commands, and here's what I use to do some tasks after the commands are executed...
You have a series of commands you want to send: command1, command2, command3. And you have a series of actions you want to perform after all the commands are done with: action1, action2, action3. This seems like a straightforward enough task - just have an alias call the script, have the script send the commands and then the actions. However, this won't work, since the actions will be performed before the commands have any chance of even leaving your computer. Thus, I do it in a different way - I add a fourth command (command4) into the series of them, that one is usually an emote. Then I add a trigger to match on that emote and call a script which will do: action1, action2, action3. Commands and actions are contained in different script routines, connected through a trigger by the last command in the series.
In your case, it could look like this (ignoring MUD-specific syntax):
<trigger
name="finishSpamCast"
enabled="y"
match="You have emoted: SpamCast finished."
script="FinishCast"
sequence="100"
></trigger>
sub SpamCast(name, output, wilds)
world.setvariable "Sleeping", "no"
world.SpeedWalkDelay = 7000
world.colournote "yellow", "black", "My speedwalk delay has returned to: " & world.SpeedWalkDelay
dim count
for count = 1 to world.getvariable ("SpellCount")
world.queue "c " & world.getvariable("SpellName"), 0
next
world.send world.getvariable ("Sleeper")
world.send "inventory"
world.send "emote SpamCast finished" //this is 'command4'
end sub
sub FinishCast(name, output, wildcs)
world.speedwalkdelay = 0
world.note "Speedwalk 0ms"
end sub
|