Class: Lich::Gemstone::Bounty
- Inherits:
-
Object
- Object
- Lich::Gemstone::Bounty
- Defined in:
- lib/gemstone/bounty.rb,
lib/gemstone/bounty/task.rb,
lib/gemstone/bounty/parser.rb
Overview
The Bounty module provides functionality for handling bounties in the game.
Defined Under Namespace
Constant Summary collapse
- KNOWN_TASKS =
A list of known task matchers.
Parser::TASK_MATCHERS.keys
Class Method Summary collapse
-
.current ⇒ Task
Retrieves the current bounty task.
-
.lnet(person) ⇒ Task?
Retrieves bounty information for a specified person from LNet.
-
.task ⇒ Task
Retrieves the current bounty task.
Class Method Details
.current ⇒ Task
Retrieves the current bounty task.
17 18 19 |
# File 'lib/gemstone/bounty.rb', line 17 def self.current Task.new(Parser.parse(checkbounty)) end |
.lnet(person) ⇒ Task?
Retrieves bounty information for a specified person from LNet.
40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/gemstone/bounty.rb', line 40 def self.lnet(person) if (target_info = LNet.get_data(person.dup, 'bounty')) Task.new(Parser.parse(target_info)) else if target_info == false text = "No one on LNet with a name like #{person}" else text = "Empty response from LNet for bounty from #{person}\n" end Lich::Messaging.msg("warn", text) nil end end |
.task ⇒ Task
Retrieves the current bounty task.
27 28 29 |
# File 'lib/gemstone/bounty.rb', line 27 def self.task current end |