|
coriandergrass Beginner
Joined: 07 Oct 2010 Posts: 15
|
Posted: Thu Oct 07, 2010 10:58 pm
Why stop then step, Zmud and Cmud send the "step" direction twice? |
I've been using Zmud and Cmud for a while. When I'm trying to use mapper I got a problem:
Say A->B->C there is a monster in room B and you have to kill it to goto C. This is very easy if I'm using PATH instead of mapper:
#SLOW .2e
#TRIG {monster is staring*} {#STOP; kill monster}
#TRIG {monster is dead} {#STEP}
OK, now I've made this three rooms using mapper, and I have configured the mapper so it can actually recognize my MUD, here is what happened:
-------------------------------------------------
monster is dead
>e
room C......
here the exit: west and east
>e
room D.....
here the exit: west and east
-------------------------------------------------
See the problem? it sent 'e' twice!!! I have no idea why it has to sent 'e' twice. |
|
|
|
coriandergrass Beginner
Joined: 07 Oct 2010 Posts: 15
|
Posted: Thu Oct 07, 2010 11:09 pm |
Maybe a little bit more details:
I overided the exit line because the "autoconfigure" doesn't work properly, so here is what I wrote:
#TRIG {here the exit:(%s)$} {#TAG EXIT %1; #CW high,green; #OK}
Note that I have to put #OK into it, otherwise it doesn't move arround on the map. But after I put #OK in it, it works fine.
The prompt is '>' and has been correctly detected by mapper.
I didn't choose "name" and "description" for the room, so only exit information.
-------------------------------------------------------------------------------------------------
I also did some check: I make an alias for onroomenter like this:
#ALIAS onroomenter {#ECHO Now I'm in}
During the test I found that:
arrive room A ---> get echo "Now I'm in"
arrive room B ---> get echo "Now I'm in"
#STOP ---> send cmd "kill monster" to mud
#STEP ---> send cmd "e" to mud, and after the mud sent back the room C exit information, the mapper shows I'm in Room C, BUT no "Now I'm in" message!!!!!!!
?????? ---> send cmd "e"
So on mapper it shows I'm in room C, but onroomenter alias doesn't fire, and the %nextdir is still B->C, not C->D.
I gues this is some time line issue, but I have no idea what can I do to solve this problem. Any suggestions? |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 08, 2010 2:28 pm |
From the documentation on #STOP:
Quote: |
Aborts the current Slow Walk. The previous step is not confirmed and will be repeated when you use #STEP to resume the walking. Typically used in triggers. |
You probably want #PAUSE:
Quote: |
Pauses the current Slow Walk. Typically used in triggers. It confirms the last step, but aborts the slow walk in progress. Continue walking with the #STEP command. |
|
|
|
|
coriandergrass Beginner
Joined: 07 Oct 2010 Posts: 15
|
Posted: Fri Oct 08, 2010 7:47 pm |
Thanks for reply. The situation here is: I'm going from B to C, but failed, because I have to kill the monster. So it should be #STOP instead of #PAUSE.
And I also tried #PAUSE, as you said, the next cmd is from C->D since #PAUSE accuming I've arrived Room C, but I'm still in Room B fighting with the monster. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri Oct 08, 2010 8:20 pm |
It looks to me like your only problem is that your onroomenter alias did not fire. The movement went exactly as it should have. You did #SLOW .2e, it sent one east command, waited for the #OK, then sent the next east command. This is exactly the way that #SLOW should work.
The reason your onroomenter alias did not fire is because it should not be an alias. onRoomEnter is an Event. Events are new with Cmud, did not exist in Zmud. With this new feature, the method for getting things to happen automatically when you enter a room has changed. See the documentation for #EVENT and #RAISEEVENT. Entering a room now automatically raises the onRoomEnter event, creating a room raises the onRoomCreate event, etc. You can also create and #RAISE your own events for whatever purpose you want.
If I am missing some other problem in your post, please let me know. |
|
|
|
coriandergrass Beginner
Joined: 07 Oct 2010 Posts: 15
|
Posted: Sat Oct 16, 2010 7:06 pm |
No, that's not the case.
I check the Zmud history log, and it has this bug:
Aborting a Slow walk no longer causes direction to be sent twice when using #OK
which has been claimed to be fixed since 6.67 22-Jan-04 (BETA version).
But I guess it's not fully fixed. Still some bugs there. |
|
|
|
complex Apprentice
Joined: 12 Apr 2004 Posts: 134 Location: USA
|
Posted: Sun Oct 17, 2010 7:25 am |
I have the same problem, I have had to use #STEP;#PAUSE
|
|
_________________ <Clever text here> |
|
|
|
coriandergrass Beginner
Joined: 07 Oct 2010 Posts: 15
|
Posted: Tue Oct 19, 2010 3:16 am |
Yeah, now what I'm doing is: I use path = %pathexpand(%walk(room)) to get the path, then in my room name and exit trigger, I add these:
#TRIG {(*) -}
#COND {The exits are (*)}
{
#TAG NAME %t1
#TAG EXIT %t2
%item(@path, @pathid) <<<<< Here instead of using #STEP, I just send the direction by myself.
}
Anyway, this can solve my current problem.
Haven't tried this in Cmud v3.x yet, maybe it's fixed. I'll post my test result later. |
|
|
|
|
|