![]() |
|
[Help] A LUA macro script to XML macro script - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Help] A LUA macro script to XML macro script (/showthread.php?tid=5991949) |
A LUA macro script to XML macro script - ch4ot1cj0ker - Jul 21, 2019 I'm going to be completely honest with you I don't know how to get this to work on my Razer Naga trinity because it has to read specific format This is the code i want function OnEvent(event, arg) OutputLogMessage("event = %s, arg = %d\n", event, arg) if (event == "PROFILE_ACTIVATED") then EnablePrimaryMouseButtonEvents(true) elseif event == "PROFILE_DEACTIVATED" then ReleaseMouseButton(2) end if (event == "MOUSE_BUTTON_PRESSED" and arg == 4) then recoil = not recoil spot = not spot end if (event == "MOUSE_BUTTON_PRESSED" and arg == 1 and recoil) then if recoil then repeat -- right MoveMouseRelative(1,10) Sleep(14) -- left MoveMouseRelative(-1, 0) Sleep(14) until not IsMouseButtonPressed(1) end end end I used to use this code use it as a template if you need <?xml version="1.0" encoding="utf-8"?> <Name>Playerunknown's Battleground</Name> <Guid>f292d59f-669f-4514-b1dd-2453be116542</Guid> <MacroEvents> <MacroEvent> <Type>2</Type> <MouseEvent> <MouseButton>1</MouseButton> <State>0</State> </MouseEvent> </MacroEvent> <MacroEvent> <Type>2</Type> <MouseEvent> <MouseButton>1</MouseButton> <State>1</State> </MouseEvent> </MacroEvent> <MacroEvent> <Type>3</Type> <MouseMovement> <MouseMovementEvent> <Type>3</Type> <X>960</X> <Y>540</Y> </MouseMovementEvent> <MouseMovementEvent> <Type>3</Type> <X>960</X> <Y>543</Y> </MouseMovementEvent> </MouseMovement> </MacroEvent> </MacroEvents> </Macro> RE: A LUA macro script to XML macro script - Glenrose - Oct 26, 2019 hi, did you solve your issue ? |