HolywoodJack

WantedStars [gta3Script] NOT Tested

Feb 17th, 2017
230
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SCRIPT_START
  2. {
  3.  
  4. LVAR_INT Player
  5. LVAR_INT CWanted CWantedChaos CWantedStar MAX_STARS MAX_CHAOS
  6. LVAR_INT var8 var9 _playerStatsInteger NumOfPoliceBribesCollected
  7. LVAR_INT String_HashesPntr _maxWantedChaos _maxWantedStars
  8. LVAR_INT MilitaryZoneAreaCheck_Pntr militaryZone
  9.  
  10. militaryZone = 0x10
  11.  
  12.  
  13. READ_MEMORY 0x438513 4 FALSE String_HashesPntr // _cheatStringHashes
  14. String_HashesPntr += 0x14
  15. WRITE_MEMORY String_HashesPntr size 4 value 0 FALSE // TURNDOWNTHEHEAT 0 [ASNAEB]
  16.  
  17. READ_MEMORY 0x438513 4 FALSE String_HashesPntr // _cheatStringHashes
  18. String_HashesPntr += 0x108
  19. WRITE_MEMORY String_HashesPntr size 4 value 0 FALSE // BRINGITON 6 [LJSPQK]
  20.  
  21. READ_MEMORY 0x561C7C size 4 FALSE _maxWantedChaos
  22. WRITE_MEMORY _maxWantedChaos 2 MAX_CHAOS FALSE // 0x23F0
  23.  
  24. READ_MEMORY 0x48CB53 4 FALSE _maxWantedStars
  25. WRITE_MEMORY _maxWantedStars 4 MAX_STARS FALSE // 0x06
  26.  
  27. SET_DISABLE_MILITARY_ZONES 0
  28. WRITE_MEMORY 0x72DF2A 1 MAX_STARS FALSE // ; _updateWantedLevel
  29. WRITE_MEMORY 0x561EF3 4 MAX_STARS FALSE // ; SetMaximumWantedLevel
  30. WRITE_MEMORY 0x561EFD 4 MAX_CHAOS FALSE // ; SetMaximumWantedLevel
  31. WRITE_MEMORY 0x561C76 4 MAX_STARS FALSE // ; _initMaxWantedLevel
  32. WRITE_MEMORY 0x58DFE4 1 MAX_STARS TRUE // ; Draw2D__WantedLevel
  33. WRITE_MEMORY 0x4396F1 1 MAX_STARS TRUE // ; _cheatSixWantedStars
  34. WRITE_MEMORY 0x561FB6 2 0x9090 FALSE // ; CWanted::NumOfHelisRequired NOP jg 6 short loc_561FA6
  35.  
  36. // replacing ja 6 "loc_default" with the "loc_case_6" instead:
  37. WRITE_MEMORY 0x41CAB0 4 0x7B870F TRUE // ; CCarAI::FindPoliceCarSpeedForWantedLevel ja loc_41CB31 (jump change)
  38. WRITE_MEMORY 0x561E77 4 0x70870F TRUE // ; CWanted::SetMaximumWantedLevel ja loc_561EED (jump change)
  39. WRITE_MEMORY 0x5624A4 2 0x5277 TRUE // ; CWanted::SetWantedLevel ja loc_5624F8 (jump change)
  40. WRITE_MEMORY 0x6C74E3 2 0x2377 TRUE // ; CHeli::ProcessControl
  41. WRITE_MEMORY 0x41FD01 2 0x0E77 TRUE // ; CCarAI::UpdateCarAI
  42. WRITE_MEMORY 0x41C9E0 2 0x2977 TRUE
  43. WRITE_MEMORY 0x41CB80 2 0x4F77 TRUE
  44. WRITE_MEMORY 0x4352F1 2 0x0E77 TRUE
  45. WRITE_MEMORY 0x435331 2 0x0E77 TRUE
  46.  
  47. :main_loop
  48. WAIT 0
  49. GOSUB BribeCheck
  50. REDAD_MEMORY 0x558E5C 4 FALSE _playerStatsInteger
  51. _playerStatsInteger += 0x2D8 // 0xB6 * 0x04 = 0x2D8
  52. REDAD_MEMORY _playerStatsInteger 4 FALSE NumOfPoliceBribesCollected
  53. IF NumOfPoliceBribesCollected == var8
  54. THEN
  55. IF IS_WANTED_LEVEL_GREATER Player 5
  56. THEN
  57. GOSUB CheckWantedChaos
  58. CWantedChaos -= 2500
  59. WRITE_MEMORY CWanted 4 CWantedChaos FALSE
  60. var9 = 0
  61. ENDIF
  62. ENDIF
  63.  
  64. GOSUB CheckWantedChaos
  65. IF CWantedChaos >= MAX_CHAOS
  66. THEN
  67. GOSUB CheckWantedStar
  68. IF NOT CWantedStar == MAX_STARS
  69. THEN
  70. GOSUB max_stars
  71. ENDIF
  72. ELSE
  73. GOSUB CheckWantedChaos
  74. IF CWantedChaos >= 9200
  75. THEN
  76. GOSUB CheckWantedStar
  77. IF NOT CWantedStar == 8
  78. THEN
  79. GOSUB STAR8
  80. ENDIF
  81. ELSE
  82. GOSUB CheckWantedChaos
  83. IF 1@ >= 6700
  84. THEN
  85. GOSUB CheckWantedStar
  86. IF NOT CWantedStar == 7
  87. THEN
  88. GOSUB STAR7
  89. ENDIF
  90. ELSE
  91. IF CWantedChaos >= 4600
  92. THEN
  93. GOSUB CheckWantedStar
  94. IF NOT CWantedStar == 6
  95. THEN
  96. GOSUB CheckWantedChaos
  97. GOSUB STAR6
  98. ENDIF
  99. ENDIF
  100. ENDIF
  101. ENDIF
  102. ENDIF
  103.  
  104. READ_MEMORY 0x72D6B8 4 FALSE MilitaryZoneAreaCheck_Pntr
  105. MilitaryZoneAreaCheck_Pntr ++
  106. READ_MEMORY MilitaryZoneAreaCheck_Pntr 4 FALSE MilitaryZoneAreaCheck_Pntr
  107. IF MilitaryZoneAreaCheck_Pntr == militaryZone
  108. THEN
  109. GOSUB CheckWantedStar
  110. IF NOT CWantedStar == MAX_STARS
  111. THEN
  112. GOSUB max_stars
  113. ENDIF
  114. ENDIF
  115.  
  116. IF OR
  117. TEST_CHEAT "MAXWANTED"
  118. TEST_CHEAT "BRINGITON"
  119. TEST_CHEAT "LJSPQK"
  120. THEN
  121. GOSUB CheckWantedStar
  122. IF NOT CWantedStar == MAX_STARS
  123. THEN
  124. PRINT_HELP 'CHEAT5'
  125. GOSUB max_stars
  126. ENDIF
  127. ELSE
  128. IF TEST_CHEAT "STAR8"
  129. THEN
  130. GOSUB CheckWantedStar
  131. IF NOT CWantedStar == 8
  132. THEN
  133. PRINT_HELP 'CHEAT5'
  134. GOSUB STAR8
  135. ENDIF
  136. ELSE
  137. IF TEST_CHEAT "STAR7"
  138. THEN
  139. GOSUB CheckWantedStar
  140. IF NOT CWantedStar == 7
  141. THEN
  142. PRINT_HELP 'CHEAT5'
  143. GOSUB STAR7
  144. ENDIF
  145. ELSE
  146. IF TEST_CHEAT "STAR6"
  147. THEN
  148. GOSUB CheckWantedStar
  149. IF NOT CWantedStar == 6
  150. THEN
  151. PRINT_HELP 'CHEAT5'
  152. GOSUB CheckWantedChaos
  153. GOSUB STAR6
  154. ENDIF
  155. ELSE
  156. IF TEST_CHEAT "STAR5"
  157. THEN
  158. GOSUB CheckWantedStar
  159. IF NOT CWantedStar == 5
  160. THEN
  161. 010D: set_player $PLAYER_CHAR wanted_level_to 5
  162. ENDIF
  163. ELSE
  164. IF TEST_CHEAT "STAR4"
  165. THEN
  166. GOSUB CheckWantedStar
  167. IF NOT CWantedStar == 4
  168. THEN
  169. 010D: set_player $PLAYER_CHAR wanted_level_to 4
  170. ENDIF
  171. ELSE
  172. IF TEST_CHEAT "STAR3"
  173. THEN
  174. GOSUB CheckWantedStar
  175. IF NOT CWantedStar == 3
  176. THEN
  177. 010D: set_player $PLAYER_CHAR wanted_level_to 3
  178. ENDIF
  179. ELSE
  180. IF TEST_CHEAT "STAR2"
  181. THEN
  182. GOSUB CheckWantedStar
  183. IF NOT CWantedStar == 2
  184. THEN
  185. 010D: set_player $PLAYER_CHAR wanted_level_to 2
  186. ENDIF
  187. ELSE
  188. IF TEST_CHEAT "STAR1"
  189. THEN
  190. GOSUB CheckWantedStar
  191. IF NOT CWantedStar == 1
  192. THEN
  193. 010D: set_player $PLAYER_CHAR wanted_level_to 1
  194. ENDIF
  195. ELSE
  196. IF OR
  197. TEST_CHEAT "CLEAR"
  198. TEST_CHEAT "ASNAEB"
  199. TEST_CHEAT "TURNDOWNTHEHEAT"
  200. THEN
  201. GOSUB CheckWantedStar
  202. IF NOT CWantedStar == 0
  203. THEN
  204. 010D: set_player $PLAYER_CHAR wanted_level_to 0
  205. ENDIF
  206. ENDIF
  207. ENDIF
  208. ENDIF
  209. ENDIF
  210. ENDIF
  211. ENDIF
  212. ENDIF
  213. ENDIF
  214. ENDIF
  215. ENDIF
  216. GOTO main_loop
  217.  
  218. CheckWantedChaos:
  219. READ_MEMORY 0xB7CD9C 4 FALSE CWanted
  220. CWanted += 0
  221. READ_MEMORY CWanted 4 FALSE CWantedChaos
  222. RETURN
  223.  
  224. CheckWantedStar:
  225. READ_MEMORY 0xB7CD9C 4 FALSE CWanted
  226. CWanted += 0x2C
  227. READ_MEMORY 0xB7CD9C 4 FALSE CWantedStar
  228. RETURN
  229.  
  230. default:
  231. WRITE_MEMORY 0x561CA6 4 4600 FALSE // ; CWanted::UpdateWantedLevel 4600 6thStarChaos
  232. WRITE_MEMORY 0x5624FA 4 4620 FALSE // ; CWanted::SetWantedLevel 4620 6thStarChaos
  233. WRITE_MEMORY 0x561CD0 1 6 FALSE // ; FNC
  234. RETURN
  235.  
  236. STAR6:
  237. WRITE_MEMORY 0@ 4 4620 FALSE
  238. WRITE_MEMORY 0x561CA6 4 4600 FALSE // ; CWanted::UpdateWantedLevel 4600 6thStarChaos
  239. WRITE_MEMORY 0x5624FA 4 4620 FALSE // ; CWanted::SetWantedLevel 4620 6thStarChaos
  240. WRITE_MEMORY 0x561CD0 1 6 FALSE // ; FNC
  241. ALTER_WANTED_LEVEL Player 6
  242. RETURN
  243.  
  244. STAR7:
  245. WRITE_MEMORY 0x561CA6 4 7100 FALSE // ; CWanted::UpdateWantedLevel 4600 6thStarChaos
  246. WRITE_MEMORY 0x5624FA 4 7120 FALSE // ; CWanted::SetWantedLevel 4620 6thStarChaos
  247. WRITE_MEMORY 0x561CD0 1 7 FALSE // ; FNC
  248. ALTER_WANTED_LEVEL Player 7
  249. RETURN
  250.  
  251. STAR8:
  252. WRITE_MEMORY 0x561CA6 4 9600 FALSE // ; CWanted::UpdateWantedLevel 4600 6thStarChaos
  253. WRITE_MEMORY 0x5624FA 4 9620 FALSE // ; CWanted::SetWantedLevel 4620 6thStarChaos
  254. WRITE_MEMORY 0x561CD0 1 8 FALSE // ; FNC
  255. ALTER_WANTED_LEVEL Player 8
  256. RETURN
  257.  
  258. max_stars:
  259. WRITE_MEMORY 0x561CA6 4 MAX_CHAOS FALSE // ; CWanted::UpdateWantedLevel 4600 6thStarChaos
  260. WRITE_MEMORY 0x5624FA 4 MAX_CHAOS FALSE // ; CWanted::SetWantedLevel 4620 6thStarChaos
  261. WRITE_MEMORY 0x561CD0 1 MAX_STARS FALSE // ; FNC
  262. ALTER_WANTED_LEVEL Player MAX_STARS
  263. WRITE_MEMORY 0x72DF2A 1 MAX_STARS FALSE // military zone WL
  264. RETURN
  265.  
  266. BribeCheck:
  267. IF NOT var9 == 1
  268. THEN
  269. READ_MEMORY 0x558E5C 4 FALSE _playerStatsInteger
  270. _playerStatsInteger += 0x2D8 // 0xB6 * 0x04 = 0x2D8
  271. READ_MEMORY _playerStatsInteger 4 FALSE _playerStatsInteger // _playerStatsInteger.NumOfPoliceBribesCollected
  272. var8 = var7 // SET_LVAR_INT_TO_LVAR_INT
  273. var8 ++
  274. var9 = 1
  275. END
  276. RETURN
  277.  
  278. }
  279.  
  280. SCRIPT_END
RAW Paste Data