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
Kronas
Wanderer


Joined: 28 Dec 2003
Posts: 62
Location: Australia

PostPosted: 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.
Reply with quote
Mordenkeinen
Beginner


Joined: 19 Feb 2004
Posts: 10
Location: USA

PostPosted: 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.
Reply with quote
Kronas
Wanderer


Joined: 28 Dec 2003
Posts: 62
Location: Australia

PostPosted: 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
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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}}
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