Advertisement
Guest User

Haxball Script by LOL

a guest
Jun 22nd, 2017
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2. #SingleInstance force
  3.  
  4. SetDefaultMouseSpeed 1
  5.  
  6. ;// variables
  7. currentTeam = none
  8. redX = 510
  9. spectX = 730
  10. blueX = 955
  11.  
  12. firstY = 400
  13. secondY = 425
  14. thirdY = 445
  15. fourthY = 470
  16. fifthY = 490
  17. sixthY = 513
  18.  
  19. autoBtnX = 360
  20. autoBtnY = 490
  21.  
  22. startBtnX = 730
  23. startBtnY = 740
  24.  
  25. mouseStartPosX = 650
  26. mouseStartPosY = 887
  27.  
  28.  
  29.  
  30. ;//functions
  31. StopStartTheGame()
  32. {
  33.     global startBtnX, startBtnY
  34.     Send, {esc}
  35.     Sleep, 50
  36.     MouseClick, left, startBtnX, startBtnY
  37.     ReturnMouseToStartPosition()
  38. }
  39.  
  40. ReturnMouseToStartPosition() ;// return to chat
  41. {
  42.     global mouseStartPosX, mouseStartPosY
  43.     MouseMove, mouseStartPosX, mouseStartPosY
  44. }
  45.  
  46. AddPlayerToTeam(playerY)
  47. {
  48.     global currentTeam, spectX, redX, blueX, firstY
  49.     if currentTeam = red
  50.     {
  51.         MouseClickDrag, left, spectX, playerY, redX, firstY
  52.     } else if currentTeam = blue
  53.     {
  54.         MouseClickDrag, left, spectX, playerY, blueX, firstY
  55.     }
  56. }
  57.  
  58. HideTrayTip(time) {
  59.     Sleep, time
  60.     TrayTip ;// Attempt to hide it the normal way.
  61.     if SubStr(A_OSVersion,1,3) = "10." {
  62.         Menu Tray, NoIcon
  63.         Sleep 200 ;// It may be necessary to adjust this sleep.
  64.         Menu Tray, Icon
  65.     }
  66. }
  67.  
  68.  
  69.  
  70.  
  71. NumPad7::
  72.     currentTeam = red
  73.  
  74.     StopStartTheGame()
  75.  
  76.     MouseClickDrag, left, redX, thirdY, spectX, firstY ;//
  77.     MouseClickDrag, left, redX, secondY, spectX, firstY ;// remove red command
  78.     MouseClickDrag, left, redX, firstY, spectX, firstY ;//
  79.  
  80.     Sleep, 50
  81.  
  82.     MouseClickDrag, left, spectX, firstY, redX, firstY ;// add first player to red
  83.  
  84.     ReturnMouseToStartPosition()
  85. return
  86.  
  87.  
  88. NumPad9::
  89.     currentTeam = blue
  90.  
  91.     StopStartTheGame()
  92.  
  93.     MouseClickDrag, left, blueX, thirdY, spectX, firstY ;//
  94.     MouseClickDrag, left, blueX, secondY, spectX, firstY ;// remove blue command
  95.     MouseClickDrag, left, blueX, firstY, spectX, firstY ;//
  96.  
  97.     Sleep, 50
  98.  
  99.     MouseClickDrag, left, spectX, firstY, blueX, firstY ;// add first player to blue
  100.  
  101.     ReturnMouseToStartPosition()
  102. return
  103.  
  104.  
  105. ;/////////////////////////////////////////////////////////////////////////
  106.  
  107. NumPad1::
  108.     AddPlayerToTeam(firstY)
  109.     ReturnMouseToStartPosition()
  110. return
  111.  
  112. NumPad2::
  113.     AddPlayerToTeam(secondY)
  114.     ReturnMouseToStartPosition()
  115. return
  116.  
  117. NumPad3::
  118.     AddPlayerToTeam(thirdY)
  119.     ReturnMouseToStartPosition()
  120. return
  121.  
  122. NumPad4::
  123.     AddPlayerToTeam(fourthY)
  124.     ReturnMouseToStartPosition()
  125. return
  126.  
  127. NumPad5::
  128.     AddPlayerToTeam(fifthY)
  129.     ReturnMouseToStartPosition()
  130. return
  131.  
  132. NumPad6::
  133.     AddPlayerToTeam(sixthY)
  134.     ReturnMouseToStartPosition()
  135. return
  136.  
  137. NumPad8::
  138.     AddPlayerToTeam(firstY)
  139.     AddPlayerToTeam(firstY)
  140.     ReturnMouseToStartPosition()
  141. return
  142.  
  143. NumPadDiv & NumPad7::
  144.     currentTeam = red
  145.     TrayTip TEAM, RED
  146.     HideTrayTip(2000)
  147. return
  148.  
  149. NumPadDiv & NumPad9::
  150.     currentTeam = blue
  151.     TrayTip TEAM, BLUE
  152.     HideTrayTip(2000)
  153. return
  154.  
  155. NumPadAdd::
  156.     global currentTeam
  157.     if currentTeam = red
  158.     {
  159.         currentTeam = blue
  160.         TrayTip TEAM, BLUE
  161.         HideTrayTip(500)
  162.     } else if currentTeam = blue
  163.     {
  164.         currentTeam = red
  165.         TrayTip TEAM, RED
  166.         HideTrayTip(500)   
  167.     }
  168. return
  169.  
  170. NumPadEnter::
  171.     StopStartTheGame()
  172. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement