Back to "b" tags

Holzhauer's Tracker Lumberjacker by mementumtrader

Description: Use organizer 2 to set hotbag to move logs before turning into boards. This helps prevent thieves from stealing them as easy.

1  # Author: golfinho
2
3#change to 1 to 0 if you dont want kindling or dont have dagger
4setvar! 'gkindling' 0
5
6#change to 1 to 0 if you dont want tracking turned on
7setvar! 'track' 1
8
9# Check for hatchet
10if lhandempty and findtype 'hatchet' backpack as _hatchet
11    dclick _hatchet
12elseif not findlayer self lefthand 
13    sysmsg "No hatchet found!" 38
14    stop
15endif
16
17# Track PKs if you have tracking
18if skill 'Tracking' > 0 and not findbuff 'Tracking Hunting' and 'track' = 1
19    @setvar! tracking_gump 4267467659
20
21    while not gumpexists tracking_gump
22        useskill 'Tracking'
23        waitforgump tracking_gump 500       
24    endwhile
25
26    while not insysmsg "You will now hunt all hostile players."
27        gumpresponse 8 tracking_gump
28        waitforgump tracking_gump 500
29    endwhile
30
31    gumpresponse 6 tracking_gump
32endif
33
34# In case a PK is seen, just notify. It is up to you what to do
35if insysmsg "Now tracking:"
36   overhead "**PK SEEN**" 38
37endif
38
39# I use Hiding as my stop condition, so if I see any PK I hide myself and the script stop
40# Feel free to remove this
41if hidden
42    overhead "Hidden, stopping script."
43    stop
44endif
45
46if weight >= 575
47    overhead "Warning: Weight too high!" 40
48    wait 1000
49    overhead "Time to drop off some goods." 40
50    wait 1000
51    overhead "Stopping script." 40
52    stop
53else
54    if findtype 'dagger' backpack as 'mydagger' and 'gkindling' = 1
55        wait 300
56        dclick 'mydagger'
57        wft 300
58        target self
59        overhead 'Got some kindling.' 40
60        wait 1500
61    endif
62    
63    #overhead "start chops" 40
64    hotkey 'use item in hand'
65    wft 600
66    target self
67
68    wait 300
69endif
70
71
72while not insysmsg "You chop some" or insysmsg "You hack at" 
73    if hidden
74        wait 1000
75        break
76    endif
77    
78    # Check for hatchet
79    if lhandempty and findtype 'hatchet' backpack as _hatchet
80        dclick _hatchet
81        
82    elseif not findlayer self lefthand 
83        sysmsg "No hatchet found!" 38
84        stop
85    
86    elseif findtype 'log%s' backpack as 'mylogs'
87        #overhead 'mylogs'
88        organizer 2
89        wait 300
90        dclick 'mylogs'
91        wait 200
92        # skill 'spiritspeak'
93 
94    elseif insysmsg "You cannot produce" or insysmsg "You do not see any"
95
96        overhead "**Move to new trees**" 38
97        #skill "spiritspeak"
98        clearsysmsg
99        replay
100     
101    elseif weight >= 575
102        overhead "Warning: Weight too high!" 40
103        wait 1000
104        overhead "Time to drop off some goods." 40
105        wait 1000
106        overhead "Stopping script." 40
107        stop                 
108
109    elseif insysmsg 'Harvesting is not allowed' 
110        overhead 'You need to leave town...' 0 
111        #skill "spiritspeak"
112        wait 2000 
113        replay 
114
115    elseif insysmsg 'You broke your axe' 
116        overhead "My axe broke!" 2086
117        #   skill "spiritspeak"
118        wait 1500
119        replay 
120
121    else
122        #overhead "else start 2nd chops" 40
123        wait 300
124        hotkey 'use item in hand'
125        wft 600
126        target self
127        #skill "spiritspeak"
128        #wait 2000
129        #break
130
131                
132    endif
133endwhile
134#overhead "endwhile"
135
136
137loop