Files
apollo/game/data/plugins/skill/mining/pickaxe.rb
T
KeepBotting 739c331860 Housekeeping
2019-03-26 14:05:40 -04:00

34 lines
915 B
Ruby

require 'java'
java_import 'org.apollo.game.model.Animation'
PICKAXES = {}
PICKAXE_IDS = []
# A pickaxe that can be mined with.
class Pickaxe
attr_reader :id, :level, :animation, :pulses
def initialize(id, level, animation, pulses)
@id = id
@level = level
@animation = Animation.new(animation)
@pulses = pulses
end
end
def append_pickaxe(pickaxe)
PICKAXES[pickaxe.id] = pickaxe
PICKAXE_IDS << pickaxe.id # tacky way of keeping things in order
end
# NOTE: ADD LOWER LEVEL PICKAXES FIRST
append_pickaxe(Pickaxe.new(1265, 1, 625, 8)) # bronze pickaxe
append_pickaxe(Pickaxe.new(1267, 1, 626, 7)) # iron pickaxe
append_pickaxe(Pickaxe.new(1269, 1, 627, 6)) # steel pickaxe
append_pickaxe(Pickaxe.new(1273, 21, 629, 5)) # mithril pickaxe
append_pickaxe(Pickaxe.new(1271, 31, 628, 4)) # adamant pickaxe
append_pickaxe(Pickaxe.new(1275, 41, 624, 3)) # rune pickaxe
PICKAXE_IDS.reverse!