Guest User

Untitled

a guest
May 9th, 2011
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.70 KB | None | 0 0
  1. {$CLEO .cs}
  2.  
  3. if
  4. 8AAB: not file_exists "CLEO\RadioSurf_by_DK22Pac.cs"
  5. then
  6. 0ACA: "ERROR!"
  7. 0A93:
  8. end
  9.  
  10. if
  11. 0AAB: file_exists "CLEO\radiosurf_cfg.ini"
  12. then
  13. 0AF2: 5@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "Radius"
  14. 0AF2: 6@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "CarVolume"
  15. 0AF2: 8@ = get_float_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "BikeVolume"
  16. 0AF0: 10@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MP3Limit"
  17. 0AF0: 14@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MP3Loop"
  18. 0AF0: 18@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MaxRadiosADD1"
  19. 0AF0: 19@ = get_int_from_ini_file "CLEO\radiosurf_cfg.ini" section "Main" key "MaxTracksADD1"
  20. else
  21. 5@ = 30.0
  22. 6@ = 0.6
  23. 7@ = 1.0
  24. 10@ = 32
  25. 14@ = 0
  26. 18@ = 13
  27. 19@ = 10
  28. end
  29. goto @begin
  30. if
  31. 5@ > 10000.0
  32. then
  33. 5@ = 10000.0
  34. end
  35. if
  36. 5@ < 1.0
  37. then
  38. 5@ = 1.0
  39. end
  40. if
  41. 6@ > 1.0
  42. then
  43. 6@ = 1.0
  44. end
  45. if
  46. 6@ < 0.0
  47. then
  48. 6@ = 0.0
  49. end
  50. if
  51. 8@ > 1.0
  52. then
  53. 8@ = 1.0
  54. end
  55. if
  56. 8@ < 0.0
  57. then
  58. 8@ = 0.0
  59. end
  60. if
  61. 10@ > 128
  62. then
  63. 10@ = 128
  64. end
  65. if
  66. 10@ < 4
  67. then
  68. 10@ = 4
  69. end
  70. if
  71. 14@ <> 0
  72. then
  73. if
  74. 14@ <> 1
  75. then
  76. 14@ = 0
  77. end
  78. end
  79. if
  80. 18@ > 12
  81. then
  82. 18@ = 12
  83. end
  84. if
  85. 18@ < 1
  86. then
  87. 18@ = 1
  88. end
  89. if
  90. 19@ > 10
  91. then
  92. 19@ = 10
  93. end
  94. if
  95. 19@ < 1
  96. then
  97. 19@ = 1
  98. end
  99.  
  100. :begin
  101. for 0@ = 0 to 127
  102. 0AC6: 1@ = label @mp3s offset
  103. 0A90: 2@ = 0@ * 4
  104. 005A: 1@ += 2@
  105. 0A8C: write_memory 1@ size 4 value 0 virtual_protect 0
  106. 003D:
  107. end
  108.  
  109. while true
  110. 003D:
  111. if or
  112. not player.Defined(0)
  113. 06B9: cutscene_data_loaded
  114. then
  115. 0AB1: call_scm_func @releaseAllMP3s 0
  116. goto @loop1
  117. end
  118. :back4
  119. if
  120. actor.Driving($player_actor)
  121. then
  122. 0AB1: call_scm_func @releaseAllMP3s 0
  123. goto @loop2
  124. end
  125. :back3
  126. // car check
  127. if
  128. 0AE2: 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 0 pass_wrecked 1
  129. then
  130. repeat
  131. 0A97: 21@ = car 27@ struct
  132. inc(21@, 0x2538)
  133. 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
  134. if
  135. 22@ == 123
  136. then
  137. if or
  138. 8205: not actor $player_actor near_car 27@ radius 5@ 5@ 5@ flag 0
  139. 8ABE: not vehicle 27@ engine_on
  140. then
  141. 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
  142. inc(21@)
  143. 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
  144. 0AC6: 15@ = label @mp3s offset
  145. 0A90: 2@ = 22@ * 4
  146. 005A: 15@ += 2@
  147. 0A8D: 22@ = read_memory 15@ size 4 virtual_protect 0
  148. 0AAE: release_mp3 22@
  149. 0A8C: write_memory 15@ size 4 value 0 virtual_protect 0
  150. end
  151. end
  152. until 8AE2: not 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 1 pass_wrecked 1
  153. end
  154. actor.StorePos($player_actor, 29@, 30@, 31@)
  155. if
  156. 0AE2: 27@ = random_vehicle_near_point 29@ 30@ 31@ in_radius 5@ find_next 0 pass_wrecked 1
  157. then
  158. repeat
  159. if
  160. 8ABE: not vehicle 27@ engine_on
  161. then
  162. continue
  163. end
  164. 0441: 28@ = car 27@ model
  165. 0006: 29@ = 0x85D2CB
  166. 0085: 25@ = 28@
  167. 0012: 25@ *= 0x24
  168. 005A: 29@ += 25@
  169. 0A8D: 29@ = read_memory 29@ size 1 virtual_protect 0
  170. if
  171. 29@ <> 0
  172. then
  173. continue
  174. end
  175. 0A97: 21@ = car 27@ struct
  176. inc(21@, 0x2538)
  177. 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
  178. if
  179. 22@ == 123
  180. then
  181. 0227: 4@ = car 27@ health
  182. if
  183. 4@ <= 0
  184. then
  185. 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
  186. inc(21@)
  187. 0A8D: 22@ = read_memory 21@ size 1 virtual_protect 0
  188. 0AC6: 14@ = label @mp3s offset
  189. 0A90: 2@ = 22@ * 4
  190. 005A: 14@ += 2@
  191. 0A8D: 22@ = read_memory 14@ size 4 virtual_protect 0
  192. 0AAE: release_mp3 22@
  193. 0A8C: write_memory 14@ size 4 value 0 virtual_protect 0
  194. end
  195. continue
  196. end
  197. 0A96: 17@ = actor $PLAYER_ACTOR struct
  198. 17@ += 0x58C
  199. 0A8D: 17@ = read_memory 17@ size 4 virtual_protect 0
  200. 0A97: 16@ = car 27@ struct
  201. if
  202. 003B: 17@ == 16@
  203. then
  204. 051E: 17@ = get_current_radio_station
  205. inc(17@)
  206. if
  207. 17@ == 13
  208. then
  209. continue
  210. end
  211. else
  212. 0209: 17@ = random_int_in_ranges 1 18@
  213. end
  214. // findFree4bytesForMP3handle
  215. 0085: 11@ = 10@
  216. dec(11@)
  217. for 13@ = 0 to 11@
  218. 0AC6: 21@ = label @mp3s offset
  219. 0A90: 2@ = 13@ * 4
  220. 005A: 21@ += 2@
  221. 0A8D: 12@ = read_memory 21@ size 4 virtual_protect 0
  222. if
  223. 12@ == 0
  224. then
  225. 0209: 12@ = random_int_in_ranges 0 19@
  226. 0AD3: 1@v = format "RS\%d\%d.mp3" 17@ 12@
  227. audiostream.Load3D(0@, 1@v)
  228. 0A8C: write_memory 21@ size 4 value 0@ virtual_protect 0
  229. 0A97: 21@ = car 27@ struct
  230. inc(21@, 0x2538)
  231. 0A8C: write_memory 21@ size 1 value 123 virtual_protect 0
  232. inc(21@)
  233. 0A8C: write_memory 21@ size 1 value 13@ virtual_protect 0
  234. audiostream.PerformAction(0@, PLAY)
  235. if
  236. 14@ == 1
  237. then
  238. audiostream.Loop(0@, true)
  239. end
  240. 0AB1: call_scm_func @isModelBikeOrQuad 1 28@ 26@
  241. if
  242. 26@ == 1
  243. then
  244. 0ABC: set_audiostream 0@ volume 8@
  245. else
  246. 0ABC: set_audiostream 0@ volume 6@
  247. end
  248. audiostream.LinkToCar(0@, 27@)
  249. break
  250. end
  251. end
  252. until 8AE2: not 27@ = random_vehicle_near_point 29@ 30@ 31@ in_radius 5@ find_next 1 pass_wrecked 1
  253. else
  254. 0AB1: call_scm_func @releaseAllMP3s 0
  255. end
  256. end
  257.  
  258. :loop1
  259. while true
  260. 003D:
  261. if and
  262. player.Defined(0)
  263. 86B9:
  264. then
  265. goto @back4
  266. end
  267. end
  268.  
  269. :loop2
  270. while true
  271. 003D:
  272. if and
  273. player.Defined(0)
  274. 86B9:
  275. then
  276. if
  277. not actor.Driving($player_actor)
  278. then
  279. goto @back3
  280. end
  281. end
  282. end
  283.  
  284. :isModelBikeOrQuad
  285. if or
  286. 0@ == 462
  287. 0@ == 581
  288. 0@ == 448
  289. 0@ == 522
  290. 0@ == 461
  291. 0@ == 521
  292. 0@ == 523
  293. then
  294. 0AB2: ret 1 true
  295. else if
  296. 0@ == 463
  297. 0@ == 586
  298. 0@ == 468
  299. 0@ == 471
  300. 0@ == 571
  301. then
  302. 0AB2: ret 1 true
  303. end
  304. end
  305. 0AB2: ret 1 false
  306.  
  307. :releaseAllMP3s
  308. for 0@ = 0 to 127
  309. 0AC6: 1@ = label @mp3s offset
  310. 0A90: 2@ = 0@ * 4
  311. 005A: 1@ += 2@
  312. 0A8D: 3@ = read_memory 1@ size 4 virtual_protect 0
  313. if
  314. 3@ <> 0
  315. then
  316. 0AAE: release_mp3 3@
  317. 0A8C: write_memory 1@ size 4 value 0 virtual_protect 0
  318. end
  319. end
  320. if
  321. 0AE2: 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 0 pass_wrecked 0
  322. then
  323. repeat
  324. 0A97: 21@ = car 27@ struct
  325. inc(21@, 0x2538)
  326. 0A8C: write_memory 21@ size 1 value 0 virtual_protect 0
  327. until 8AE2: not 27@ = random_vehicle_near_point .0 .0 .0 in_radius 5000.0 find_next 1 pass_wrecked 0
  328. end
  329. 0AB2: ret 0
  330.  
  331. :mp3s // handles buffer
  332. hex
  333. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  334. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  335. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  336. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  337. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  338. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  339. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  340. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  341. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  342. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  343. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  344. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  345. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  346. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  347. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  348. 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
  349. end
Advertisement
Add Comment
Please, Sign In to add comment