|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: 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? |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: 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. |
|
|
|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: Tue Dec 07, 2004 1:17 am |
thanks
|
|
|
|
Toihva Novice
Joined: 20 Nov 2004 Posts: 38
|
Posted: Mon Dec 20, 2004 3:37 pm |
Ok, so how would the @count work?
|
|
|
|
Hibio Beginner
Joined: 19 Mar 2004 Posts: 22
|
Posted: 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 |
|
|
|
|
|