Advertisement
Guest User

Untitled

a guest
May 24th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1. /////////////////////////////////////////////
  2. // UO Steam Mining Macro
  3. // for Outlands
  4. //
  5. // * just mines ore, nothing else
  6. // * clicks ore in case you near forge
  7. // * loads packhorse with ore, if found
  8. //
  9. // Version 1.0
  10. // -----------
  11. // First release
  12. //
  13. // Version 1.1
  14. // -----------
  15. // Added PK detection and warnings. To use this
  16. // activate your tracking and set to [REDS]
  17. //
  18. // Version 1.2
  19. // -----------
  20. // Added ability to use a pack horse
  21. // - Remember if you lose packhorse, reset objects
  22. // Automatically recalls you if a PK is detected
  23. // - Write and save a script named 'recall' if you want to use this
  24. // Detects if you are moving while trying to mine
  25. // - Script yells at you to STOP
  26. //
  27. /////////////////////////////////////////////
  28. sysmsg "UO Outlands Miner script" 88
  29. sysmsg "Version 1.2" 88
  30. @useobject 'backpack'
  31. pause 1000
  32. //
  33. // Prompt for pack horse/llama
  34. //
  35. if not @findalias 'Packy'
  36. sysmsg "Pack animals are optional"
  37. promptalias 'Packy'
  38. endif
  39. //
  40. // Clear hands
  41. //
  42. clearhands 'both'
  43. pause 1000
  44. //
  45. // Whistle timer
  46. //
  47. removetimer 'whistle'
  48. createtimer 'whistle'
  49. //
  50. // Clear alias (possibly other macros)
  51. //
  52. @unsetalias 'knife'
  53. //
  54. // Create Messages list
  55. //
  56. @removelist 'Messages'
  57. @createlist 'Messages'
  58. //
  59. // While alive
  60. //
  61. while hits > 0
  62. @clearjournal
  63. //
  64. // Transfer to pack horse if found
  65. //
  66. if diffweight < 60
  67. if findalias 'Packy'
  68. @movetype 0x1081 'backpack' 'Packy'
  69. pause 1000
  70. endif
  71. endif
  72. //
  73. // Auto smelt if near forge
  74. //
  75. //
  76. // If still too heavy, need player help
  77. //
  78. while diffweight < 10
  79. headmsg 'I am too heavy, please unload me' '23'
  80. pause 2000
  81. endwhile
  82. //
  83. // Check holding pickaxe
  84. //
  85. if not @findlayer 'self' 1
  86. pause 1000
  87. @unsetalias 'knife'
  88. endif
  89. //
  90. // Equip pickaxe or stop with msg
  91. //
  92. if not findalias 'knife'
  93. if @findtype 0x2d20 'any' 'backpack'
  94. @setalias 'knife' 'found'
  95. // This equips it
  96. @equipitem 'found' 1
  97. useobject 'knife'
  98. pause 1000
  99. else
  100. headmsg 'No knife found' '55' 'self'
  101. stop
  102. endif
  103. endif
  104. if counttype '0x2d20' 'any' 'backpack' == 0
  105. sysmsg "On last knife!" 38
  106. endif
  107. @canceltarget
  108. //
  109. // Mine ore
  110. //
  111. useobject 'knife'
  112. waitfortarget 1000
  113. target! 'self'
  114. pause 100
  115. // Wait for results
  116. for 21
  117. if @injournal 'You carve' 'system'
  118. break
  119. elseif @injournal "moved too far" "system"
  120. headmsg "STOP!" 66
  121. break
  122. elseif @injournal "You find" "system"
  123. msg "well look at that..."
  124. break
  125. elseif @injournal "harvestable" "system"
  126. headmsg 'Find a new spot' '43'
  127. pause 1000
  128. break
  129. elseif not @findlayer 'self' 1
  130. headmsg 'NO knife EQUIPPED' '23'
  131. break
  132. else
  133. pause 100
  134. endif
  135. endfor
  136. //
  137. // Whistle
  138. //
  139. if timer 'whistle' > 20000
  140. emotemsg 'whistles'
  141. settimer 'whistle' 0
  142. endif
  143. //
  144. // PK Detect
  145. //
  146. if @injournal "now tracking" 'system'
  147. headmsg "PK PK PK!" 22
  148. playmacro 'recall'
  149. stop
  150. endif
  151. endwhile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement