-
Member
[Lua] Detect if Lua is unlocked
Hello guys !
Using lua in script/addon, is it somehow possible to test if we can actually call protected functions?
I'm using an Lua unlocker tool and would like to detect if it is running (or detect the error and prevent it from display).
Something like this :
Code:
if canUse("castSpellByName") then
return true
else
return false
end
Thank you!
-
Active Member
Last edited by uzzy13u; 03-24-2022 at 07:26 AM.
-
Member
Hi uzzy13u
What i want to achieve here is detecting if /run Jump() works using code instead of manual test.
I tried to call it inside a pcall() but it doesn't seem to be the solution since wow is blocking here, not lua.
I'm using this tool to disable protection : Lua Unlocker (1.12.1, 2.4.3 & 3.3.5a) (Lua Unlocker (1.12.1, 2.4.3 & 3.3.5a))
Maybe.. it could be modified to inject a global lua variable into wow so i can then test it inside my lua script. I don't have any idea about how to achieve this or even if it possible. Any advise / trick appreciated
-
Member
Leaving this here incase someone will need.
Blizzard has simple function for this:
if ( issecure() ) then DoStuff() end
if issecure returns true you can always use any lua function, including ones that require hardware event from user (on 3.3.5a at least).
-
Post Thanks / Like - 1 Thanks
lordaplala (1 members gave Thanks to CrazyCo for this useful post)