|
Kronas Wanderer
Joined: 28 Dec 2003 Posts: 62 Location: Australia
|
Posted: Mon Mar 22, 2004 12:41 pm
variables |
hi , ummm, im missing something with this script
I have a {#trigger you have killed (*w) soldier}{#additem body %1}
Now in the #var @body there are a few bodies
but if I want to offer them say to a shrine and there is like 10 of them.
And they will vary from 1 type to another. Like ghoul|goblin|rat
I start with the command with .... offer rat
pattern {#trigger you offer a rat} {offer @body}
it offers the 1st one then says....what is it you wish ti offer?.
what am I missing #if %item ? or something like that. |
|
|
|
Mordenkeinen Beginner
Joined: 19 Feb 2004 Posts: 10 Location: USA
|
Posted: Mon Mar 22, 2004 2:59 pm |
Why do that, when all you have to do is:
#TRIGGER {you have killed a (%w) *} {#additem body %1}
#ALIAS {offerall} {#FORALL @body {offer %pop(body);#wait 500}
I believe, tho I might be wrong here, but I believe that it is supposed to be (%w) instead of the (*w) that you had posted, plus you didn't need 'soldier' either, wildcard it so that the trigger grabs most of what you kill.
Now, with that, say you kill a ghoul, a goblin, a rat, and a dwarf...
@body will have "ghoul|goblin|rat|dwarf"
You will then type offerall and it will go through the list and offer each corpse that is in it, with a half-second pause between offerings. |
|
|
|
Kronas Wanderer
Joined: 28 Dec 2003 Posts: 62 Location: Australia
|
Posted: Mon Mar 22, 2004 4:36 pm |
nope sorry didn,t work
what it did was offered 1 body then stopped. When I had like 6 of them or so, and didn't go to the next body .
any other Ideas please
what the %pop did was removed the 1st body and that was it
and I still had 7 more then some others , which it didn't see |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Mon Mar 22, 2004 5:30 pm |
You just need to modify your script to make a timer for each element in @body, but only one timer at a time.
1. Setup a timer to offer the first item on the list.
2. Disable the timer when you are out of that particular body.
3. Pop the next item off of the list and setup a new timer.
Something along those lines, though the exact scripting would depend on what makes sense to you. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Mar 22, 2004 8:46 pm |
The alias doesn't have enough }s at the end.
#ALIAS {offerall} {#FORALL @body {offer %pop(body);#wait 500}} |
|
|
|
|
|