Disabling Trigger Groups

Post Reply
Verthar
Posts: 10
Joined: Tue Apr 27, 2010 3:12 pm

Disabling Trigger Groups

Post by Verthar »

This is for Achaea

what I'm trying to go is set a system up for buying stuff without having to use the total stop in order to do it. I came up with this but to no avail. I have it as an alias and just named it ^rawr$ for the purpose of testing it. That is also the command line. Am I just doing it wrong?

disabletrigger(grouptheft)
send ("get backpack331776 from kitbag206012")
send ("get (\d+) gold sovereigns from backpack331776")
send ("put backpack331776 in kitbag206012")
enabletrigger(grouptheft)

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Disabling Trigger Groups

Post by Vadi »

Several problems there...

1) Lua is case-sensitive
2) disableTrigger takes the name, as text, so you want to put it in quotes
3) (\d+) in a trigger becomes the matches[#] variable, first pair of brackets() becomes 2, so first (\d+) = matches[2] variable

Maybe something like
Code: [show] | [select all] lua
disableTrigger("grouptheft")
send ("get backpack331776 from kitbag206012")
send ("get " .. matches[2] .. " gold sovereigns from backpack331776")
send ("put backpack331776 in kitbag206012")
enableTrigger("grouptheft")
is closer to what you want.

Verthar
Posts: 10
Joined: Tue Apr 27, 2010 3:12 pm

Re: Disabling Trigger Groups

Post by Verthar »

excellent, thank you so much. I didn't think 2 sets of "" were allowed in a string, good to know. It worked perfectly, and thank you very much again.

Morsquachien
Posts: 7
Joined: Thu Nov 02, 2017 10:25 pm

Re: Disabling Trigger Groups

Post by Morsquachien »

This looks like a pretty old thread, but it has the title for what my question is about so hopefully it will get handled.

How are entire groups enabled and disabled?

I can find where individual triggers etc. are enabled/disabled, but I cannot find how to disable/enable entire groups.

Any advice is helpful.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Disabling Trigger Groups

Post by Vadi »

Use the same function as for individual triggers. Trigger groups can still be triggers, after all!

Post Reply