|
meecham Newbie
Joined: 10 Sep 2004 Posts: 1 Location: PA, USA
|
Posted: 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 |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: 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 |
|
|
|
lindy Newbie
Joined: 11 Sep 2004 Posts: 3
|
Posted: Sat Sep 11, 2004 7:06 am |
[Delete Post, figured out answer to own question]
|
|
|
|
|
|