(Quick Question) LUA rotation "switch" without unlocking LUA menu

User Tag List

Results 1 to 8 of 8
  1. #1
    reliasn's Avatar Legendary Authenticator enabled
    Reputation
    774
    Join Date
    Jan 2009
    Posts
    136
    Thanks G/R
    24/215
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    (Quick Question) LUA rotation "switch" without unlocking LUA

    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!

    (Quick Question) LUA rotation "switch" without unlocking LUA
  2. #2
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I remember, you will taint variables like that (which is what you're seeing), but you cannot taint variables in tables like that:
    Code:
    /run if not abc then abc = {} end if not abc.targetN then abc.targetN = 1 else abc.targetN = 0 end
    My memory is foggy, but I'm pretty sure I was able to read variables from tables like this without tainting.

    Also as long as your stuff is private you do not need to worry about Warden finding these variables/cvars.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  3. #3
    reliasn's Avatar Legendary Authenticator enabled
    Reputation
    774
    Join Date
    Jan 2009
    Posts
    136
    Thanks G/R
    24/215
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by MaiN View Post
    As far as I remember, you will taint variables like that (which is what you're seeing), but you cannot taint variables in tables like that:
    Code:
    /run if not abc then abc = {} end if not abc.targetN then abc.targetN = 1 else abc.targetN = 0 end
    My memory is foggy, but I'm pretty sure I was able to read variables from tables like this without tainting.

    Also as long as your stuff is private you do not need to worry about Warden finding these variables/cvars.
    Thanks for the reply! I used this macro:
    Code:
    /run if not abc then abc = {} end if not abc.targetN or abc.targetN == 0 then abc.targetN = 1 else abc.targetN = 0 end
    And in my .LUA, something like this:
    Code:
    if abc.targetN == 1 then
    	HunterRotation()
    end
    The "Blocked Action" frame is still showing though... I will keep on trying! I have to read more about this tainting thing and see what other people have done to avoid it. Thanks once again! (PS: "You must spread some Reputation around before giving it to MaiN again.")

  4. #4
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you just keep your 'switch' in your external code? and then have your bot/hack check if switch before it uses the correct function?
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  5. #5
    aeo's Avatar Contributor
    Reputation
    135
    Join Date
    Apr 2007
    Posts
    286
    Thanks G/R
    97/68
    Trade Feedback
    7 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    As lame as it is you could keep control of the variable in your external code and force the lua value each frame. Use GetSynckeystate to alter the variable and then each from just run

    Code:
    DoString("if not rotationActionType then
    rotationActionType = nil
    else
    rotationActionType = single/aoe/...
    end");.
    The chances of this variable being tainted are pretty slim as you are resetting the value each frame.

  6. #6
    reliasn's Avatar Legendary Authenticator enabled
    Reputation
    774
    Join Date
    Jan 2009
    Posts
    136
    Thanks G/R
    24/215
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was mainly afraid of my tool being flagged by an Anti-Virus as a Keylogger. I appreciate everyone's reply and I ended up implementing the switch on my External tool.

    SetWindowsHookEx + global hook, without using DLLs. I suppose this is better than implementing a loop calling GetAsyncKeyState() all the time. Anyways, 0/54 on Virustotal so I guess it's all good!

    Regards everyone!

  7. #7
    Wildbreath's Avatar Contributor
    Reputation
    162
    Join Date
    Feb 2012
    Posts
    121
    Thanks G/R
    2/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try to use wow bindings (using xml), check my addon (to offspring). it's protected, but configurable out of combat

  8. #8
    Travelformed's Avatar Member Authenticator enabled
    Reputation
    10
    Join Date
    Jan 2008
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you can do a trick w/o xml right from your lua code:


    Code:
    -- Bind a function to a key combination
    -- bindingName - unique name for binding
    -- key - key combination
    -- handler - handler function
    function bindButton(bindingName, key, handler)
    	local name = "BindButton_"..bindingName;
    	local button = CreateFrame("BUTTON", name)
    	print("Binding: "..key)
    	SetBindingClick(key, name)
    	button:SetScript("OnClick", handler)
    end

Similar Threads

  1. A quick question Regarding LUA
    By Myzt in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 07-18-2008, 12:14 PM
  2. [Quick +Rep] LUA Question
    By Strupantwn in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 06-15-2008, 08:05 PM
  3. [Quick +Rep] LUA Question
    By Strupantwn in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 06-03-2008, 02:38 PM
  4. a quick question/request
    By Avianar47 in forum World of Warcraft General
    Replies: 2
    Last Post: 12-27-2006, 03:54 AM
  5. quick question...
    By thehacker in forum World of Warcraft General
    Replies: 2
    Last Post: 10-01-2006, 01:20 AM
All times are GMT -5. The time now is 01:05 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search