killtrigger and resetprofile alias not working

Post Reply
TheUltimateMap
Posts: 10
Joined: Thu Jul 11, 2013 9:14 pm

killtrigger and resetprofile alias not working

Post by TheUltimateMap »

After much reading and trying different solutions, including here in the forum, I need help with a temp trigger that runs and fires properly but I can't seem to kill; I still see it in the statistics. In trying different things, I used resetprofile() as a temporary solution, which worked for a bit, but since also has stopped working. Here is the setup:

Alias 1:
Code: [show] | [select all] lua
triggerID = tempComplexRegexTrigger("triggername", "pattern detected", [[echo("it fired")]], 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
Alias 2:
Code: [show] | [select all] lua
killtrigger("triggername")
Alias 3:
Code: [show] | [select all] lua
resetprofile()
Note also that I pressed the enter key a few times after running the trigger to generate some lines from the MUD and fired it before trying to kill it.

It's probably something ridiculously simple I overlooked. Any suggestions?

User avatar
Omni
Posts: 131
Joined: Fri Feb 12, 2010 10:26 am

Re: killtrigger and resetprofile alias not working

Post by Omni »

killTrigger not killtrigger and resetProfile not resetprofile, check the error console(exclamation point button in the script dialog window) more often and it will usually tell you what you did wrong.

TheUltimateMap
Posts: 10
Joined: Thu Jul 11, 2013 9:14 pm

Re: killtrigger and resetprofile alias not working

Post by TheUltimateMap »

Oh snap, should have realized it was case sensitive by all the capitalized letters in the API :? And thanks for pointing out the error console.

resetProfile now works but killTrigger still does not. I noticed something else however that may indicate the problem, and it could be the trigger itself. I set it to highlight the pattern a few different colors but they did not take effect. I tried it with and without triggerID, not sure if that was ever right to begin with.

So now it's
Code: [show] | [select all] lua
tempComplexRegexTrigger("triggername", "pattern detected", [[echo("it fired")]], 0, 0, 0, 0, 0, 13, 4, 0, 0, 0)
And
Code: [show] | [select all] lua
killTrigger("triggername")
Any idea what could be happening?

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

Re: killtrigger and resetprofile alias not working

Post by Vadi »

killTrigger needs a trigger ID - not a name. So it doesn't work for the tempComplexRegexTrigger. Check out this example on how to accomplish this though: http://wiki.mudlet.org/w/Manual:Scripti ... _target.3F

Post Reply