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


Joined: 20 Nov 2004
Posts: 38

PostPosted: Sat Nov 20, 2004 8:40 pm   

Alias/Variable Trouble
 
Ok, here is what I am trying to do. I play Imperian and want to try and set up a basic variable/alias for use of the ability beastbane. I'm trying to get it so there is a variable list of entities that I can affect when I so choose. The thing is, I want to have a specific order to attack.

Example:

I am fighting and I get a gremlin, a bubonis a green slime and a demonic storm after me. They all hit me at different times and I would like to attack in this order:

Gremlin
Bubonis
Slime
Storm

I can only attack one at a time and want to use one alias which is nice and clean and short.

Something like

#alias BB
beastbane @banelist

Am I being clear enough with what I'm trying to do?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Mon Nov 29, 2004 5:59 pm   
 
#alias bb {#add count 1;beastbane %item(@banelist,@count);#if (@count = %numitems(@banelist)) {count=0}}

Just type bb to attack the first person in the list, then again to attack the second, again for the third, again for the fourth, then again to reattack the first.
Reply with quote
Toihva
Novice


Joined: 20 Nov 2004
Posts: 38

PostPosted: Tue Dec 07, 2004 1:17 am   
 
thanks
Reply with quote
Toihva
Novice


Joined: 20 Nov 2004
Posts: 38

PostPosted: Mon Dec 20, 2004 3:37 pm   
 
Ok, so how would the @count work?
Reply with quote
Hibio
Beginner


Joined: 19 Mar 2004
Posts: 22

PostPosted: Mon Dec 27, 2004 9:42 pm   
 
count is just a number vriable. What happen is you put the monsters into an array of variables, and count tells you the slot in the array.

Gremlin - 1
Bubonis - 2
Slime - 3
Storm - 4

Those are basically the slot numbers in the array of the variable banelist, each time you type bb, count will add 1 to it and it will beastbane the variable in the count slot of the array.

At the end he did a check for count to compare the variable to the size of the array, if it is = then reset to 0, for you to start over again
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