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


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Thu Jan 28, 2010 5:10 pm   

Seems basic but its getting me
 
ok simple - got two variables 1 = stringlist with loads of disease on it 2 = disease/diseases i have now

ok i tried this but only works if i got one ailment

#if (%ismember( @diag002, @healup2test)) {smile}

eg if i get flu a trigger adds flu to diag002
then i get drunk - adds drunk to diag 002

in healup2test i got a list - lest say flu|drunk|wind|cramp|shingles

so I am after if any of the ailments in healup2test are also in diag002 then smile whether thats 1 disease or all

i put smile to test
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jan 28, 2010 7:56 pm   
 
#forall @diag002 {
#if (%ismember(%i,@healup2test)) {smile}
}
_________________
EDIT: I didn't like my old signature
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Fri Jan 29, 2010 4:14 am   
 
Thanks Matt

Ok that works but if there are 3 things from @healuptest2 in @diag002 - i smile x3 times

any way I can only smile once

eg if 1 or more items from @healup2test are in @diag002 - I just smile once if that makes sense
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jan 29, 2010 5:32 am   
 
change "smile" to "smile;#abort 1"
_________________
EDIT: I didn't like my old signature
Reply with quote
stark62
Wanderer


Joined: 04 Apr 2003
Posts: 94
Location: United Kingdom

PostPosted: Fri Jan 29, 2010 5:39 am   
 
Perfect you win the big Very Happy for today
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