wrong syntax? or just plain wrong?

Post Reply
Reiterii
Posts: 1
Joined: Mon Nov 07, 2011 3:00 pm

wrong syntax? or just plain wrong?

Post by Reiterii » Wed Apr 11, 2012 8:54 am

Ok, so I've tried making an alias that automatically shuts of generosity, gives (whatever), then automatically put up selfishness again.

Alias pattern: ^give (.*) to (\w+)$
Code: [show] | [select all] lua
send("generosity")
temptimer( 0.8, [[send("give ]]..matches[2]..[[ to ]]..matches[3]..[[")]])
temptimer( 1.2, [[send("selfishness")]])
but for some reason it only sends generosity.

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: wrong syntax? or just plain wrong?

Post by Iocun » Wed Apr 11, 2012 3:25 pm

It's tempTimer with the second T capitalized.

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: wrong syntax? or just plain wrong?

Post by tsuujin » Wed Apr 11, 2012 8:59 pm

Personal perference here, but I -never- use timers for that kind of thing. Instead of a timer, I create trigger that captures all the balance regain messages, and on each check looks to see if I'm capable of casting selfishness. If I am then it casts it and deletes the trigger.

This solves issues with lag, also with people finding out you have a timer and looking for ways to exploit it.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests