Advertisement
Guest User

objectFinder Chrismas edition

a guest
Nov 25th, 2014
529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.35 KB | None | 0 0
  1. {$CLEO}
  2. 0000: NOP
  3. repeat
  4. wait 50
  5. until 0AFA: is_samp_available
  6. 0B34: samp register_client_command "xpresent" to_label @opresent
  7. 0B34: samp register_client_command "xsanta" to_label @osanta
  8. 0B34: samp register_client_command "xtree" to_label @otree
  9. 0B34: samp register_client_command "xelf" to_label @oelf
  10. 0B34: samp register_client_command "xreset" to_label @oreset
  11. 0B34: samp register_client_command "xtog" to_label @otog
  12. 0B34: samp register_client_command "xm" to_label @musicswitch
  13. 0B34: samp register_client_command "xhelp" to_label @ohelpchristmas
  14. 0B34: samp register_client_command "xmadjust" to_label @adjustpanel
  15. 0390: load_txd_dictionary 'xmas'
  16. 038F: load_texture "upl" as 1
  17. 038F: load_texture "up" as 2
  18. 038F: load_texture "triang" as 3
  19. 038F: load_texture "square" as 4
  20. 038F: load_texture "right" as 5
  21. 038F: load_texture "left" as 6 //panel
  22. 038F: load_texture "upr" as 7 //arrow up
  23. 038F: load_texture "downr" as 8 //up - right
  24. 038F: load_texture "downl" as 9 // right
  25. 038F: load_texture "down" as 10 //right - down
  26. 038F: load_texture "cross" as 11 //down
  27. 038F: load_texture "cring" as 12 //left - down
  28. 038F: load_texture "circle" as 13 //left
  29. 038F: load_texture "chit" as 14 //left - up
  30. 0@ = 1000
  31. 32@ = 0
  32. 33@ = 0
  33. 7@ = 0
  34.  
  35.  
  36.  
  37. if
  38. 0AAB: file_exists "CLEO\oSettings.ini"
  39. then
  40. 0AF2: 26@ = get_float_from_ini_file "CLEO\oSettings.ini" section "Position" key "x"
  41. 0AF2: 27@ = get_float_from_ini_file "CLEO\oSettings.ini" section "Position" key "y"
  42. 0AF0: 4@ = get_int_from_ini_file "CLEO\oSettings.ini" section "Settings" key "musiconstart"
  43. if 4@ == 1
  44. then
  45. 4@ = 0
  46. 9@ = 1
  47. else
  48. 9@ = 0
  49. end
  50. end
  51.  
  52. :First
  53. wait 0
  54. //0AD1: show_formatted_text_highpriority "%d" time 1000 6@
  55.  
  56. if 28@ == 1
  57. then 0AB1: @Position_panel 2 XY 26@ 27@ XY_store_to 26@ 27@
  58. end
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. 10@ = 0
  66. if 8@ == 1
  67. then
  68. 0AB9: get_mp3 $hMP1 state_to 17@
  69. //0AD1: show_formatted_text_highpriority "mp3= %d, 0@= %d, 33@= %d" time 100 17@ 0@ 33@
  70. 0AB1: @music 2 26@ 27@ store_to 26@ 27@ button_output 10@
  71. if 10@ == 1
  72. then
  73. jump @forward_button
  74. else
  75. if 10@ == 2
  76. then
  77. jump @play_pause_button
  78. else
  79. if 10@ == 3
  80. then
  81. jump @stop_button
  82. else
  83. if 10@ == 4
  84. then
  85. jump @previous_button
  86. end
  87. end
  88. end
  89. end
  90. //gosub @music
  91. end
  92.  
  93. if
  94. 056D: actor $PLAYER_ACTOR defined
  95. jf @First
  96.  
  97. if
  98. 0118: actor $PLAYER_ACTOR dead
  99. then
  100. jump @First
  101. end
  102.  
  103. if 9@ == 1
  104. then
  105. // if and
  106. //0AB9: get_mp3 $hMP1 state_to 17@
  107. //17@ == -1
  108. // then
  109. if 001B: 33@ > 0@
  110. then
  111. 0AAE: release_mp3 $hMP1
  112. 0209: 5@ = random_int_in_ranges 1 13
  113. if 5@ == 1
  114. then
  115. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/1.MP3"
  116. else
  117. if 5@ == 2
  118. then
  119. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/2.MP3"
  120. else
  121. if 5@ == 3
  122. then
  123. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/3.MP3"
  124. else
  125. if 5@ == 4
  126. then
  127. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/4.MP3"
  128. else
  129. if 5@ == 5
  130. then
  131. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/5.MP3"
  132. else
  133. if 5@ == 6
  134. then
  135. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/6.MP3"
  136. else
  137. if 5@ == 7
  138. then
  139. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/7.MP3"
  140. else
  141. if 5@ == 8
  142. then
  143. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/8.MP3"
  144. else
  145. if 5@ == 9
  146. then
  147. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/9.MP3"
  148. else
  149. if 5@ == 10
  150. then
  151. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/10.MP3"
  152. else
  153. if 5@ == 11
  154. then
  155. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/11.MP3"
  156. else
  157. if 5@ == 12
  158. then
  159. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/12.MP3"
  160. else
  161. if 5@ == 13
  162. then
  163. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/13.MP3"
  164. end
  165. end
  166. end
  167. end
  168. end
  169. end
  170. end
  171. end
  172. end
  173. end
  174. end
  175. end
  176. end
  177. 0AAD: set_mp3 $hMP1 perform_action 1
  178. 0ABC: set_audiostream $hMP1 volume 1.0
  179. 0AAF: 0@ = get_mp3_length $hMP1
  180. 0@ *= 1000
  181. 33@ = 0
  182. end
  183. //end
  184. end
  185.  
  186. if
  187. Actor.Driving($PLAYER_ACTOR)
  188. then
  189. if 32@ > 4000
  190. then
  191. 32@ = 0
  192. 041E: set_radio_station 11
  193. end
  194. end
  195. 30@ = 0
  196.  
  197. if
  198. 7@ == 1
  199. then
  200. jump @First
  201. end
  202.  
  203. if 1@ == 1
  204. then
  205. 0AB1: @Find_object 4 Object number 11@ Display_offset 30@ Image_number 1 Color 0xFF2929
  206. 30@ += 43
  207. end
  208.  
  209. if 2@ == 1
  210. then
  211. 0AB1: @Find_object 4 Object number 12@ Display_offset 30@ Image_number 2 Color 0xFF2929
  212. 30@ += 43
  213. end
  214.  
  215. if 3@ == 1
  216. then
  217. 0AB1: @Find_object 4 Object number 13@ Display_offset 30@ Image_number 3 Color 0xFF2929
  218. 30@ += 43
  219. end
  220.  
  221. if 4@ == 1
  222. then
  223. 0AB1: @Find_object 4 Object number 14@ Display_offset 30@ Image_number 4 Color 0xFF2929
  224. 30@ += 43
  225. end
  226. jump @First
  227.  
  228.  
  229.  
  230. :previous_button
  231. wait 0
  232. if 32@ > 300
  233. then
  234. 5@ -= 1
  235. if 5@ == 0
  236. then 5@ = 13
  237. end
  238. 0AB1: @change_song 1 song_number 5@ song_length_store 0@
  239. 33@ = 0 //reset timer
  240. 6@ = 0
  241. 32@ = 0 //timer for button
  242. end
  243. jump @First
  244.  
  245. :play_pause_button
  246. wait 0
  247. if 32@ > 300
  248. then
  249. if 6@ == 2
  250. then
  251. 0AAD: set_mp3 $hMP1 perform_action 1 //play in case if stopped
  252. 0AAF: 0@ = get_mp3_length $hMP1
  253. 0@ *= 1000
  254. 33@ = 0
  255. 6@ = 0
  256. else
  257. 0B12: 6@ = 6@ XOR 1 //switcher
  258. if 6@ == 1
  259. then
  260. 0AAD: set_mp3 $hMP1 perform_action 2 //pause
  261. 0085: 18@ = 33@ // (int)
  262. 0@ = 1000000000
  263. else
  264. 0AAD: set_mp3 $hMP1 perform_action 3 //resume
  265. 0085: 33@ = 18@
  266. 0AAF: 0@ = get_mp3_length $hMP1
  267. 0@ *= 1000
  268. end
  269. end
  270. 32@ = 0 //timer for button
  271. end
  272. jump @First
  273.  
  274. :stop_button
  275. wait 0
  276. if 32@ > 300
  277. then
  278. //0AB9: get_mp3 $hMP1 state_to 10@
  279. // if 10@ == 2
  280. //
  281. //1 = file is playing
  282. //2 = file paused
  283. //-1 = file is stopped
  284. 0AAD: set_mp3 $hMP1 perform_action 0 // stop
  285. 6@ = 2
  286. 32@ = 0 //timer for button
  287. 33@ = 0
  288. 0@ = 1000000000
  289. end
  290. jump @First
  291.  
  292. :forward_button
  293. wait 0
  294. if 32@ > 300
  295. then
  296. 5@ += 1
  297. if 5@ == 14
  298. then 5@ = 1
  299. end
  300. 0AB1: @change_song 1 song_number 5@ song_length_store 0@
  301. 33@ = 0 //reset timer
  302. 6@ = 0
  303. 32@ = 0 //timer for button
  304. end
  305. jump @First
  306.  
  307.  
  308. :musicswitch
  309. wait 0
  310. 0B12: 8@ = 8@ XOR 1 //switcher
  311. if 8@ == 1
  312. then
  313. 0B5D: samp toggle_cursor 1
  314. else
  315. 0B5D: samp toggle_cursor 0
  316. end
  317. samp.CmdRet
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324. //0AB1: @change_song 1 song_number 5@ song_length_store 0@
  325. :change_song
  326. 0AAE: release_mp3 $hMP1
  327. if 0@ == 1
  328. then
  329. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/1.MP3"
  330. else
  331. if 0@ == 2
  332. then
  333. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/2.MP3"
  334. else
  335. if 0@ == 3
  336. then
  337. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/3.MP3"
  338. else
  339. if 0@ == 4
  340. then
  341. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/4.MP3"
  342. else
  343. if 0@ == 5
  344. then
  345. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/5.MP3"
  346. else
  347. if 0@ == 6
  348. then
  349. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/6.MP3"
  350. else
  351. if 0@ == 7
  352. then
  353. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/7.MP3"
  354. else
  355. if 0@ == 8
  356. then
  357. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/8.MP3"
  358. else
  359. if 0@ == 9
  360. then
  361. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/9.MP3"
  362. else
  363. if 0@ == 10
  364. then
  365. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/10.MP3"
  366. else
  367. if 0@ == 11
  368. then
  369. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/11.MP3"
  370. else
  371. if 0@ == 12
  372. then
  373. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/12.MP3"
  374. else
  375. if 0@ == 13
  376. then
  377. 0AAC: $hMP1 = load_audiostream "CLEO/MUSIC/oFinder_audio/13.MP3"
  378. end
  379. end
  380. end
  381. end
  382. end
  383. end
  384. end
  385. end
  386. end
  387. end
  388. end
  389. end
  390. end
  391. 0AAD: set_mp3 $hMP1 perform_action 1 //play
  392. 0ABC: set_audiostream $hMP1 volume 1.0
  393. 0AAF: 1@ = get_mp3_length $hMP1
  394. 1@ *= 1000
  395. 33@ = 0
  396. 0AB2: ret 1 1@ //song length
  397.  
  398.  
  399. :adjustpanel
  400. wait 0
  401. 0B12: 28@ = 28@ XOR 1
  402. if 28@ == 1
  403. then
  404. 8@ = 0
  405. 0B5D: samp toggle_cursor 1
  406. else
  407. 0B5D: samp toggle_cursor 0
  408. end
  409. samp.CmdRet
  410.  
  411.  
  412. :opresent
  413. wait 0
  414. 0B35: samp 29@ = get_last_command_params //
  415. if 0AD4: 31@ = scan_string 29@ format "%d" 11@
  416. then
  417. 1@ = 1
  418. else
  419. 1@ = 0
  420. end
  421. samp.CmdRet
  422.  
  423. :osanta
  424. wait 0
  425. 0B35: samp 29@ = get_last_command_params //
  426. if 0AD4: 31@ = scan_string 29@ format "%d" 12@
  427. then
  428. 2@ = 1
  429. else
  430. 2@ = 0
  431. end
  432. samp.CmdRet
  433.  
  434. :otree
  435. wait 0
  436. 0B35: samp 29@ = get_last_command_params //
  437. if 0AD4: 31@ = scan_string 29@ format "%d" 13@
  438. then
  439. 3@ = 1
  440. else
  441. 3@ = 0
  442. end
  443. samp.CmdRet
  444.  
  445. :oelf
  446. wait 0
  447. 0B35: samp 29@ = get_last_command_params //
  448. if 0AD4: 31@ = scan_string 29@ format "%d" 14@
  449. then
  450. 4@ = 1
  451. else
  452. 4@ = 0
  453. end
  454. samp.CmdRet
  455.  
  456.  
  457. :oreset
  458. wait 0
  459. 1@ = 0
  460. 2@ = 0
  461. 3@ = 0
  462. 4@ = 0
  463. samp.CmdRet
  464.  
  465. :otog
  466. wait 0
  467. 0B12: 7@ = 7@ XOR 1
  468. samp.CmdRet
  469.  
  470. :cursor
  471. wait 0
  472. wait 1000
  473. 0B12: 8@ = 8@ XOR 1
  474. if 8@ == 1
  475. then
  476. 0B5D: samp toggle_cursor 1
  477. else
  478. 0B5D: samp toggle_cursor 0
  479. end
  480. samp.CmdRet
  481.  
  482.  
  483.  
  484.  
  485. :ohelpchristmas
  486. wait 0
  487. 0AF8: samp add_message_to_chat "{F7F694}o{FF4800}b{00C8FF}j{D900FF}e{1EFF00}c{FFFFFF}t{F7F694}Finder {FF2929}Christmas edition:) {F7F694}commands:" color 0xFFFFFFFF
  488. 0AF8: samp add_message_to_chat "{FFFFFF}/xpresent <modelID> " color 0xFFFFFFFF
  489. 0AF8: samp add_message_to_chat "{FFFFFF}/xsanta <modelID> " color 0xFFFFFFFF
  490. 0AF8: samp add_message_to_chat "{FFFFFF}/xtree <modelID> " color 0xFFFFFFFF
  491. 0AF8: samp add_message_to_chat "{FFFFFF}/xelf <modelID> " color 0xFFFFFFFF
  492. 0AF8: samp add_message_to_chat "{FFFFFF}/xm {F7F694}(opens the music panel)" color 0xFFFFFFFF
  493. 0AF8: samp add_message_to_chat "{FFFFFF}/xmadjust {F7F694}(allows you to adjust the position of the music panel)"
  494. 0AF8: samp add_message_to_chat "{FFFFFF}/xreset {F7F694}(reset current searches)" color 0xFFFFFFFF
  495. 0AF8: samp add_message_to_chat "{FFFFFF}/xtog {F7F694}(tog current searches)" color 0xFFFFFFFF
  496. samp.CmdRet
  497.  
  498.  
  499. //0AB1: @music 2 26@ 27@ store_to 26@ 27@ button_output 1@
  500. :music
  501. 0AB1: @Panel 2 XY_input 0@ 1@ XY_store_to 15@ 16@ //returns X and Y position of the panel
  502. 0B5D: samp toggle_cursor 1
  503. if key_down 1
  504. then
  505. 0B5E: get_cursor_pos 9@ 10@
  506. 0B5F: convert_window_screen_coords 9@ 10@ to_game_screen_coords 9@ 10@
  507. //0AD1: show_formatted_text_highpriority "posX%f posY%f" time 1000 9@ 10@
  508. 16@ -= 9.027272
  509. if and
  510. 0025: 10@ > 16@ // (float) // top border - the same for all
  511. 16@ += 18.2
  512. 0025: 16@ > 10@ // bottom border - the same for all
  513. then
  514. 15@ -= 58.5 // 15@ = left edge of previous button
  515. if
  516. 0025: 9@ > 15@
  517. then
  518. 15@ += 18.5 //right edge of previous button
  519. if
  520. 0025: 15@ > 9@
  521. then
  522. 8@ = 1 //jump @previous_button
  523. else
  524. 15@ += 5.0 // left edge of play/pause button
  525. if
  526. 0025: 9@ > 15@
  527. then
  528. 15@ += 18.5 //right edge of play/pause button
  529. if
  530. 0025: 15@ > 9@
  531. then
  532. 8@ = 2 //jump @play_pause_button
  533. else
  534. 15@ += 4.5 // left edge of stop button
  535. if
  536. 0025: 9@ > 15@
  537. then
  538. 15@ += 18.5 //right edge of stop button
  539. if
  540. 0025: 15@ > 9@
  541. then
  542. 8@ = 3 //jump @stop_button
  543. else
  544. 15@ += 4.5 // left edge of forward button
  545. if
  546. 0025: 9@ > 15@
  547. then
  548. 15@ += 18.5 //right edge of forward button
  549. if
  550. 0025: 15@ > 9@
  551. then
  552. 8@ = 4 //jump @forward_button
  553. else
  554. 8@ = 0 //no button
  555. end
  556. end
  557. end
  558. end
  559. end
  560. end
  561. end
  562. end
  563. end
  564.  
  565.  
  566. {
  567. if and
  568. 10@ > 31.7 // top border - the same for all
  569. 49.9 > 10@ // bottom border - the same for all
  570. then
  571. if and
  572. 9@ > 261.5 //left border - previous button
  573. 280.0 > 9@ //right border
  574. then
  575. jump @previous_button
  576. else
  577. if and
  578. 9@ > 285.0 //left border - play/pause button
  579. 303.5 > 9@ //right border
  580. then
  581. jump @play_pause_button
  582. else
  583. if and
  584. 9@ > 308.0 //left border - stop button
  585. 326.5 > 9@ //right border
  586. then
  587. jump @stop_button
  588. else
  589. if and
  590. 9@ > 331.0 //left border - forward button
  591. 350.0 > 9@ //right border
  592. then
  593. jump @forward_button
  594. end
  595. end
  596. end
  597. end
  598. end
  599. }
  600. end
  601. 0AB2: ret 3 0@ 1@ 8@
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612. //0AB1: @Find_object 2 Object number 0@ Display_offset y@ Image_number 2@ Color
  613. :Find_object
  614. 0B5A: get_screen_resolution 29@ 31@ //int
  615. 29@ /= 10
  616. 29@ *= 8
  617. //31@ /= 2
  618. 31@ /= 10
  619. 31@ *= 7
  620. 005A: 31@ += 1@
  621. 28@ = 0
  622. if 056D: actor $PLAYER_ACTOR defined
  623. then
  624. 00A0: store_actor $PLAYER_ACTOR position_to 13@ 14@ 15@
  625. else
  626. jump @First
  627. end
  628. 21@ = 400.0
  629. for 16@ = 0 to 10000
  630. if 0B50: samp 10@ = object_handle_by_id 16@
  631. then
  632. 0984: 11@ = object 10@ model
  633. if 003B: 11@ == 0@ // (int)
  634. then
  635. 03F0: enable_text_draw 1
  636. 28@ += 1
  637. 01BB: store_object 10@ position_to 17@ 18@ 19@
  638. 050A: 20@ = distance_between_XYZ 13@ 14@ 15@ and_XYZ 17@ 18@ 19@
  639. if 0025: 21@ > 20@ // (float)
  640. then
  641. 0087: 21@ = 20@ // (float)
  642. 0085: 22@ = 10@ // (int) --22@ = closest object
  643. end
  644.  
  645. if
  646. 02CC: object 10@ bounding_sphere_visible
  647. then
  648. 0AB1: @Draw 2 Object_handle 10@ Image_number 2@
  649. end
  650. end
  651. end
  652. if 28@ > 49
  653. then break
  654. end
  655. end
  656. 0AD3: 8@v = format "Model: %d" 0@
  657. 0AD3: 12@v = format "Number: %d" 28@
  658. if
  659. 28@ == 0
  660. then
  661. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  662. 31@ += 19
  663. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 0x575757 shadow 1
  664.  
  665. 29@ -= 25
  666. //31@ -= 60
  667. 0B5F: convert_window_screen_coords 29@ 31@ to_game_screen_coords 26@ 27@
  668. 03E3: set_texture_to_be_drawn_antialiased 1@
  669. 03F0: enable_text_draw 1
  670. 038D: draw_texture 2@ position 26@ 27@ size 20.0 20.0 RGBA 30 30 30 170 //128 128 128 255
  671. else
  672. 0D94: draw_text 8@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 3@ shadow 1
  673. 31@ += 19
  674. 0D94: draw_text 12@v pos_xy 29@ 31@ align_xy 0.0 0.0 color 3@ shadow 1
  675.  
  676. 29@ -= 25
  677. //31@ += 60
  678. 0B5F: convert_window_screen_coords 29@ 31@ to_game_screen_coords 26@ 27@
  679. 03E3: set_texture_to_be_drawn_antialiased 1@
  680. 03F0: enable_text_draw 1
  681. 038D: draw_texture 2@ position 26@ 27@ size 20.0 20.0 RGBA 240 240 240 255 //128 128 128 255
  682. 26@ -= 19.0
  683. 0AB1: @Draw_arrow 3 Object_handle 22@ PositionXY 26@ 27@
  684. end
  685. 0AB2: ret 0
  686.  
  687.  
  688.  
  689. //0AB1: @Draw_arrow 3 Object_handle 1@ PositionXY
  690. :Draw_arrow
  691. 068D: get_camera_position_to 10@ 11@ 12@
  692. 068E: get_camera_target_point_to 13@ 14@ 15@
  693. 0AB1: call_scm_func @getZAngleBetweenPoints 4 from_XY 13@ 14@ and_XY 10@ 11@ store_to 17@
  694. 01BB: store_object 0@ position_to 13@ 14@ 15@
  695. 0AB1: call_scm_func @getZAngleBetweenPoints 4 from_XY 10@ 11@ and_XY 13@ 14@ store_to 16@
  696. if 0025: 17@ > 16@ // (float)
  697. then
  698. 18@ = 360.0
  699. 0063: 17@ -= 16@ // (float)
  700. 0063: 18@ -= 17@ // (float)
  701. else
  702. //0063: 18@ -= 17@
  703. 0063: 16@ -= 17@
  704. 0087: 18@ = 16@
  705. end
  706.  
  707. if or
  708. 0021: 18@ > 337.4
  709. 0023: 22.5 > 18@
  710. then
  711. 19@ = 11
  712. else
  713. if and
  714. 0021: 18@ > 22.4
  715. 0023: 67.5 > 18@
  716. then
  717. 19@ = 10
  718. else
  719. if and
  720. 0021: 18@ > 67.4
  721. 0023: 112.5 > 18@
  722. then
  723. 19@ = 9
  724. else
  725. if and
  726. 0021: 18@ > 112.4
  727. 0023: 157.5 > 18@
  728. then
  729. 19@ = 8
  730. else
  731. if and
  732. 0021: 18@ > 157.4
  733. 0023: 202.5 > 18@
  734. then
  735. 19@ = 7
  736. else
  737. if and
  738. 0021: 18@ > 202.4
  739. 0023: 247.5 > 18@
  740. then
  741. 19@ = 14
  742. else
  743. if and
  744. 0021: 18@ > 247.4
  745. 0023: 292.5 > 18@
  746. then
  747. 19@ = 13
  748. else
  749. if and
  750. 0021: 18@ > 292.4
  751. 0023: 337.5 > 18@
  752. then
  753. 19@ = 12
  754. end
  755. end
  756. end
  757. end
  758. end
  759. end
  760. end
  761. end
  762. 03E3: set_texture_to_be_drawn_antialiased 19@
  763. 03F0: enable_text_draw 1
  764. 038D: draw_texture 19@ position 1@ 2@ size 18.0 18.0 RGBA 255 255 255 255 //
  765. 0AB2: ret 0
  766.  
  767.  
  768. :getZAngleBetweenPoints
  769. //0AB1: call_scm_func @getZAngleBetweenPoints 4 from_XY 0.0 0.0 and_XY 1.0 0.0 store_to 1@
  770. 0063: 0@ -= 2@
  771. 0063: 1@ -= 3@
  772. 0604: get_Z_angle_for_point 0@ 1@ store_to 4@
  773. 0AB2: ret 1 4@
  774.  
  775.  
  776. //0AB1: @Draw 6 Object_handle 1@ Image_number
  777. :Draw
  778. 01BB: store_object 0@ position_to 11@ 12@ 13@
  779. 068D: get_camera_position_to 21@ 22@ 23@
  780. 050A: 24@ = distance_between_XYZ 11@ 12@ 13@ and_XYZ 21@ 22@ 23@
  781. if 0031: 24@ >= 80.0
  782. then
  783. 24@ = 80.0 //to prevent too small images
  784. end
  785. 25@ = 1300.0
  786. 26@ = 1300.0
  787. 5@ = 255
  788. if 0033: 16.0 >= 24@
  789. then
  790. 6@ = 255.0
  791. 0017: 6@ /= 8.0
  792. 0087: 7@ = 24@ // (float)
  793. 000F: 7@ -= 8.0
  794. 006B: 6@ *= 7@
  795. if 0033: 0.0 >= 7@
  796. then
  797. 5@ = 0
  798. else
  799. 0092: 5@ = float 6@ to_integer
  800. end
  801. end
  802. 0073: 25@ /= 24@ // (float)
  803. 0073: 26@ /= 24@
  804. 0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 11@ Y 12@ Z 13@ store_screen_X_to 14@ Y_to 15@
  805. 03E3: set_texture_to_be_drawn_antialiased 1@
  806. 03F0: enable_text_draw 1
  807. 038D: draw_texture 1@ position 14@ 15@ size 25@ 26@ RGBA 255 255 255 5@ //128 128 128 255
  808. if 0033: 9.9 >= 24@ //add happy face when approach the object closely
  809. then
  810. 6@ = 10.0
  811. 0063: 6@ -= 24@ // (float)
  812. 8@ = 255.0
  813. 0017: 8@ /= 8.0
  814. 006B: 8@ *= 6@
  815. 0092: 5@ = float 8@ to_integer
  816. if 0029: 5@ >= 130
  817. then
  818. 5@ = 130
  819. end
  820. 03E3: set_texture_to_be_drawn_antialiased 5
  821. 03F0: enable_text_draw 1
  822. 038D: draw_texture 5 position 14@ 15@ size 25@ 26@ RGBA 255 255 255 5@ //128 128 128 255
  823. end
  824. 0AB2: ret 0
  825.  
  826.  
  827. //0AB1: @Panel 2 XY 0@ 1@
  828. :Panel
  829. 03E3: set_texture_to_be_drawn_antialiased 6
  830. 03F0: enable_text_draw 1
  831. 038D: draw_texture 6 position 0@ 1@ size 129.142960 45.333576 RGBA 255 255 255 255 //128 128 128 255 //90.4 34.0
  832. 0AB2: ret 2 0@ 1@
  833.  
  834. //0AB1: @Position_panel 2 XY 26@ 27@
  835. :Position_panel
  836. 0B5D: samp toggle_cursor 1
  837. if key_down 1
  838. then
  839. 0B5E: get_cursor_pos 9@ 10@
  840. 0B5F: convert_window_screen_coords 9@ 10@ to_game_screen_coords 0@ 1@
  841. 0AF3: write_float 0@ to_ini_file "CLEO\oSettings.ini" section "Position" key "x"
  842. 0AF3: write_float 1@ to_ini_file "CLEO\oSettings.ini" section "Position" key "y"
  843. end
  844. 03E3: set_texture_to_be_drawn_antialiased 6
  845. 03F0: enable_text_draw 1
  846. 038D: draw_texture 6 position 0@ 1@ size 129.142960 45.333576 RGBA 150 150 150 150
  847. 0AD1: show_formatted_text_highpriority "Click anywhere + use /xmadjust again to exit editing" time 100 0xF7F694
  848. 0AB2: ret 2 0@ 1@
  849.  
  850. //0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@
  851. :getScreenXYFrom3DCoords
  852. 0AA7: call_function 0x70CE30 num_params 6 pop 6 clipNear 1 clipFar 1 yMult 7@s xMult 6@s outVector 2@s inVector 0@s result 29@
  853. 0073: 2@ /= 6@
  854. 0073: 2@ /= 4@
  855. 0073: 3@ /= 7@
  856. 0073: 3@ /= 4@
  857. 2@ *= 640.0
  858. 3@ *= 448.0
  859. 0AB2: ret 2 2@ 3@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement