What I'm doing: running rotation profiles with Lua_DoString()
What I want to do: implement an in-game "switch" that would allow me to switch between burst, AoE and single-target mode without unlocking LUA.
My tests:
- Macro in-game: /script if targetN == 0 then targetN = 1 else targetN = 0 end
Then reading targetN in my profile to then decide which mode to run.
This, however, triggers the "Blocked action" by WoW UI, because (I think) I'm running a script in Lua_DoString() (unprotected) that references/reads another variable that was set by a macro in-game (protected).
What worked for me: using a CVar as "dummy"
- RegisterCVar("test","0")
- Macro in-game: /run x = GetCVar("test"); if x == "1" then SetCVar("test","0") else SetCVar("test","1") end;
Then in my profile targetN = GetCVar("test"), from which I decide which mode to run.
The idea is basically to use some setting that can be set/read as "dummy". This method worked, but I'm concerned about its safety. Does anyone have a better method for this "mode switch" without unlocking LUA? I thought about reading pressed keys, but that will probably flag my tool as a keylogger. Finally, can Warden scan registered CVars and are these CVars uploaded to the servers in some way? I suppose it's YES and NO for this last question...
Regards and thanks for your attention!