I finally went back and made the edits to this code that were necessary for it to be a functional complete script.
Happy Hunting ^^
CODE
#-------------------------------#
# Blue Magic Script #
#-------------------------------#
# Written By: Prexus #
#
http://prexus.rmxponline.com #
#-------------------------------#
# Instructions: #
# Read the comments and apply #
# changes where needed. #
#-------------------------------#
class Game_Battler
alias blm_game_battler_skill_effect skill_effect
def skill_effect(user, skill)
blm_game_battler_skill_effect(user, skill)
if user.is_a?(Game_Enemy) and self.is_a?(Game_Actor)
learn_chance = (rand(100) < 100) # X is the percentage chance (70, 20, etc.) Simply make x = 100 if you want it to work all the time.
if learn_chance == true
if self.class_id == 4 # Change this number with the class ID of your "Blue Mage"
#if skill.id == x or skill.id == y # etc. etc. replace x and y with ids of skills the mage can learn, if any skills just get rid of the line and the end, keep putting 'or skill.id = ' to add more.
self.learn_skill(skill.id, true) # Change true to false if you don't want a sound to play
#end
end
end
end
end
end
class Game_Actor < Game_Battler
def learn_skill(skill_id, play = false)
if skill_id > 0 and not skill_learn?(skill_id)
@skills.push(skill_id)
@skills.sort!
if play == true
Audio.me_play("Audio/ME/011-Item02") # Sound file to play when learning in battle.
end
end
end
end