Advertisement
Fee_Nicks

Movement Hijack script (v.6)

May 6th, 2011
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.87 KB | None | 0 0
  1. plotscript, movementhijack, begin
  2. #bluh bluh
  3. #nowait
  4. #This is a script for a custom movement system exactly the same as the OHR's default one, except that this one makes it easier to put in nifty stuff like stairs without completely messing everything up.
  5. #Zone 4 shows that the area in question is for atypical stuff, while the other zones are used in the specific things.
  6. #Big thanks to #slimesalad [especially James Paige] for assistance, etc.
  7. suspend player
  8. variable (x)
  9. variable (y)
  10. x := hero x (0)
  11. y := hero y (0)
  12. if (read zone (4,x,y)), then(
  13. if (read zone (1,x,y)), then(
  14. show value (1)
  15.  
  16. if (key is pressed (key:Right)) then(
  17. suspend hero walls
  18. walk hero (0, up, 1)
  19. walk hero (0, right, 1)
  20. set hero direction (0, right)
  21. wait for hero
  22. resume hero walls
  23. )
  24.  
  25. if (key is pressed (key:Left)) then (
  26. suspend hero walls
  27. walk hero (0, left, 1)
  28. walk hero (0, down, 1)
  29. set hero direction (0, left)
  30. wait for hero
  31. resume hero walls
  32. )
  33. if (key is pressed (key:Down)) then(
  34. walk hero (0, down, 1)
  35. set hero direction (0, down)
  36. wait for hero
  37. )
  38.  
  39. if (key is pressed (key:Up)) then(
  40. walk hero (0, up, 1)
  41. set hero direction (0, up)
  42. wait for hero
  43. )
  44. )
  45.  
  46. if (read zone (2,x,y)), then(
  47. show value (2)
  48.  
  49. if (key is pressed (key:Right)) then(
  50. suspend hero walls
  51. walk hero (0, up, 1)
  52. walk hero (0, right, 1)
  53. set hero direction (0, right)
  54. wait for hero
  55. resume hero walls
  56. )
  57. if (key is pressed (key:Left)) then(
  58. walk hero (0, left, 1)
  59. set hero direction (0, left)
  60. wait for hero
  61. )
  62. if (key is pressed (key:Down)) then(
  63. walk hero (0, down, 1)
  64. set hero direction (0, down)
  65. wait for hero
  66. )
  67.  
  68. if (key is pressed (key:Up)) then(
  69. walk hero (0, up, 1)
  70. set hero direction (0, up)
  71. wait for hero
  72. )
  73. )
  74. if (read zone (3,x,y)), then(
  75. show value (3)
  76.  
  77. if (key is pressed (key:Left)) then (
  78. suspend hero walls
  79. walk hero (0, left, 1)
  80. walk hero (0, down, 1)
  81. set hero direction (0, left)
  82. wait for hero
  83. resume hero walls
  84. )
  85. if (key is pressed (key:Right)) then(
  86. walk hero (0, right, 1)
  87. set hero direction (0, right)
  88. wait for hero
  89. )
  90. if (key is pressed (key:Down)) then(
  91. walk hero (0, down, 1)
  92. set hero direction (0, down)
  93. wait for hero
  94. )
  95.  
  96. if (key is pressed (key:Up)) then(
  97. walk hero (0, up, 1)
  98. set hero direction (0, up)
  99. wait for hero
  100. )
  101. )
  102. if (read zone (5,x,y)), then(
  103. show value (5)
  104.  
  105. if (key is pressed (key:Right)) then(
  106. suspend hero walls
  107. walk hero (0, down, 1)
  108. walk hero (0, right, 1)
  109. set hero direction (0, right)
  110. wait for hero
  111. resume hero walls
  112. )
  113.  
  114. if (key is pressed (key:Left)) then (
  115. suspend hero walls
  116. walk hero (0, left, 1)
  117. walk hero (0, up, 1)
  118. set hero direction (0, left)
  119. wait for hero
  120. resume hero walls
  121. )
  122. if (key is pressed (key:Down)) then(
  123. walk hero (0, down, 1)
  124. set hero direction (0, down)
  125. wait for hero
  126. )
  127.  
  128. if (key is pressed (key:Up)) then(
  129. walk hero (0, up, 1)
  130. set hero direction (0, up)
  131. wait for hero
  132. )
  133. )
  134.  
  135. if (read zone (6,x,y)), then(
  136. show value (6)
  137.  
  138. if (key is pressed (key:Right)) then(
  139. suspend hero walls
  140. walk hero (0, down, 1)
  141. walk hero (0, right, 1)
  142. set hero direction (0, right)
  143. wait for hero
  144. resume hero walls
  145. )
  146. if (key is pressed (key:Left)) then(
  147. walk hero (0, left, 1)
  148. set hero direction (0, left)
  149. wait for hero
  150. )
  151. if (key is pressed (key:Down)) then(
  152. walk hero (0, down, 1)
  153. set hero direction (0, down)
  154. wait for hero
  155. )
  156.  
  157. if (key is pressed (key:Up)) then(
  158. walk hero (0, up, 1)
  159. set hero direction (0, up)
  160. wait for hero
  161. )
  162. )
  163. if (read zone (7,x,y)), then(
  164. show value (7)
  165.  
  166. if (key is pressed (key:Left)) then (
  167. suspend hero walls
  168. walk hero (0, left, 1)
  169. walk hero (0, up, 1)
  170. set hero direction (0, left)
  171. wait for hero
  172. resume hero walls
  173. )
  174. if (key is pressed (key:Right)) then(
  175. walk hero (0, right, 1)
  176. set hero direction (0, right)
  177. wait for hero
  178. )
  179. if (key is pressed (key:Down)) then(
  180. walk hero (0, down, 1)
  181. set hero direction (0, down)
  182. wait for hero
  183. )
  184.  
  185. if (key is pressed (key:Up)) then(
  186. walk hero (0, up, 1)
  187. set hero direction (0, up)
  188. wait for hero
  189. )
  190. )
  191. )
  192. #when time comes, add stuff here.
  193.  
  194. else(
  195. if (key is pressed (key:Right)) then(
  196. walk hero (0, right, 1)
  197. set hero direction (0, right)
  198. wait for hero
  199. )
  200. if (key is pressed (key:Left)) then(
  201. walk hero (0, left, 1)
  202. set hero direction (0, left)
  203. wait for hero
  204. )
  205. if (key is pressed (key:Down)) then(
  206. walk hero (0, down, 1)
  207. set hero direction (0, down)
  208. wait for hero
  209. )
  210.  
  211. if (key is pressed (key:Up)) then(
  212. walk hero (0, up, 1)
  213. set hero direction (0, up)
  214. wait for hero
  215. )
  216. )
  217.  
  218. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement