forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
clean-lumber.lic
70 lines (61 loc) · 1.83 KB
/
clean-lumber.lic
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
=begin
Documentation: https://elanthipedia.play.net/Lich_script_repository#clean-leather
=end
custom_require.call(%w(common common-items common-money common-travel drinfomon))
class CleanLumber
include DRC
include DRCI
include DRCM
include DRCT
def initialize
arg_definitions = [
[
{ name: 'type', regex: /\w+/, description: 'wood type to process' },
{ name: 'source', regex: /\w+/, description: 'container' },
{ name: 'storage', regex: /\w+/, description: 'container to put lumber in' }
]
]
args = parse_args(arg_definitions)
%w(stick log branch limb deed).each { |size| process_size(args, size) }
end
def process_size(args, size)
while 'What were you' != bput("get #{args.type} #{size} from my #{args.source}", 'You get', 'You carefully remove', 'What were you')
if size == 'deed'
was_deed = true
fput('tap deed')
pause
until right_hand
fput('swap')
pause
end
size = right_hand.split.last
end
unless 'wood saw' == bput('get my saw', 'wood saw', 'You get')
fput('stow saw')
bput('get my second saw', 'wood saw', 'You get')
end
until 'you complete' == bput("cut #{size} with my saw", 'roundtime', 'you complete')
waitrt?
end
pause
waitrt?
fput('stow saw')
fput('get drawknife')
until 'work completes' == bput("scrape #{size} with my drawknife", 'roundtime', 'work completes')
waitrt?
end
pause
waitrt?
fput('stow drawknife')
fput("get #{args.type} lumber from my #{args.storage}")
fput('combine')
if args.storage
fput("put my lumber in my #{args.storage}")
else
fput('stow lumber')
end
size = 'deed' if was_deed
end
end
end
CleanLumber.new