Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Help 

A LUA macro script to XML macro script

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>
hi, did you solve your issue ?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Lua] by Toph BeifongMay 7, 2025 07:19 PM 13 658 May 7, 2025 07:19 PM
Last Post: Phantom_NiNja
by Kaushal@67May 7, 2025 10:24 AM 5 200 May 7, 2025 10:24 AM
Last Post: Tyr
[Lua] by clarkpepJul 16, 2022 11:06 PM 0 192 Jul 16, 2022 11:06 PM
Last Post: clarkpep