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
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Sun Mar 10, 2002 11:21 am   

okay, I want 2 separate stealth modes
 
i need 2 separate stealth modes, one for my assassin (stealthmode), one for my ranger (ranstealthmode). I have the variables set for each (gost sets stealthmode to 1, goran sets ranstealthmode to 1, off sets them both to 0)

The goal is to type either "goran" or "gost", and enter the appropriate stealthmode, then when I use my keypad for directions, i.e. up, down, east, west, etc, I will "sneak" properly.

the assassin can 'sneak' and 'hide', the ranger can 'camo' and 'qmove'

Here's what i have, using east as a direction:

#IF {@stealthmode = on} {
sneak
hide
east
hide
}
#IF {@ranstealthmode = on} {
camo
qmove
east
camo
} {east}

now, I am able to turn "ranstealthmode" on, and have proper results. If I type "off", I get proper results, as both stealthmodes turn off. However, if I try to enter "stealthmode", I sneak properly, but I end up going each direction twice, i.e. "e" = "hide;sneak;east;hide;east" when stealthmode=1

I've tried nesting {'s, tried sticking "else" in between the 2 modes, and nothing seems to work. It's probably something real simple, but if anyoen could help me out, I'd really appreciate it.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Sun Mar 10, 2002 2:31 pm   
 
You will always get the extra east when
your ranstealthmode is off due to your code:

..snip..
#IF {@ranstealthmode = on} {
camo
qmove
east
camo
} {east}

#IF (Condition) {true} {false}

Remove the part in red and you
should't get:
"hide;sneak;east;hide;east"

but

"hide;sneak;east;hide"

TonDiening
Beta Upgrading to 6.26
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun Mar 10, 2002 3:46 pm   
 
If, what you want is to send just "east" when both are off, then you need to change it to:
#IF {@stealthmode = on} {
sneak
hide
east
hide
} {#IF {@ranstealthmode = on} {
camo
qmove
east
camo
} {east}}

Kjata
Reply with quote
obor
Wanderer


Joined: 20 Dec 2001
Posts: 56
Location: USA

PostPosted: Mon Mar 11, 2002 2:51 am   
 
once again, right on the nose. thanks. =)
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