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
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Mon Dec 09, 2002 5:49 am   

merging 2 trigs
 
I've had a kick trigger and a spell trigger seperately, decided to merge the two since the syntax is pretty much the same.
with a trigger of (this works, tis a reference)
Your %1 {@damages} (%2)'s {@bodyparts}* ~[%d~]$

the problems are with the commands to parse:
#IF ( @breath > 15) {

#IF (@hp < @maxhp) {
#VARIABLE breath 0
cast 'cure serious' self
} {
disarm
#VARIABLE breath 0
}
}
#IF (@mana > 100)
#IF (%1 = "blast of lightning") {
cast 'lightning breath'
#ABORT 1
}
#IF (%1 = "blast of acid") {
cast 'acid breath'
#ABORT 1
}
#IF ((%1 = kick) AND (@kick < 15)) {kick}

if i've cast frost breath, acid breath, whatever, it'll return as cast lightning breath instead of the one that triggered the recast. the kicks are fine, no problems there. just cant figure (apart from being the first in the list) why lightning will cast instead of whatever :) this worked fine when the trigger was left as Your blast of %1, i think the problem is in #if (%1 = "blast of something"

Why oh WHY did I have pass door on...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Mon Dec 09, 2002 6:20 am   
 
When problems arise, the first step is to go back to proper syntax:
Your (*) {@damages} (%w)'s {@bodyparts}* ~[%d~]$

When the problem seems to be in matching strings (especially multi-word strings), use delimiters:
#IF ("%1" = "blast of lightning") {cast 'lightning breath';#ABORT 1}
#IF ({%1} = "blast of acid") {cast 'acid breath';#ABORT 1}


LightBulb
Senior Member
Reply with quote
seamer
Magician


Joined: 26 Feb 2001
Posts: 358
Location: Australia

PostPosted: Mon Dec 09, 2002 6:35 am   
 
ok, i was close, only omitting ""'s :P
thankya :)

Why oh WHY did I have pass door on...
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