Advertisement
matsamilla

Fishing Archer with Healing

Aug 29th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1. @clearlist 'mobsound'
  2. @createlist 'mobsound'
  3. @clearlist 'attack'
  4. @createlist 'attack'
  5. @clearlist 'scan'
  6. @createlist 'scan'
  7. @clearlist 'skin'
  8. @createlist 'skin'
  9. @clearlist 'drive'
  10. @createlist 'drive'
  11. //********* SETUP ****************************************
  12. pushlist 'mobsound' 'no' // yes for mob sound, no for no sound.
  13. pushlist 'attack' 'yes' // yes to attack, no for no attack
  14. pushlist 'scan' 'yes' // yes to scan the horizons
  15. pushlist 'skin' 'yes' // Will skin & re-open nearby corpses
  16. pushlist 'drive' 'yes' // yes to drive boat
  17. //********************************************************
  18. if not timerexists 'Sound Timer'
  19. createtimer 'Sound Timer'
  20. settimer 'Sound Timer' 15000
  21. endif
  22. if not timerexists 'Bandage Timer'
  23. createtimer 'Bandage Timer'
  24. settimer 'Bandage Timer' 10250
  25. endif
  26. if not findalias 'Escape Book'
  27. headmsg 'Select Escape Book'
  28. promptalias 'Escape Book'
  29. endif
  30. // Check the bandage timer to see if enough time has elapsed
  31. if timer 'Bandage Timer' < 10250
  32. // Small delay to slow down the loop. 100 milliseconds means we will not miss
  33. // a bandage.
  34. pause 100
  35. // We need to wait for our current bandage to finish so start the while
  36. // loop from the beginning
  37. continue
  38. endif
  39. // If we are poisoned or don't have full health
  40. if poisoned 'self' or hits < 85
  41. // Enough time has elapsed lets apply a bandage.
  42. bandageself
  43. // Reset the timer.
  44. settimer 'Bandage Timer' 0
  45. endif
  46. if not @listexists 'xaxis'
  47. @createlist 'xaxis'
  48. @pushlist 'xaxis' 3
  49. @pushlist 'xaxis' -3
  50. endif
  51. if not @listexists 'yaxis'
  52. @createlist 'yaxis'
  53. @pushlist 'yaxis' 3
  54. @pushlist 'yaxis' -3
  55. endif
  56. if not listexists 'fish'
  57. createlist 'fish'
  58. @pushlist 'fish' '0x9ce'
  59. @pushlist 'fish'' 0x9cf'
  60. @pushlist 'fish' '0x9cc'
  61. @pushlist 'fish' '0x9cd'
  62. endif
  63. if dead
  64. stop
  65. endif
  66. if not @findobject 'bow'
  67. promptalias 'bow'
  68. endif
  69. if not @findobject 'pole'
  70. if @findtype '0xdbf' 'any' 'backpack' 'any' '3'
  71. setalias 'pole' 'found'
  72. pause 600
  73. else
  74. msg 'No Poles'
  75. playsound 'error.wav'
  76. pause 10000
  77. endif
  78. endif
  79. for 0 to 'xaxis'
  80. for 0 to 'yaxis'
  81. while not @injournal 'biting' 'system'
  82. if timer 'Bandage Timer' < 10250
  83. // Small delay to slow down the loop. 100 milliseconds means we will not miss
  84. // a bandage.
  85. pause 100
  86. // We need to wait for our current bandage to finish so start the while
  87. // loop from the beginning
  88. continue
  89. endif
  90. // If we are poisoned or don't have full health
  91. if poisoned 'self' or hits < 85
  92. // Enough time has elapsed lets apply a bandage.
  93. bandageself
  94. // Reset the timer.
  95. settimer 'Bandage Timer' 0
  96. endif
  97. // Skin serps
  98. if @inlist 'skin' 'Yes' or @inlist 'skin' 'yes'
  99. if @findtype 0x2006 'any' 'ground' 'any' 2
  100. usetype 0xf52
  101. waitfortarget 3500
  102. target! 'found'
  103. pause 600
  104. useobject 'found'
  105. ignoreobject 'found'
  106. unsetalias 'found'
  107. pause 600
  108. endif
  109. endif
  110. // Scan the Horizons
  111. if @inlist 'scan' 'Yes' or @inlist 'scan' 'yes'
  112. msg 'scan the horizons'
  113. endif
  114. if not @findobject 'lefthand'
  115. equipitem 'bow' 2
  116. endif
  117. // Reset pole
  118. if not @findobject 'pole'
  119. if @findtype '0xdbf' 'any' 'backpack' 'any' '3'
  120. setalias 'pole' 'found'
  121. pause 600
  122. else
  123. msg 'No Poles'
  124. playsound 'error.wav'
  125. pause 10000
  126. endif
  127. endif
  128. @canceltarget
  129. @useobject 'pole'
  130. waitfortarget 2000
  131. targettileoffset! 'xaxis[]' 'yaxis[]' 0
  132. pause 500
  133. if not @injournal 'biting' 'system'
  134. pause 7750
  135. endif
  136. //Cheer
  137. if @injournal 'pull a bottle' 'system'
  138. clearjournal
  139. headmsg 'GOT ONE'
  140. if @inlist 'mobsound' 'Yes' or @inlist 'mobsound' 'yes'
  141. playsound 'cheer.wav'
  142. endif
  143. endif
  144. if @injournal 'mess' 'system'
  145. clearjournal
  146. @usetype! 0xdd6
  147. pause 1000
  148. @usetype! 0xdd6
  149. pause 1000
  150. endif
  151. if @injournal 'closer' 'system'
  152. clearjournal
  153. resync
  154. endif
  155. //fishing cleanup
  156. if weight >= maxweight
  157. for 0 to 'fish'
  158. while @findtype fish[] 'any' 'backpack'
  159. usetype! 0xf52
  160. waitfortarget 1000
  161. target! 'found'
  162. pause 600
  163. endwhile
  164. endfor
  165. // adds to fishsteak pile on floor
  166. if @findtype 0x97a 'any' 'ground' 'any' 2
  167. movetype 0x97a 'backpack' 'found'
  168. pause 600
  169. else
  170. //starts fishsteak pile on floor if doesnt exist
  171. movetypeoffset 0x97a 'backpack' 'ground'
  172. pause 600
  173. endif
  174. endif
  175. //end fishing cleanup
  176. if not @findobject 'lefthand'
  177. equipitem 'bow' 2
  178. endif
  179. //attack sea serp
  180. getenemy 'enemy' 'criminal' 'gray' 'closest'
  181. while @inrange 'enemy' 10
  182. if @inlist 'mobsound' 'Yes' or @inlist 'mobsound' 'yes'
  183. if timer 'Sound Timer' > 10000
  184. playsound 'bell.wav'
  185. settimer 'Sound Timer' 0
  186. endif
  187. endif
  188. // Attack!
  189. if @inlist 'attack' 'Yes' or @inlist 'attack' 'yes'
  190. attack! 'enemy'
  191. endif
  192. if not timerexists 'Bandage Timer'
  193. createtimer 'Bandage Timer'
  194. settimer 'Bandage Timer' 10250
  195. endif
  196. // Check the bandage timer to see if enough time has elapsed
  197. if timer 'Bandage Timer' > 10250
  198. pause 100
  199. continue
  200. endif
  201. // If we are poisoned or don't have full health
  202. if poisoned 'self' or hits < 85
  203. bandageself
  204. settimer 'Bandage Timer' 0
  205. endif
  206. endwhile
  207. endwhile
  208. clearjournal
  209. endfor
  210. if @inlist 'drive' 'Yes' or @inlist 'drive' 'yes'
  211. msg '[e whistle'
  212. pause 350
  213. for 0 to '3'
  214. msg 'Back One'
  215. Pause 350
  216. endfor
  217. for 0 to '6'
  218. msg 'Forward One'
  219. Pause 350
  220. endfor
  221. for 0 to '3'
  222. msg 'Left One'
  223. Pause 350
  224. endfor
  225. for 0 to '6'
  226. msg 'Right One'
  227. Pause 350
  228. endfor
  229. msg 'Forward'
  230. pause 4500
  231. msg 'stop'
  232. playsound 'pssst.wav'
  233. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement