08-24-2013, 09:53 AM
I've figured it out on my own. adding the following gave me what i was looking for:
Code:
#--------------------------------------------------------------------------
# ● Aliased item_effect_recover_hp
#--------------------------------------------------------------------------
alias bluemagic_item_effect_recover_hp item_effect_recover_hp
def item_effect_recover_hp(user, item, effect)
bluemagic_item_effect_recover_hp(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_recover_mp
#--------------------------------------------------------------------------
alias bluemagic_item_effect_recover_mp item_effect_recover_mp
def item_effect_recover_mp(user, item, effect)
bluemagic_item_effect_recover_mp(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_gain_tp
#--------------------------------------------------------------------------
alias bluemagic_item_effect_gain_tp item_effect_gain_tp
def item_effect_gain_tp(user, item, effect)
bluemagic_item_effect_gain_tp(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_add_state
#--------------------------------------------------------------------------
alias bluemagic_item_effect_add_state item_effect_add_state
def item_effect_add_state(user, item, effect)
bluemagic_item_effect_add_state(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_remove_state
#--------------------------------------------------------------------------
alias bluemagic_item_effect_remove_state item_effect_remove_state
def item_effect_remove_state(user, item, effect)
bluemagic_item_effect_remove_state(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_add_buff
#--------------------------------------------------------------------------
alias bluemagic_item_effect_add_buff item_effect_add_buff
def item_effect_add_buff(user, item, effect)
bluemagic_item_effect_add_buff(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end
#--------------------------------------------------------------------------
# ● Aliased item_effect_add_debuff
#--------------------------------------------------------------------------
alias bluemagic_item_effect_add_debuff item_effect_add_debuff
def item_effect_add_debuff(user, item, effect)
bluemagic_item_effect_add_debuff(user, item, effect)
if @result.hit? and item.class == RPG::Skill
if BlueMages.include?(@actor_id) and BlueMagic.include?(item.id)
i = @skills.size
learn_skill(item.id)
if !(i == @skills.size)
SceneManager.scene.add_text(actor.name + " learns " + item.name + ".")
end
end
end
end