forked from elanthia-online/dr-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean-lumber.lic
More file actions
72 lines (63 loc) · 2.07 KB
/
clean-lumber.lic
File metadata and controls
72 lines (63 loc) · 2.07 KB
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
71
72
=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)
settings = get_settings
tool_storage = settings.crafting_container
%w[stick log branch limb deed].each { |size| process_size(args, size, tool_storage) }
end
def process_size(args, size, tool_storage)
while bput("get #{args.type} #{size} from my #{args.source}", 'You get', 'You carefully remove', 'What were you') != '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 bput('get my saw', 'wood saw', 'woodcutting saw', 'You get') =~ /woodcutting saw|wood saw/
fput("put my saw in my #{args.storage}")
bput('get my second saw', 'wood saw', 'You get')
end
until bput("cut #{size} with my saw", 'roundtime', 'you complete', 'ready to be carved') =~ /you complete|ready to be carved/
waitrt?
end
pause
waitrt?
fput("put my saw in my #{tool_storage}")
fput('get my drawknife')
until bput("scrape #{size} with my drawknife", 'roundtime', 'work completes') == 'work completes'
waitrt?
end
pause
waitrt?
fput("put my drawknife in my #{tool_storage}")
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