Mail.ruПочтаМой МирОдноклассникиВКонтактеИгрыЗнакомстваНовостиКалендарьОблакоЗаметкиВсе проекты

Объединение двух скриптов

Russian Movies самедов Ученик (125), на голосовании 3 недели назад
Помогите пожалуйста объеденить два макросса для софта логитеч
local Macro_Activation_Key = 4
local function OutputLogs(s)
OutputLogMessage(s.."\n")
OutputDebugMessage(s.."\n")
end
local Recoil_Activator
function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "MOUSE_BUTTON_PRESSED" and arg == Macro_Activation_Key then
Recoil_Activator = not Recoil_Activator
OutputLogs(Recoil_Activator and "ON_Macro" or "OFF_Macro")
elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 and Recoil_Activator then
MoveMouseRelative(2, -2)
repeat
MoveMouseRelative(-4, 4)
Sleep(3)
MoveMouseRelative(4, -4)
Sleep(3)
until not IsMouseButtonPressed(1)
end
end
И ВОТ ЭТОТ
local Macro_Activation_Key = 4
local function OutputLogs(s)
OutputLogMessage(s.."\n")
OutputDebugMessage(s.."\n")
end
local Recoil_Activator
function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)
elseif event == "MOUSE_BUTTON_PRESSED" and arg == Macro_Activation_Key then
Recoil_Activator = not Recoil_Activator
OutputLogs(Recoil_Activator and "ON_Macro" or "OFF_Macro")
elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 and Recoil_Activator then
MoveMouseRelative(2, -2)
repeat
MoveMouseRelative(-4, 4)
Sleep(3)
MoveMouseRelative(4, -4)
Sleep(3)
until not IsMouseButtonPressed(1)
end
end
Голосование за лучший ответ
Александр Волков Мудрец (12575) 1 месяц назад
 local Macro_Activation_Key = 4 

local function OutputLogs(s)
OutputLogMessage(s .. "\n")
OutputDebugMessage(s .. "\n")
end

local Recoil_Activator = false

function OnEvent(event, arg)
if (event == "PROFILE_ACTIVATED") then
EnablePrimaryMouseButtonEvents(true)

elseif (event == "MOUSE_BUTTON_PRESSED") then
if (arg == Macro_Activation_Key) then
Recoil_Activator = not Recoil_Activator
OutputLogs(Recoil_Activator and "ON_Macro" or "OFF_Macro")

elseif (arg == 1 and Recoil_Activator) then
MoveMouseRelative(2, -2)
repeat
MoveMouseRelative(-4, 4)
Sleep(3)
MoveMouseRelative(4, -4)
Sleep(3)
until not IsMouseButtonPressed(1)
end
end
end
Russian Movies самедовУченик (125) 2 недели назад
Понос, не работает
Похожие вопросы