|
ebolisay Newbie
Joined: 17 Dec 2002 Posts: 7 Location: USA
|
Posted: Mon Aug 25, 2003 3:44 pm
Summoning Script |
I need some help with a summoning script.
Basically what I want to do is summon monsters and kill.
For example.
In the world there are 10 foxes, 2 rabbits, and 5 mice.
Right now I just summon all the foxes then I work on rabbits, then the mice.
summon %item( @monsters, ((%ismember( @monster, @monsters)%numitems( @monsters)) + 1))
Then I have the arrays with monster as the current thing to be summoned and the monsters array has the list of mobs to be summoned.
You receive your share of -- this is the trig I use to resummon. So when I see this it summons the next thing on the list.
Thanks for all your help.[?] |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Aug 26, 2003 6:08 pm |
The simplest method would be to summon/kill foxes until you get an error message that there aren't any foxes to summon, then do the same for rabbits, and then for mice, and then back to foxes. That appears to be the purpose of your formula and it looks sound. The only difficulty I see is that it doesn't have anything to stop the script when you run out of monsters completely.
What, exactly, did you want help with? |
|
|
|
ebolisay Newbie
Joined: 17 Dec 2002 Posts: 7 Location: USA
|
Posted: Wed Sep 24, 2003 7:39 pm |
Well, I sorta made a script to summon stuff.
Basically it's attached to a variable with a list of monsters.
creatures (variable)
then under that I have 100 monsters down the line
What I need help with is. I'm thinking I should be using the #loo command.
For example instead of putting in summon 20.fox, summon 19.fox, ect... I could use the #loo command to summon 20 foxes. However I'm stumped how to set the max number of foxes in my variable. |
|
|
|
ebolisay Newbie
Joined: 17 Dec 2002 Posts: 7 Location: USA
|
Posted: Wed Sep 24, 2003 8:29 pm |
I should also say that I am not concerned with shutting off the script because the monsters return after a few minutes. So an endless loop of summoning is okay with me.
A clearer view of the problem:
5 foxes, 2 monkeys, 3 horses
Variable Creatures
fox|monkey|horse
Could just have
5.fox|4.fox|3.fox|2.fox|1.fox|2.monkey|1.monkey|3.horse|2.horse|1.horse or #loo 5,1 {summon %{i}creatures
The script summons the next monster from the list upon death of the monster. If I use the #loo command it sends however many instuctions all at one time.
BTW I have over 100 monsters in the list. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Sep 24, 2003 10:28 pm |
If you want to summon all the foxes at once, you just need to include both the name and the max number in the list. This does mean that if there's only one phoenix, you still have to use 1.phoenix.
#VAR monsters {5.fox|2.monkey|3.horse}
#VAR next 1 1
#AL monsum {#VAR number {%word( %item( @monsters, @next), 1, ".")};#VAR monster {%word( %item( @monsters, @next), 2, ".")};#IF (@next < %numitems( @monsters)) {#ADD next 1} {#VAR next 1};#LOOP @number,1 {summon %i.@monster}} |
|
|
|
ebolisay Newbie
Joined: 17 Dec 2002 Posts: 7 Location: USA
|
Posted: Thu Sep 25, 2003 3:02 pm |
Yeah this is great, but I need it to wait for the death message or a not found message to summon the next number of the mob.
IE. summon 5.fox, wait for death or not found message, then summon 4.fox wait for death or not found message, summon 3.fox ect...
This example summons all of em at once. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Sep 25, 2003 5:19 pm |
Okay, so you only want to summon one fox at a time. In that case, you should probably do what I said in the first place. "The simplest method would be to summon/kill foxes until you get an error message that there aren't any foxes to summon." No numbers needed.
#VAR monsters {fox|monkey|horse}
#VAR next 1 1
#TR {You receive your share of} {summon %item( @monsters, @next)}
#TR {not found} {#IF (@next < %numitems( @monsters) {#ADD next 1} {#VAR next 1};summon %item( @monsters, @next)} |
|
|
|
|
|