This works fine except it will cause any other alias command to be repeated. Is there some way to write a check for another alias without having to write a bunch of if statements for each alias that might be used?
current alias code is:
pattern: (.+)
Code: Select all
currentCommand = matches[2]
if currentCommand == lastCommand then
command_count(1)
else
command_count(0)
end
lastCommand = currentCommand
send(matches[1],false)
Code: Select all
function command_count(counter)
if commandCountKill == nil then
commandCountKill = 1
end --if
if counter == 0 then
commandCountKill = 0
end --if
commandCountKill = commandCountKill + counter
if commandCountKill >= 28 then
send("look")
commandCountKill = 1
end --if
end --fxn