I need help to speedwalk.

by Unknown

Back to Mechanic's Corner.

Unknown2012-08-11 14:47:07
Hi
When I am leading pilgrims to Avechna Peak I speedwalk from Ackleberry Triple Junction to the Peak, with a stop in the Reserve, so I made an alias that doesn't work as I wanted.
The alias is this:
send "path to reserve"send "path start"tempTimer(5, send ("path start")]])


I have to use it twice since the tempTimer line is useless. Of course, if I adjust the number of the timer eventually I will make it work but I think that there would be a better and efficient way to accomplish what I want.

I know I have to replace that line with something like this:If "You speedwalk in to an old cave."then send ("path to peak"send "path start"endif

Of course this is not the right grammar for a Mudlet Alias and that's what I am asking for, if someone can help me with the right way to put that.

And, since I also want to go down from the Peak to the Junction, it would be nice to join the "up" and the "down" aliases in one alias.
My guess is that the logic would be (the noncode parts in italics):

send "path to reserve"send "path start"If "You speedwalk in to an old cave." then if x=0then send "path to peak"send "path start"endifelse send ("path find 294")send ("path start")

Of course I also need a trigger or something that asigns values to the variable x (1 if you reached the Peak, 0 when you reach the Junction)


Can somebody help me with this?
Thanks
Unknown2012-08-11 17:21:29
You could do this very simply using the Mudlet mapper rather than the in game one then just use the mmapper arrived event and work from there.


function pathMe(room1, room2)
_G.room2 = room2
mmp.gotoRoom(room1)
end


Second function: (Make sure to add the "mmapper arrived" event handler to this function.)


function secondRoom()
mmp.gotoRoom(room2)
end


Simple as that!
Unknown2012-08-11 23:45:08
Thanks but I know almost nothing about coding so I don't really understand your answer.

Please, can you explain it again but step-by-step, as if I were a moron?

I really would appretiate that, don't be afraid of patronizing me
Calixa2012-08-12 11:09:35
First of, go to the rooms you want to use as the nodes of your route, and type 'rl' while in them. Note down the room numbers. Also for the room at the reserve, note down the room name.

Now, make an alias that will start your route. Give it a name, and put in the code box


mmp.gotoRoom(number)
enableTrigger("peak")


where you replace the word number by the actual number of the room at the reserve you want to halt at. This alias will take you from your starting point to the reserve.

Now make a trigger, called peak, and put the room name as a pattern for that trigger. To keep it simple use a begin of line substring trigger. Put this into the code box, and replace number2 by the number of the room at the peak you want to end up in.


mmp.gotoRoom(number2)
disableTrigger("peak")


What happens is basically when you type your alias, you will start walking, and the trigger called peak will fire when you enter the room, which sets you off on the second part of your journey. Once that trigger has fired it disables itself again, so if you ever manually walk into that room, the trigger doesn't send you up to the peak.

Hope that is clear and what you wanted :)
Unknown2012-08-12 13:38:47
Thanks.
It worked!
It took me a little bit to realize that I needed to install the IRE mapping script in order to make it work, though.

Thanks a lot