The trigger doesnt fire until the speedwalk has finished,
so what im looking at is the trigger to fire at a certain
point, it doesnt matter about the speedwalk after that, as
long as the trigger fires when i need it.
Oh. You'll need to Queue the speedwalk, rather than sending it all in one burst.
Since, after you evaluate the speedwalk (such as /w3n2e, or whatever) mushclient sends that to the server, and after that you cant 'take back' those commands.
You see this:
[Output from the server]
[your speedwalk commands, such as...
n
n
w
w
s
s
e
e
e]
[and then the output from the server, starting with the first n]
So youll have to use the Speedwalk Queue for your speedwalks, then they are stored clientside (and sent one at a time), which allows you to stop and do other things.
make an alias (since I assume you're just typing the speedwalk in?) and have it send this:
queue evaluatespeedwalk ("%1"), true
to script. Obviously, %1 is wildcard for the speedwalk.
(That command was straight from the list of functions and the examples that come with them.)
That will queue whatever speedwalk string you want (make sure you have the speedwalk delay and stuff set up, you can change them through scripting too if you so desire).
And then you'll be able to use discardqueue or sendimmediate with that queue.
Check your SpeedWalkDelay. If it's 0, the DiscardQueue won't work at all. If it's higher then 0, but low, the stopping trigger could fire too late, i.e. stopping you five or 10 rooms after the monster. So, try experimenting with SpeedWalkDelay and see if it helps.
<aliases>
<alias
name="SpeedWalkPause"
match="^pause$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>dim speedwalkQueue
dim iCount
dim NewQueue
newQueue = ""
speedwalkQueue = World.GetQueue
world.discardqueue
If Not IsEmpty (speedwalkQueue) Then
for iCount = lbound (speedwalkQueue) to ubound (speedwalkQueue)
newQueue = newQueue & speedwalkQueue(iCount) & VBCrLf
setvariable "QueueTemp", newQueue
next
End If
enablealias "speedwalkresume", 1</send>
</alias>
</aliases>
<aliases>
<alias
name="SpeedWalkPause"
match="^pause$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
ignore_case="y"
sequence="100"
>
<send>dim speedwalkQueue
dim iCount
dim NewQueue
newQueue = ""
speedwalkQueue = World.GetQueue
world.discardqueue
If Not IsEmpty (speedwalkQueue) Then
for iCount = lbound (speedwalkQueue) to ubound (speedwalkQueue)
newQueue = newQueue & speedwalkQueue(iCount) & VBCrLf
setvariable "QueueTemp", newQueue
next
End If
enablealias "speedwalkresume", 1</send>
</alias>
</aliases>
Plus I have a variable called SW_pause_mon which contains a list of names of mons that should cause a speedwalk pause. And as I said earlier, it only works if the SpeedWalkDelay is high enough.
Assassin, you cannot use the "speedwalk prefix" you instead need to use a custom alias (which could very well be remarkably similar to the original speedwalk prefix) to queue commands.
Speedwalking (via /w or whatever) is different than the speedwalk queue.
Mind you, thats an alias to stop, but you can just make a trigger that does the same thing.
And you can change your alias prefix (I use wk) for your actual movement alias.
Set your delay. And yes, you have to take into account latency (since the client just spews off commands every X ms, so if youve already sent two more directions by the time you get the response back to trigger the trigger, youre going to be in the wrong room).
Cheers Guys, Im trying to get round what your alias does
Flannel, basically im trying to catch a mobile at a certain
point, and attack it, their was a recent post about this
so im having a look now, i use an alias 'mo' to do a route
from a-b which is fine, although the trigger to attack it
fires right at the end.