Page 1 of 1

Perpetual Noob seeks Scripting Wisdom

Posted: Fri Oct 11, 2019 4:29 am
by perpetualnoob
I'm playing a game that allows for native macros. I'm trying to set up a script to simply cycle through my attack macros every 4 seconds. My attack macros are simply 1, 2, 3, 4, 5, & 6 Also, if it tells me I am "prone" (something knocked me down), I want it to stand me up (the macro for which is 00) instead of trying to attack. This is what I have so far:

state = state or 0
send = print
commands = {
"1",
"2",
"3",
"4",
"5",
"6",
}

sleep = 4 -- seconds

if string.find(line, "stance") then
tempTimer(sleep, [[send("00")]])
else
cmd = commands[(state % #commands) + 1]
tempTimer(sleep, [[send(cmd)]])
state = (state + 4) % #commands
end




The problem I'm having is that for whatever reason, timers, triggers, etc all work fine. But the script is just throwing the commands as print on my client screen and not actually inputting them like triggers/timers do. What am I doing wrong?

Re: Perpetual Noob seeks Scripting Wisdom

Posted: Thu Oct 24, 2019 5:20 am
by perpetualnoob
No one has any advice? :(