Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Mon Mar 28, 2011 4:14 am   

[3.33a] #T- Not working at all.
 
This is the trigger.. Can you find an error?
Code:
<trigger priority="10" id="2764">
  <pattern>^~ ME: (%d)~%  Enemy: (%d)~%</pattern>
  <value>#if (@AutoQuaff.Quaffer = 1) {
#IF (@PromptData.hpper <@autoquaff.heallimit) {
  #T- AutoQuaff|Trigger|AutoHeal
  hpot
  }}</value>
</trigger>

edit: the trigger fires.. but it doesnt shut off the folder.. so it keeps healing myself :/
This simple trigger has worked for quite a while.. and the exact same trigger works on my friends.

Any help will be appreciated.
I have just reinstalled, that didnt happen.
Going to try to recreate the trigger.. but if i copy/paste it not sure what the difference will be.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Mar 28, 2011 11:15 am   
 
Did you try putting quotes around the Class?

Unless you have multiple Classes with the same name, you could just:
#T- AutoHeal
_________________
Discord: Shalimarwildcat
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Mar 29, 2011 5:21 am   
 
Personally I would not give classes and variables the same ID or name. You have a variable named AutoQuaff and a class named AutoQuaff. I also would not give a class the name of a keyword like "Trigger".

As far as enabling and disabling the AutoHeal class, shouldn't you be using the following syntax?

#T- /AutoQuaff/Trigger/AutoHeal

Scoping

[/url]
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Tue Mar 29, 2011 4:00 pm   
 
oldguy2 wrote:
Personally I would not give classes and variables the same ID or name. You have a variable named AutoQuaff and a class named AutoQuaff. I also would not give a class the name of a keyword like "Trigger".

As far as enabling and disabling the AutoHeal class, shouldn't you be using the following syntax?

#T- /AutoQuaff/Trigger/AutoHeal

Scoping

[/url]

I actually did not know about the scoping rules.. thanks :)
I tried #T- AutoHeal That doesnt work, and autoheal is the only class with that name.
Its like part of the trigger doesnt fire. but every other part does.

I also have the same trigger for mana but instead of hpot its mpot.. and instead of autoheal its automana.. only difference.
That one works fine.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Tue Mar 29, 2011 4:13 pm   
 
I've figured out the problem.. appearently when i triggered on
Code:
{^You feel much better.$|^A warm feeling feels your body$}

It triggered on every line..
I seperated the triggers and it works now.. Thansk :)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Mar 29, 2011 4:33 pm   
 
The parser might be confusing the $ character which can also be used for a multiline trigger pattern when embedded into the middle of a pattern. You might be able to use this pattern instead:
Code:
^{You feel much better.|A warm feeling feels your body}$
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Tue Mar 29, 2011 6:29 pm   
 
Well... the #T- seems to hinge on:

#IF (@PromptData.hpper <@autoquaff.heallimit)

have you tested to see if this expression evaluates as true?

sometimes you have to use a @{this.that} style syntax to fully expand a nested db variable (or better still, assign the value to a $localVar and test against that instead)
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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