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-confused
Novice


Joined: 14 Jan 2004
Posts: 31

PostPosted: Fri Mar 05, 2004 10:04 am   

stringlist in an ailias
 
I need the ailias to do something like this.
get poison1 from pouch
rub poison1 on dagger
throw dagger at target
then on to the next poison in my list
get poison2 from pouch
rub poison2 on dagger
throw dagger at target
ect.
When it gets to the end of the list I just want it to start over.
I thought I could handle this one but after almost yanking all my hair out I decided to ask for some help *sigh*.
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Fri Mar 05, 2004 12:55 pm   
 
Here is one way, it should get you started

#VAR PoisonList {Poison1|Poison2|Poison3}
#VAR PoisonPosition {1}
#alias Daggers {get %item(@PoisonList,@PoisonPosition) from pouch; rub %item(@PoisonList,@PoisonPosition) on dagger;throw dagger at target}
#TRIGGER {You throw a dagger at target} {%IF (@PoisonPosition>=%numitems(PoisonList)) {#VAR PoisonPosition 1} {#ADD PoisonPosition 1}}
Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Sun Mar 07, 2004 4:32 pm   
 
Here's just another solution (the previous post would work too)

First, define @NPoison as the starting point:

Code:
#VAR NPoison {1}


Then, This alias should work just fine.

Code:

#ALAIS PoisonDagger {
  #VAR PoisonSpot {%concat(poison,@NPoison)};
  get @PoisonSpot from pouch;
  rub @PoisonSpot on dagger;
  throw dagger at target;
  #ADD NPoison {1}
  }


The previous post would require either a list with lots of poison entries, or (as it is written) will only go up to the third poison. The alias I have here will continue to move to the next poison till you redefine @NPoison
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