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
dazed-n-confused999
Wanderer


Joined: 03 Aug 2004
Posts: 79

PostPosted: Sun Oct 23, 2005 2:01 pm   

excluding items from lists automaticaly
 
How would I go about not selecting a certain item from a group of common items. In my inventory I have the following items:
glass1234
glass5432
glass9884
glass2345
Now lets say glass1234 is special, and I dont want to touch it except in certian situations. What I want to know is how to get zmud to exclude a pre-defined item from a list. Im going to play with this for awhile, but if anyone out there feels generous and has the answer feel free to post it.
Very Happy
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sun Oct 23, 2005 4:03 pm   
 
Build an exclusion list then use %ismember within an #IF to determine if the item is in your excluded list. I hope that is enough to help, but without more specifics I can't be much more specific.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
dazed-n-confused999
Wanderer


Joined: 03 Aug 2004
Posts: 79

PostPosted: Mon Oct 24, 2005 1:44 am   
 
Ok its worse than I had hoped. I seem to be having trouble getting each item into a list. When I check inventory, I get:
glass1234
glass5432
glass9876
glass5678

Ive been trying
#trigger ("glass(%d)") {#additem glasslist %1}

However, this seems to be terribly wrong. I think if I could get the list to clear and rebuild each time i check inventory, I would have little problem excluding my special item. I think. Rolling Eyes
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: Mon Oct 24, 2005 2:49 am   
 
Assuming you just want the list to contain the 4 digit number, and not the 'glass' part.

#TRIGGER {^glass(%d)} {#IF (%1 = "1234") {} {#ADDITEM GlassList %1}}
_________________

No-one ever gets flamed for posting too much information. Conform to the PPP (Preferred Posting Protocol) and give as much information as possible, including MUD output where needed.
Reply with quote
Theragil
Apprentice


Joined: 13 Feb 2004
Posts: 157
Location: USA

PostPosted: Mon Oct 24, 2005 12:45 pm   
 
And don't forget to #var GlassList "" beforehand to clear it.
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