-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdropbox.lic
More file actions
62 lines (52 loc) · 1.62 KB
/
dropbox.lic
File metadata and controls
62 lines (52 loc) · 1.62 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
=begin
Currently checks user vars for boxsack and your disk if available and drops all boxes.
author: Nomada
game: Gemstone
tags: loot, dropper, boxes, chests, utility, helper
version: 0.1 alpha
required: Lich >= 4.6.14
changelog:
0.1 (1/2016) Release, includes a disk check and drops all items.
future: if requests for other containers are needed.. etc.
will change disk check or have a toggle.. depends.
=end
$boxitems=["box", "strongbox", "chest", "coffer", "trunk"]
def diskCheck
unless disk = GameObj.loot.find { |obj| obj.name =~ /#{Char.name} disk$/ }
if reget.any? { |line| line =~ /^Your disk arrives, following you dutifully\./ }
50.times { break if GameObj.loot.any? { |obj| obj.name =~ /#{Char.name} disk$/ }; sleep 0.1 }
disk = GameObj.loot.find { |obj| obj.name =~ /#{Char.name} disk$/ }
end
end
if disk and disk.contents.nil?
dothistimeout "look in ##{disk.id}", 3, /In the|There is nothing in there\./
end
disk.contents.each{|item|
if item.type =~ /box/i
waitrt?
fput "get ##{item.id}"
fput "drop ##{item.id}"
end
}
end
def boxDrop
$contents.each{|box|
fput "get #{box} from #{$container}"
fput "drop #{box}"
}
end
def scanBox
result = dothistimeout "look in my #{Vars.boxsack}", 5, /In the .*? you see|There is nothing in there/
if result !~ /There is nothing in there/
$contents = result.scan(/\b(?:#{$boxitems.join('|')})(?= and an? |,|\.)/)
if $contents.empty? == false
echo "Boxsack: #{$contents}"
$container = "my #{Vars.boxsack}"
boxDrop
end
end
end
##MAIN SEQUENCE
diskCheck
boxDrop
scanBox