Вопрос (LUA) Макросы на мышь Logitech - довести до ума.

Начинающий
Статус
Оффлайн
Регистрация
30 Мар 2019
Сообщения
4
Реакции[?]
0
Поинты[?]
0
День добрый!

Возникла необходимость использования макросов в CSGO на мышках logitech. После некоторых скитаний был найден данный код.
Однако работает в игре он не совсем корректно, а именно - после активации работа по паттерну выполняется от одного до 4 раз, затем не работает.
Есть одно но, замечено, что при одновременном нажатии mouse1 и mouse2 все работает как надо. В итоге если заменить mouse2 на условные numlock или scrolllock в теории должно работать как надо.
Обращаюсь в сильным мира сего - помогите скорректировать сей код (прилагаю ниже).

Код:
-- [[ KEYS SETUP ]] --
local Activation_Key = 4 -- key to activate / deactivate the script, default 4 = G4
local Selection_Key = 6 -- Key to choose weapons, default 6 = precision key
-- [[ KEYS SETUP ]] --

-- [[ PATTERNS ]] --
local AK47_Pattern = {
   { x = 0, y = 0 }, { x = 0, y = 0 }, { x = 0, y = 5 }, { x = 0, y = 6 }, { x = 0, y = 7 }, { x = 0, y = 7 }, { x = 0, y = 8 }, { x = 0, y = 7 }, { x = 0, y = 6 }, { x = 0, y = 7 }, { x = 0, y = 8 }, { x = -2, y = 8 }, { x = 1, y = 7 }, { x = 3, y = 7 }, { x = 6, y = 7 }, { x = 6, y = 7 }, { x = 6, y = 7 }, { x = 0, y = 7 }, { x = 1, y = 7 }, { x = 2, y = 7 }, { x = 2, y = 8 }, { x = 2, y = 8 }, { x = 2, y = 9 }, { x = -3, y = -4 }, { x = -8, y = -1 }, { x = -15, y = -1 }, { x = -15, y = -1 }, { x = -5, y = 0 }, { x = -5, y = 0 }, { x = -5, y = 0 }, { x = -5, y = 0 }, { x = -1, y = 1 }, { x = 4, y = 2 }, { x = 4, y = 2 }, { x = 5, y = 1 }, { x = -5, y = 1 }, { x = -5, y = 1 }, { x = -10, y = 1 }, { x = -10, y = 0 }, { x = -5, y = 0 }, { x = -3, y = 0 }, { x = 0, y = 0 }, { x = 0, y = 1 }, { x = 0, y = 1 }, { x = -2, y = 1 }, { x = 6, y = 1 }, { x = 8, y = 2 }, { x = 14, y = 2 }, { x = 15, y = 2 }, { x = 1, y = 2 }, { x = 1, y = 2 }, { x = 1, y = 1 }, { x = 1, y = 1 }, { x = 5, y = 1 }, { x = 6, y = 1 }, { x = 6, y = 1 }, { x = 6, y = 1 }, { x = 6, y = -1 }, { x = 10, y = -1 }, { x = 10, y = -2 }, { x = 10, y = -3 }, { x = 0, y = -5 }, { x = 0, y = 0 }, { x = -5, y = 0 }, { x = -5, y = 0 }, { x = -5, y = 0 }, { x = 0, y = 0 }, { x = 0, y = 1 }, { x = 0, y = 2 }, { x = 0, y = 1 }, { x = 0, y = 1 }, { x = 0, y = 2 }, { x = 0, y = 2 }, { x = 0, y = 1 }, { x = 0, y = 1 }, { x = 3, y = 1 }, { x = 3, y = -1 }, { x = 3, y = -1 }, { x = 0, y = 0 }, { x = -3, y = 0 }, { x = -4, y = 0 }, { x = -4, y = 0 }, { x = -4, y = 0 }, { x = -4, y = 0 }, { x = -4, y = 0 }, { x = -7, y = 0 }, { x = -7, y = 0 }, { x = -8, y = 0 }, { x = -8, y = -2 }, { x = -15, y = -3 }, { x = -16, y = -5 }, { x = -18, y = -7 }, { x = 0, y = 0 }, { x = 0, y = 0 },
}
-- [[ PATTERNS ]] --

-- [[ SCRIPT ]] --
local function RetrieveWeaponName(weapon,act)
   if act == 1 then
      if weapon == 1 then
         return"AK47"
      elseif weapon == 2 then
      end
      return"CT: ON"
   end
   return"OFF"
end
local function OutputLogs(weapon, act)
   OutputLogMessage(RetrieveWeaponName(weapon,act).."\n");
   OutputDebugMessage(RetrieveWeaponName(weapon,act).."\n");
   ClearLCD();
   OutputLCDMessage(RetrieveWeaponName(weapon,act));
end
local Spray_Randomize = math.random(29,31)
local Recoil_Activator,R_Weapon_Selector = 0,0
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
   if (event == "MOUSE_BUTTON_PRESSED" and arg == Activation_Key) then
      if Recoil_Activator >= 3 then Recoil_Activator = 0 end
      Recoil_Activator = Recoil_Activator + 1
      OutputLogs(R_Weapon_Selector or nil,Recoil_Activator)
   end
   if (event == "MOUSE_BUTTON_PRESSED" and arg == Selection_Key) then
      if R_Weapon_Selector >= 2 then R_Weapon_Selector = 0 end
      R_Weapon_Selector = R_Weapon_Selector + 1
      OutputLogs(R_Weapon_Selector,Recoil_Activator)
   end
   if Recoil_Activator == 1 then
      if (R_Weapon_Selector == 1) and IsMouseButtonPressed(1) then
         for i = 1, #AK47_Pattern do
            if IsMouseButtonPressed(1) then
               Sleep(Spray_Randomize)
               MoveMouseRelative( AK47_Pattern[i].x, AK47_Pattern[i].y )
            end
         end
      end
   else
      -- OFF
   end
end
-- [[ SCRIPT ]] --
 
Начинающий
Статус
Оффлайн
Регистрация
30 Мар 2019
Сообщения
4
Реакции[?]
0
Поинты[?]
0
Ввиду того что ответов и вообще иных сообщений в теме нет, то пользуем костыльный вариант. Паттерны прилагаю ниже (sensitivity 3).
Однако все-таки не покидает надежда что решится проблема описанная выше.



M4A4:
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) -- to prevent it from being stuck on
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

Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 4)
Sleep(21)
MoveMouseRelative(0, 5)
if not IsMouseButtonPressed(1) then break end    
--2 0,10
Sleep(21)
MoveMouseRelative(0, 6)
Sleep(21)
MoveMouseRelative(0, 7)
Sleep(21)
MoveMouseRelative(0, 5)
Sleep(21)
MoveMouseRelative(0, 2)
if not IsMouseButtonPressed(1) then break end
--3 -6,16
Sleep(21)
MoveMouseRelative(0, 5)
Sleep(21)
MoveMouseRelative(0, 2)
Sleep(21)
MoveMouseRelative(0, 5)
Sleep(21)
MoveMouseRelative(0, 6)
if not IsMouseButtonPressed(1) then break end
--4 4,22
Sleep(21)
MoveMouseRelative(-1, 9)
Sleep(21)
MoveMouseRelative(0, 8)
Sleep(21)
MoveMouseRelative(1, 6)
Sleep(21)
MoveMouseRelative(0, 7)
if not IsMouseButtonPressed(1) then break end
--5 -7,24
Sleep(21)
MoveMouseRelative(0, 8)
Sleep(21)
MoveMouseRelative(1, 8)
Sleep(21)
MoveMouseRelative(2, 7)
Sleep(21)
MoveMouseRelative(2, 7)
--6 -7,24
if not IsMouseButtonPressed(1) then break end
Sleep(21)
MoveMouseRelative(3, 4)
Sleep(21)
MoveMouseRelative(4, -1)
Sleep(21)
MoveMouseRelative(4, -1)
Sleep(21)
MoveMouseRelative(4, -1)
if not IsMouseButtonPressed(1) then break end
--7 16,16
Sleep(21)
MoveMouseRelative(3, 1)
Sleep(21)
MoveMouseRelative(3, 1)
Sleep(21)
MoveMouseRelative(3, 1)
Sleep(21)
MoveMouseRelative(1, 1)
if not IsMouseButtonPressed(1) then break end
--8 16,16
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(-3, 1)
Sleep(21)
MoveMouseRelative(-5, 1)
Sleep(21)
MoveMouseRelative(-8, 1)
if not IsMouseButtonPressed(1) then break end
--9 22,8
Sleep(21)
MoveMouseRelative(-10, 1)
Sleep(21)
MoveMouseRelative(-10, 1)
Sleep(21)
MoveMouseRelative(-10, 1)
Sleep(21)
MoveMouseRelative(-10, 1)
if not IsMouseButtonPressed(1) then break end
--10 -4,8
Sleep(21)
MoveMouseRelative(-10, 1)
Sleep(21)
MoveMouseRelative(-5, -1)
Sleep(21)
MoveMouseRelative(-5, -1)
Sleep(21)
MoveMouseRelative(-5, -1)
if not IsMouseButtonPressed(1) then break end
--11 -24,6
Sleep(21)
MoveMouseRelative(-5, -1)
Sleep(21)
MoveMouseRelative(1, -1)
Sleep(21)
MoveMouseRelative(1, -1)
Sleep(21)
MoveMouseRelative(2, -1)
if not IsMouseButtonPressed(1) then break end
--12 -24,-4
Sleep(21)
MoveMouseRelative(2, 2)
Sleep(21)
MoveMouseRelative(2, 2)
Sleep(21)
MoveMouseRelative(2, 1)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--13 -24,-1
Sleep(21)
MoveMouseRelative(-2, 1)
Sleep(21)
MoveMouseRelative(-2, 1)
Sleep(21)
MoveMouseRelative(-2, 1)
Sleep(21)
MoveMouseRelative(-4, 1)
if not IsMouseButtonPressed(1) then break end
--14 -24,-4
Sleep(21)
MoveMouseRelative(-4, -1)
Sleep(21)
MoveMouseRelative(-2, 1)
Sleep(21)
MoveMouseRelative(2, 1)
Sleep(21)
MoveMouseRelative(4, 1)
if not IsMouseButtonPressed(1) then break end
--15 -1,1
Sleep(15)
Sleep(15)
MoveMouseRelative(8, 0)
if not IsMouseButtonPressed(1) then break end
--16 8,6
Sleep(21)
MoveMouseRelative(14, 0)
Sleep(21)
MoveMouseRelative(18, 0)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(-2, 0)
if not IsMouseButtonPressed(1) then break end
--17 -8,1
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(5, 0)
Sleep(21)
MoveMouseRelative(3, 0)
Sleep(21)
MoveMouseRelative(2, 0)
if not IsMouseButtonPressed(1) then break end
--18 -8,-4
Sleep(21)
MoveMouseRelative(5, 0)
Sleep(21)
MoveMouseRelative(3, 0)
Sleep(21)
MoveMouseRelative(2, 0)
Sleep(21)
MoveMouseRelative(5, 0)
if not IsMouseButtonPressed(1) then break end
--19 8,1
Sleep(21)
MoveMouseRelative(3, 0)
Sleep(21)
MoveMouseRelative(2, 0)
Sleep(21)
MoveMouseRelative(0, -1)
Sleep(21)
MoveMouseRelative(2, -1)
if not IsMouseButtonPressed(1) then break end
--20 24,1
Sleep(21)
MoveMouseRelative(5, -3)
Sleep(21)
MoveMouseRelative(-5, 3)
Sleep(21)
MoveMouseRelative(-3, 2)
Sleep(21)
MoveMouseRelative(-3, 1)
if not IsMouseButtonPressed(1) then break end
--21 16,1
Sleep(21)
MoveMouseRelative(4, 2)
Sleep(21)
MoveMouseRelative(8, 1)
Sleep(21)
MoveMouseRelative(12, 1)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--22 20,1
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--23 12,1
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end


--
Sleep(1000)
if not IsMouseButtonPressed(1) then break end
Sleep(1000)
if not IsMouseButtonPressed(1) then break end
Sleep(1000)
if not IsMouseButtonPressed(1) then break end

until not IsMouseButtonPressed(1)
end
end
end
AK47:
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) -- to prevent it from being stuck on
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

Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 5)
Sleep(21)
MoveMouseRelative(0, 6)
if not IsMouseButtonPressed(1) then break end    
--2 0,10
Sleep(21)
MoveMouseRelative(0, 7)
Sleep(21)
MoveMouseRelative(0, 7)
Sleep(21)
MoveMouseRelative(0, 8)
Sleep(21)
MoveMouseRelative(0, 7)
if not IsMouseButtonPressed(1) then break end
--3 -6,16
Sleep(21)
MoveMouseRelative(0, 6)
Sleep(21)
MoveMouseRelative(0, 7)
Sleep(21)
MoveMouseRelative(0, 8)
Sleep(21)
MoveMouseRelative(-2, 8)
if not IsMouseButtonPressed(1) then break end
--4 4,22
Sleep(21)
MoveMouseRelative(1, 7)
Sleep(21)
MoveMouseRelative(3, 7)
Sleep(21)
MoveMouseRelative(6, 7)
Sleep(21)
MoveMouseRelative(6, 7)
if not IsMouseButtonPressed(1) then break end
--5 -7,24
Sleep(21)
MoveMouseRelative(6, 7)
Sleep(21)
MoveMouseRelative(0, 7)
Sleep(21)
MoveMouseRelative(1, 7)
Sleep(21)
MoveMouseRelative(2, 7)
--6 -7,24
if not IsMouseButtonPressed(1) then break end
Sleep(21)
MoveMouseRelative(2, 8)
Sleep(21)
MoveMouseRelative(2, 8)
Sleep(21)
MoveMouseRelative(2, 9)
Sleep(21)
MoveMouseRelative(-3, -4)
if not IsMouseButtonPressed(1) then break end
--7 16,16
Sleep(21)
MoveMouseRelative(-8, -1)
Sleep(21)
MoveMouseRelative(-15, -1)
Sleep(21)
MoveMouseRelative(-15, -1)
Sleep(21)
MoveMouseRelative(-5, 0)
if not IsMouseButtonPressed(1) then break end
--8 16,16
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-1, 1)
if not IsMouseButtonPressed(1) then break end
--9 22,8
Sleep(21)
MoveMouseRelative(4, 2)
Sleep(21)
MoveMouseRelative(4, 2)
Sleep(21)
MoveMouseRelative(6, 2)
Sleep(21)
MoveMouseRelative(5, 1)
if not IsMouseButtonPressed(1) then break end
--10 -4,8
Sleep(21)
MoveMouseRelative(-5, 1)
Sleep(21)
MoveMouseRelative(-5, 1)
Sleep(21)
MoveMouseRelative(-10, 1)
Sleep(21)
MoveMouseRelative(-10, 0)
if not IsMouseButtonPressed(1) then break end
--11 -24,6
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-3, 0)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--12 -24,-4
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(-2, 1)
Sleep(21)
MoveMouseRelative(6, 1)
Sleep(21)
MoveMouseRelative(8, 2)
if not IsMouseButtonPressed(1) then break end
--13 -24,-1
Sleep(21)
MoveMouseRelative(14, 2)
Sleep(21)
MoveMouseRelative(15, 2)
Sleep(21)
MoveMouseRelative(1, 2)
Sleep(21)
MoveMouseRelative(1, 2)
if not IsMouseButtonPressed(1) then break end
--14 -24,-4
Sleep(21)
MoveMouseRelative(1, 1)
Sleep(21)
MoveMouseRelative(1, 1)
Sleep(21)
MoveMouseRelative(5, 1)
Sleep(21)
MoveMouseRelative(6, 1)
if not IsMouseButtonPressed(1) then break end
--15 -1,1
Sleep(15)
Sleep(15)
MoveMouseRelative(6, 1)
if not IsMouseButtonPressed(1) then break end
--16 8,6
Sleep(21)
MoveMouseRelative(6, 1)
Sleep(21)
MoveMouseRelative(6, -1)
Sleep(21)
MoveMouseRelative(10, -1)
Sleep(21)
MoveMouseRelative(10, -2)
if not IsMouseButtonPressed(1) then break end
--17 -8,1
Sleep(21)
MoveMouseRelative(10, -3)
Sleep(21)
MoveMouseRelative(0, -5)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(-5, 0)
if not IsMouseButtonPressed(1) then break end
--18 -8,-4
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-5, 0)
Sleep(21)
MoveMouseRelative(-2, 0)
Sleep(21)
MoveMouseRelative(0, 0)
if not IsMouseButtonPressed(1) then break end
--19 8,1
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(2, 0)
Sleep(21)
MoveMouseRelative(0, 2)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--21 24,1
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(0, 2)
Sleep(21)
MoveMouseRelative(0, 2)
Sleep(21)
MoveMouseRelative(0, 1)
if not IsMouseButtonPressed(1) then break end
--21 16,1
Sleep(21)
MoveMouseRelative(0, 1)
Sleep(21)
MoveMouseRelative(3, 1)
Sleep(21)
MoveMouseRelative(3, -1)
Sleep(21)
MoveMouseRelative(3, -1)
if not IsMouseButtonPressed(1) then break end
--22 21,1
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(-3, 0)
Sleep(21)
MoveMouseRelative(-4, 0)
Sleep(21)
MoveMouseRelative(-4, 0)
if not IsMouseButtonPressed(1) then break end
--21 12,1
Sleep(21)
MoveMouseRelative(-4, 0)
Sleep(21)
MoveMouseRelative(-4, 0)
Sleep(21)
MoveMouseRelative(-4, 0)
Sleep(21)
MoveMouseRelative(-7, 0)
if not IsMouseButtonPressed(1) then break end
--24 12,1
Sleep(21)
MoveMouseRelative(-7, 0)
Sleep(21)
MoveMouseRelative(-8, 0)
Sleep(21)
MoveMouseRelative(-8, 2)
Sleep(21)
MoveMouseRelative(-15, -3)
if not IsMouseButtonPressed(1) then break end
--21 -8,1
Sleep(21)
MoveMouseRelative(-16, -5)
Sleep(21)
MoveMouseRelative(-18, -7)
Sleep(21)
MoveMouseRelative(0, 0)
Sleep(21)
MoveMouseRelative(0, 0)
if not IsMouseButtonPressed(1) then break end

--
Sleep(1000)
if not IsMouseButtonPressed(1) then break end
Sleep(1000)
if not IsMouseButtonPressed(1) then break end
Sleep(1000)
if not IsMouseButtonPressed(1) then break end

until not IsMouseButtonPressed(1)
end
end
end
 
Начинающий
Статус
Оффлайн
Регистрация
30 Мар 2019
Сообщения
4
Реакции[?]
0
Поинты[?]
0
А кнопка активации какая?
Скрытое содержимое
Кнопка активации Mouse4, создается 2 профиля - один на M4, второй на АК47. Переключение осуществляется через переключение профилей. Это можно забиндить в ПО мыши. Однако данные скрипты уже не совсем актуальные. Ниже будет актуальный.

Создаете сценарий LUA в профиле по умолчанию. Вставляете текст скрипта. Сохраняете. Кнопка активации Mouse4 и Mouse5. Деактивация нажатие колесика мыши. Только М4 и АК47. DPI 800 , Сенса 2.3 где-то, подберете под себя с учетом необходимой кучности.


Код:
-------------------------------One click mouse side button key setting ------------------------
ak47key = 5     ------ak47
galilkey = 0    ------galil
sg553key = 0    ------sg553
m4a1key = 0    ------m4a1
m4a4key = 4    ------m4a4
famaskey = 0    ------famas
augkey = 0    ------aug
mp9key = 0    ------mp9
mac10key =0    ------mac10
ump45key =0    ------ump45
mp7key = 0    ------mp7
mp5sdkey =0    ------mp5sd
bizonkey = 0    ------bizon
p90key = 9    ------p90
cz75key = 0    ------cz75
m249key =  0    ------m249

-------------------------------Double-click mouse side button key setting ------------------------
ak47key2 = 0    ------ak47
galilkey2 = 0    ------galil
sg553key2 = 0    ------sg553
m4a1key2 = 0    ------m4a1
m4a4key2 = 0    ------m4a4
famaskey2 = 0    ------famas
augkey2 = 0    ------aug
mp9key2 = 0    ------mp9
mac10key2 =0    ------mac10
ump45key2 =  0    ------ump45
mp7key2 = 0    ------mp7
mp5sdkey2 =0    ------mp5sd
bizonkey2 = 0    ------bizon
p90key2 = 0    ------p90
cz75key2 = 0    ------cz75
m249key2 = 0    ------m249


-------------------------------Ctrl+mouse side button key setting------------------------
ak47_CTRL_key = 0
galil_CTRL_key = 0
sg553_CTRL_key = 0
m4a1_CTRL_key = 0
m4a4_CTRL_key = 0
famas_CTRL_key = 0
aug_CTRL_key = 0
mp9_CTRL_key = 0
mac10_CTRL_key = 0
ump45_CTRL_key = 0
mp7_CTRL_key = 0
mp5sd_CTRL_key = 0
bizon_CTRL_key = 0
p90_CTRL_key = 0
cz75_CTRL_key = 0
m249_CTRL_key = 0

-------------------------------Script switch key setting------------------------
offkey = 3

ak47 = {{x=0, y=0, d=3}, {x=0, y=0, d=3}, {x=0, y=0, d=2}, {x=0, y=0, d=3}, {x=0, y=0, d=2}, {x=0, y=0, d=3}, {x=0, y=0, d=2}, {x=0, y=0, d=3}, {x=0, y=0, d=2}, {x=0, y=0, d=3}, {x=0, y=0, d=2}, {x=0, y=0, d=3}, {x=0, y=0, d=9}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=9}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=9}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=2, d=9}, {x=0, y=2, d=8}, {x=0, y=2, d=8}, {x=0, y=2, d=9}, {x=0, y=2, d=8}, {x=0, y=2, d=8}, {x=0, y=2, d=9}, {x=0, y=2, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=2, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=2, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=2, d=8}, {x=0, y=3, d=8}, {x=-1, y=2, d=9}, {x=0, y=3, d=8}, {x=-1, y=2, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=0, y=3, d=8}, {x=0, y=3, d=8}, {x=0, y=2, d=9}, {x=-1, y=3, d=8}, {x=0, y=3, d=8}, {x=1, y=2, d=9}, {x=1, y=3, d=8}, {x=1, y=3, d=8}, {x=1, y=3, d=9}, {x=1, y=2, d=8}, {x=1, y=3, d=8}, {x=1, y=3, d=9}, {x=1, y=3, d=8}, {x=1, y=2, d=8}, {x=1, y=3, d=9}, {x=1, y=3, d=8}, {x=1, y=3, d=8}, {x=1, y=2, d=9}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=0, y=3, d=9}, {x=1, y=2, d=8}, {x=0, y=3, d=8}, {x=1, y=2, d=8}, {x=0, y=3, d=9}, {x=1, y=2, d=8}, {x=0, y=3, d=8}, {x=1, y=2, d=8}, {x=2, y=1, d=9}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=1, y=1, d=9}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=1, y=1, d=9}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=1, y=1, d=9}, {x=1, y=2, d=8}, {x=1, y=2, d=8}, {x=-1, y=1, d=9}, {x=-1, y=1, d=8}, {x=-1, y=1, d=8}, {x=-1, y=1, d=8}, {x=-2, y=1, d=9}, {x=-1, y=1, d=8}, {x=-2, y=2, d=8}, {x=-1, y=1, d=8}, {x=-2, y=2, d=9}, {x=-1, y=1, d=8}, {x=-2, y=2, d=8}, {x=-1, y=1, d=8}, {x=-3, y=-1, d=9}, {x=-4, y=0, d=8}, {x=-3, y=-1, d=8}, {x=-4, y=0, d=9}, {x=-3, y=-1, d=8}, {x=-4, y=0, d=8}, {x=-4, y=0, d=9}, {x=-3, y=-1, d=8}, {x=-4, y=0, d=8}, {x=-4, y=0, d=9}, {x=-3, y=-1, d=8}, {x=-4, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=1, d=8}, {x=-2, y=1, d=8}, {x=-2, y=1, d=9}, {x=-2, y=0, d=8}, {x=-2, y=1, d=8}, {x=-2, y=1, d=9}, {x=-2, y=1, d=8}, {x=-2, y=0, d=8}, {x=-2, y=1, d=9}, {x=-2, y=1, d=8}, {x=-2, y=1, d=8}, {x=2, y=0, d=9}, {x=1, y=1, d=8}, {x=1, y=1, d=8}, {x=1, y=0, d=8}, {x=1, y=1, d=9}, {x=1, y=1, d=8}, {x=2, y=0, d=8}, {x=1, y=1, d=8}, {x=1, y=1, d=9}, {x=1, y=0, d=8}, {x=1, y=1, d=8}, {x=1, y=1, d=8}, {x=-1, y=0, d=9}, {x=-1, y=0, d=8}, {x=-2, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=0, d=8}, {x=-1, y=0, d=8}, {x=-2, y=0, d=9}, {x=-1, y=0, d=8}, {x=-2, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=1, d=8}, {x=-1, y=0, d=8}, {x=-2, y=-1, d=9}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=9}, {x=-2, y=-1, d=8}, {x=-2, y=0, d=8}, {x=-2, y=-1, d=8}, {x=-3, y=0, d=9}, {x=-2, y=-1, d=8}, {x=-3, y=0, d=8}, {x=-2, y=-1, d=8}, {x=0, y=0, d=9}, {x=0, y=0, d=8}, {x=0, y=1, d=8}, {x=0, y=0, d=9}, {x=0, y=1, d=8}, {x=0, y=0, d=8}, {x=-1, y=1, d=9}, {x=0, y=0, d=8}, {x=-1, y=1, d=8}, {x=0, y=0, d=9}, {x=-1, y=1, d=8}, {x=0, y=0, d=8}, {x=4, y=0, d=9}, {x=3, y=1, d=8}, {x=3, y=1, d=8}, {x=3, y=0, d=9}, {x=3, y=1, d=8}, {x=3, y=1, d=8}, {x=3, y=0, d=9}, {x=3, y=1, d=8}, {x=3, y=1, d=8}, {x=3, y=0, d=9}, {x=3, y=1, d=8}, {x=3, y=1, d=8}, {x=2, y=0, d=9}, {x=2, y=1, d=8}, {x=2, y=0, d=8}, {x=2, y=1, d=8}, {x=2, y=0, d=9}, {x=2, y=1, d=8}, {x=2, y=0, d=8}, {x=2, y=1, d=8}, {x=2, y=0, d=9}, {x=2, y=1, d=8}, {x=2, y=0, d=8}, {x=2, y=1, d=8}, {x=2, y=0, d=9}, {x=1, y=0, d=8}, {x=1, y=1, d=8}, {x=1, y=0, d=9}, {x=1, y=1, d=8}, {x=1, y=0, d=8}, {x=2, y=1, d=9}, {x=1, y=0, d=8}, {x=1, y=1, d=8}, {x=1, y=0, d=9}, {x=1, y=1, d=8}, {x=1, y=0, d=8}, {x=3, y=-1, d=9}, {x=2, y=0, d=8}, {x=2, y=0, d=8}, {x=2, y=0, d=8}, {x=3, y=0, d=9}, {x=2, y=0, d=8}, {x=2, y=-1, d=8}, {x=2, y=0, d=8}, {x=3, y=0, d=9}, {x=2, y=0, d=8}, {x=2, y=0, d=8}, {x=2, y=0, d=8}, {x=3, y=-1, d=9}, {x=3, y=-1, d=8}, {x=3, y=-1, d=8}, {x=3, y=-1, d=9}, {x=3, y=-1, d=8}, {x=3, y=-1, d=8}, {x=3, y=0, d=9}, {x=3, y=-1, d=8}, {x=3, y=0, d=8}, {x=3, y=-1, d=9}, {x=2, y=0, d=8}, {x=3, y=-1, d=8}, {x=-1, y=0, d=9}, {x=-2, y=0, d=8}, {x=-2, y=1, d=8}, {x=-1, y=0, d=9}, {x=-2, y=1, d=8}, {x=-2, y=0, d=8}, {x=-1, y=1, d=9}, {x=-2, y=0, d=8}, {x=-2, y=1, d=8}, {x=-1, y=0, d=9}, {x=-2, y=1, d=8}, {x=-2, y=0, d=8}, {x=1, y=0, d=9}, {x=0, y=0, d=8}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=1, y=0, d=9}, {x=0, y=0, d=8}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=1, y=0, d=9}, {x=0, y=0, d=8}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=9}, {x=-1, y=1, d=8}, {x=-1, y=0, d=8}, {x=-1, y=1, d=9}, {x=0, y=0, d=8}, {x=-1, y=1, d=8}, {x=-1, y=0, d=9}, {x=-1, y=1, d=8}, {x=0, y=0, d=8}, {x=-1, y=1, d=9}, {x=-1, y=0, d=8}, {x=-1, y=1, d=8}, {x=0, y=0, d=9}, {x=-1, y=0, d=8}, {x=-1, y=0, d=8}, {x=-1, y=0, d=8}, {x=0, y=0, d=9}, {x=-1, y=0, d=8}, {x=-1, y=0, d=8}, {x=-1, y=0, d=8}, {x=0, y=1, d=9}, {x=-1, y=0, d=8}, {x=-1, y=1, d=8}, {x=-1, y=0, d=8}, {x=2, y=-1, d=9}, {x=2, y=0, d=8}, {x=2, y=0, d=8}, {x=2, y=0, d=9}, {x=1, y=0, d=8}, {x=2, y=0, d=8}, {x=1, y=-1, d=9}, {x=2, y=0, d=8}, {x=1, y=0, d=8}, {x=2, y=0, d=9}, {x=1, y=0, d=8}, {x=2, y=0, d=8}, {x=1, y=0, d=9}, {x=1, y=0, d=8}, {x=0, y=1, d=8}, {x=1, y=0, d=9}, {x=0, y=1, d=8}, {x=1, y=0, d=8}, {x=0, y=1, d=9}, {x=1, y=0, d=8}, {x=0, y=1, d=8}, {x=1, y=0, d=9}, {x=0, y=1, d=8}, {x=1, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=0, d=8}, {x=-2, y=0, d=8}, {x=-2, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=0, d=8}, {x=-2, y=0, d=8}, {x=-2, y=0, d=8}, {x=-1, y=0, d=9}, {x=-2, y=0, d=8}, {x=-2, y=1, d=8}, {x=-2, y=0, d=8}, {x=-2, y=-1, d=9}, {x=-3, y=0, d=8}, {x=-3, y=0, d=8}, {x=-3, y=0, d=9}, {x=-2, y=-1, d=8}, {x=-3, y=0, d=8}, {x=-3, y=0, d=9}, {x=-3, y=0, d=8}, {x=-2, y=-1, d=8}, {x=-3, y=0, d=9}, {x=-3, y=0, d=8}, {x=-3, y=0, d=8}, {x=-3, y=-2, d=9}, {x=-4, y=-2, d=8}, {x=-4, y=-2, d=8}, {x=-4, y=-2, d=8}, {x=-4, y=-2, d=9}, {x=-4, y=-2, d=8}, {x=-4, y=-1, d=8}, {x=-4, y=-2, d=8}, {x=-4, y=-1, d=9}, {x=-4, y=-2, d=8}, {x=-4, y=-1, d=8}, {x=-4, y=-2, d=8}, {x=-1, y=0, d=10}, {x=-1, y=0, d=9}, {x=-1, y=0, d=9}, {x=-1, y=0, d=9}, {x=-1, y=0, d=9}, {x=-1, y=0, d=9}, {x=-2, y=0, d=10}, {x=-1, y=0, d=9}, {x=-2, y=0, d=9}, {x=-1, y=0, d=9}, {x=-2, y=0, d=9}, {x=-1, y=0, d=9}}
m4a4 = {{x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=2}, {x=0, y=0, d=1}, {x=0, y=0, d=2}, {x=0, y=0, d=1}, {x=0, y=0, d=2}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=1, d=8}, {x=0, y=1, d=7}, {x=0, y=1, d=8}, {x=0, y=1, d=7}, {x=0, y=2, d=8}, {x=0, y=1, d=7}, {x=0, y=2, d=8}, {x=0, y=1, d=7}, {x=0, y=2, d=8}, {x=0, y=1, d=7}, {x=0, y=2, d=8}, {x=0, y=1, d=7}, {x=0, y=1, d=8}, {x=0, y=1, d=7}, {x=-1, y=1, d=8}, {x=0, y=1, d=7}, {x=-1, y=2, d=8}, {x=0, y=1, d=7}, {x=-1, y=2, d=8}, {x=0, y=1, d=7}, {x=-1, y=2, d=8}, {x=0, y=1, d=7}, {x=-1, y=2, d=8}, {x=0, y=1, d=7}, {x=1, y=1, d=8}, {x=0, y=2, d=7}, {x=1, y=2, d=8}, {x=0, y=2, d=7}, {x=1, y=2, d=8}, {x=0, y=2, d=7}, {x=1, y=2, d=8}, {x=0, y=2, d=7}, {x=1, y=2, d=8}, {x=0, y=2, d=7}, {x=1, y=2, d=8}, {x=0, y=2, d=7}, {x=0, y=2, d=8}, {x=-1, y=2, d=7}, {x=-1, y=2, d=8}, {x=0, y=2, d=7}, {x=-1, y=2, d=8}, {x=-1, y=2, d=7}, {x=0, y=3, d=8}, {x=-1, y=2, d=7}, {x=-1, y=3, d=8}, {x=0, y=2, d=7}, {x=-1, y=3, d=8}, {x=-1, y=2, d=7}, {x=0, y=1, d=8}, {x=0, y=2, d=7}, {x=0, y=2, d=8}, {x=0, y=2, d=7}, {x=-1, y=2, d=8}, {x=0, y=2, d=7}, {x=-1, y=2, d=7}, {x=0, y=2, d=8}, {x=-1, y=2, d=7}, {x=0, y=2, d=7}, {x=-1, y=2, d=8}, {x=0, y=2, d=7}, {x=2, y=1, d=8}, {x=1, y=1, d=7}, {x=1, y=1, d=8}, {x=2, y=1, d=7}, {x=1, y=1, d=8}, {x=1, y=1, d=7}, {x=2, y=1, d=8}, {x=1, y=1, d=7}, {x=1, y=2, d=8}, {x=2, y=1, d=7}, {x=1, y=2, d=8}, {x=1, y=1, d=7}, {x=1, y=1, d=8}, {x=1, y=1, d=7}, {x=1, y=1, d=8}, {x=1, y=1, d=7}, {x=1, y=2, d=8}, {x=1, y=1, d=7}, {x=1, y=2, d=8}, {x=1, y=1, d=7}, {x=0, y=2, d=8}, {x=1, y=1, d=7}, {x=0, y=2, d=8}, {x=1, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=2, y=0, d=8}, {x=2, y=1, d=7}, {x=0, y=0, d=8}, {x=-1, y=1, d=7}, {x=0, y=1, d=8}, {x=-1, y=0, d=7}, {x=0, y=1, d=8}, {x=-1, y=1, d=7}, {x=-1, y=0, d=8}, {x=0, y=1, d=7}, {x=-1, y=1, d=8}, {x=-1, y=0, d=7}, {x=0, y=1, d=8}, {x=-1, y=1, d=7}, {x=-1, y=0, d=8}, {x=-2, y=0, d=7}, {x=-1, y=1, d=8}, {x=-2, y=0, d=7}, {x=-1, y=1, d=8}, {x=-2, y=0, d=7}, {x=-1, y=1, d=8}, {x=-2, y=0, d=7}, {x=-1, y=1, d=8}, {x=-2, y=0, d=7}, {x=-1, y=1, d=8}, {x=-2, y=0, d=7}, {x=-2, y=0, d=8}, {x=-2, y=0, d=7}, {x=-2, y=0, d=8}, {x=-2, y=0, d=7}, {x=-2, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=1, d=8}, {x=-2, y=0, d=7}, {x=-2, y=-1, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=-1, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-3, y=0, d=8}, {x=-2, y=0, d=7}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=7}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=7}, {x=-2, y=-1, d=8}, {x=-2, y=-1, d=7}, {x=-2, y=0, d=8}, {x=-2, y=-1, d=7}, {x=-2, y=0, d=8}, {x=-2, y=-1, d=7}, {x=-2, y=0, d=8}, {x=-2, y=-1, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=0, y=1, d=8}, {x=1, y=1, d=7}, {x=0, y=0, d=8}, {x=1, y=1, d=7}, {x=0, y=1, d=8}, {x=1, y=1, d=7}, {x=0, y=0, d=8}, {x=1, y=1, d=7}, {x=0, y=1, d=8}, {x=1, y=1, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=-1, d=8}, {x=-1, y=-1, d=7}, {x=-1, y=0, d=8}, {x=-1, y=-1, d=7}, {x=-1, y=0, d=8}, {x=-1, y=-1, d=7}, {x=-1, y=0, d=7}, {x=-1, y=-1, d=8}, {x=-1, y=0, d=7}, {x=-1, y=-1, d=7}, {x=-1, y=0, d=8}, {x=-1, y=-1, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=3, y=0, d=8}, {x=3, y=1, d=7}, {x=3, y=0, d=8}, {x=3, y=1, d=7}, {x=2, y=0, d=8}, {x=3, y=1, d=7}, {x=2, y=0, d=8}, {x=3, y=1, d=7}, {x=2, y=0, d=8}, {x=3, y=1, d=7}, {x=2, y=0, d=8}, {x=3, y=1, d=7}, {x=2, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=3, y=-1, d=8}, {x=2, y=0, d=7}, {x=2, y=0, d=8}, {x=3, y=0, d=7}, {x=2, y=0, d=8}, {x=2, y=0, d=7}, {x=3, y=-1, d=8}, {x=2, y=0, d=7}, {x=2, y=0, d=8}, {x=3, y=0, d=7}, {x=2, y=0, d=8}, {x=2, y=0, d=7}, {x=1, y=0, d=8}, {x=1, y=0, d=7}, {x=1, y=0, d=8}, {x=1, y=0, d=7}, {x=0, y=0, d=8}, {x=1, y=0, d=7}, {x=0, y=0, d=8}, {x=1, y=0, d=7}, {x=0, y=0, d=8}, {x=1, y=0, d=7}, {x=0, y=1, d=8}, {x=1, y=0, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=1, y=0, d=8}, {x=1, y=1, d=7}, {x=0, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=0, d=8}, {x=-1, y=0, d=7}, {x=-1, y=1, d=8}, {x=-1, y=0, d=7}, {x=-1, y=1, d=8}, {x=-1, y=0, d=7}, {x=-1, y=1, d=8}, {x=-1, y=0, d=7}, {x=-1, y=1, d=8}, {x=-1, y=0, d=7}, {x=1, y=0, d=9}, {x=0, y=0, d=8}, {x=1, y=0, d=8}, {x=0, y=0, d=9}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=9}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=0, y=0, d=9}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=1, y=-1, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=0, d=8}, {x=1, y=0, d=7}, {x=0, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=1, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=0, y=1, d=8}, {x=0, y=0, d=7}, {x=1, y=0, d=9}, {x=0, y=0, d=8}, {x=1, y=0, d=8}, {x=0, y=0, d=9}, {x=1, y=0, d=8}, {x=0, y=0, d=8}, {x=1, y=1, d=9}, {x=0, y=0, d=8}, {x=1, y=1, d=8}, {x=0, y=0, d=9}, {x=1, y=1, d=8}, {x=0, y=0, d=8}}



ShieldCode = "Lalt"
Second="lctrl"
mode = 2      
round = 30  
speed = 2    
time1 = 25  
time2 = 35  
wireless = 1    






indexWeapon = 0
indexPattern = 1
temp = 0
backx = 0
backy = 0
backx1 = 0.00
backy1 = 0.00
backx2 = 0
backy2 = 0
backx3 = 0
backy3 = 0
tsleep = 0.00
tsleep2 = 0
tsleep3 = 0.00
temptime = 0
click = false
i = 0
flag = 0
flag2 = 1
timestart = 0
timebegin = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
timeend = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
Wpattern = {ak47, galil, sg553, m4a4, m4a1, famas, aug, mp9, mac10, ump45, mp7, mp5sd, bizon, p90, cz75, m249}
Wkey1 = {ak47key, galilkey, sg553key, m4a4key, m4a1key, famaskey, augkey, mp9key, mac10key, ump45key, mp7key, mp5sdkey, bizonkey, p90key, cz75key, m249key, autoshoot}
Wkey2 = {ak47key2, galilkey2, sg553key2, m4a4key2, m4a1key2, famaskey2, augkey2, mp9key2, mac10key2, ump45key2, mp7key2, mp5sdkey2, bizonkey2, p90key2, cz75key2, m249key2, autoshoot2}
Wkey3 = {ak47_CTRL_key,galil_CTRL_key,sg553_CTRL_key,m4a1_CTRL_key,m4a4_CTRL_key,famas_CTRL_key,aug_CTRL_key,mp9_CTRL_key,mac10_CTRL_key,ump45_CTRL_key,mp7_CTRL_key,mp5sd_CTRL_key,bizon_CTRL_key,p90_CTRL_key,cz75_CTRL_key,m249_CTRL_key}

EnablePrimaryMouseButtonEvents(true)
function OnEvent(event, arg)
    if (wireless) then
        Sleep(1)
    end
    while IsMouseButtonPressed(1) and flag2 == 1 do
        if (indexWeapon == 17) then
            click = true
            SetMKeyState(3)
            break
        end
        if (indexWeapon > 0 and indexWeapon < 17 and not IsModifierPressed(ShieldCode)) then
            if indexPattern < #Wpattern[indexWeapon] then
                if indexPattern == 1 then
                    timestart = GetRunningTime()
                end      
                MoveMouseRelative(Wpattern[indexWeapon][indexPattern].x, Wpattern[indexWeapon][indexPattern].y)
                backx = backx - Wpattern[indexWeapon][indexPattern].x
                backy = backy - Wpattern[indexWeapon][indexPattern].y
                timestart = timestart + Wpattern[indexWeapon][indexPattern].d
                Sleep3(timestart)
                indexPattern = indexPattern + 1
            else
                backx2 = math.floor(backx / 40)
                backy2 = math.floor(backy / 40)
                i = 0
                while (i < round) do
                    tsleep = 2* math.sqrt(math.abs(backx) * math.abs(backx) + math.abs(backy) * math.abs(backy)) / round / speed
                    tsleep2 = math.floor(tsleep)
                    tsleep3 = tsleep3 + tsleep - tsleep2
                    if tsleep3 >= 1 then
                        tsleep3 = tsleep3 - 1
                        tsleep2 = tsleep2 + 1
                    end
                    Sleep2(tsleep2)
                    backx1 = backx1 + backx / 40 - backx2
                    backy1 = backy1 + backy / 40 - backy2
                    if (backx1 >= 1) then
                        backx1 = backx1 - 1
                        backx3 = backx2 + 1
                    else
                        backx3 = backx2
                    end
                    if (backy1 >= 1) then
                        backy1 = backy1 - 1
                        backy3 = backy2 + 1
                    else
                        backy3 = backy2
                    end
                    MoveMouseRelative(backx3, backy3)
                    i = i + 1
                end
                indexPattern = 1
                backx = 0
                backy = 0
                backx1 = 0.00
                backy1 = 0.00
                tsleep3 = 0.00  
                flag2 = 0              
                Sleep(1000)
            end
        end
    end
    if (event == "MOUSE_BUTTON_RELEASED" and arg == 1 and indexWeapon == 17) then
        click = false
    end
    if (event == "M_PRESSED" and arg == 3 and click and indexWeapon == 17) then
        PressAndReleaseMouseButton(1)
        if click then
            SetMKeyState(3)
            math.randomseed(GetRunningTime())
            temptime = math.random(time1, time2)
            Sleep(temptime)
        end
    end
    if (event == "MOUSE_BUTTON_RELEASED" and indexWeapon == 0) then
        if (mode == 3 and arg == offkey) then
            if not IsKeyLockOn("scrolllock") then
                PressAndReleaseKey("scrolllock")
            end
            indexWeapon = temp
            ClearLog()
            OutputLogMessage("on\n")
        end
    end
    if (event == "MOUSE_BUTTON_RELEASED" and indexWeapon ~= 17 and indexWeapon ~= 0) then
        if (arg == 1) then
            backx2 = math.floor(backx / 40)
            backy2 = math.floor(backy / 40)
            i = 0
            while (i < round and (backx2 ~= 0 or backy2 ~= 0)) do
                tsleep = (150 + 1.1 * math.sqrt(math.abs(backx) * math.abs(backx) + math.abs(backy) * math.abs(backy))) / round / speed
                tsleep2 = math.floor(tsleep)
                tsleep3 = tsleep3 + tsleep - tsleep2
                if tsleep3 >= 1 then
                    tsleep3 = tsleep3 - 1
                    tsleep2 = tsleep2 + 1
                end
                Sleep2(tsleep2)
                backx1 = backx1 + backx / 40 - backx2
                backy1 = backy1 + backy / 40 - backy2
                if (backx1 >= 1) then
                    backx1 = backx1 - 1.00
                    backx3 = backx2 + 1
                else
                    backx3 = backx2
                end
                if (backy1 >= 1) then
                    backy1 = backy1 - 1.00
                    backy3 = backy2 + 1
                else
                    backy3 = backy2
                end
                MoveMouseRelative(backx3, backy3)
                i = i + 1
            end
            indexPattern = 1
            backx = 0
            backy = 0
            backx1 = 0.00
            backy1 = 0.00
            tsleep3 = 0.00  
            flag2 = 1
        end
    end
    if (event == "MOUSE_BUTTON_PRESSED") then
        if (arg ~= 1) then
            if (arg == Wkey3[1] and IsModifierPressed(Second))then
                indexWeapon = 1
                temp = 1
                flag = 1
                ClearLog()
OutputLogMessage(" AK47")

                   
               
           
            elseif (arg == Wkey1[1]) then
                indexWeapon = 1
                temp = 1
                flag = 1
                ClearLog()
OutputLogMessage(" AK47")


               
            end
           
            if (arg == Wkey3[4] and IsModifierPressed(Second))then
                indexWeapon = 4
                temp = 4
                flag = 1
                ClearLog()
OutputLogMessage(" MAA4")

                   
               
                   
            elseif (arg == Wkey1[4]) then
                indexWeapon = 4
                temp = 4
                flag = 1
                ClearLog()
OutputLogMessage(" M4A4")


            end
            if (arg == Wkey1[17]) then
                indexWeapon = 17
                temp = 17
                flag = 1
                ClearLog()
                OutputLogMessage("autotap\n")
            end
            if (arg == Wkey2[1]) then
                timeend[1] = GetRunningTime()
                if (timeend[1] - timebegin[1]) < 300 then
                    indexWeapon = 1
                    temp = 1
                    flag = 1
                    ClearLog()
OutputLogMessage(" AK47")
                end
                timebegin[1] = GetRunningTime()
            end
            if (arg == Wkey2[2]) then
                timeend[2] = GetRunningTime()
                if (timeend[2] - timebegin[2]) < 400 then
                    indexWeapon = 2
                    temp = 2
                    flag = 1
                    ClearLog()
OutputLogMessage(" GALIL")
                end
                timebegin[2] = GetRunningTime()
            end
            if (arg == Wkey2[3]) then
                timeend[3] = GetRunningTime()
                if (timeend[3] - timebegin[3]) < 400 then
                    indexWeapon = 3
                    temp = 3
                    flag = 1
                    ClearLog()
OutputLogMessage(" SG553")
                end
                timebegin[3] = GetRunningTime()
            end
            if (arg == Wkey2[4]) then
                timeend[4] = GetRunningTime()
                if (timeend[4] - timebegin[4]) < 400 then
                    indexWeapon = 4
                    temp = 4
                    flag = 1
                    ClearLog()
OutputLogMessage(" M4A4")
                end
                timebegin[4] = GetRunningTime()
            end
            if (arg == Wkey2[5]) then
                timeend[5] = GetRunningTime()
                if (timeend[5] - timebegin[5]) < 400 then
                    indexWeapon = 5
                    temp = 5
                    flag = 1
                    ClearLog()
OutputLogMessage(" M4A1")
                end
                timebegin[5] = GetRunningTime()
            end
            if (arg == Wkey2[6]) then
                timeend[6] = GetRunningTime()
                if (timeend[6] - timebegin[6]) < 400 then
                    indexWeapon = 6
                    temp = 6
                    flag = 1
                    ClearLog()
OutputLogMessage(" FAMAS")
                end
                timebegin[6] = GetRunningTime()
            end
            if (arg == Wkey2[7]) then
                timeend[7] = GetRunningTime()
                if (timeend[7] - timebegin[7]) < 400 then
                    indexWeapon = 7
                    temp = 7
                    flag = 1
                    ClearLog()
OutputLogMessage(" AUG")
                end
                timebegin[7] = GetRunningTime()
            end
            if (arg == Wkey2[8]) then
                timeend[8] = GetRunningTime()
                if (timeend[8] - timebegin[8]) < 400 then
                    indexWeapon = 8
                    temp = 8
                    flag = 1
                    ClearLog()
OutputLogMessage(" MP9")
                end
                timebegin[8] = GetRunningTime()
            end
            if (arg == Wkey2[9]) then
                timeend[9] = GetRunningTime()
                if (timeend[9] - timebegin[9]) < 400 then
                    indexWeapon = 9
                    temp = 9
                    flag = 1
                    ClearLog()
OutputLogMessage(" MAC10")
                end
                timebegin[9] = GetRunningTime()
            end
            if (arg == Wkey2[10]) then
                timeend[10] = GetRunningTime()
                if (timeend[10] - timebegin[10]) < 400 then
                    indexWeapon = 10
                    temp = 10
                    flag = 1
                    ClearLog()
OutputLogMessage(" UMP45")
                end
                timebegin[10] = GetRunningTime()
            end
            if (arg == Wkey2[11]) then
                timeend[11] = GetRunningTime()
                if (timeend[11] - timebegin[11]) < 400 then
                    indexWeapon = 11
                    temp = 11
                    flag = 1
                    ClearLog()

OutputLogMessage(" MP7")
                end
                timebegin[11] = GetRunningTime()
            end
            if (arg == Wkey2[12]) then
                timeend[12] = GetRunningTime()
                if (timeend[12] - timebegin[12]) < 400 then
                    indexWeapon = 12
                    temp = 12
                    flag = 1
                    ClearLog()
OutputLogMessage(" MP5SD")
                end
                timebegin[12] = GetRunningTime()
            end
            if (arg == Wkey2[13]) then
                timeend[13] = GetRunningTime()
                if (timeend[13] - timebegin[13]) < 400 then
                    indexWeapon = 13
                    temp = 13
                    flag = 1
                    ClearLog()
OutputLogMessage(" BIZON")
                end
                timebegin[13] = GetRunningTime()
            end
            if (arg == Wkey2[14]) then
                timeend[14] = GetRunningTime()
                if (timeend[14] - timebegin[14]) < 400 then
                    indexWeapon = 14
                    temp = 14
                    flag = 1
                    ClearLog()
OutputLogMessage(" P90 RUSHB")
                end
                timebegin[14] = GetRunningTime()
            end
            if (arg == Wkey2[15]) then
                timeend[15] = GetRunningTime()
                if (timeend[15] - timebegin[15]) < 400 then
                    indexWeapon = 15
                    temp = 15
                    flag = 1
                    ClearLog()
OutputLogMessage(" CZ75")
                end
                timebegin[15] = GetRunningTime()
            end
            if (arg == Wkey2[16]) then
                timeend[16] = GetRunningTime()
                if (timeend[16] - timebegin[16]) < 400 then
                    indexWeapon = 16
                    temp = 16
                    flag = 1
                    ClearLog()
OutputLogMessage(" M249")
                end
                timebegin[16] = GetRunningTime()
            end
            if (arg == Wkey2[17]) then
                timeend[17] = GetRunningTime()
                if (timeend[17] - timebegin[17]) < 400 then
                    indexWeapon = 17
                    temp = 17
                    flag = 1
                    ClearLog()
                    OutputLogMessage("autotap\n")
                end
                timebegin[17] = GetRunningTime()
            end
            if (not IsKeyLockOn("scrolllock")) and flag == 1 then
                PressAndReleaseKey("scrolllock")
                flag = 0
            end
            if (arg == offkey) then
                if mode==0 then
                    timeend[18] = GetRunningTime()
                    if (timeend[18] - timebegin[18] < 400) then
                        if not IsKeyLockOn("scrolllock") then
                            PressAndReleaseKey("scrolllock")
                        end
                        indexWeapon = temp
                        ClearLog()
OutputLogMessage(" ON")
                    else
                        if IsKeyLockOn("scrolllock") then
                            PressAndReleaseKey("scrolllock")
                        end
                        indexWeapon = 0
                        ClearLog()
OutputLogMessage(" OFF")
                    end
                    timebegin[18] = GetRunningTime()
                end
                if mode==1 then
                    if indexWeapon~=0 then
                        if IsKeyLockOn("scrolllock") then
                            PressAndReleaseKey("scrolllock")
                        end
                        indexWeapon = 0
                        ClearLog()
OutputLogMessage(" OFF")
                    else
                        if not IsKeyLockOn("scrolllock") then
                            PressAndReleaseKey("scrolllock")
                        end
                        indexWeapon = temp
                        ClearLog()
OutputLogMessage(" ON")
                    end
                end
                if (mode==2 or mode==3) then
                    if IsKeyLockOn("scrolllock") then
                        PressAndReleaseKey("scrolllock")
                    end
                    indexWeapon = 0
                    ClearLog()
OutputLogMessage(" OFF")
                end
            end
            Sleep(100)
        end
    end
end

function Sleep2(time)
    start = GetRunningTime()
    while (time + start > GetRunningTime())
    do
    end
end

function Sleep3(time)
    while (time > GetRunningTime())
    do
    end
end
 
Последнее редактирование:
Сверху Снизу