Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.02 KB | None | 0 0
  1. function OnEvent(event, arg)
  2.     local Delay = function () Sleep(math.random(30, 400)) end
  3.     local m_tbl = {
  4.                     [1] = function () OutputLogMessage("[1] - LMB\n") end,
  5.                     [2] = function () OutputLogMessage("[2] - RMB\n") end,
  6.  
  7.                     -- Ctrl + A
  8.                     [3] = function ()
  9.                             PressKey(0x11d)
  10.                             PressAndReleaseKey("a")
  11.                             ReleaseKey(0x11d)
  12.                          end,
  13.  
  14.                     [4] = function ()
  15.                             PressKey(0x2a)
  16.                             PressAndReleaseKey("o")
  17.                             Delay()
  18.                             PressAndReleaseKey("p")
  19.                             Delay()
  20.                             PressAndReleaseKey(0x39, 0x4a, 0x39)
  21.                             Delay()
  22.                             PressAndReleaseKey("h")
  23.                             Delay()
  24.                             PressAndReleaseKey("u")
  25.                             Delay()
  26.                             PressAndReleaseKey("i", 0x39)
  27.                             ReleaseKey(0x2a)
  28.                          end,
  29.  
  30.                     [5] = function ()
  31.                          end,
  32.  
  33.                     [6] = function ()
  34.                          end
  35.                 }
  36.  
  37.     if (event == "PROFILE_ACTIVATED") then
  38.         EnablePrimaryMouseButtonEvents(1)
  39.     end
  40.  
  41.     if (event == "MOUSE_BUTTON_PRESSED") then
  42.         m_tbl[arg]()
  43.     end
  44.  
  45.     --OutputLogMessage("event = %s, arg = %s\n", event, arg)
  46. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement