mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 00:38:18 +00:00
@@ -32,7 +32,7 @@ class AlchemyAction < ItemSpellAction
|
|||||||
ILLEGAL_ALCH_ITEMS.include?(@item.id)
|
ILLEGAL_ALCH_ITEMS.include?(@item.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def executeAction
|
def execute_action
|
||||||
if @pulses == 0
|
if @pulses == 0
|
||||||
mob.play_animation(@spell.animation)
|
mob.play_animation(@spell.animation)
|
||||||
mob.play_graphic(@spell.graphic)
|
mob.play_graphic(@spell.graphic)
|
||||||
@@ -70,16 +70,14 @@ def alchemy(_name, hash)
|
|||||||
end
|
end
|
||||||
|
|
||||||
id, multiplier = hash[:button], hash[:multiplier]
|
id, multiplier = hash[:button], hash[:multiplier]
|
||||||
level, runes, experience = hash[:level], hash[:runes], hash[:experience]
|
level, experience = hash[:level], hash[:experience]
|
||||||
|
|
||||||
|
runes = { FIRE => hash[:fires], NATURE => 1 }
|
||||||
animation = Animation.new(hash[:animation])
|
animation = Animation.new(hash[:animation])
|
||||||
graphic = Graphic.new(hash[:graphic], 0, GRAPHIC_HEIGHT)
|
graphic = Graphic.new(hash[:graphic], 0, GRAPHIC_HEIGHT)
|
||||||
|
|
||||||
ALCHEMY_SPELLS[id] = AlchemySpell.new(level, runes, experience, animation, graphic, multiplier)
|
ALCHEMY_SPELLS[id] = AlchemySpell.new(level, runes, experience, animation, graphic, multiplier)
|
||||||
end
|
end
|
||||||
|
|
||||||
alchemy :low_level, button: 1_162, level: 21, runes: { FIRE => 3, NATURE => 1 }, animation: 712,
|
alchemy :low_level, button: 1_162, level: 21, fires: 3, animation: 712, graphic: 112, multiplier: 0.48, experience: 31
|
||||||
graphic: 112, multiplier: 0.48, experience: 31
|
alchemy :high_level, button: 1_178, level: 55, fires: 5, animation: 713, graphic: 113, multiplier: 0.72, experience: 65
|
||||||
|
|
||||||
alchemy :high_level, button: 1_178, level: 55, runes: { FIRE => 5, NATURE => 1 }, animation: 713,
|
|
||||||
graphic: 113, multiplier: 0.72, experience: 65
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class EnchantAction < ItemSpellAction
|
|||||||
ENCHANT_ITEMS[@item.id].nil?
|
ENCHANT_ITEMS[@item.id].nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def executeAction
|
def execute_action
|
||||||
if @pulses == 0
|
if @pulses == 0
|
||||||
mob.play_animation(@spell.animation)
|
mob.play_animation(@spell.animation)
|
||||||
mob.play_graphic(@spell.graphic)
|
mob.play_graphic(@spell.graphic)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class ItemSpellAction < SpellAction
|
|||||||
if illegal_item?
|
if illegal_item?
|
||||||
mob.send_message('You cannot use that spell on this item!')
|
mob.send_message('You cannot use that spell on this item!')
|
||||||
stop
|
stop
|
||||||
next
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
id = @item.id
|
id = @item.id
|
||||||
@@ -132,7 +132,7 @@ on :message, :magic_on_item do |player, message|
|
|||||||
message.terminate
|
message.terminate
|
||||||
else
|
else
|
||||||
enchant = ENCHANT_SPELLS[message.id]
|
enchant = ENCHANT_SPELLS[message.id]
|
||||||
|
|
||||||
if !enchant.nil? && enchant.button == spell
|
if !enchant.nil? && enchant.button == spell
|
||||||
slot = message.slot
|
slot = message.slot
|
||||||
item = player.inventory.get(slot)
|
item = player.inventory.get(slot)
|
||||||
|
|||||||
Reference in New Issue
Block a user