Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.88 KB | None | 0 0
  1. #Include MaxAPO.ahk
  2. #ifWinActive, GTA:SA:MP
  3. #SingleInstance, force
  4. #Persistent
  5. #UseHook
  6. #NoEnv
  7.  
  8.  
  9. global username := GetUsername()
  10.  
  11. if(username == "")
  12. {
  13. RegRead, username, HKCU, Software\SAMP, PlayerName
  14. }
  15. url = http://wheelman.jameschans.de/keybinder/check.php?name=%username%
  16. UrlDownloadtoVar(url, result)
  17. if(result == 0 || result == -1 || result == -2)
  18. {
  19. MsgBox, 16, Fehler, Du stehst nicht auf der Whitelist`, bitte kontaktiere die Leaderschaft, 4
  20. ExitApp
  21. } else {
  22. VarSetCapacity(url, -1)
  23. VarSetCapacity(result, -1)
  24. }
  25.  
  26.  
  27.  
  28. Settimer, hacken, On
  29. SetTimer, Grabben, On
  30. SetTimer, accept, On
  31.  
  32.  
  33. gui, font, s10, Verdana
  34. Gui, Add, Text, x5 y5 w260 h160 , Für die die den Wheelman Keybinder nicht benutzen wollen.`nEin Zusatz Programm das Eure Daten ins Wheelman CP einträgt.
  35. Gui, Show, w261 h135, Wheelman Zusatz
  36. return
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. hacken: ; Nach XTasten Timer
  46. GetChatLine(0, line1)
  47. GetChatLine(1, line2)
  48. GetChatLine(2, line3)
  49. VarSetCapacity(urli, ERROR)
  50. VarSetCapacity(money_, ERROR)
  51. VarSetCapacity(money_1, ERROR)
  52. VarSetCapacity(money_2, ERROR)
  53. VarSetCapacity(resultm, ERROR)
  54. VarSetCapacity(resultm_1, ERROR)
  55. VarSetCapacity(resultm_2, ERROR)
  56. VarSetCapacity(result, ERROR)
  57. VarSetCapacity(result_, ERROR)
  58. VarSetCapacity(result_1, ERROR)
  59. VarSetCapacity(result_2, ERROR)
  60. VarSetCapacity(line3name, ERROR)
  61. VarSetCapacity(line2name, ERROR)
  62. VarSetCapacity(line1name, ERROR)
  63. if(InStr(line1, "hat einen Eintrag entfernt. Verbleibend:") && !InStr(line2, "hat einen Eintrag entfernt. Verbleibend:") && !InStr(line3, "hat einen Eintrag entfernt. Verbleibend:"))
  64. {
  65. RegExMatch(line1, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", money_)
  66. line1name := money_1
  67. if(line1name == line2name || line1name == line3name || line1name == "")
  68. return
  69. urli = http://wheelman.jameschans.de/keybinder/einnahme.php?name=%username%&einnahme=%money_2%
  70. UrlDownloadToVar(urli, resultm)
  71. StringSplit, resultm_, resultm, ~
  72. url = http://wheelman.jameschans.de/keybinder/gehackt.php?name=%username%&anzahl=1
  73. UrlDownloadToVar(url, result)
  74. StringSplit, result_, result, ~
  75. if(result_1 == 11 && resultm_1 == 1 || result_1 == 1 && resultm_1 == 1)
  76. {
  77. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Du hast bereits " result_2 " Wanteds gehackt und bereits " resultm_2 "$ verdient.")
  78. Sleep 1000
  79.  
  80. } else {
  81. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Datenbankfehler. Bitte an John_Reese oder Pietro_Miller wenden.")
  82. }
  83. }
  84. if(InStr(line2, "hat einen Eintrag entfernt. Verbleibend:") && !InStr(line3, "hat einen Eintrag entfernt. Verbleibend:"))
  85. {
  86. RegExMatch(line2, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", moneyl2_)
  87. RegExMatch(line1, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", moneyl1_)
  88. line2name := moneyl2_1
  89. line1name := moneyl1_1
  90. money_gesamt := 0
  91. if(line2name == line1name || line2name == line3name || line2name == "" || line1name == "")
  92. return
  93. money_gesamt += moneyl2_2
  94. money_gesamt += moneyl1_2
  95. urli = http://wheelman.jameschans.de/keybinder/einnahme.php?name=%username%&einnahme=%money_gesamt%
  96. UrlDownloadToVar(urli, resultm)
  97. StringSplit, resultm_, resultm, ~
  98. url = http://wheelman.jameschans.de/keybinder/gehackt.php?name=%username%&anzahl=2
  99. UrlDownloadToVar(url, result)
  100. StringSplit, result_, result, ~
  101. if(result_1 == 11 && resultm_1 == 1 || result_1 == 1 && resultm_1 == 1)
  102. {
  103. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Du hast bereits " result_2 " Wanteds gehackt und bereits " resultm_2 "$ verdient.")
  104. Sleep 1000
  105. } else {
  106. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Datenbankfehler. Bitte an John_Reese oder Pietro_Miller wenden.")
  107. }
  108. }
  109. if(InStr(line3, "hat einen Eintrag entfernt. Verbleibend:"))
  110. {
  111. RegExMatch(line3, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", moneyl3_)
  112. RegExMatch(line2, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", moneyl2_)
  113. RegExMatch(line1, "(.*) hat einen Eintrag entfernt. Verbleibend: .* \(\+(.+)\$\)", moneyl1_)
  114. line3name := moneyl3_1
  115. line2name := moneyl2_1
  116. line1name := moneyl1_1
  117. money_gesamt := 0
  118. if(line3name == line2name || line3name == line1name || line2name == "" || line1name == "" || line3name == "")
  119. return
  120. money_gesamt += moneyl3_2
  121. money_gesamt += moneyl2_2
  122. money_gesamt += moneyl1_2
  123.  
  124. urli = http://wheelman.jameschans.de/keybinder/einnahme.php?name=%username%&einnahme=%money_gesamt%
  125. UrlDownloadToVar(urli, resultm)
  126. StringSplit, resultm_, resultm, ~
  127. url = http://wheelman.jameschans.de/keybinder/gehackt.php?name=%username%&anzahl=3
  128. UrlDownloadToVar(url, result)
  129. StringSplit, result_, result, ~
  130. if(result_1 == 11 && resultm_1 == 1 || result_1 == 1 && resultm_1 == 1)
  131. {
  132. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Du hast bereits " result_2 " Wanteds gehackt und bereits " resultm_2 "$ verdient.")
  133. Sleep 1000
  134. } else {
  135. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Datenbankfehler. Bitte an John_Reese oder Pietro_Miller wenden.")
  136. }
  137. }
  138. return
  139.  
  140.  
  141.  
  142.  
  143. accept:
  144. username := GetUsername()
  145. GetChatLine(0, line1)
  146. if(InStr(line1, "Du hast den Auftrag von") && InStr(line1, "angenommen"))
  147. {
  148.  
  149. Settimer, accept, off
  150. url = http://wheelman.jameschans.de/keybinder/angen.php?name=%username%
  151. UrlDownloadToVar(url, result)
  152. StringSplit, result_, result, ~
  153. if(result_1 == 1)
  154. {
  155. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Du hast bereits " result_2 " Aufträge angenommen")
  156. } else {
  157. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Datenbankfehler. Bitte an John_Reese oder Pietro_Miller wenden.")
  158. }
  159. }
  160. return
  161.  
  162.  
  163.  
  164.  
  165. Grabben:
  166. zone := GetPlayerZone()
  167. City := GetPlayerCity()
  168. GetChatLine(1, line)
  169. if(InStr(line, "* Du versuchst") && InStr(line, "in dein Fahrzeug zu ziehen."))
  170. {
  171. SendChat("/f Ich Versuche den Kunden Rauszuziehen. Bitte PD blockieren. | Pos: "zone " "City "")
  172. Sleep 1000
  173. ShowGameText("~g~5 ~g~ sec", 1000, 3)
  174. GetChatLine(0, line1)
  175. if(InStr(line1, "Du bist nicht in der Nähe des Spielers"))
  176. {
  177. return
  178. }
  179. Sleep 1000
  180. ShowGameText("~g~4 ~g~ sec", 1000, 3)
  181. GetChatLine(0, line1)
  182. if(InStr(line1, "Du bist nicht in der Nähe des Spielers"))
  183. {
  184. return
  185. }
  186. Sleep 1000
  187. ShowGameText("~g~3 ~g~ sec", 1000, 3)
  188. GetChatLine(0, line1)
  189. if(InStr(line1, "Du bist nicht in der Nähe des Spielers"))
  190. {
  191. return
  192. }
  193. Sleep 1000
  194. ShowGameText("~g~2 ~g~ sec", 1000, 3)
  195. GetChatLine(0, line1)
  196. if(InStr(line1, "Du bist nicht in der Nähe des Spielers"))
  197. {
  198. return
  199. }
  200. Sleep 1000
  201. ShowGameText("~g~1 ~g~ sec", 1000, 3)
  202. }
  203. GetChatLine(0, line1)
  204. if(InStr(line1, "Du bist nicht in der Nähe des Spielers"))
  205. {
  206. return
  207. }
  208. ; Bei Grabben Timer nach der letzten }
  209. GetChatLine(0, line1)
  210. if(InStr(line1, "steigt in dein Fahrzeug ein und zahlt"))
  211. {
  212. RegExMatch(line1, "steigt in dein Fahrzeug ein und zahlt (.*)\$", money_)
  213. urli = http://wheelman.jameschans.de/keybinder/einnahme.php?name=%username%&einnahme=%money_1%
  214. UrlDownloadToVar(urli, resultm)
  215. StringSplit, resultm_, resultm, ~
  216. SendChat("/f Ich habe den Kunden Erfolgreich befreit. Danke!")
  217. url = http://wheelman.jameschans.de/keybinder/ausge.php?name=%username%
  218. VarSetCapacity(result, -)
  219. VarSetCapacity(result_1, -)
  220. URLDownloadToVar(url, result)
  221. StringSplit, result, result, ~
  222.  
  223. if(result1 == 1 && resultm_1 == 1)
  224. {
  225. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Du hast schon " result2 " Personen befreit und " resultm_2 "$ verdient.")
  226. } else {
  227. AddChatMessage("|{01DF01}Wheelman{FFFFFF}| Datenbankfehler. Bitte an Pietro_Miller oder John_Reese wenden.")
  228. }
  229. }
  230.  
  231. return
  232.  
  233.  
  234.  
  235. UrlDownloadToVar(URL, ByRef Result, UserAgent = "", Proxy = "", ProxyBypass = "")
  236. {
  237. hModule := DllCall("LoadLibrary", "Str", "wininet.dll")
  238. AccessType := Proxy != "" ? 3 : 1
  239. io := DllCall("wininet\InternetOpenA", "Str", UserAgent, "UInt", AccessType, "Str", Proxy, "Str", ProxyBypass, "UInt", 0)
  240.  
  241. iou := DllCall("wininet\InternetOpenUrlA", "UInt", io, "Str", url, "Str", "", "UInt", 0, "UInt", 0x80000000, "UInt", 0)
  242. If (ErrorLevel != 0 or iou = 0) {
  243. DllCall("FreeLibrary", "UInt", hModule)
  244. return 0
  245. }
  246.  
  247. VarSetCapacity(buffer, 10240, 0)
  248. VarSetCapacity(BytesRead, 4, 0)
  249.  
  250. Loop
  251. {
  252. irf := DllCall("wininet\InternetReadFile", "UInt", iou, "UInt", &buffer, "UInt", 10240, "UInt", &BytesRead)
  253. VarSetCapacity(buffer, -1)
  254. BytesRead_ = 0
  255.  
  256. Loop, 4
  257. BytesRead_ += *(&BytesRead + A_Index-1) << 8*(A_Index-1)
  258. If (irf = 1 and BytesRead_ = 0)
  259. break
  260. Else
  261. Result .= SubStr(buffer, 1, BytesRead_)
  262. }
  263.  
  264. DllCall("wininet\InternetCloseHandle", "UInt", iou)
  265. DllCall("wininet\InternetCloseHandle", "UInt", io)
  266. DllCall("FreeLibrary", "UInt", hModule)
  267. }
  268.  
  269.  
  270. GuiClose:
  271. DllCall("AnimateWindow", "UInt", GuiID, "Int", 1400 , "UInt", AW_SLIDE + AW_CENTER + AW_HIDE)
  272. FormatTime, LastLoginTime ,, dd.MM.yyyy HH:mm:ss
  273. ;MsgBox, 64, Wheelman Keybinder,Der Keybinder wird nun Beendet.
  274. Gui Destroy
  275. ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement