Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.88 KB | None | 0 0
  1. ; <COMPILER: v1.1.24.01>
  2. #NoEnv
  3. #SingleInstance force
  4. #KeyHistory, 0
  5. ListLines, Off
  6. SetBatchLines, -1
  7. CoordMode, Pixel, Screen
  8.  
  9. verHash := "2.0.1"
  10. Gui Add, Text, x220 y25 w130 h30, Start [F1]
  11. ; Gui Add, Text, x220 y45 w110 h30, Large Screen [F2]
  12. Gui Add, Text, x220 y65 w160 h30, Restart Program [F3]
  13. Gui Add, Text, x220 y85 w110 h30, Pause/Resume [F4]
  14.  
  15. Gui Add, GroupBox, x10 y120 w160 h45, Speed
  16. Gui Add, GroupBox, x10 y10 w180 h100, Intro
  17. Gui Add, Text, x20 y30 w165 h25, MPGH PUB
  18. Gui Add, Text, x20 y55 w165 h25, Active when Mouse were pressed
  19.  
  20. GoSub getProfile
  21.  
  22. Gui Add, Text, x40 y144 w35 h20, rx:
  23. Gui Add, Edit, x80 y140 w50 h20 vrx, %pfrx%
  24. Gui Add, Button, x230 y210 w100 h20 gsub1, How-to
  25. Gui Add, Button, x230 y240 w100 h20 gsub2, Get lastest ver
  26. Gui Add, GroupBox, x8 y265 w187 h210, Misc
  27. Gui Add, CheckBox, x16 y288 w160 h20 voverlayActive, Overlay
  28. Gui Add, CheckBox, x16 y328 w160 h20 vreaper, Reaper Fast Reload
  29. ; Gui Add, Text, x16 y428 w160 h20, LtoRaddendOffset:
  30. ; Gui Add, Edit, x16 y448 w160 h20 vLtoRaddendOffset, 1.2
  31. ; Gui Add, Text, x16 y200 w33 h20, x-axis:
  32. ; Gui Add, Slider,x48 y200 w130 h25 vxrange Invert Tickinterval1 range1-4, 4
  33. ; Gui Add, Text, x16 y224 w35 h19, y-axis:
  34. ; Gui Add, Slider,x48 y224 w130 h25 vyrange Invert Tickinterval1 range1-4, 4
  35. Gui Add, Edit, x315 y140 w30 h20 vya, %pfya%
  36. Gui Add, Text, x280 y140 w35 h20, Y:
  37. Gui Add, Text, x208 y140 w35 h20, X:
  38. Gui Add, Edit, x240 y140 w35 h20 vxa, %pfxa%
  39. Gui Add, GroupBox, x205 y120 w160 h45, Shoot
  40. Gui Add, Text, x220 y300 w130 h150, `n`nThe software is just for fun`n`nYou should only use it for legal propose`n`n
  41. Gui Show, w372 h480, MPGH Pub
  42. Gosub isUpdate
  43. Return
  44.  
  45. sub1:
  46. {
  47. msgbox, How-to:`n`nLaunch Game. Set display mode to Borderless Windowed mode in Settings.`nSet your quality settings to Low.`n`nTo-use:`nPress F1 or F2 depending on your screen size. If you are not sure, just try them both. `nShoot an Enemy. When the Health Bar is visible, Overkill v2.0 will start to auto-aiming for about 1s when capslock is pressed.`n`n Speed: represent the moving speed of auto-aiming. If your mouse shakes badly, you should turn it down, otherwise you should turn it up.`n`n Shoot: represent the offset of the final aimming point. If you think this point on the left of the adversaries' head, increase X. If you think this point is higher than the adversaries' head, increase Y. `n`n Misc: Just explore it.
  48. }
  49. return
  50.  
  51. sub2:
  52. {
  53. Run, https://www.mpgh.net
  54. }
  55.  
  56. GuiClose:
  57. ExitApp
  58. return
  59.  
  60. Change1:
  61. MsgBox, Applied
  62. Gui,Submit, Nohide
  63. return
  64.  
  65. DebugTool:
  66. MouseGetPos, MX, MY
  67. ToolTip, %AimOffsetX% | %AimOffsetY%
  68. ToolTip, %AimX% | %AimY%
  69. ToolTip, %IntAimX% | %IntAimY%
  70. ToolTip, %RootX% | %RootY%
  71. ToolTip, %MoveX% | %MoveY% || %MX% %MY%
  72. Return
  73.  
  74.  
  75. F1::
  76. Gui, Submit, NoHide
  77.  
  78. headX := 41 + xa*3
  79. headY := 77 + ya*5
  80.  
  81.  
  82.  
  83. ;save profile
  84. GoSub saveProfile
  85.  
  86. if(overlayActive=1){
  87. Box_Init("FF0000")
  88. Box_Draw((A_ScreenWidth)/2 - headX-15, (A_ScreenHeight)/2 - headY-30
  89. , 20, 40)
  90. }
  91.  
  92. Init := new OverWatch(rx,headX,headY)
  93.  
  94. Loop
  95. {
  96. If ( Init.Firing("LButton") )
  97. {
  98. Pos := Init.Search()
  99. Init.Calc(Pos.X, Pos.Y)
  100.  
  101. }
  102. }
  103. Return
  104. getProfile:
  105. file := FileOpen("overkill.conf", "r")
  106. if !IsObject(file)
  107. {
  108. pfrx := 5
  109. pfxa := 0
  110. pfya := 0
  111. return
  112. }
  113. i := 0
  114. Loop, 3
  115. { i := i+1
  116. Line := file.ReadLine()
  117. if(i==1)
  118. {
  119. pfxa:=SubStr(Line,1,StrLen(Line)-1)
  120. }
  121. if(i==2)
  122. {
  123. pfya := SubStr(Line,1,StrLen(Line)-1)
  124. }
  125. if(i==3)
  126. {
  127. pfrx := SubStr(Line,1,StrLen(Line)-1)
  128. }
  129. }
  130. file.Close()
  131. return
  132.  
  133. saveProfile:
  134. FileDelete,overkill.conf
  135. file := FileOpen("overkill.conf", "w")
  136. if !IsObject(file)
  137. {
  138. return
  139. }
  140. i:=0
  141. Loop, 3
  142. { i:=i+1
  143. if(i==1)
  144. {
  145. Line:=xa
  146. }
  147. if(i==2)
  148. {
  149. Line:=ya
  150. }
  151. if(i==3)
  152. {
  153. Line:=rx
  154. }
  155. file.WriteLine(Line)
  156. }
  157. file.Close()
  158. return
  159.  
  160.  
  161.  
  162.  
  163. isUpdate:
  164. Loop, HKLM, System\MountedDevices
  165. If mac := A_LoopRegName
  166. Break
  167. RegExMatch(mac, ".*-(.*)}", mac)
  168.  
  169. url := "https://www.xiaof3i.com/overkill.php?uid="+mac1
  170.  
  171. whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
  172. whr.Open("GET", url, true)
  173. whr.Send()
  174. whr.WaitForResponse()
  175. version := whr.ResponseText
  176. if (version<>verHash)
  177. {
  178. MsgBox, 4,, new version released, want to update?
  179. IfMsgBox Yes
  180. Gosub sub2
  181. }
  182.  
  183. return
  184.  
  185.  
  186. reload:
  187. SleepF1:
  188. SleepDuration = 1
  189. TimePeriod = 1
  190. DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)
  191. Iterations = 1
  192. StartTime := A_TickCount
  193. Loop, %Iterations% {
  194. DllCall("Sleep", UInt, TimePeriod)
  195. }
  196. DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
  197. Return
  198.  
  199.  
  200. DebugTool1:
  201. MouseGetPos, MX, MY
  202. ToolTip, %xa% | %xy%
  203. Return
  204.  
  205. ~capslock::
  206. pause
  207. SoundBEEP
  208. return
  209.  
  210. F3::
  211. Reload
  212. Return
  213.  
  214. Box_Init(C="FF0000") {
  215. Gui, 96: -Caption +ToolWindow +E0x20
  216. Gui, 96: Color, % C
  217. Gui, 97: -Caption +ToolWindow +E0x20
  218. Gui, 97: Color, % C
  219. Gui, 98: -Caption +ToolWindow +E0x20
  220. Gui, 98: Color, % C
  221. Gui, 99: -Caption +ToolWindow +E0x20
  222. Gui, 99: Color, % C
  223. }
  224. Box_Draw(X, Y, W, H, T="1", O="I") {
  225. If(W < 0)
  226. X += W, W *= -1
  227. If(H < 0)
  228. Y += H, H *= -1
  229. If(T >= 2)
  230. {
  231. If(O == "O")
  232. X -= T, Y -= T, W += T, H += T
  233. If(O == "C")
  234. X -= T / 2, Y -= T / 2
  235. If(O == "I")
  236. W -= T, H -= T
  237. }
  238. Gui, 96: Show, % "x" X " y" Y " w" W " h" T " NA", Horizontal 1
  239. Gui, 96:+AlwaysOnTop
  240. Gui, 98: Show, % "x" X " y" Y + H " w" W " h" T " NA", Horizontal 2
  241. Gui, 98:+AlwaysOnTop
  242. Gui, 97: Show, % "x" X " y" Y " w" T " h" H " NA", Vertical 1
  243. Gui, 97:+AlwaysOnTop
  244. Gui, 99: Show, % "x" X + W " y" Y " w" T " h" H " NA", Vertical 2
  245. Gui, 99:+AlwaysOnTop
  246. }
  247. Box_Destroy() {
  248. Loop, 4
  249. Gui, % A_Index + 95 ": Destroy"
  250. }
  251. Box_Hide() {
  252. Loop, 4
  253. Gui, % A_Index + 95 ": Hide"
  254. }
  255.  
  256. Class OverWatch
  257. {
  258. __New(rx,headX,headY)
  259. {
  260. this.rx := rx
  261. this.offset := rx / 10
  262. this.headX := headX
  263. this.headY := headY
  264. }
  265.  
  266. Firing(Key)
  267. {
  268. Return GetKeyState(Key, "P")
  269. }
  270.  
  271. Search()
  272. {
  273. Static X1 := (A_ScreenWidth)/2 - (A_ScreenWidth)/7
  274. , Y1 := (A_ScreenHeight)/2 - (A_ScreenHeight)/5
  275. , X2 := (A_ScreenWidth)/2 + (A_ScreenWidth)/7
  276. , Y2 := (A_ScreenHeight)/2 + (A_ScreenHeight)/7
  277. , ColorID := 0xFF0013, ColorVariation := 0
  278.  
  279. Loop
  280. {
  281. PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID, Variation, Fast RGB
  282. } Until ErrorLevel = 0
  283.  
  284. Return {x: OutputVarX, y: OutputVarY}
  285. }
  286.  
  287. Calc(x, y)
  288. { If ( this.AntiShake(x) )
  289. {
  290. x := Floor( (x - A_ScreenWidth/2 + this.headX) * this.offset)
  291. y := Floor( (y - A_ScreenHeight/2 + this.headY) * this.offset)
  292. this.MouseMove(x, y)
  293. }
  294. }
  295.  
  296.  
  297.  
  298. AntiShake(x)
  299. {
  300. If ( this.findBar() )
  301. {
  302. If ( Abs(x - A_ScreenWidth/2 + this.headX)> 60)
  303. {
  304. Return false
  305. }
  306. }
  307. Return true
  308. }
  309.  
  310. findBar()
  311. {
  312. barX := (A_ScreenWidth)/2-this.headX
  313. barY := (A_ScreenHeight)/2-this.headY
  314. PixelSearch, OutputVarX, OutputVarY, barX-15, barY-30, barX+5, barY+15, 0xFF0013, 0, Fast RGB
  315. if ErrorLevel
  316. Return false
  317. else
  318. Return true
  319. }
  320.  
  321.  
  322. MouseMove(x, y)
  323. {
  324. Return DllCall("mouse_event", "UInt", 0x01, "Int", x, "Int", y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement