Holzhauer's Tracker Lumberjacker by mementumtrader
Related: Lumberjackinglumberjacking
Description from the author:
# Original Author: golfinho, modified by Holzhauer to my liking
#change 1 to 0 if you don't want kindling or don't have dagger
setvar! 'gkindling' 0
#change 1 to 0 if you don't want tracking turned on
setvar! 'track' 1
# Check for hatchet
if lhandempty and findtype 'hatchet' backpack as _hatchet
dclick _hatchet
elseif not findlayer self lefthand
sysmsg "No hatchet found!" 38
stop
endif
# Track PKs if you have tracking
if skill 'Tracking' > 0 and not findbuff 'Tracking Hunting' and 'track' = 1
@setvar! tracking_gump 4267467659
while not gumpexists tracking_gump
useskill 'Tracking'
waitforgump tracking_gump 500
endwhile
while not insysmsg "You will now hunt all hostile players."
gumpresponse 8 tracking_gump
waitforgump tracking_gump 500
endwhile
gumpresponse 6 tracking_gump
endif
# In case a PK is seen, just notify. It is up to you what to do
if insysmsg "Now tracking:"
overhead "**PK SEEN**" 38
endif
# I use Hiding as my stop condition, so if I see any PK I hide myself and the script stop
# Feel free to remove this
if hidden
overhead "Hidden, stopping script."
stop
endif
if weight >= 575
overhead "Warning: Weight too high!" 40
wait 1000
overhead "Time to drop off some goods." 40
wait 1000
overhead "Stopping script." 40
stop
else
if findtype 'dagger' backpack as 'mydagger' and 'gkindling' = 1
wait 300
dclick 'mydagger'
wft 300
target self
overhead 'Got some kindling.' 40
wait 1500
endif
#overhead "start chops" 40
hotkey 'use item in hand'
wft 600
target self
wait 300
endif
while not insysmsg "You chop some" or insysmsg "You hack at"
if hidden
wait 1000
break
endif
# Check for hatchet
if lhandempty and findtype 'hatchet' backpack as _hatchet
dclick _hatchet
elseif not findlayer self lefthand
sysmsg "No hatchet found!" 38
stop
elseif findtype 'log%s' backpack as 'mylogs'
#overhead 'mylogs'
organizer 2
wait 300
dclick 'mylogs'
wait 200
# skill 'spiritspeak'
elseif insysmsg "You cannot produce" or insysmsg "You do not see any"
overhead "**Move to new trees**" 38
#skill "spiritspeak"
clearsysmsg
replay
elseif weight >= 575
overhead "Warning: Weight too high!" 40
wait 1000
overhead "Time to drop off some goods." 40
wait 1000
overhead "Stopping script." 40
stop
elseif insysmsg 'Harvesting is not allowed'
overhead 'You need to leave town...' 0
#skill "spiritspeak"
wait 2000
replay
elseif insysmsg 'You broke your axe'
overhead "My axe broke!" 2086
# skill "spiritspeak"
wait 1500
replay
else
#overhead "else start 2nd chops" 40
wait 300
hotkey 'use item in hand'
wft 600
target self
#skill "spiritspeak"
#wait 2000
#break
endif
endwhile
#overhead "endwhile"
loopUse organizer 2 to set hotbag to move logs before turning into boards. This helps prevent thieves from stealing them as easy.