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
Surreall
Beginner


Joined: 16 Oct 2004
Posts: 15

PostPosted: Fri Jan 14, 2005 4:37 am   

help with a small set of triggers
 
first of all Id like to thank Zugg for helping me with my problem with Zmud. I am very greatful

secondly this note is about me having some problems ..mainly because I am eliterate when it comes to simply trigger designs.

Im trying to make a simple script that equips a empty bottle ..brews a spell into it equpis another bottle brews another spell and then mixes those potions. ..the basic actions are

hold empty
brew 'spell'
hold empty
brew 'spell'
mix 'spell' 'spell'
brew 'spell'
mix 'spell' mix

for a grand total of 3 spells brewed into one potion ..ill provide an example.


hold empty
You hold an empty bottle in your hand.

brew grudge
You whip up a fantastic concoction!

hold empty
You hold an empty bottle in your hand.

brew grudge
You whip up a fantastic concoction!

mix grudge 2.grudge
You skillfully combine the potions!

hold empty
You hold an empty bottle in your hand.

brew grudge
You whip up a fantastic concoction!

mix grudge mix
You skillfully combine the potions!

ive attempted making a trigger for just this. but it keeps looping on me and of course spaming me off the mud.

if anyone could help me out with htis that would be awesome.

Thanks.

a dedicated Zmudder
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Fri Jan 14, 2005 5:14 am   
 
Ok, couple questions:

1) are any of your spells multiple words?
2) Are there always 3 spells to mix?

Easiest way I could see to do this is with a multistate trigger.
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Aarlot
Adept


Joined: 30 Dec 2003
Posts: 226

PostPosted: Fri Jan 14, 2005 5:28 am   
 
Here's one that should work if my above assumptions are correct:


#CLASS {Potions}
#ALIAS mixpotion {
spell1 = %1
spell2 = %2
spell3 = %3
#T+ mixingtrigger
hold empty
}
#VAR spell1 {}
#VAR spell2 {}
#VAR spell3 {}
#TRIGGER "mixingtrigger" {You hold an empty bottle in your hand.$} {brew @spell1}
#COND {You whip up a fantastic concoction!$} {hold empty}
#COND {You hold an empty bottle in your hand.$} {brew @spell2}
#COND {You whip up a fantastic concoction!$} {#IF (@spell1 = @spell2) {mix @spell1 2.@spell2} {mix @spell1 @spell2}}
#COND {You skillfully combine the potions!$} {hold empty}
#COND {You hold an empty bottle in your hand.$} {brew @spell3}
#COND {You whip up a fantastic concoction!$} {
mix @spell3 mix
#T- mixingtrigger
}
#CLASS 0



To use this, you do mixpotion followed by the names of the three spells. ie: mixpotion grudge grudge grudge

Btw.... if there are no timers in there that you have to wait for, or some other time consideration, you could just put all of this in an alias:

#ALIAS mixpotion {
hold empty
brew %1
hold empty
brew %2
#IF (%1 = %2) {mix %1 2.%2} {mix %1 %2}
hold empty
brew %3
mix %3 mix
}

With again the same syntax. Hope this helps you Smile
_________________
Everyone is entitled to their beliefs - until they die. Then only the truth matters.
Reply with quote
Surreall
Beginner


Joined: 16 Oct 2004
Posts: 15

PostPosted: Fri Jan 14, 2005 5:52 am   
 
that worked perfectly. thanks for the help!
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