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


Joined: 25 Aug 2004
Posts: 7

PostPosted: Tue Oct 17, 2006 5:04 pm   

Compare string list with ...?
 
I am looking for a script or best solution for checking what defences have been taken from me.

When I check my defences I will typically see:


You are wearing armour negating 50% of normal blows.
You are protected with Master magical warding.
You are wearing magic enhancers of Master potency.
You have limited extra-sensory perception.
You are using fight-text very brief mode.
You have quaffed a potion of life-giving.
You have the full gift of innersight.
You are using your sixth sense.
Your whereabouts is protected by spiritualism.
You are blessed with ten safe encounters with Death.
You have nine specific defences.

What I want to do is somehow check against a master list which ones are NOT returned. In other words if they arent shown in the list above I want to warn myself that defence has dropped.

I'm not looking for the exact code - more of an idea how to go about it.
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Tue Oct 17, 2006 6:09 pm   
 
%ismember will help you, just make an alias that will set your defenses var to {}, then use #additem defenses blah and by using %ismember(@defenses,@defenselist) it will return zero if the defense isn't present, combine this with forall or loop.
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