Facebook
From Sergey777, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 173
  1. {$CLEO .cs}
  2. 0000:
  3. 0661: NOP "created by ..."
  4. script_name "Hello2"
  5. wait 0
  6.  
  7. $POINTER=0
  8.  
  9. $MEX=0.0
  10. $MEY=0.0
  11. $MEZ=0.0
  12.  
  13. $REX=0.0
  14. $REY=0.0
  15. $REZ=0.0
  16.  
  17. $FEX=0.0
  18. $FEY=0.0
  19. $FEZ=0.0
  20.  
  21. while true
  22. if
  23. 0ab0: key_pressed 49 true
  24. then
  25. gosub @make_beep
  26. end
  27.  
  28. if
  29. 0ab0: key_pressed 50 true
  30. then
  31. gosub @jump_to_me
  32. end
  33.  
  34. if
  35. 0ab0: key_pressed 51 true
  36. then
  37. gosub @set_cam_and_rot
  38. end
  39.  
  40. // change values
  41. if
  42. 0ab0: key_pressed 53 true
  43. then
  44. gosub @pointer_next
  45. end
  46. if
  47. 0ab0: key_pressed 48 true
  48. then
  49. gosub @pointer_set_0
  50. end
  51.  
  52. if
  53. 0ab0: key_pressed 56 true
  54. then
  55. gosub @pointer_dec
  56. end
  57.  
  58. if
  59. 0ab0: key_pressed 57 true
  60. then
  61. gosub @pointer_inc
  62. end
  63.  
  64.  
  65. wait 100
  66. end
  67.  
  68.  
  69. 0A93: terminate_this_custom_script
  70.  
  71.  
  72. :make_beep
  73. 0209: 1@ = random_int_in_ranges 0 10
  74. set_weather 1@
  75. 00A0: store_actor $PLAYER_ACTOR position_to 0@ 1@ 2@
  76. 018C: play_sound  1159 at 0@ 1@ 2@
  77. 03BC: 5@ = create_sphere_at 0@ 1@ 2@ radius 1.0
  78. 02A7: 6@ = create_icon_marker_and_sphere 35 at 0@ 1@ 2@
  79. 0A40: 7@ = create_entrance_marker_at 0@ 1@ 2@ color 14
  80. //0AED: 0@v = float 0@ to_string_format "Info: %.15g last"
  81. //0AD3: 0@v = string_format "pos:%.3fx%.3fx%.3f" 0@ 1@ 2@
  82. 0ACE: show_formatted_text_box "pos:%.15g %.15g %.15g" 0@ 1@ 2@ time 1000
  83.  
  84. //0ACD: show_text_highpriority "Hello World!" time 500
  85. //0ACD: show_text_highpriority 0@v time 500
  86.  
  87. return
  88.  
  89.  
  90. :jump_to_me
  91. 00A1: put_actor $PLAYER_ACTOR at $MEX $MEY $MEZ
  92. 018C: play_sound  1159 at $MEX $MEY $MEZ
  93.  
  94. return
  95.  
  96. :set_cam_and_rot
  97. //0930: lock_camera_position 1
  98. //0931: lock_camera_zoom 1
  99. //0E60: set_camera_control 1@ 2@
  100. //0936: set_camera 3@ 4@ 5@ position_to 0@ 1@ 10@ time 9@ drop_mode 1
  101. //092F: lock_camera_target_point 1
  102.  
  103. //015F: set_camera_position $MEX $MEY $MEZ rotation $REX $REY $REZ
  104.  
  105. 04E4: refresh_game_renderer_at $MEX $MEY
  106. Camera.PointAt($FEX $FEY $FEZ, 2)
  107. Camera.SetPosition($MEX $MEY $MEZ, $REX $REY $REZ)
  108.  
  109.  
  110. //0936: set_camera 2358.656 -1246.348 28.7884 position_to 2358.656 -1246.348 28.7884 time 7000 smooth_transition 1
  111.  
  112.  
  113. 0209: 1@ = random_int_in_ranges 0 10
  114. set_weather 1@
  115. return
  116.  
  117. :pointer_next
  118. 0209: 1@ = random_int_in_ranges 0 10
  119. set_weather 1@
  120. 0008: $POINTER += 1
  121. if
  122. 0038:   $POINTER == 9
  123. then
  124. $POINTER=0
  125. end
  126.  
  127. 008F: 1@ = integer $POINTER to_float
  128. 0ACE: show_formatted_text_box "pointer:%.15g" 1@ time 1000
  129.  
  130. return
  131.  
  132.  
  133. :pointer_set_0
  134. if
  135. 0038:   $POINTER == 0
  136. then
  137. $MEX=0.0
  138. end
  139.  
  140. if
  141. 0038:   $POINTER == 1
  142. then
  143. $MEY=0.0
  144. end
  145.  
  146. if
  147. 0038:   $POINTER == 2
  148. then
  149. $MEZ=0.0
  150. end
  151.  
  152. return
  153.  
  154. :pointer_dec
  155. if
  156. 0038:   $POINTER == 0
  157. then
  158. 000D: $MEX -= 10.0
  159. end
  160.  
  161. if
  162. 0038:   $POINTER == 1
  163. then
  164. 000D: $MEY -= 10.0
  165. end
  166.  
  167. if
  168. 0038:   $POINTER == 2
  169. then
  170. 000D: $MEZ -= 10.0
  171. end
  172.  
  173. if
  174. 0038:   $POINTER == 3
  175. then
  176. 000D: $REX -= 10.0
  177. end
  178.  
  179. if
  180. 0038:   $POINTER == 4
  181. then
  182. 000D: $REY -= 10.0
  183. end
  184.  
  185. if
  186. 0038:   $POINTER == 5
  187. then
  188. 000D: $REZ -= 10.0
  189. end
  190.  
  191. if
  192. 0038:   $POINTER == 6
  193. then
  194. 000D: $FEX -= 10.0
  195. end
  196.  
  197. if
  198. 0038:   $POINTER == 7
  199. then
  200. 000D: $FEY -= 10.0
  201. end
  202.  
  203. if
  204. 0038:   $POINTER == 8
  205. then
  206. 000D: $FEZ -= 10.0
  207. end
  208.  
  209. 0ACE: show_formatted_text_box "me:%.15g %.15g %.15g" $MEX $MEY $MEZ time 500
  210. gosub @set_cam_and_rot
  211. return
  212.  
  213.  
  214. :pointer_inc
  215. if
  216. 0038:   $POINTER == 0
  217. then
  218. 0009: $MEX += 10.0
  219. end
  220.  
  221. if
  222. 0038:   $POINTER == 1
  223. then
  224. 0009: $MEY += 10.0
  225. end
  226.  
  227. if
  228. 0038:   $POINTER == 2
  229. then
  230. 0009: $MEZ += 10.0
  231. end
  232.  
  233. if
  234. 0038:   $POINTER == 3
  235. then
  236. 0009: $REX += 10.0
  237. end
  238.  
  239. if
  240. 0038:   $POINTER == 4
  241. then
  242. 0009: $REY += 10.0
  243. end
  244.  
  245. if
  246. 0038:   $POINTER == 5
  247. then
  248. 0009: $REZ += 10.0
  249. end
  250.  
  251. if
  252. 0038:   $POINTER == 6
  253. then
  254. 0009: $FEX += 10.0
  255. end
  256.  
  257. if
  258. 0038:   $POINTER == 7
  259. then
  260. 0009: $FEY += 10.0
  261. end
  262.  
  263. if
  264. 0038:   $POINTER == 8
  265. then
  266. 0009: $FEZ += 10.0
  267. end
  268.  
  269. 0ACE: show_formatted_text_box "me:%.15g %.15g %.15g" $MEX $MEY $MEZ time 500
  270. gosub @set_cam_and_rot
  271. return