How would I disable two triggers?

Post Reply
Sivan
Posts: 49
Joined: Tue Jun 23, 2009 3:54 am

How would I disable two triggers?

Post by Sivan »

I have a two triggers that I would like to disable once one trigger runs. The trigger is matching on a chest being opened. I see there is disableTrigger but it seems to only disable one trigger. Though I am not sure really where to put the disableTrigger command.

Trigger Name: questchestopened
The matching command is: ^(\w+) unlocks a chest.
The response is: send("gossip " .. matches[2] .. " wins!")

Thanks

EulersIdentity
Posts: 27
Joined: Fri Jun 26, 2015 8:52 am

Re: How would I disable two triggers?

Post by EulersIdentity »

Not sure I'm catching exactly what you want.

Name = TriggerFoo
Code: [show] | [select all] lua
send("Foo")
Name = TriggerBar
Code: [show] | [select all] lua
send("Bar")
disableTrigger("TriggerFoo")
disableTrigger("TriggerBar")
When 'TriggerBar' is matched, it should disable itself and 'TriggerFoo'. I hope that's what you're looking for.

Post Reply