Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
1,750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.59 KB | None | 0 0
  1. /////////////////////////////////////////////
  2. // UO Steam Recall Lumberjack
  3. // for Outlands
  4. // by Jewele
  5. //
  6. // Recall lumberjack which recalls you to each location in a runebook,
  7. // and gathers resources in a semi-random pattern around you.
  8. //
  9. // What does this do for you:
  10. // --------------------------
  11. // * Recalls to 15 spots in a runebook
  12. // * At each location chops multiple spots
  13. // * Carries few regs and 1 axe
  14. // * Walking pattern is never the same between two spots
  15. // * Audible alarms for miner damage, and captcha
  16. // * Heals you with audible alarm if you take damage
  17. // * Detects nearby PKs and recalls you away
  18. // * Recalls immediately if aggro in range
  19. // * Works at bank or home
  20. // * Drops wood off at 500 logs
  21. //
  22. // Character Build:
  23. // ----------------
  24. // 50+ Lumberjack
  25. // 60 Magery
  26. // 100 Tracking
  27. //
  28. // Requirements:
  29. // -------------
  30. // One Blessed Runebook (in pack)
  31. //
  32. // Runebook Preparation:
  33. // ---------------------
  34. // 1) Mark first rune in blessed runebook as DEFAULT
  35. // 2) SET THE RUNE DEFAULT - this is not automatic!
  36. // 3) Fill rest of runebook with chopping locations.
  37. //
  38. // How to use?
  39. // -----------
  40. // 1) Decide what container you want to use -
  41. // either a box/bag in your bank or a chest
  42. // at your home. This will be known as <box>
  43. // 2) Put axes in <box>
  44. // 3) Put recall and heal regs in <box>
  45. // 4) If you have tracking: * Reds, * Closest, [X] House
  46. // 5) Run script
  47. //
  48. // Bank or home?
  49. // -------------
  50. // This was written for both, actually, so you might see
  51. // your character say "bank" even though you are running
  52. // it from home. If running from home, when prompted for
  53. // the banker, select the box.
  54. //
  55. // Lumber Pattern
  56. // --------------
  57. // The pattern is semi-intelligent - in that, if you go
  58. // a direction that has wood, it will keep going that direction
  59. // then switch to other compass points when no wood is found.
  60. // This is what makes this a "better" lumberjack macro than
  61. // most I've found - it learns which directions are yielding wood.
  62. //
  63. // Marking Locations
  64. // -----------------
  65. // Choose _sparsely_ wooded areas without much aggro. For example,
  66. // outside Andaria. Examples of places NOT to do this : Nusero island.
  67. // Just mark right in the middle of the forest.
  68. //
  69. // Aggro Avoidance
  70. // ---------------
  71. // Macro will recall you out immediately if it detects any hostile nearby.
  72. // If you get aggro, and its going to happen, where the mob is blocking
  73. // your recall. Just run away from it to another part of the forest, and
  74. // let macro continue. No need to stop!
  75. //
  76. // Tracking Window
  77. // ---------------
  78. // After getting frustrated with PKs jumping me, despite tracking closest,
  79. // I decided to add active Tracking alongside passive hunting mode. You will
  80. // see the tracking window appear on your screen. What I found was - it actually
  81. // improves reliability of passive hunting! No explanation why - maybe
  82. // passive hunting processes the results from the active track?
  83. // No PKs have ever gotten even close to me after I added this /thumbsup.
  84. //
  85. // IMPORTANT : Mix and match your rune locations. Do not put 2 of same
  86. // location next to each other. You don't want to detect PK
  87. // and recall back 20 spaces away.
  88. //
  89. // Known Issues
  90. // ------------
  91. //
  92. // You might see this macro walk you into a house or some other strange place.
  93. // Dont worry it will turn you around or, upon exhausting directions, go to
  94. // next rune spot.
  95. //
  96. // Sounds
  97. // ------------
  98. // 1. You can get the buzzer.wav file at :
  99. // https://github.com/gmccord333/UOOutlands/tree/master/Sounds
  100. // 2. Create a \Sounds directory in UOSteam directory
  101. // 3. Put file in there
  102. //
  103. // Versions
  104. // -----------
  105. // 1.0 First release! yay!
  106. //
  107. // UOSTEAM COPY-PASTE BELOW THIS LINE
  108. /////////////////////////////////////////////
  109.  
  110. //
  111. // Initialization
  112. //
  113. @removetimer 'track'
  114. @createtimer 'track'
  115. @removelist 'runes'
  116. createlist 'runes'
  117. @removelist 'last'
  118. createlist 'last'
  119. @removelist 'moves'
  120. createlist 'moves'
  121. @removelist 'scriptregs'
  122. @createlist 'scriptregs'
  123. pushlist 'scriptregs' 0xf7a // pearl
  124. pushlist 'scriptregs' 0xf7b // moss
  125. pushlist 'scriptregs' 0xf86 // root
  126. pushlist 'scriptregs' 0xf8d // silk
  127. pushlist 'scriptregs' 0xf85 // ginseng
  128. pushlist 'scriptregs' 0xf84 // garlic
  129. @clearjournal
  130.  
  131. //
  132. // Set box
  133. //
  134. msg "bank"
  135. pause 1000
  136. if not findalias 'box'
  137. sysmsg "Select a box with regs, axes and where wood will be placed" 88
  138. promptalias 'box'
  139. endif
  140.  
  141. //
  142. // Set banker (or box)
  143. //
  144. msg "bank"
  145. pause 1000
  146. if not findalias 'banker'
  147. sysmsg "Select the banker at your bank or BOX if running from home" 88
  148. promptalias 'banker'
  149. endif
  150.  
  151. //
  152. // Set runebook
  153. //
  154. @useobject 'backpack'
  155. if not findalias 'runebook'
  156. sysmsg "Select runebook with chop locations" 88
  157. promptalias 'runebook'
  158. endif
  159.  
  160. //
  161. // Actions list
  162. //
  163. @removelist 'actions'
  164. @createlist 'actions'
  165. pushlist 'actions' 'dumprestock'
  166.  
  167. while not dead
  168.  
  169. //
  170. // Rune list
  171. //
  172. if list 'runes' == 0
  173. @pushlist 'runes' 11
  174. @pushlist 'runes' 17
  175. @pushlist 'runes' 23
  176. @pushlist 'runes' 29
  177. @pushlist 'runes' 35
  178. @pushlist 'runes' 41
  179. @pushlist 'runes' 47
  180. @pushlist 'runes' 53
  181. @pushlist 'runes' 59
  182. @pushlist 'runes' 65
  183. @pushlist 'runes' 71
  184. @pushlist 'runes' 77
  185. @pushlist 'runes' 83
  186. @pushlist 'runes' 89
  187. @pushlist 'runes' 95
  188. endif
  189.  
  190. //
  191. // action : recall
  192. //
  193. if @inlist 'actions' 'recall'
  194. poplist 'actions' 'recall'
  195. // mana to recall
  196. while mana < 15
  197. useskill 'meditation'
  198. pause 6000
  199. endwhile
  200. useobject 'runebook'
  201. waitforgump 0x5c7db029 5000
  202. sysmsg "Moving spots"
  203. replygump 0x5c7db029 'runes[0]'
  204. pause 3000
  205. poplist 'runes' 'front'
  206. pushlist 'actions' 'chop'
  207. @clearlist 'last'
  208. @clearlist 'moves'
  209. @pushlist 'moves' 'North'
  210. @pushlist 'moves' 'NorthWest'
  211. @pushlist 'moves' 'East'
  212. @pushlist 'moves' 'NorthEast'
  213. @pushlist 'moves' 'West'
  214. @pushlist 'moves' 'SouthWest'
  215. @pushlist 'moves' 'South'
  216. @pushlist 'moves' 'SouthEast'
  217. endif
  218.  
  219. //
  220. // Aggro check
  221. //
  222. @getenemy 'murderer' 'enemy' 'criminal' 'next'
  223. if @findobject 'enemy' and @inrange 'enemy' 15
  224. headmsg "ALARM! ALARM!" 22
  225. pushlist! 'actions' 'recall'
  226. continue
  227. endif
  228.  
  229. //
  230. // PK check
  231. //
  232. if @injournal "now tracking" 'system'
  233. headmsg "ALARM! ALARM!" 22
  234. pushlist! 'actions' 'recall'
  235. @clearjournal
  236. continue
  237. endif
  238.  
  239. //
  240. // Tracking window
  241. //
  242. if timer 'track' > 6000
  243. useskill 'Tracking'
  244. pause 1000
  245. if @gumpexists 0xfe5c638b
  246. @settimer 'track' 0
  247. replygump 0xfe5c638b 5
  248. pause 1000
  249. endif
  250. else
  251. pause 500
  252. endif
  253.  
  254. //
  255. // Gump check
  256. //
  257. if @ingump 'any' 'Click when complete'
  258. headmsg "Answer gump" 55
  259. playsound 'buzzer.wav'
  260. pause 10000
  261. continue
  262. endif
  263.  
  264. //
  265. // Server save
  266. //
  267. if @injournal 'server' 'system'
  268. pushlist 'actions' 'serversave'
  269. @clearjournal
  270. endif
  271.  
  272. //
  273. // Health check
  274. //
  275. if diffhits > 1
  276. playsound 'buzzer.wav'
  277. cast 'Greater Heal'
  278. waitfortarget 5000
  279. target! 'self'
  280. pause 2000
  281. continue
  282. endif
  283.  
  284. //
  285. // action : serversave
  286. //
  287. if @inlist 'actions' 'serversave'
  288. poplist 'actions' 'serversave'
  289. sysmsg "Pausing for server save" 55
  290. for 25
  291. @getenemy 'murderer' 'enemy' 'criminal' 'next'
  292. if @injournal "now tracking" 'system' or @findobject 'enemy'
  293. headmsg "ALARM! ALARM!" 22
  294. @canceltarget
  295. cast "Recall"
  296. waitfortarget 5000
  297. target! 'runebook'
  298. endif
  299. pause 1000
  300. endfor
  301. endif
  302.  
  303. //
  304. // Reg check
  305. //
  306. if not @inlist! 'actions' 'dumprestock'
  307. // script regs
  308. for 0 to 'scriptregs'
  309. if @counttype scriptregs[] 'any' 'backpack' < 3
  310. @clearlist 'actions'
  311. pushlist 'actions' 'dumprestock'
  312. continue
  313. endif
  314. endfor
  315. endif
  316.  
  317. //
  318. // Axe check
  319. //
  320. if not @inlist! 'actions' 'dumprestock'
  321. if not @findlayer 'self' 2
  322. if @counttype 0xf44 'any' 'backpack' < 1
  323. sysmsg "no axe in pack, no axe in hand"
  324. @clearlist 'actions'
  325. pushlist 'actions' 'dumprestock'
  326. continue
  327. endif
  328. endif
  329. endif
  330.  
  331. //
  332. // Log check
  333. //
  334. if not @inlist! 'actions' 'dumprestock'
  335. if counttype 0x1bdd 'any' 'backpack' > 500
  336. sysmsg "Log quota, going to drop"
  337. @clearlist 'actions'
  338. pushlist 'actions' 'dumprestock'
  339. continue
  340. endif
  341. endif
  342.  
  343. //
  344. // action : dumprestock
  345. //
  346. if @inlist! 'actions' 'dumprestock'
  347. poplist 'actions' 'dumprestock'
  348. sysmsg "Heading to dump and restock" 88
  349. pause 200
  350. //
  351. // check if we are at bank/home
  352. //
  353. msg 'bank'
  354. pause 1000
  355. if not @findobject 'banker'
  356. // mana to recall
  357. while mana < 15
  358. useskill 'meditation'
  359. pause 6000
  360. endwhile
  361. // recall
  362. @canceltarget
  363. cast "Recall"
  364. waitfortarget 5000
  365. target! 'runebook'
  366. pause 2500
  367. endif
  368. msg 'bank'
  369. useskill 'hiding'
  370. pause 1000
  371. @useobject 'box'
  372. pause 1000
  373. //
  374. // Reg restocking is extremely unreliable!
  375. //
  376. for 0 to 'scriptregs'
  377. removetimer 'restock'
  378. createtimer 'restock'
  379. while counttype scriptregs[] 'any' 'backpack' < 15
  380. sysmsg "restocking reagent" 55
  381. movetype scriptregs[] 'box' 'backpack' 0 0 0 'any' 15
  382. pause 1500
  383. if timer 'restock' > 30000
  384. sysmsg "I cannot restock regs!" 55
  385. playsound 'buzzer.wav'
  386. stop
  387. endif
  388. endwhile
  389. endfor
  390. //
  391. // Restock axes
  392. //
  393. removetimer 'restock'
  394. createtimer 'restock'
  395. while @counttype 0xf44 'any' 'backpack' < 1
  396. sysmsg "restocking axes" 55
  397. movetype 0xf44 'box' 'backpack' 0 0 0 'any' 1
  398. pause 1500
  399. if timer 'restock' > 30000
  400. sysmsg "I cannot restock axes!" 55
  401. playsound 'buzzer.wav'
  402. stop
  403. endif
  404. endwhile
  405. //
  406. // Convert wood to boards
  407. //
  408. while @findtype 0x1bdd 'any' 'backpack'
  409. @usetype 0x1bdd
  410. pause 1000
  411. endwhile
  412. //
  413. // Move boards
  414. //
  415. while @findtype 0x1bd7 'any' 'backpack'
  416. movetype 0x1bd7 'backpack' 'box' 0 0 0 'any'
  417. pause 1000
  418. endwhile
  419. //
  420. // Dump seeds
  421. //
  422. while @findtype 0x5736 'any' 'backpack'
  423. sysmsg "Dumping wood" 55
  424. movetype 0x5736 'backpack' 'box' 0 0 0 'any'
  425. pause 1000
  426. endwhile
  427.  
  428. pushlist 'actions' 'recall'
  429. endif
  430.  
  431. //
  432. // action : move
  433. //
  434. if @inlist 'actions' 'move'
  435. if list 'moves' > 0
  436. turn 'moves[0]'
  437. for 0 to 2
  438. walk 'moves[0]'
  439. walk 'moves[0]'
  440. walk 'moves[0]'
  441. endfor
  442. @clearlist 'last'
  443. pushlist 'last' 'moves[0]'
  444. poplist 'moves' 'front'
  445. clearlist 'actions'
  446. pushlist! 'actions' 'chop'
  447. else
  448. @clearlist 'actions'
  449. @pushlist 'actions' 'recall'
  450. endif
  451. endif
  452.  
  453. //
  454. // action : chop
  455. //
  456. if @inlist 'actions' 'chop'
  457.  
  458. //
  459. // Equip axe
  460. //
  461. if not @findlayer 'self' 2
  462. @findtype 0xf44 'any' 'backpack'
  463. canceltarget
  464. @useobject 'found'
  465. pause 2000
  466. endif
  467.  
  468. //
  469. // Axe check
  470. //
  471. if not @findlayer 'self' 2
  472. msg "Darnit! my axe broke!"
  473. continue
  474. endif
  475.  
  476. //
  477. // Health check
  478. //
  479. if hits < maxhits
  480. continue
  481. endif
  482.  
  483. //
  484. // Gump check
  485. //
  486. if @ingump 'any' 'Click when complete'
  487. continue
  488. endif
  489.  
  490. //
  491. // chop
  492. //
  493. @clearjournal
  494. @canceltarget
  495. useobject 'lefthand'
  496. waitfortarget 2000
  497. target! 'self'
  498. pause 2000
  499.  
  500. //
  501. // immediately check chop result
  502. //
  503. if @injournal 'any harvest' 'system'
  504. pushlist! 'actions' 'move'
  505. continue
  506. endif
  507.  
  508. //
  509. // we got wood, push last direction to front of moves
  510. //
  511. if list 'last' > 0
  512. if not @inlist 'moves' 'last[0]'
  513. pushlist! 'moves' 'last[0]' 'front'
  514. pushlist 'moves' 'last[0]' 'front'
  515. clearlist 'last'
  516. endif
  517. endif
  518.  
  519. endif
  520.  
  521. endwhile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement