mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-06 08:40:03 +00:00
@@ -3,6 +3,7 @@ require 'java'
|
|||||||
java_import 'org.apollo.game.action.Action'
|
java_import 'org.apollo.game.action.Action'
|
||||||
java_import 'org.apollo.game.model.Animation'
|
java_import 'org.apollo.game.model.Animation'
|
||||||
java_import 'org.apollo.game.model.Item'
|
java_import 'org.apollo.game.model.Item'
|
||||||
|
java_import 'org.apollo.game.model.entity.Skill'
|
||||||
java_import 'org.apollo.game.model.inter.EnterAmountListener'
|
java_import 'org.apollo.game.model.inter.EnterAmountListener'
|
||||||
java_import 'org.apollo.game.model.inter.dialogue.DialogueAdapter'
|
java_import 'org.apollo.game.model.inter.dialogue.DialogueAdapter'
|
||||||
|
|
||||||
@@ -274,15 +275,15 @@ class FinishedMixingAction < MixingAction
|
|||||||
@ingredient = ingredient
|
@ingredient = ingredient
|
||||||
end
|
end
|
||||||
|
|
||||||
def executeAction
|
def execute_action
|
||||||
player = mob
|
ingredient = name_of(:item, @ingredient).downcase
|
||||||
ingredient = name_of(@ingredient).downcase
|
|
||||||
name = @potion.item.definition.name.sub('(3)', '')
|
name = @potion.item.definition.name.sub('(3)', '')
|
||||||
|
|
||||||
player.send_message("You add the #{ingredient} to the mixture to make an #{name}.")
|
name = "#{LanguageUtil.get_indefinite_article(name)} #{name}"
|
||||||
player.skill_set.add_experience(HERBLORE_SKILL_ID, @potion.experience)
|
mob.send_message("You add the #{ingredient} to the mixture to make #{name}.")
|
||||||
|
mob.skill_set.add_experience(Skill::HERBLORE, @potion.experience)
|
||||||
|
|
||||||
inventory = player.inventory
|
inventory = mob.inventory
|
||||||
|
|
||||||
@slots.each do |slot, amount|
|
@slots.each do |slot, amount|
|
||||||
unless inventory.remove_slot(slot, amount) # TODO: will this remove stuff incorrectly?
|
unless inventory.remove_slot(slot, amount) # TODO: will this remove stuff incorrectly?
|
||||||
|
|||||||
Reference in New Issue
Block a user