Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /////////////////////////////////////////////
- // UO Steam Recall Lumberjack
- // for Outlands
- // by Jewele
- //
- // Recall lumberjack which recalls you to each location in a runebook,
- // and gathers resources in a semi-random pattern around you.
- //
- // What does this do for you:
- // --------------------------
- // * Recalls to 15 spots in a runebook
- // * At each location chops multiple spots
- // * Carries few regs and 1 axe
- // * Walking pattern is never the same between two spots
- // * Audible alarms for miner damage, and captcha
- // * Heals you with audible alarm if you take damage
- // * Detects nearby PKs and recalls you away
- // * Recalls immediately if aggro in range
- // * Works at bank or home
- // * Drops wood off at 500 logs
- //
- // Character Build:
- // ----------------
- // 50+ Lumberjack
- // 60 Magery
- // 100 Tracking
- //
- // Requirements:
- // -------------
- // One Blessed Runebook (in pack)
- //
- // Runebook Preparation:
- // ---------------------
- // 1) Mark first rune in blessed runebook as DEFAULT
- // 2) SET THE RUNE DEFAULT - this is not automatic!
- // 3) Fill rest of runebook with chopping locations.
- //
- // How to use?
- // -----------
- // 1) Decide what container you want to use -
- // either a box/bag in your bank or a chest
- // at your home. This will be known as <box>
- // 2) Put axes in <box>
- // 3) Put recall and heal regs in <box>
- // 4) If you have tracking: * Reds, * Closest, [X] House
- // 5) Run script
- //
- // Bank or home?
- // -------------
- // This was written for both, actually, so you might see
- // your character say "bank" even though you are running
- // it from home. If running from home, when prompted for
- // the banker, select the box.
- //
- // Lumber Pattern
- // --------------
- // The pattern is semi-intelligent - in that, if you go
- // a direction that has wood, it will keep going that direction
- // then switch to other compass points when no wood is found.
- // This is what makes this a "better" lumberjack macro than
- // most I've found - it learns which directions are yielding wood.
- //
- // Marking Locations
- // -----------------
- // Choose _sparsely_ wooded areas without much aggro. For example,
- // outside Andaria. Examples of places NOT to do this : Nusero island.
- // Just mark right in the middle of the forest.
- //
- // Aggro Avoidance
- // ---------------
- // Macro will recall you out immediately if it detects any hostile nearby.
- // If you get aggro, and its going to happen, where the mob is blocking
- // your recall. Just run away from it to another part of the forest, and
- // let macro continue. No need to stop!
- //
- // Tracking Window
- // ---------------
- // After getting frustrated with PKs jumping me, despite tracking closest,
- // I decided to add active Tracking alongside passive hunting mode. You will
- // see the tracking window appear on your screen. What I found was - it actually
- // improves reliability of passive hunting! No explanation why - maybe
- // passive hunting processes the results from the active track?
- // No PKs have ever gotten even close to me after I added this /thumbsup.
- //
- // IMPORTANT : Mix and match your rune locations. Do not put 2 of same
- // location next to each other. You don't want to detect PK
- // and recall back 20 spaces away.
- //
- // Known Issues
- // ------------
- //
- // You might see this macro walk you into a house or some other strange place.
- // Dont worry it will turn you around or, upon exhausting directions, go to
- // next rune spot.
- //
- // Sounds
- // ------------
- // 1. You can get the buzzer.wav file at :
- // https://github.com/gmccord333/UOOutlands/tree/master/Sounds
- // 2. Create a \Sounds directory in UOSteam directory
- // 3. Put file in there
- //
- // Versions
- // -----------
- // 1.0 First release! yay!
- //
- // UOSTEAM COPY-PASTE BELOW THIS LINE
- /////////////////////////////////////////////
- //
- // Initialization
- //
- @removetimer 'track'
- @createtimer 'track'
- @removelist 'runes'
- createlist 'runes'
- @removelist 'last'
- createlist 'last'
- @removelist 'moves'
- createlist 'moves'
- @removelist 'scriptregs'
- @createlist 'scriptregs'
- pushlist 'scriptregs' 0xf7a // pearl
- pushlist 'scriptregs' 0xf7b // moss
- pushlist 'scriptregs' 0xf86 // root
- pushlist 'scriptregs' 0xf8d // silk
- pushlist 'scriptregs' 0xf85 // ginseng
- pushlist 'scriptregs' 0xf84 // garlic
- @clearjournal
- //
- // Set box
- //
- msg "bank"
- pause 1000
- if not findalias 'box'
- sysmsg "Select a box with regs, axes and where wood will be placed" 88
- promptalias 'box'
- endif
- //
- // Set banker (or box)
- //
- msg "bank"
- pause 1000
- if not findalias 'banker'
- sysmsg "Select the banker at your bank or BOX if running from home" 88
- promptalias 'banker'
- endif
- //
- // Set runebook
- //
- @useobject 'backpack'
- if not findalias 'runebook'
- sysmsg "Select runebook with chop locations" 88
- promptalias 'runebook'
- endif
- //
- // Actions list
- //
- @removelist 'actions'
- @createlist 'actions'
- pushlist 'actions' 'dumprestock'
- while not dead
- //
- // Rune list
- //
- if list 'runes' == 0
- @pushlist 'runes' 11
- @pushlist 'runes' 17
- @pushlist 'runes' 23
- @pushlist 'runes' 29
- @pushlist 'runes' 35
- @pushlist 'runes' 41
- @pushlist 'runes' 47
- @pushlist 'runes' 53
- @pushlist 'runes' 59
- @pushlist 'runes' 65
- @pushlist 'runes' 71
- @pushlist 'runes' 77
- @pushlist 'runes' 83
- @pushlist 'runes' 89
- @pushlist 'runes' 95
- endif
- //
- // action : recall
- //
- if @inlist 'actions' 'recall'
- poplist 'actions' 'recall'
- // mana to recall
- while mana < 15
- useskill 'meditation'
- pause 6000
- endwhile
- useobject 'runebook'
- waitforgump 0x5c7db029 5000
- sysmsg "Moving spots"
- replygump 0x5c7db029 'runes[0]'
- pause 3000
- poplist 'runes' 'front'
- pushlist 'actions' 'chop'
- @clearlist 'last'
- @clearlist 'moves'
- @pushlist 'moves' 'North'
- @pushlist 'moves' 'NorthWest'
- @pushlist 'moves' 'East'
- @pushlist 'moves' 'NorthEast'
- @pushlist 'moves' 'West'
- @pushlist 'moves' 'SouthWest'
- @pushlist 'moves' 'South'
- @pushlist 'moves' 'SouthEast'
- endif
- //
- // Aggro check
- //
- @getenemy 'murderer' 'enemy' 'criminal' 'next'
- if @findobject 'enemy' and @inrange 'enemy' 15
- headmsg "ALARM! ALARM!" 22
- pushlist! 'actions' 'recall'
- continue
- endif
- //
- // PK check
- //
- if @injournal "now tracking" 'system'
- headmsg "ALARM! ALARM!" 22
- pushlist! 'actions' 'recall'
- @clearjournal
- continue
- endif
- //
- // Tracking window
- //
- if timer 'track' > 6000
- useskill 'Tracking'
- pause 1000
- if @gumpexists 0xfe5c638b
- @settimer 'track' 0
- replygump 0xfe5c638b 5
- pause 1000
- endif
- else
- pause 500
- endif
- //
- // Gump check
- //
- if @ingump 'any' 'Click when complete'
- headmsg "Answer gump" 55
- playsound 'buzzer.wav'
- pause 10000
- continue
- endif
- //
- // Server save
- //
- if @injournal 'server' 'system'
- pushlist 'actions' 'serversave'
- @clearjournal
- endif
- //
- // Health check
- //
- if diffhits > 1
- playsound 'buzzer.wav'
- cast 'Greater Heal'
- waitfortarget 5000
- target! 'self'
- pause 2000
- continue
- endif
- //
- // action : serversave
- //
- if @inlist 'actions' 'serversave'
- poplist 'actions' 'serversave'
- sysmsg "Pausing for server save" 55
- for 25
- @getenemy 'murderer' 'enemy' 'criminal' 'next'
- if @injournal "now tracking" 'system' or @findobject 'enemy'
- headmsg "ALARM! ALARM!" 22
- @canceltarget
- cast "Recall"
- waitfortarget 5000
- target! 'runebook'
- endif
- pause 1000
- endfor
- endif
- //
- // Reg check
- //
- if not @inlist! 'actions' 'dumprestock'
- // script regs
- for 0 to 'scriptregs'
- if @counttype scriptregs[] 'any' 'backpack' < 3
- @clearlist 'actions'
- pushlist 'actions' 'dumprestock'
- continue
- endif
- endfor
- endif
- //
- // Axe check
- //
- if not @inlist! 'actions' 'dumprestock'
- if not @findlayer 'self' 2
- if @counttype 0xf44 'any' 'backpack' < 1
- sysmsg "no axe in pack, no axe in hand"
- @clearlist 'actions'
- pushlist 'actions' 'dumprestock'
- continue
- endif
- endif
- endif
- //
- // Log check
- //
- if not @inlist! 'actions' 'dumprestock'
- if counttype 0x1bdd 'any' 'backpack' > 500
- sysmsg "Log quota, going to drop"
- @clearlist 'actions'
- pushlist 'actions' 'dumprestock'
- continue
- endif
- endif
- //
- // action : dumprestock
- //
- if @inlist! 'actions' 'dumprestock'
- poplist 'actions' 'dumprestock'
- sysmsg "Heading to dump and restock" 88
- pause 200
- //
- // check if we are at bank/home
- //
- msg 'bank'
- pause 1000
- if not @findobject 'banker'
- // mana to recall
- while mana < 15
- useskill 'meditation'
- pause 6000
- endwhile
- // recall
- @canceltarget
- cast "Recall"
- waitfortarget 5000
- target! 'runebook'
- pause 2500
- endif
- msg 'bank'
- useskill 'hiding'
- pause 1000
- @useobject 'box'
- pause 1000
- //
- // Reg restocking is extremely unreliable!
- //
- for 0 to 'scriptregs'
- removetimer 'restock'
- createtimer 'restock'
- while counttype scriptregs[] 'any' 'backpack' < 15
- sysmsg "restocking reagent" 55
- movetype scriptregs[] 'box' 'backpack' 0 0 0 'any' 15
- pause 1500
- if timer 'restock' > 30000
- sysmsg "I cannot restock regs!" 55
- playsound 'buzzer.wav'
- stop
- endif
- endwhile
- endfor
- //
- // Restock axes
- //
- removetimer 'restock'
- createtimer 'restock'
- while @counttype 0xf44 'any' 'backpack' < 1
- sysmsg "restocking axes" 55
- movetype 0xf44 'box' 'backpack' 0 0 0 'any' 1
- pause 1500
- if timer 'restock' > 30000
- sysmsg "I cannot restock axes!" 55
- playsound 'buzzer.wav'
- stop
- endif
- endwhile
- //
- // Convert wood to boards
- //
- while @findtype 0x1bdd 'any' 'backpack'
- @usetype 0x1bdd
- pause 1000
- endwhile
- //
- // Move boards
- //
- while @findtype 0x1bd7 'any' 'backpack'
- movetype 0x1bd7 'backpack' 'box' 0 0 0 'any'
- pause 1000
- endwhile
- //
- // Dump seeds
- //
- while @findtype 0x5736 'any' 'backpack'
- sysmsg "Dumping wood" 55
- movetype 0x5736 'backpack' 'box' 0 0 0 'any'
- pause 1000
- endwhile
- pushlist 'actions' 'recall'
- endif
- //
- // action : move
- //
- if @inlist 'actions' 'move'
- if list 'moves' > 0
- turn 'moves[0]'
- for 0 to 2
- walk 'moves[0]'
- walk 'moves[0]'
- walk 'moves[0]'
- endfor
- @clearlist 'last'
- pushlist 'last' 'moves[0]'
- poplist 'moves' 'front'
- clearlist 'actions'
- pushlist! 'actions' 'chop'
- else
- @clearlist 'actions'
- @pushlist 'actions' 'recall'
- endif
- endif
- //
- // action : chop
- //
- if @inlist 'actions' 'chop'
- //
- // Equip axe
- //
- if not @findlayer 'self' 2
- @findtype 0xf44 'any' 'backpack'
- canceltarget
- @useobject 'found'
- pause 2000
- endif
- //
- // Axe check
- //
- if not @findlayer 'self' 2
- msg "Darnit! my axe broke!"
- continue
- endif
- //
- // Health check
- //
- if hits < maxhits
- continue
- endif
- //
- // Gump check
- //
- if @ingump 'any' 'Click when complete'
- continue
- endif
- //
- // chop
- //
- @clearjournal
- @canceltarget
- useobject 'lefthand'
- waitfortarget 2000
- target! 'self'
- pause 2000
- //
- // immediately check chop result
- //
- if @injournal 'any harvest' 'system'
- pushlist! 'actions' 'move'
- continue
- endif
- //
- // we got wood, push last direction to front of moves
- //
- if list 'last' > 0
- if not @inlist 'moves' 'last[0]'
- pushlist! 'moves' 'last[0]' 'front'
- pushlist 'moves' 'last[0]' 'front'
- clearlist 'last'
- endif
- endif
- endif
- endwhile
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement