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
meecham
Newbie


Joined: 10 Sep 2004
Posts: 1
Location: PA, USA

PostPosted: Fri Sep 10, 2004 2:04 am   

simple if statement question
 
I need help with what I'm sure is a very simple if statement, I just can't seem to find the right syntax. Its used in a trigger for "You cannot move in that direction." When that comes up, I want to change a variable called 'dir' from east to west and vice versa. I would also like to have a counter keeping track of how many times thats done so I'll know when I reach the end of the rectangular area I'm botting in and can go back to the beginning. So I think I also need to check if variable 'count' > 7 or = 8, or whatever...Any help is appreciated :)

Thanx,
Robb
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Sep 10, 2004 3:56 pm   
 
#TR {You cannot move in that direction} {#IF (@dir = "east") {#VAR dir west} {#VAR dir east};#ADD count 1}
_________________
LightBulb
Senior member

Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Sep 10, 2004 10:40 pm   
 
I would suggest using %reversedir to solve this problem. Off the top of my head the syntax should be:
dir=%reversedir(@dir,1)
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
lindy
Newbie


Joined: 11 Sep 2004
Posts: 3

PostPosted: Sat Sep 11, 2004 7:06 am   
 
[Delete Post, figured out answer to own question]
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