|
rtatum Novice
Joined: 19 Sep 2004 Posts: 45 Location: Houston
|
Posted: Thu Feb 23, 2006 8:26 pm
Lists |
Okay, I want to have a list of mobs, say, like this for example:
#VAR mobName {dog|cat|bird|fish}
so that I can have a trigger set up to do something like:
c summon @mobName.1
So it would summon dog, repeatedly until it received a "You failed." message, at which point the number would increment to two, and then summon cat until "You failed." and then increment, and so forth, until it reached 4, and then it would reset back to one after "You failed." on four... I've figured out that I can't just use another variable, i.e. c summon @mobName.@mobNumber, so what other solutions are there? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Thu Feb 23, 2006 8:47 pm |
#VAR mobName {dog|cat|bird|fish}
#VAR mobCurrent 1
#VAR mobFailed 0
#TRIGGER {^You summon a (%w).} {#VAR mobFailed 0;kill %1;#TEMP summonkilling {^A %%1 is dead!$} {c summon %item(@mobName,@mobCurrent)}
#TRIGGER {^You failed.$} {#ADD mobFailed 1;#ADD mobcurrent 1;#IF (@mobCurrent > %numitems(@mobName)) {#VAR mobCurrent 1};#IF (@mobFailed = %numitems(@mobName)) {#ECHO All dead!} {c summon %item(@mobName,@mobCurrent)}}
This will loop till it has mobFailed at 4 as there is no more animals to load.
Where and when you cast and what the message is where you want to resummon (I used when it dies) is up to yo. |
|
|
|
rtatum Novice
Joined: 19 Sep 2004 Posts: 45 Location: Houston
|
Posted: Thu Feb 23, 2006 11:04 pm |
#VAR mobName {agent|data entry|sniper}
#VAR mobCurrent 1
#VAR mobFailed 0
#TRIGGER {^(*) arrives suddenly.} {#VAR mobFailed 0;#TEMP summonkilling {^(*) has been DEFEATED!$} {c summon %item(@mobName,@mobCurrent)}
#TRIGGER {^You failed.$} {#ADD mobFailed 1;#ADD mobcurrent 1;#IF (@mobCurrent > %numitems(@mobName)) {#VAR mobCurrent 1};#IF (@mobFailed = %numitems(@mobName)) {#ECHO All dead!} {c summon %item(@mobName,@mobCurrent)}}
Here would be the modified setup I used, replacing with the proper messages, and since I don't initiate the kill, I removed that part... I switched from the %w wildcard because some of the mobs have more than one word in their names, i.e. a data entryist, or a section 9 sniper, and so forth |
|
|
|
|
|
|
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
|
|