kakel_anders

UOS - Universal Recall Shopper

Mar 2nd, 2022 (edited)
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.73 KB | None | 0 0
  1. /// Universal recall-shopper ///
  2. /// - By kakel_anders (Player - UOG:Demise) - ///
  3. /////////////////////////////////////////////////
  4. /////////////////////////////////////////////////
  5. // The macro will scan for any NPC's within 5 tiles and apply
  6. // the desired purchaseagent.
  7. // Just mark runes in the shops you want, set up the agent, configure the Script
  8. // And you are ready to go!
  9. //////////INSTRUCTIONS///////////////////////////
  10. //1. Beetle, preferably bonded (Just in case)
  11. //2. Runebook for shops
  12. //3. Runebook for home (1 tile from dropoffchest)
  13. /////////////////////////////////////////////////
  14. //1. Start UNMOUNTED at your dropoff location
  15. //2. Adjust to the proper purchaseagent below! (Line 37-)
  16. //3. Check that the item you are buying are in the "Wares"-list (Line 48-)
  17. //4. Can be run on repeat, adjust pause on last line if you want to (Default 60sec)
  18. //5. set up ID's of beetle, dropoffchest, home runebook, shoprunebook below.
  19. //6. PROFIT!
  20. /////////////////////////////////////////////////
  21. //// Clean up old aliases and lists
  22. clearjournal
  23. clearignorelist
  24. removelist 'wares'
  25. removelist 'restarttimer'
  26. removelist 'shop'
  27. removelist 'speech'
  28. unsetalias 'beetle'
  29. unsetalias 'dropoff'
  30. unsetalias 'home'
  31. unsetalias 'runebook'
  32. //// Make new ones
  33. // ID OF BEETLE
  34. setalias 'beetle' 0xedf1c
  35. // ID OF DROPOFF CHEST
  36. setalias 'dropoff' 0x43c67f4c
  37. //ID OF HOME RUNEBOOK
  38. setalias 'home' 0x4359eb7f
  39. //ID OF SHOP RUNEBOOK
  40. setalias 'runebook' 0x412b3ca0
  41. createlist 'restarttimer'
  42. ///////////////////////////////
  43. ///What are we buying today?///
  44. ///////////////////////////////
  45. //buy 'cloth'
  46. //buy 'ingots'
  47. //buy 'dildos'
  48. //buy 'breastimplants'
  49. buy Regs
  50. ///
  51. ///
  52. // List of grapgiccodes for items you are going to buy. This list dictates
  53. // what items are moved from ground and backpack to beetle. And also the
  54. // offloading of the beetle
  55. createlist 'wares'
  56. pushlist 'wares' 0x1bfb // Bolts
  57. pushlist 'wares' 0xf3f // Arrows
  58. pushlist 'wares' 0xef3 // Blank Scroll
  59. pushlist 'wares' 0xf0e // Empty Bottle
  60. pushlist 'wares' 0xf8c // Sulfurous Ash
  61. pushlist 'wares' 0xf86 // Mandrake Root
  62. pushlist 'wares' 0xf84 // Garlic
  63. pushlist 'wares' 0xf8d // Spidersilk
  64. pushlist 'wares' 0xf88 // Nightshade
  65. pushlist 'wares' 0xf7b // Bloodmoss
  66. pushlist 'wares' 0xf85 // Ginseng
  67. pushlist 'wares' 0xf7a // Blackpearl
  68. pushlist 'wares' 0xf8a // Pigiron
  69. pushlist 'wares' 0xf78 // Batwing
  70. pushlist 'wares' 0xf8e // Nox Crystals
  71. pushlist 'wares' 0xf8f // Gravedust
  72. pushlist 'wares' 0xf7d // Daemon Blood
  73. pushlist 'wares' 0xf95 // Bolt of Cloth
  74. pushlist 'wares' 0x1767 // Folded Cloth
  75. pushlist 'wares' 0x1766 // Cut cloth
  76. pushlist 'wares' 0x1079 // Hides
  77. pushlist 'wares' 0x1081 // Cut leather
  78. pushlist 'wares' 0x1bf2 // Ingots
  79. //
  80. //// Runebook Buttonnumbers
  81. createlist 'shop'
  82. pushlist 'shop' 5
  83. pushlist 'shop' 11
  84. pushlist 'shop' 17
  85. pushlist 'shop' 23
  86. pushlist 'shop' 29
  87. pushlist 'shop' 35
  88. pushlist 'shop' 41
  89. pushlist 'shop' 47
  90. pushlist 'shop' 53
  91. pushlist 'shop' 59
  92. pushlist 'shop' 65
  93. pushlist 'shop' 71
  94. pushlist 'shop' 77
  95. pushlist 'shop' 83
  96. pushlist 'shop' 89
  97. pushlist 'shop' 95
  98. //
  99. //// Not important, just for funny :)
  100. //
  101. createlist 'speech'
  102. pushlist 'speech' 'A good deadline reaches places motivation never could.'
  103. pushlist 'speech' 'Once I started to read between the lines, I realized that all books were really the same.'
  104. pushlist 'speech' 'Sometimes I drink water - just to surprise my liver.'
  105. pushlist 'speech' "I think your parents shouldn't have built the swing that close to the wall."
  106. pushlist 'speech' 'I hope your pillow is warm on both sides in the summer!'
  107. pushlist 'speech' "It's amazing how nice people are to you when they know you're going away."
  108. pushlist 'speech' 'If you can’t reach it from your couch, you don’t need it.'
  109. pushlist 'speech' 'According to my mirror I am pregnant. The father is Nutella.'
  110. pushlist 'speech' 'Organized people are simply too lazy to search for stuff.'
  111. pushlist 'speech' "You may have one but that doesn't mean you have to act like one."
  112. pushlist 'speech' 'Anything done before the first coffee of the day could be classified as self-defense.'
  113. pushlist 'speech' "Oh phew. That was narrow. It nearly interested me."
  114. pushlist 'speech' "Just checked my bank account. Anybody in need of a kidney?"
  115. pushlist 'speech' "Somebody said today that I'm lazy. I nearly answered him."
  116. pushlist 'speech' "I’m on a strict seafood diet.... I see food, I eat it."
  117. pushlist 'speech' "Always end up phone calls like this: I have to run, the swing is free now."
  118. pushlist 'speech' "I’m sorry, I have neither the patience, nor the coloring crayons to explain this to you."
  119. pushlist 'speech' "Not giving a shit can surprisingly be the right choice when your toilet breaks down."
  120. pushlist 'speech' "Finally, the spring is here! I'm so thrilled I wet my plants."
  121. pushlist 'speech' "If you’re having a bad day, remember some adults wear braces."
  122. pushlist 'speech' "I wouldn’t exactly say I’m lazy but it’s a good thing that breathing is a reflex."
  123. pushlist 'speech' "How many times must I flush before you finally go away?!"
  124. pushlist 'speech' "My love life is like the beginning of a fairytale: A long time ago, in a land far away..."
  125. pushlist 'speech' "If I’ve told you once, I’ve told you a million times: Don’t exaggerate!"
  126. pushlist 'speech' "I’m standing outside. In other words, I’m outstanding."
  127. pushlist 'speech' "My mood is currently swinging between an axe and gasoline."
  128. pushlist 'speech' "Stressed is just desserts spelled backwards."
  129. pushlist 'speech' "You can only be young once. But you can enjoy being infantile forever."
  130. pushlist 'speech' "I’m pretty sure some people’s head is just a backup copy of their butt."
  131. pushlist 'speech' "Excuse me while I go on a ride on the porcelain steamer."
  132. pushlist 'speech' "Money alone won’t make you happy. You’ve got to own it."
  133. pushlist 'speech' "I think you deserve a standing ovation … of my longest finger!"
  134. pushlist 'speech' "Of course you're not fat. Just grab a couple of chairs and come sit with us."
  135. pushlist 'speech' "No thanks, I didn't fight my way to the top of the food pyramid to become a vegetarian."
  136. pushlist 'speech' "You were the only child in your family to be given up for adoption."
  137. pushlist 'speech' "After millions of years of evolution, you’re kind of a disappointment."
  138. pushlist 'speech' "Here, have a tissue. There’s still a bit of bullshit left on your mouth."
  139. pushlist 'speech' "Every rule has an exception. This rule is no exception."
  140. pushlist 'speech' "My boyfriend is so ugly, I sometimes have to put roofies in my own drink."
  141. pushlist 'speech' "Where exactly was I in the night from Friday to Monday???"
  142. pushlist 'speech' "Everyone has the right to be stupid, but some abuse that privilege."
  143. pushlist 'speech' "War never decides who is right. War only decides who is left."
  144. pushlist 'speech' "The snorers are always the ones to fall asleep first."
  145. pushlist 'speech' "Pity there’s no gym for your face."
  146. //// Repeat, how many times?
  147. for 1
  148. //
  149. ////
  150. for 0 to shop
  151. //
  152. //// Mount up and recall to shop
  153. useobject 'beetle'
  154. pause 2000
  155. useobject 'runebook'
  156. waitforgump 0x554b87f3 15000
  157. replygump 0x554b87f3 shop[]
  158. pause 2000
  159. //
  160. //// retry once
  161. if @injournal 'That location is blocked' 'system'
  162. sysmsg 'Rune blocked, waiting 5 seconds before retry'
  163. pause 5000
  164. @clearjournal
  165. useobject 'runebook'
  166. waitforgump 0x554b87f3 15000
  167. replygump 0x554b87f3 shop[]
  168. pause 2000
  169. endif
  170. //
  171. //// else skip
  172. if @injournal 'That location is blocked' 'system'
  173. @clearjournal
  174. @poplist 'shop' 'front'
  175. sysmsg 'Skipping rune'
  176. useobject 'runebook'
  177. waitforgump 0x554b87f3 15000
  178. replygump 0x554b87f3 shop[]
  179. pause 2000
  180. endif
  181. //
  182. //// Find vendors and purchase wares
  183. while @findtype 0x190 'any' 'ground' 'any' 5 or findtype 0x191 'any' 'ground' 'any' 5
  184. sysmsg "- SCANNING FOR NPC'S -"
  185. if @findtype 0x190 'any' 'ground' 'any' 5 or findtype 0x191 'any' 'ground' 5
  186. setalias 'vendor' 'found'
  187. headmsg speech[0] 36 'vendor'
  188. pushlist 'speech' 'speech[0]'
  189. @poplist 'speech' 'front'
  190. waitforcontext 'vendor' 1 1500
  191. pause 500
  192. ignoreobject 'vendor'
  193. endif
  194. endwhile
  195. sysmsg "- ALL NPC'S CHECKED -"
  196. pause 1000
  197. //
  198. //// Pick up any dropped items and put on Beetle if possible ////
  199. useobject self
  200. pause 700
  201. for 0 to wares
  202. while @findtype 'wares[]' 'any' 'ground' 'any' '2'
  203. moveitem found 'beetle'
  204. ignoreobject found
  205. pause 1000
  206. endwhile
  207. endfor
  208. //
  209. //// If hides in backpack, cut them up.
  210. if @findtype 0x1079 'any' 'backpack'
  211. usetype 0xf9f 'any' 'backpack'
  212. pause 700
  213. target! found
  214. pause 700
  215. endif
  216. //
  217. //// Overload to beetle incase overloaded
  218. while weight > 400
  219. clearignorelist
  220. for 0 to wares
  221. if @findtype 'wares[]' 'any' 'backpack'
  222. moveitem found 'beetle'
  223. ignoreobject found
  224. pause 1000
  225. endif
  226. endfor
  227. endwhile
  228. // Make sure you are mounted before recalling (Incase unbonded)
  229. useobject 'beetle'
  230. pause 2000
  231. //
  232. //// Offloading at house
  233. clearignorelist
  234. cast 'recall'
  235. pause 2500
  236. target! 'home'
  237. pause 2500
  238. useobject self
  239. pause 1000
  240. waitforcontext 'beetle' 9 1500
  241. for 0 to wares
  242. while @findtype 'wares[]' 'any' 'beetle'
  243. moveitem found 'dropoff'
  244. pause 1000
  245. endwhile
  246. while @findtype 'wares[]' 'any' 'backpack'
  247. moveitem found 'dropoff'
  248. pause 1000
  249. endwhile
  250. endfor
  251. clearjournal
  252. endfor
  253. endfor
  254. clearbuy
  255. pause 60000
  256.  
Add Comment
Please, Sign In to add comment