Olib 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Olib.gemspec +17 -16
- data/README.md +23 -21
- data/TODOS.md +3 -3
- data/lib/Olib.rb +88 -50
- data/lib/Olib/area.rb +51 -0
- data/lib/Olib/bounty.rb +171 -128
- data/lib/Olib/character/char.rb +113 -118
- data/lib/Olib/character/group.rb +68 -67
- data/lib/Olib/character/inventory.rb +79 -79
- data/lib/Olib/character/mind.rb +70 -0
- data/lib/Olib/combat/creature.rb +255 -249
- data/lib/Olib/combat/creatures.rb +61 -56
- data/lib/Olib/core/container.rb +200 -148
- data/lib/Olib/core/errors.rb +91 -91
- data/lib/Olib/core/extender.rb +27 -19
- data/lib/Olib/core/item.rb +549 -549
- data/lib/Olib/core/utils.rb +220 -220
- data/lib/Olib/dictionary/dictionary.rb +165 -157
- data/lib/Olib/events/emitter.rb +7 -0
- data/lib/Olib/go2.rb +151 -0
- data/lib/Olib/npcs.rb +5 -0
- data/lib/Olib/objects/box.rb +3 -3
- data/lib/Olib/objects/clothing.rb +3 -3
- data/lib/Olib/objects/herb.rb +3 -3
- data/lib/Olib/objects/jar.rb +100 -100
- data/lib/Olib/objects/jewel.rb +34 -34
- data/lib/Olib/objects/jewelry.rb +9 -9
- data/lib/Olib/objects/scroll.rb +71 -71
- data/lib/Olib/objects/uncommon.rb +3 -3
- data/lib/Olib/objects/unknown.rb +3 -3
- data/lib/Olib/objects/wand.rb +3 -3
- data/lib/Olib/shops.rb +176 -176
- data/lib/Olib/utils/cli.rb +80 -80
- data/lib/Olib/utils/help_menu.rb +166 -166
- data/lib/Olib/utils/monsterbold.rb +4 -4
- data/lib/Olib/utils/vbulletin.rb +100 -100
- data/lib/Olib/version.rb +3 -0
- metadata +11 -7
- data/lib/Olib/transport.rb +0 -117
- data/lib/Olib/utils/utils.rb +0 -148
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32dd85c76004987a26b1485416f9ea279ff9a18b
|
4
|
+
data.tar.gz: 3bd045223d339ccd81a67d842253821f694665fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e3b6ca1d57404720b818b69b9275b5240711f11d83bd6252432866fc6f4be3e390ad3eef42447fc378013f80dd4d7aafc1d06b9105b657bb42a26b81d06fed
|
7
|
+
data.tar.gz: 77a1f64d339a3f50fcdfba866c566e54deeb2f8b7f865bbbb29b68051a606c90e17f89e47f7c82756f420a4b4849aa5639b004ee176ccdb0a43c86ae1db93a48
|
data/Olib.gemspec
CHANGED
@@ -1,17 +1,18 @@
|
|
1
|
-
lib = File.expand_path("../lib/", __FILE__)
|
2
|
-
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
s.
|
7
|
-
s.
|
8
|
-
s.
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
|
15
|
-
#
|
16
|
-
s.
|
1
|
+
lib = File.expand_path("../lib/", __FILE__)
|
2
|
+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include?(lib)
|
3
|
+
require "Olib/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "Olib"
|
7
|
+
s.version = Olib::VERSION
|
8
|
+
s.date = "2014-09-12"
|
9
|
+
s.summary = "Useful Lich extensions for Gemstone IV"
|
10
|
+
s.description = "Useful Lich extensions for Gemstone IV including hostile creature management, group management, syntactically pleasing movement, locker management, etc"
|
11
|
+
s.authors = ["Ondreian Shamsiel"]
|
12
|
+
s.email = "ondreian.shamsiel@gmail.com"
|
13
|
+
s.homepage = "https://github.com/ondreian/Olib"
|
14
|
+
s.files = %w[Olib.gemspec] + Dir["*.md", "lib/**/*.rb"]
|
15
|
+
#s.require_paths = %w[lib]
|
16
|
+
# s.add_runtime_dependency "shoes"
|
17
|
+
s.license = "MIT"
|
17
18
|
end
|
data/README.md
CHANGED
@@ -1,21 +1,23 @@
|
|
1
|
-
## Olib
|
2
|
-
|
3
|
-
`gem install Olib`
|
4
|
-
|
5
|
-
This offers a lot of syntatic sugar for scripting in GS
|
6
|
-
|
7
|
-
examples:
|
8
|
-
|
9
|
-
``` ruby
|
10
|
-
Creatures.magical.each { |creature|
|
11
|
-
creature.kill
|
12
|
-
}
|
13
|
-
```
|
14
|
-
|
15
|
-
``` ruby
|
16
|
-
Group.members.each { |char|
|
17
|
-
haste(char)
|
18
|
-
}
|
19
|
-
```
|
20
|
-
|
21
|
-
|
1
|
+
## Olib [](https://travis-ci.org/ondreian/Olib)
|
2
|
+
|
3
|
+
`gem install Olib`
|
4
|
+
|
5
|
+
This offers a lot of syntatic sugar for scripting in GS.
|
6
|
+
|
7
|
+
examples:
|
8
|
+
|
9
|
+
``` ruby
|
10
|
+
Creatures.magical.each { |creature|
|
11
|
+
creature.kill
|
12
|
+
}
|
13
|
+
```
|
14
|
+
|
15
|
+
``` ruby
|
16
|
+
Group.members.each { |char|
|
17
|
+
haste(char)
|
18
|
+
}
|
19
|
+
```
|
20
|
+
|
21
|
+
[WIP documentation](http://www.rubydoc.info/github/ondreian/Olib/Olib/)
|
22
|
+
|
23
|
+
Pull requests and the like as welcome.
|
data/TODOS.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# TODOS
|
2
|
-
|
3
|
-
+ Add Documentation
|
1
|
+
# TODOS
|
2
|
+
|
3
|
+
+ Add Documentation
|
4
4
|
+ Better tagging for items
|
data/lib/Olib.rb
CHANGED
@@ -1,51 +1,89 @@
|
|
1
|
-
require 'net/http'
|
2
|
-
require 'json'
|
3
|
-
|
4
|
-
module Olib
|
5
|
-
|
6
|
-
def Olib.update_notifier
|
7
|
-
begin
|
8
|
-
|
9
|
-
|
10
|
-
if
|
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
|
-
|
1
|
+
require 'net/http'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Olib
|
5
|
+
|
6
|
+
def Olib.update_notifier
|
7
|
+
begin
|
8
|
+
response = JSON.parse Net::HTTP.get URI('https://rubygems.org/api/v1/gems/Olib.json')
|
9
|
+
# check version
|
10
|
+
if Gem.loaded_specs["Olib"].version < Gem::Version.new(response['version'])
|
11
|
+
puts "<pushBold/>You need to update the Olib gem with a `gem install Olib`<popBold/>"
|
12
|
+
end
|
13
|
+
|
14
|
+
rescue
|
15
|
+
echo $!
|
16
|
+
puts $!.backtrace[0..1]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def Olib.methodize(str)
|
21
|
+
str.downcase.strip.gsub(/-|\s+|'|"/, "_")
|
22
|
+
end
|
23
|
+
|
24
|
+
# load core first
|
25
|
+
Dir[File.dirname(__FILE__) + '/Olib/core/**/*.rb'].each {|file|
|
26
|
+
require file
|
27
|
+
}
|
28
|
+
|
29
|
+
# load things that depend on core extensions
|
30
|
+
Dir[File.dirname(__FILE__) + '/Olib/**/*.rb'].each {|file|
|
31
|
+
require file
|
32
|
+
}
|
33
|
+
|
34
|
+
# invoke update notifier immediately
|
35
|
+
Olib.update_notifier
|
36
|
+
|
37
|
+
def Olib.do(action, re)
|
38
|
+
dothistimeout action, 5, re
|
39
|
+
end
|
40
|
+
|
41
|
+
def Olib.run(script, *args)
|
42
|
+
start_script script, args
|
43
|
+
wait_while { running? script }
|
44
|
+
end
|
45
|
+
|
46
|
+
def Olib.install(g, v=nil)
|
47
|
+
if !which("gem") then
|
48
|
+
echo "Olib could not detect the `gem` executable in your $PATH"
|
49
|
+
echo "when you installed Ruby did you forget to click the `modify $PATH` box?"
|
50
|
+
raise Exception
|
51
|
+
end
|
52
|
+
|
53
|
+
begin
|
54
|
+
unless v.nil?
|
55
|
+
# make it a true instance of Gem::Version so we can compare
|
56
|
+
raise UpdateGemError if Gem.loaded_specs[g].version < Gem::Version.new(v)
|
57
|
+
gem g, v
|
58
|
+
end
|
59
|
+
|
60
|
+
Olib.reload g
|
61
|
+
|
62
|
+
##
|
63
|
+
## rescue missing gem and reload after install
|
64
|
+
##
|
65
|
+
rescue LoadError
|
66
|
+
echo "installing #{g}..."
|
67
|
+
version = "--version '#{v}'" unless v.nil?
|
68
|
+
worked = system("gem install #{g} #{version} --no-ri --no-rdoc")
|
69
|
+
unless worked then raise "Could not install #{g} gem" end
|
70
|
+
Olib.reload g
|
71
|
+
echo "... installed #{g}!"
|
72
|
+
|
73
|
+
##
|
74
|
+
## rescue from too old of a gem version for a Ruby environment
|
75
|
+
##
|
76
|
+
rescue UpdateGemError
|
77
|
+
echo "updating #{g}@#{Gem.loaded_specs[g].version} => #{v}..."
|
78
|
+
version = "--version '#{v}'" unless v.nil?
|
79
|
+
worked = system("gem install #{g} #{version} --no-ri --no-rdoc")
|
80
|
+
unless worked then raise "Could not install #{g} gem" end
|
81
|
+
Olib.reload g
|
82
|
+
echo "... updated #{g} to #{v}!"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
Vars.Olib ||= Hash.new
|
87
|
+
|
88
|
+
|
51
89
|
end
|
data/lib/Olib/area.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
class Area < Olib::Container
|
2
|
+
|
3
|
+
def Area.current
|
4
|
+
Area.new
|
5
|
+
end
|
6
|
+
|
7
|
+
attr_accessor :room, :contents, :objects
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@contents = []
|
11
|
+
@room = Room.current
|
12
|
+
@objects = [ GameObj.loot, GameObj.room_desc ]
|
13
|
+
.flatten
|
14
|
+
.compact
|
15
|
+
.map { |thing| thing.id }
|
16
|
+
.uniq # sometimes objects exist in both loot & room_desc
|
17
|
+
.map { |id| Olib::Container.new id }
|
18
|
+
end
|
19
|
+
|
20
|
+
def contents
|
21
|
+
items = []
|
22
|
+
@objects
|
23
|
+
.reject { |container| container.name =~ /[A-Z][a-z]+ disk/ }
|
24
|
+
.each { |container|
|
25
|
+
check_container container
|
26
|
+
unless container.nested?
|
27
|
+
container.contents.each { |item|
|
28
|
+
item.container = container
|
29
|
+
items << item
|
30
|
+
}
|
31
|
+
else
|
32
|
+
container.containers.each do |nested|
|
33
|
+
check_container nested
|
34
|
+
nested.contents.each { |item|
|
35
|
+
item.container = container
|
36
|
+
items << item
|
37
|
+
}
|
38
|
+
end
|
39
|
+
end
|
40
|
+
}
|
41
|
+
items.compact
|
42
|
+
end
|
43
|
+
|
44
|
+
def check_container(container)
|
45
|
+
unless container.contents
|
46
|
+
container.look.at.on
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
end
|
data/lib/Olib/bounty.rb
CHANGED
@@ -1,129 +1,172 @@
|
|
1
|
-
module Olib
|
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
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
1
|
+
module Olib
|
2
|
+
class Bounty
|
3
|
+
@@listeners = {}
|
4
|
+
@@re = {}
|
5
|
+
@@re[:herb] = /requires (?:a|an|some) (?<herb>[a-zA-Z '-]+) found (?:in|on|around) (?<area>[a-zA-Z '-]+). These samples must be in pristine condition. You have been tasked to retrieve (?<number>[\d]+)/
|
6
|
+
@@re[:escort] = /Go to the (.*?) and WAIT for (?:him|her|them) to meet you there. You must guarantee (?:his|her|their) safety to (?<destiniation>[a-zA-Z '-]+) as soon as/
|
7
|
+
@@re[:gem] = /has received orders from multiple customers requesting (?:a|an|some) (?<gem>[a-zA-Z '-]+). You have been tasked to retrieve (?<number>[0-9]+)/
|
8
|
+
@@re[:heirloom] = /You have been tasked to recover ([a-zA-Z '-]+) that an unfortunate citizen lost after being attacked by (a|an|some) (?<creature>[a-zA-Z '-]+) (in|on|around|near|by) (?<area>[a-zA-Z '-]+)./
|
9
|
+
@@re[:heirloom_found] = /^You have located the heirloom and should bring it back to/
|
10
|
+
@@re[:succeeded] = /^You have succeeded in your task and can return to the Adventurer's/
|
11
|
+
@@re[:report_to_guard] = /^You succeeded in your task and should report back to/
|
12
|
+
@@re[:cull] = /^You have been tasked to suppress (?<creature>^((?!bandit).)*$) activity (?:in|on) (?:the )? (?<area>.*?)(?: near| between| under|\.) ([a-zA-Z' ]+). You need to kill (?<number>[0-9]+)/
|
13
|
+
@@re[:bandits] = /^You have been tasked to suppress bandit activity (?:in |on )(?:the )(?<area>.*?)(?: near| between| under) ([a-zA-Z' ]+). You need to kill (?<number>[0-9]+)/
|
14
|
+
@@re[:dangerous] = /You have been tasked to hunt down and kill a particularly dangerous (?<creature>.*) that has established a territory (?:in|on) (?:the )?(?<area>.*?)(?: near| between| under|\.)/
|
15
|
+
@@re[:get_skin_bounty] = /The local furrier/
|
16
|
+
@@re[:get_rescue] = /It appears that a local resident urgently needs our help in some matter/
|
17
|
+
@@re[:get_bandits] = /It appears they have a bandit problem they'd like you to solve./
|
18
|
+
@@re[:get_heirloom] = /It appears they need your help in tracking down some kind of lost heirloom/
|
19
|
+
@@re[:get_herb_bounty] = /local herbalist|local healer|local alchemist/
|
20
|
+
@@re[:get_gem_bounty] = /The local gem dealer, (?<npc>[a-zA-Z ]+), has an order to fill and wants our help/
|
21
|
+
@@re[:creature_problem] = /It appears they have a creature problem they\'d like you to solve/
|
22
|
+
@@re[:rescue] = /A local divinist has had visions of the child fleeing from (?:a|an) (?<creature>.*) (?:in|on) (?:the )?(?<area>.*?)(?: near| between| under|\.)/
|
23
|
+
@@re[:failed] = /You have failed in your task/
|
24
|
+
@@re[:none] = /You are not currently assigned a task/
|
25
|
+
|
26
|
+
# convenience list to get all types of bounties
|
27
|
+
def Bounty.types
|
28
|
+
@@re.keys
|
29
|
+
end
|
30
|
+
##
|
31
|
+
## @brief provides an accessor to the raw regular expression dictionary for Bounty logic
|
32
|
+
##
|
33
|
+
## @return Bounty Regex
|
34
|
+
##
|
35
|
+
def Bounty.regex
|
36
|
+
@@re
|
37
|
+
end
|
38
|
+
|
39
|
+
def Bounty.town
|
40
|
+
Bounty.current[:town]
|
41
|
+
end
|
42
|
+
|
43
|
+
def Bounty.area
|
44
|
+
Bounty.current[:area]
|
45
|
+
end
|
46
|
+
|
47
|
+
def Bounty.destination
|
48
|
+
Bounty.current[:destiniation]
|
49
|
+
end
|
50
|
+
|
51
|
+
def Bounty.gem
|
52
|
+
Bounty.current[:gem]
|
53
|
+
end
|
54
|
+
|
55
|
+
def Bounty.creature
|
56
|
+
Bounty.current[:creature]
|
57
|
+
end
|
58
|
+
|
59
|
+
def Bounty.herb
|
60
|
+
Bounty.current[:herb]
|
61
|
+
end
|
62
|
+
|
63
|
+
def Bounty.n
|
64
|
+
Bounty.current[:number].to_i
|
65
|
+
end
|
66
|
+
|
67
|
+
def Bounty.type
|
68
|
+
Bounty.current[:type]
|
69
|
+
end
|
70
|
+
|
71
|
+
def Bounty.task
|
72
|
+
Bounty.current
|
73
|
+
end
|
74
|
+
|
75
|
+
def Bounty.current
|
76
|
+
info = nil
|
77
|
+
bounty_str = checkbounty.strip
|
78
|
+
Bounty.regex.each do |type, exp|
|
79
|
+
if data = exp.match(bounty_str) then
|
80
|
+
info = data.names.length ? Hash[ data.names.map(&:to_sym).zip( data.captures ) ] : {}
|
81
|
+
info[:type] = type
|
82
|
+
end
|
83
|
+
end
|
84
|
+
return info || {}
|
85
|
+
end
|
86
|
+
|
87
|
+
def Bounty.ask_for_bounty
|
88
|
+
fput "ask ##{Bounty.npc.id} for bounty"
|
89
|
+
Bounty
|
90
|
+
end
|
91
|
+
|
92
|
+
def Bounty.remove
|
93
|
+
Go2.advguild
|
94
|
+
2.times do fput "ask ##{Bounty.npc.id} for remove" end
|
95
|
+
Bounty
|
96
|
+
end
|
97
|
+
|
98
|
+
def Bounty.to_s
|
99
|
+
@@listeners.to_s
|
100
|
+
end
|
101
|
+
|
102
|
+
def Bounty.on(namespace, &block)
|
103
|
+
@@listeners[namespace] = block
|
104
|
+
Bounty
|
105
|
+
end
|
106
|
+
|
107
|
+
def Bounty.listeners
|
108
|
+
@@listeners
|
109
|
+
end
|
110
|
+
|
111
|
+
def Bounty.cooldown?
|
112
|
+
Spell[9003].active?
|
113
|
+
end
|
114
|
+
|
115
|
+
def Bounty.cooldown!
|
116
|
+
if Bounty.cooldown?
|
117
|
+
Go2.origin
|
118
|
+
wait_until { !Bounty.cooldown? }
|
119
|
+
end
|
120
|
+
Bounty
|
121
|
+
end
|
122
|
+
|
123
|
+
def Bounty.throw_missing_listener
|
124
|
+
msg = "\n"
|
125
|
+
msg.concat "\nBounty.dispatch called for `:#{Bounty.type}` without a defined listener\n\n"
|
126
|
+
msg.concat "define a listener with:\n"
|
127
|
+
msg.concat " \n"
|
128
|
+
msg.concat " Bounty.on(:#{Bounty.type}) {\n"
|
129
|
+
msg.concat " # do something\n"
|
130
|
+
msg.concat " }\n"
|
131
|
+
msg.concat " \n"
|
132
|
+
msg.concat "or rescue this error (Olib::Errors::Fatal) gracefully\n"
|
133
|
+
msg.concat " \n"
|
134
|
+
raise Errors::Fatal.new msg
|
135
|
+
end
|
136
|
+
|
137
|
+
def Bounty.dispatch(listener=nil)
|
138
|
+
if listener
|
139
|
+
if @@listeners[listener]
|
140
|
+
@@listeners[listener].call
|
141
|
+
return Bounty
|
142
|
+
else
|
143
|
+
Bounty.throw_missing_listener
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
if @@listeners[Bounty.type]
|
148
|
+
@@listeners[Bounty.type].call
|
149
|
+
return Bounty
|
150
|
+
else
|
151
|
+
Bounty.throw_missing_listener
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
def Bounty.find_guard
|
156
|
+
Go2.advguard
|
157
|
+
if Bounty.npc.nil? then Go2.advguard2 end
|
158
|
+
if Bounty.npc.nil? then
|
159
|
+
throw Olib::Errors::Fatal.new "could not find guard"
|
160
|
+
end
|
161
|
+
return Bounty
|
162
|
+
end
|
163
|
+
|
164
|
+
def Bounty.npc
|
165
|
+
GameObj.npcs.select { |npc| npc.name =~ /guard|taskmaster|gemcutter|jeweler|akrash|kris|healer|dealer/i }.first
|
166
|
+
end
|
167
|
+
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
class Bounty < Olib::Bounty
|
129
172
|
end
|