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>
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>

