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
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Mon Jan 19, 2004 8:25 pm   

Something Obvious I am overlooking I am sure
 
Need some help on figuring out why this will not work.


The mindstate variable contains mind lock|dazed|bewildered
The mind variable is capturing and contains mind lock

Now I am sure you can figure out that if the mind variable is a member of the mindstate variable I want to shut off the class and put my juggling items way. But for some reason it is continuing to juggle the item. Everything is capturing correctly and the pattern is matching all the variables are capturing into their correct areas.


#ALARM +@RTWAIT {#IF (%ismember( @mind, @mindstate)) {
#t- juggling
put @jugglies in @container
} {juggle @jugglies}}

Thanks for the help ahead of time
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Jan 19, 2004 10:43 pm   
 
That snippet you showed should work perfectly. If it doesn't work, it would have to be that @mind isn't being set to a member of @mindstate.
Reply with quote
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Tue Jan 20, 2004 1:01 am   
 
quote:
Originally posted by Danlo

That snippet you showed should work perfectly. If it doesn't work, it would have to be that @mind isn't being set to a member of @mindstate.



I know which is the part that is boggling my mind.

This is the pattern I am Matching for the perception part of it.

Perception: 92 37.14% muddled

This is matching with my pattern perfectly I triple checked to make sure @mind was updating with the pattern match there.

Where Muddled is the mindstate and the three I am looking are in this variable

mindstate="mind lock|dazed|bewildered"

#CLASS {Juggling}
#TRIGGER {You toss*} {}
#COND {Roundtime~:%s(%d)%sseconds.} {#var rtwait %1;exp perception}
#COND {Perception~:%s(%d)%s(%d).(%d~%)%s(*)} {#var mind "%4";#ALARM +@RTWAIT {#IF %ismember( @mind, @mindstate) {#ECHO debug stop juggle;#t- juggling;put @jugglies in @container;} {#ECHO DEBUG keep juggle;juggle @jugglies}}
#CLASS 0
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Jan 20, 2004 3:15 am   
 
"muddled" is not a member of "mind lock|dazed|bewildered". That's why you continue to juggle. If you don't want to juggle while you are muddled, you should add "muddled" to the list.

"Mind lock", "Dazed", and "Bewildered" are also not members of the list, since the entries in the list are all lower-case. If case-matching is the cause of your problem, you can solve it by using the %lower function.
Reply with quote
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Wed Jan 21, 2004 2:19 am   
 
quote:
Originally posted by LightBulb

"muddled" is not a member of "mind lock|dazed|bewildered". That's why you continue to juggle. If you don't want to juggle while you are muddled, you should add "muddled" to the list.

"Mind lock", "Dazed", and "Bewildered" are also not members of the list, since the entries in the list are all lower-case. If case-matching is the cause of your problem, you can solve it by using the %lower function.


Yeah I know muddled isn't part of list Smile I was just showing the pattern I was matching, even if it goes to mind lock dazed or bewildered it still keeps juggling, I will give some mud output so you can see
Reply with quote
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Wed Jan 21, 2004 2:30 am   
 
Here is my Trigger set.

#CLASS {Juggling}
#TRIGGER {You toss*} {} "Juggling"
#COND {Roundtime~:%s(%d)%sseconds.} {#var rtwait %1;exp perception}
#COND {Perception~:%s(%d)%s(%d).(%d~%)%s(*)} {#var mind "%4";#ALARM +@RTWAIT {#IF %ismember( @mind, @mindstate) {#ECHO debug stop juggle;#t- juggling;put @jugglies in @container} {#ECHO DEBUG keep juggle;juggle @jugglies}}}
#CLASS 0

Now for some sample mud output.

You toss four of your guppy and shark beanbags into the air and start juggling them. You get a good crossover pattern going, and keep them all flying for a bit. Then you switch in mid-toss to a two and two pattern, rather surprised at how well the transition went. You keep going for a while longer, then catch each pair as it comes down and stop.
Roundtime: 12 seconds.
exp perception
>
Circle: 40

SKILL: Rank/Percent towards next rank/Amount learning
Perception: 92 55.15% perplexed

Time Development Points: 55 Favors: 2 Deaths: 49
Overall state of mind: clear
EXP HELP for more information

> DEBUG keep juggle
juggle beanbags
You toss four of your guppy and shark beanbags into the air and start juggling them. You get a good crossover pattern going, and keep them all flying for a bit. Then you feel yourself slipping, and manage to catch them all as they come down, not quite dropping any.
Roundtime: 12 seconds.


----------------------------------------------------------

Okay this is working as intended..

now for where it goes silly and doesnt work.

----------------------------------------------------------

You toss four of your guppy and shark beanbags into the air and start juggling them. You get a good crossover pattern going, and keep them all flying for a bit. Then you feel yourself slipping, and manage to catch them all as they come down, not quite dropping any.
Roundtime: 12 seconds.
exp perception
>
Circle: 40

SKILL: Rank/Percent towards next rank/Amount learning
Perception: 92 55.85% bewildered

Time Development Points: 55 Favors: 2 Deaths: 49
Overall state of mind: clear
EXP HELP for more information

> DEBUG keep juggle
juggle beanbags
You toss five of your guppy and shark beanbags into the air and start juggling them. You begin with a simple, smooth crossover pattern, and then start tossing every third one over your shoulder and catching it behind your back. You keep that going as long as you think you can, then bring everything to a graceful stop.
Roundtime: 12 seconds.


#VAR mind confirms that @mind is bewildered and @mindstate is
mind lock|dazed|bewildered

Now when I type

#IF (%ismember(@mind,@mindstate) {#SAY YEP} {#SAY NOPE}

in the command line with mind=mind lock it still says nope. Which tells me that something is wrong with %ismember. I am using the newest Beta of zMUD for this.

UPDATE now I canged @mind to dazed and the command above worked correctly, I changed it back to mind lock and it works correctly, I change it to something not in @mindlist and it works correctly ARGH! losing my mind! But my trigger set still does not want to cooperate.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Jan 21, 2004 2:56 am   
 
Snip...missing paranthesis #IF (%ismember(@mind,@mindstate)) {#SAY YEP} {#SAY NOPE}...guess you fixed this one when retrying it.
Snip...no paranthesis surrounding condition often works, but why chance slang #IF (%ismember( @mind, @mindstate)).
Reply with quote
Reddytedy
Apprentice


Joined: 13 Oct 2000
Posts: 114
Location: USA

PostPosted: Wed Jan 21, 2004 3:07 am   
 
quote:
Originally posted by Vijilante

Snip...missing paranthesis #IF (%ismember(@mind,@mindstate)) {#SAY YEP} {#SAY NOPE}...guess you fixed this one when retrying it.
Snip...no paranthesis surrounding condition often works, but why chance slang #IF (%ismember( @mind, @mindstate)).



Doh! Told ya it was something I was overlooking [:o)]
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