Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. ; notes: %nschest needs to have 1 reg in it for what your making
  2. ; notes: stack bottles to max 1200 in that chest or they want grab
  3. ; notes: sub movetoeat xyz needs to be set to where you stand and then 2 tiles away
  4. ; notes: the first line is where you move to the second where you stand to alch
  5.  
  6. set %food EDF_QQD_FWI_UWI_TWI_KPE_MQE_UQE_CWE_KPE_ZPE_AXI_YWI_WLI_ACG_QRD_NRD_FUD_WBG_JQE
  7. set #scnt 0
  8. set %tool RQF
  9. set %ns WZF_JZF_KZF
  10. set %maxweight 2000
  11. set %nschest CNEVGWE
  12. set %bottles WUF
  13. set %normalX 150
  14. set %normalY 66
  15. set %greaterX 150
  16. set %greaterY 66
  17. set %deadlyX 194
  18. set %deadlyY 66
  19. set %greaterskill 800
  20. set %deadlyskill 1050
  21. start:
  22.  
  23. if #scnt2 > 6000
  24. {
  25. set #scnt2 0
  26. GoSub hunger
  27. }
  28. wait 2s
  29. {
  30. if #HITS < #MAXHITS
  31. gosub heal
  32. wait 2s
  33. }
  34. if #weight > %maxweight
  35. gosub drop
  36. {
  37. finditem %bottles C_ , #backpackid
  38. if #Findkind = -1
  39. gosub bottlefetch
  40. }
  41. gosub getmenu
  42. goto start
  43. ;====================================
  44. Sub GetMenu
  45. deletejournal
  46. set #sCnt 1
  47. Finditem %Tool C_ , #BACKPACKID
  48. If #FINDKIND = -1
  49. {
  50. FindItem %Tool C_ , %Inshavebag
  51. If #FINDKIND = -1
  52. {
  53. Display Ok No mortars left! Script halting.
  54. Halt
  55. }
  56. ExEvent Drag #FINDID #FINDSTACK
  57. Wait 5
  58. ExEvent Dropc #BACKPACKID
  59. Wait 15
  60. }
  61. Set #LOBJECTID #FINDID
  62. Event Macro 17
  63. wait 5s
  64. {
  65. gosub Target
  66. ;======================================
  67. Sub Target
  68. Finditem %ns C_ , %nschest
  69. set #ltargetid #findid
  70. set #ltargetkind 1
  71. event macro 22
  72. wait 3s
  73. chooseskill Alchemy
  74. wait 2s
  75. gosub choosetype
  76. ;=======================================
  77.  
  78. sub choosetype
  79. if #skill >= %greaterskill && #skill < %deadlyskill
  80. {
  81. click %greaterX %greaterY
  82. click %greaterX %greaterY
  83. return
  84. }
  85. if #skill >= %deadlyskill && #skill < 1250
  86. {
  87. click %deadlyX %deadlyY
  88. click %deadlyX %deadlyY
  89. return
  90. ;======================================
  91.  
  92. sub drop
  93. if #weight > 2000
  94. {
  95. finditem AVF C_ , #backpackid
  96. if #FINDKIND <> -1
  97. {
  98. for #FindIndex 1 #FindCnt
  99. {
  100. ExEvent Drag #FindId #FindStack
  101. ExEvent DropG #CharPosX #CharPosY #CharPosZ
  102. }
  103. }
  104. return
  105. ;======================================
  106. sub Bottlefetch
  107. if #weight > 100
  108. finditem AVF C_ , #backpackid
  109. if #FINDKIND <> -1
  110. {
  111. for #FindIndex 1 #FindCnt
  112. {
  113. ExEvent Drag #FindId #FindStack
  114. ExEvent DropG #CharPosX #CharPosY #CharPosZ
  115. }
  116. }
  117. wait 2s
  118. FindItem WUF C_ , %nschest
  119. if #findstack < 1201
  120. {
  121. ExEvent Drag #FINDID #FINDSTACK
  122. wait 10
  123. ExEvent Dropc #backpackid
  124. wait 10
  125. }
  126. return
  127. ;======================================
  128. sub hunger
  129. gosub movetoeat
  130. set %eat N/A
  131. set %jstart #jIndex
  132. msg .hunger$
  133. wait 20
  134. set %jend #jIndex
  135. for %ji %jstart %jend
  136. {
  137. scanjournal %ji
  138. if watch_your_weight in #journal
  139. return
  140. if three_square_meals in #journal
  141. return
  142. if Your_diet_is_consistent in #journal
  143. set %eat 1
  144. if Even_thought_you_are_not_starving,_some_food_would_be_welcome. in #journal
  145. set %eat 3
  146. if stomach_is_growling in #journal
  147. set %eat 6
  148. if Are_you_Anorexic in #journal
  149. set %eat 8
  150. }
  151. if %eat = N/A
  152. return
  153. finditem %food c_
  154. set #LOBJECTID #FINDID
  155. for %i 1 %eat
  156. {
  157. event macro 17
  158. wait 20
  159. }
  160. }
  161. else
  162. return
  163. return
  164. ;====================================
  165. sub movetoeat
  166. wait 1s
  167. gosub pathFind 2584 179 26
  168. wait 10s
  169. gosub pathFind 2584 181 26
  170. wait 2s
  171. return
  172. ;====================================
  173. sub pathFind
  174. Event pathFind %1 %2 %3
  175. repeat
  176. until #CHARPOSX = %1 && #CHARPOSY = %2
  177. return
  178. ;====================================
  179. sub heal
  180. wait 1s
  181. if #Hits < #MAXHITS
  182. wait 5
  183. gosub pathfind 2584 181 26
  184. wait 7s
  185. event macro 15 9
  186. wait 3s
  187. event macro 23
  188. wait 1s
  189. if #Hits < #MAXHITS
  190. event macro 15 27
  191. wait 5s
  192. event macro 23
  193. wait 1s
  194. event pathfind 2584 181 26
  195. wait 1s
  196. goto start
  197. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement