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
porcelina
Beginner


Joined: 20 Jun 2004
Posts: 20
Location: USA

PostPosted: Sat Feb 05, 2005 5:42 pm   

stringlist help
 
I know there is a simple answer to this query but Im not able to find it on the forums in the context that Im looking for.

What I want to do is add a few cures to a stringlist called @cures, preaty simple I know. So I made the coresponding triggers to the text and put in #additem cures cureailiasname for the value.

This added the cures I wanted to @cures now to extract them I made an alias called cme "cure me."
Value = @cures
So of course all this did was put all my cure aliases in one long list seperated by piping ie: happenstance|conjecture|verbatum| exc...

Now in the alias I know I need to put in something like @cure,1 then #deleteitem @cure,1 Or some such.

Thing is this is my real query, lets say I have 5 cures on the stringlist how do I go through all the cures then make the alias stop? How do I notify the mud that I have 5 cures on a string or maybe only 2. I want to cure them all at once or resetup defenses based on this info then after there deleted make it stop and maybe say all @cures empty?

Hopefully this makes sense to someone out there I know Im on the right track and its probley preaty simple to a guru!

Thanks for any and all replies

Porcelina
_________________
carol
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Sat Feb 05, 2005 7:42 pm   
 
#ALIAS cureall {#FORALL @cures {cast %i};#VAR cures {}}

This is a simple alias that will go through all the things in @cures, doing each one, then clear @cures. You can change the "cast %i" to whatever you need to do each cure. The %i is the variable calling the current item on the list.
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
porcelina
Beginner


Joined: 20 Jun 2004
Posts: 20
Location: USA

PostPosted: Sat Feb 05, 2005 10:09 pm   
 
Thanks thats what I was lookin for, much appreciated!

Porcelina
_________________
carol
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