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
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Sat Apr 01, 2006 11:56 pm   

Can't figure out my error
 
This is the text I'm working off at the start

970h, 0m ef-
Done.
There is a stabbing pain in your chest and you fall to the floor gasping in
pain.
721h, 0m ef-


this is my trigger


#TRIGGER {(%d)h, (%d)m} {#va healthvalue %1;#va manavalue %2;#IF ((@healthvalue < @basehealth-100) and (@PotionDelay = 0)) {PotionHeal} "" {prompt}


As such, if my health drops by more than 100, and if I'm not under a potion delay (can only sip so often) then this alias should fire


#ALIAS PotionHeal {sip %item( @bottlehealth, 1);#va PotionDelay 1}


With that alias I should sip my selected potion and the potion delay should change to false.

Now, if I exit Zmud and re-enter it works fine the first time. But after that it sips the potion two times every time??

I've searched and searched there are no other commands called PotionHeal. The only thing I can think of the the {prompt} part of the trigger. I just now saw that after I exported it to text. If thats it where do I change it?

This is what it looks like not working. Inside the ** are my notes and not from the mud.


------------------------------------------------------------------------------

970h, 0m ef- eat kly

Done.
There is a stabbing pain in your chest and you fall to the floor gasping in
pain.

943h, 0m ef- *here I ate first poison, damage less than 100, did not sip, that works*

*my spaceing for easier reading*

943h, 0m ef- eat kly
Done.
There is a stabbing pain in your chest and you fall to the floor gasping in
pain.
769h, 0m ef- sip 999999
sip 999999 *See I'm sipping the potion twice??*

You drink from a pink potion.
The healing liquid sends a tingle down your spine.
970h, 0m efp-
You drink from a pink potion.
You must wait a few seconds before taking another healing potion.


----------------------------------

Thanks in advance
_________________
Dazed glazed and having fun
Reply with quote
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Thu Apr 06, 2006 6:04 pm   
 
Hrmm, no one? Not enough information? too much?
_________________
Dazed glazed and having fun
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Apr 06, 2006 9:18 pm   
 
Nah, random circumstances + obscure errors always equal long answer times.

1){prompt} should actually be {nocr|prompt}, the nocr bit telling zmud not to trigger on the newline. This is probably the reason for the double fire, but it doesn't make much sense that it'd consistently fire correctly that first time.

2)you appear to be missing a closing curly bracket after Potionheal. As this would be an obvious error easily and correctly picked up by the syntax checker, I'm guessing it's just a typo.
_________________
EDIT: I didn't like my old signature
Reply with quote
sepe
Novice


Joined: 09 Feb 2002
Posts: 39
Location: USA

PostPosted: Fri Apr 07, 2006 10:40 pm   
 
OK, I'l try the nocr, only prob here, I didn't put the {prompt} command in myself. I guess it is an auto setting? Where can I make that change? Also, where does } after potionheal? It looks right to me (and I didn't edit). I assume I can just enter it from the command promt line (after i delete the first one of course)

Also, where in this line am I missing the }

#IF ((@healthvalue < @basehealth-100) and (@PotionDelay = 0)) {PotionHeal} "" {prompt}
_________________
Dazed glazed and having fun
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Apr 07, 2006 11:11 pm   
 
Quote:

#IF ((@healthvalue < @basehealth-100) and (@PotionDelay = 0)) {PotionHeal}} "" {prompt}


Need the closing bracket for the trigger codeblock itself
_________________
EDIT: I didn't like my old signature
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