Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
piniocircuit
Newbie


Joined: 27 May 2006
Posts: 4

PostPosted: Sat May 27, 2006 8:29 am   

%nextdir problems
 
Hello

I'm running zMud 7.21

I use the map in fastwalk as my mud doesn't handle the other walk modes well at all.

I have a number of mobs that block the exits from a room unless they're dead, so I use the 'pause when speedwalking' option and a walkscript to check if they're there and kill them. This seems to work fine until I use the %nextdir.

For example
I have a room with exits 'e' and 'w'. The mob blocks you if you try to move 'w' but not if you come from the other way and go 'e'.

For testing I have this simple script:
Code:
#if ( %nextdir = "w" ) { say stop and kill} { say carry on }


When I speedwalk through the room, it pauses but does nothing, so I simplify it to:
Code:
#if ( %nextdir = "w" ) { say stop and kill }


Still nothing. So I add in
Code:
say %nextdir
#if ( %nextdir = "w") { say stop and kill }

and this walks to the room and preforms the 'say' which send "say w". So why is the #IF statement not kicking in?

TIA

Circuit






Code:
Reply with quote
Petrograd
Novice


Joined: 08 Dec 2005
Posts: 35
Location: Sweden

PostPosted: Sat May 27, 2006 9:26 am   
 
I copied your code, changed the dir from west to south and tested it... and it worked without any changes o.O However, I don't actually manage to say the direction, 'say %nextdir' comes up as say only.
Reply with quote
piniocircuit
Newbie


Joined: 27 May 2006
Posts: 4

PostPosted: Sat May 27, 2006 9:30 am   
 
Petrograd wrote:
However, I don't actually manage to say the direction, 'say %nextdir' comes up as say only.


Were you #WALKing through the room?
Good that it worked for you, thought I was going mad, at least now I'm only slightly mad.
Reply with quote
Petrograd
Novice


Joined: 08 Dec 2005
Posts: 35
Location: Sweden

PostPosted: Sat May 27, 2006 9:33 am   
 
I was speedwalking in slow mode. Where did you place this code? I put it under Room script for it to work.
Reply with quote
Petrograd
Novice


Joined: 08 Dec 2005
Posts: 35
Location: Sweden

PostPosted: Sat May 27, 2006 9:35 am   
 
Tested putting it under walkscript, then it fired after I put in the dir for the room, but before I reached it.
Reply with quote
piniocircuit
Newbie


Joined: 27 May 2006
Posts: 4

PostPosted: Sat May 27, 2006 2:46 pm   
 
Well it's still acting very oddly for me. Very very oddly. If retyped it all in, tested more and got nothing, copied the code back from the top of here (which was exactly the same as what I'd typed) and got the following results

Code:

say %nextdir
#if ( %nextdir = "w" ) { say stop and kill} { say carry on }


results:
#walk testroom
A room (w and e)
> w
say w
say carry on
Test room (w and e)
> You say: w
> You say: carry on

Where surely it should have said 'stop and kill' rather than 'carry on'
boggle
Reply with quote
Petrograd
Novice


Joined: 08 Dec 2005
Posts: 35
Location: Sweden

PostPosted: Sat May 27, 2006 10:24 pm   
 
Oh, again, where did you place this code? Room script, walk script or just a trigger?
Reply with quote
piniocircuit
Newbie


Joined: 27 May 2006
Posts: 4

PostPosted: Mon May 29, 2006 8:18 am   
 
The code is in the walkscript.

thanks

circuit
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net