#==============================================================================
# ** Skill Shop
#------------------------------------------------------------------------------
# SephirothSpawn
# 2006-04-06
# Version 1
#------------------------------------------------------------------------------
# * Instrucions :
#
# ~ Gaining Skill Points
# - $game_party.actors[actor_index].skill_shop_points +-*/= x
# OR
# - $game_actors[actor_id].skill_shop_points +-*/= x
#
# ~ Setting Up Aviable Skills
# - $game_temp.skill_shop_skills[actor_id] = [skill_id, ... ]
# OR
# - $game_temp.skill_shop_skills[actor_id] = nil
# - $game_temp.skill_shop_skills[0] = [skill_id, ...]
# (0 is used as the default. Any actor ID not defined will use this list for the skills)
#
# ~ Calling Skill Shop
# - $scene = Scene_SkillShop.new(actor_index)
#
# ~ Switching Actor In Skill Shop
# - Press L or R
#------------------------------------------------------------------------------
# * Customization :
#
# ~ Purchasing Types (Must Use 1, can Use 2)
# - Spend_Gold = true (On) or false (Off)
# - Spend_Skill_Points = true (On) or false (Off)
#
# ~ Skill Cost
# - Gold Cost
# Skill_Gold_Cost = { skill_id => cost, ... }
# - Skill Point Cost
# Skill_Point_Cost = { skill_id => cost, ... }
#
# ~ Actor Requirements
# - Actor_Requirements = { skill_id => [actor_id, ...], ... }
#
# ~ Level Requirements
# - Level_Requirements = { skill_id => req_level, ... }
#
# ~ Previous Skill Requirements
# - Previous_Skill_Requirments = { skill_id => [req_skill, ...], ... }
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Skill Shop', 'SephirothSpawn', 1, '2006-04-06')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Skill Shop') == true
#==============================================================================
# ** Skill_Shop
#==============================================================================
module Skill_Shop
#--------------------------------------------------------------------------
# * Purchasing Types
#--------------------------------------------------------------------------
Spend_Gold = true
Spend_Skill_Points = true
#--------------------------------------------------------------------------
# * Skill Cost
# ~ Skill_Gold_Cost = { skill_id => cost, ... }
# ~ Skill_Point_Cost = { skill_id => cost, ... }
#--------------------------------------------------------------------------
Default_Skill_Gold_Cost = 0
Skill_Gold_Cost = {}
Default_SP_Cost = 500
Skill_Point_Cost = {}
#--------------------------------------------------------------------------
# * Actor Requirements
# ~ Actor_Requirements = { skill_id => [actor_id, ...], ... }
#--------------------------------------------------------------------------
Actor_Requirements = {
57 => [1], 58 => [1], 59 => [1], 60 => [1],
61 => [2], 62 => [2], 63 => [2], 64 => [2],
65 => [3], 66 => [3], 67 => [3], 68 => [3],
69 => [4], 70 => [4], 71 => [4], 72 => [4],
73 => [5], 74 => [5], 75 => [5], 76 => [5],
77 => [6], 78 => [6], 79 => [6], 80 => [6],
}
#--------------------------------------------------------------------------
# * Level Requirements
# ~ Level_Requirements = { skill_id => req_level, ... }
#--------------------------------------------------------------------------
Level_Requirements = {}
#--------------------------------------------------------------------------
# * Previous Skill Requirements
# ~ Previous_Skill_Requirments = { skill_id => [req_skill, ...], ... }
#--------------------------------------------------------------------------
Previous_Skill_Requirments = {
2 => [1], 3 => [1, 2],
5 => [4],
8 => [7], 9 => [7, 8],
11 => [10], 12 => [10, 11],
14 => [13], 15 => [13, 14],
17 => [16], 18 => [16, 17],
20 => [19], 21 => [19, 20],
23 => [22], 24 => [22, 23],
26 => [25], 27 => [25, 26],
29 => [28], 30 => [28, 29], 32 => [31],
58 => [57], 59 => [57, 58], 60 => [57, 58, 59],
62 => [61], 63 => [61, 62], 64 => [61, 62, 63],
66 => [65], 67 => [65, 66], 68 => [65, 66, 67],
70 => [69], 71 => [69, 70], 72 => [69, 70, 71],
74 => [73], 75 => [73, 74], 76 => [73, 74, 75],
78 => [77], 79 => [77, 78], 80 => [77, 78, 79]
}
end
#==============================================================================
# ** Game_Temp
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :skill_shop_skills
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_skillshop_gtemp_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_skillshop_gtemp_init
# Sets Skills Shop Skills List
@skill_shop_skills = {0 => (1...$data_skills.size).to_a}
end
end
#==============================================================================
# ** Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :skill_shop_points
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_skillshop_gactor_setup setup
alias seph_skillshop_gactor_skills skills
#--------------------------------------------------------------------------
# * Setup
#--------------------------------------------------------------------------
def setup(actor_id)
# Sets Up Skill Shop Skills Array
@skill_shop_skills = []
# Sets Up Skill Points
@skill_shop_points = 0
# Original Setup Method
seph_skillshop_gactor_setup(actor_id)
end
#--------------------------------------------------------------------------
# * Skills
#--------------------------------------------------------------------------
def skills
# Gets Original Skills
s = seph_skillshop_gactor_skills.dup
# Adds Skill Shop Skills
s << @skill_shop_skills
# Returns Skills
return s.flatten.uniq.sort.dup
end
#--------------------------------------------------------------------------
# * Learn Shop Skill
#--------------------------------------------------------------------------
def learn_shop_skill(skill_id)
# Unless Skill Already Learned
unless @skill_shop_skills.include?(skill_id)
# Learn Shop Skill
@skill_shop_skills << skill_id
end
end
#--------------------------------------------------------------------------
# * Can Learn Shop Skill Check
#--------------------------------------------------------------------------
def can_learn_shop_skill?(skill_id)
# If Skill Learned
if self.skills.include?(skill_id)
return false
end
# If Gold Cost
if Skill_Shop::Spend_Gold
if Skill_Shop::Skill_Gold_Cost.has_key?(skill_id)
if $game_party.gold < Skill_Shop::Skill_Gold_Cost[skill_id]
return false
end
else
if $game_party.gold < Skill_Shop::Default_Skill_Gold_Cost
return false
end
end
end
# If Skill Point Cost
if Skill_Shop::Spend_Skill_Points
if Skill_Shop::Skill_Point_Cost.has_key?(skill_id)
if @skill_shop_points < Sklll_Shop::Skill_Point_Cost[skill_id]
p 'Not Enough SP'
return false
end
else
if @skill_shop_points < Skill_Shop::Default_SP_Cost
return false
end
end
end
# Actor Requirement
if Skill_Shop::Actor_Requirements.has_key?(skill_id)
unless Skill_Shop::Actor_Requirements[skill_id].include?(@actor_id)
return false
end
end
# Level Requirement
if Skill_Shop::Level_Requirements.has_key?(skill_id)
if @level < Skill_Shop::Level_Requirements[skill_id]
return false
end
end
# Previous Skill Requirement
if Skill_Shop::Previous_Skill_Requirments.has_key?(skill_id)
for s_id in Skill_Shop::Previous_Skill_Requirments[skill_id]
unless self.skills.include?(s_id)
return false
end
end
end
return true
end
end
#==============================================================================
# ** Window_SkillShop_SkillList
#==============================================================================
class Window_SkillShop_SkillList < Window_Selectable
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor_id)
super(0, 64, 224, 320)
@actor = $game_party.actors[actor_id]
create_skills_list
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Create Skills List
#--------------------------------------------------------------------------
def create_skills_list
# Check for Personalize Skills List
if $game_temp.skill_shop_skills.has_key?(@actor.id)
unless $game_temp.skill_shop_skills[@actor.id].nil?
@skills = $game_temp.skill_shop_skills[@actor.id]
end
end
# Default Skill List
if @skills.nil?
@skills = $game_temp.skill_shop_skills[0]
end
# Sets Item Max
@item_max = @skills.size
if @item_max > 0
self.contents = Bitmap.new(192, @item_max * 32)
end
end
#--------------------------------------------------------------------------
# * Return Skill Id
#--------------------------------------------------------------------------
def skill_id
return @skills[self.index]
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
#--------------------------------------------------------------------------
def draw_item(index)
# Sets Skill
skill = $data_skills[@skills[index]]
# Can Learn Flag
can_learn = @actor.can_learn_shop_skill?(skill.id)
# Skill Icon
bitmap = RPG::Cache.icon(skill.icon_name)
# Draws Skill Icon
self.contents.blt(4, index * 32 + 4, bitmap, Rect.new(0, 0, 24, 24), can_learn ? 255 : 160)
# Font Color
self.contents.font.color = can_learn ? normal_color : disabled_color
# Draws Skill Name
self.contents.draw_text(32, index * 32, 160, 32, skill.name)
end
end
#==============================================================================
# ** Window_SkillShop_Cost
#==============================================================================
class Window_SkillShop_Cost < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor_id, skill_id)
super(0, 384, 224, 96)
self.contents = Bitmap.new(192, 64)
@actor = $game_party.actors[actor_id]
refresh(skill_id)
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(skill_id)
self.contents.clear
# Gold & SP Cost
if Skill_Shop::Spend_Gold && Skill_Shop::Spend_Skill_Points
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 192, 32, "#{$data_system.words.gold} Cost:")
self.contents.draw_text(4, 32, 192, 32, 'Skill Point Cost:')
gold = $game_party.gold - (Skill_Shop::Skill_Gold_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Gold_Cost[skill_id] : Skill_Shop::Default_Skill_Gold_Cost)
self.contents.font.color = gold >= 0 ? text_color(1) : text_color(2)
self.contents.draw_text(- 4, 0, 192, 32, gold.to_s, 2)
sp = @actor.skill_shop_points - (Skill_Shop::Skill_Point_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Point_Cost[skill_id] : Skill_Shop::Default_SP_Cost)
self.contents.font.color = sp >= 0 ? text_color(1) : text_color(2)
self.contents.draw_text(- 4, 32, 192, 32, sp.to_s, 2)
# Only Gold Cost
elsif Skill_Shop::Spend_Gold
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 192, 32, "#{$data_system.words.gold} Cost:")
gold = $game_party.gold - (Skill_Shop::Skill_Gold_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Gold_Cost[skill_id] : Skill_Shop::Default_Skill_Gold_Cost)
self.contents.font.color = gold >= 0 ? text_color(1) : text_color(2)
self.contents.draw_text(- 4, 32, 192, 32, gold.to_s, 2)
elsif Skill_Shop::Spend_Skill_Points
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 192, 32, 'Skill Point Cost')
self.contents.font.color = normal_color
sp = @actor.skill_shop_points - Skill_Shop::Skill_Point_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Point_Cost[skill_id] : Skill_Shop::Default_SP_Cost
self.contents.font.color = sp >= 0 ? text_color(1) : text_color(2)
self.contents.draw_text(- 4, 32, 192, 32, sp.to_s, 2)
end
end
end
#==============================================================================
# ** Window_SkillShop_SkillData
#==============================================================================
class Window_SkillShop_SkillData < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor_index, skill_id)
super(224, 64, 416, 416)
self.contents = Bitmap.new(384, 384)
@actor = $game_party.actors[actor_index]
refresh(skill_id)
end
#--------------------------------------------------------------------------
# * Disabled System Color
#--------------------------------------------------------------------------
def disabled_system_color
color = system_color
color.alpha = disabled_color.alpha
return color
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh(skill_id)
self.contents.clear
# Gets Skills
skill = $data_skills[skill_id]
# Can Learn Flag
can_learn = @actor.can_learn_shop_skill?(skill.id)
# Gets Icon
bitmap = RPG::Cache.icon(skill.icon_name)
# Draws Skill Icon
self.contents.blt(4, 4, bitmap, Rect.new(0, 0, 24, 24), can_learn ? 255 : 160)
# Draws Skill Name
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(32, 0, 352, 32, skill.name)
# Draws SP Cost
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(272, 0, 112, 32, "#{$data_system.words.sp} :")
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(- 4, 0, 384, 32, skill.sp_cost.to_s, 2)
# Draws Descritpion
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(4, 32, 60, 32, 'Desc. :')
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(64, 32, 320, 32, skill.description)
# Draws Scope
case skill.scope
when 0 ; scope = 'None'
when 1 ; scope = 'One Enemy'
when 2 ; scope = 'All Enemies'
when 3 ; scope = 'One Ally'
when 4 ; scope = 'All Allies'
when 5 ; scope = "KO'd Ally"
when 6 ; scope = "All KO'd Allies"
when 7 ; scope = 'User'
end
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(4, 64, 186, 32, 'Scope :')
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(- 4, 64, 190, 32, scope, 2)
# Draws Occassion
case skill.occasion
when 0 ; occ = 'Always'
when 1 ; occ = 'In Battle'
when 2 ; occ = 'In Menu'
when 3 ; occ = 'Never'
end
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(194, 64, 186, 32, 'Occassion :')
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(190, 64, 190, 32, occ, 2)
# Draws Skill Power & Hit Probability
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(4, 96, 186, 32, 'Power :')
self.contents.draw_text(194, 96, 186, 32, 'Hit %')
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(- 4, 96, 190, 32, skill.power.to_s, 2)
self.contents.draw_text(190, 96, 190, 32, skill.hit.to_s, 2)
# Cash Cost
if Skill_Shop::Spend_Gold
cost = Skill_Shop::Skill_Gold_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Gold_Cost[skill_id] : Skill_Shop::Default_Skill_Gold_Cost
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(4, 128, 186, 32, "#{$data_system.words.gold} Cost:")
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(- 4, 128, 190, 32, cost.to_s, 2)
end
# Skill Points Cost
if Skill_Shop::Spend_Skill_Points
cost = Skill_Shop::Skill_Point_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Point_Cost[skill_id] : Skill_Shop::Default_SP_Cost
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(194, 128, 186, 32, "Skill Point Cost:")
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(190, 128, 190, 32, cost.to_s, 2)
end
# Draws Level Requried
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(95, 160, 190, 32, 'Level Required :')
req_lvl = Skill_Shop::Level_Requirements.has_key?(skill_id) ?
Skill_Shop::Level_Requirements[skill_id].to_s : 'None'
self.contents.font.color = can_learn ? normal_color : disabled_color
self.contents.draw_text(95, 160, 190, 32, req_lvl, 2)
# Actor Requirment
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(0, 192, 384, 32, 'Actors Allowed Skills', 1)
self.contents.font.color = can_learn ? normal_color : disabled_color
if Skill_Shop::Actor_Requirements.has_key?(skill_id)
actors = Skill_Shop::Actor_Requirements[skill_id].dup
actors.collect! { |x| $data_actors[x].name}
actors = actors.join(' - ')
else
actors = 'All Actors'
end
self.contents.draw_text(0, 224, 384, 32, actors, 1)
# Draws Previous Skill Requirements
self.contents.font.color = can_learn ? system_color : disabled_system_color
self.contents.draw_text(0, 256, 384, 32, 'Previous Skill Requirements', 1)
self.contents.font.color = can_learn ? normal_color : disabled_color
if Skill_Shop::Previous_Skill_Requirments.has_key?(skill_id)
skills = Skill_Shop::Previous_Skill_Requirments[skill_id].dup
skills.collect! {|x| $data_skills[x]}
for i in 0...skills.size
skill = skills[i]
x = 4 + i % 2 * 190
y = i / 2 * 32 + 288
bitmap = RPG::Cache.icon(skill.icon_name)
self.contents.blt(x + 4, y + 4, bitmap, Rect.new(0, 0, 24, 24), can_learn ? 255 : 160)
self.contents.draw_text(x + 32, y, 154, 32, skill.name)
end
else
self.contents.draw_text(0, 288, 384, 32, 'No Skills Required', 1)
end
end
end
#==============================================================================
# ** Scene_SkillShop
#==============================================================================
class Scene_SkillShop
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor_index = 0)
@actor_index = actor_index
@actor = $game_party.actors[actor_index]
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Creates Help Window
@help_window = Window_Help.new
@help_window.set_text("Welcome To the Skill Shop #{@actor.name} ~ Select Skill To Learn", 1)
# Creates Skill List
@skill_list_window = Window_SkillShop_SkillList.new(@actor_index)
# Creates Skill Shop Cost Window
@skill_cost_window = Window_SkillShop_Cost.new(@actor_index, @skill_list_window.skill_id)
# Creates Skill Data Window
@skill_data_window = Window_SkillShop_SkillData.new(@actor_index, @skill_list_window.skill_id)
# Confirmation Window
@confirmation_window = Window_Command.new(128, ['Yes', 'No'])
@confirmation_window.x, @confirmation_window.y = 256, 208
@confirmation_window.z = 1000
@confirmation_window.visible = @confirmation_window.active = false
# Scene Objects
@scene_objects = [@help_window, @skill_list_window, @skill_cost_window,
@skill_data_window, @confirmation_window]
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Updates Scene Objects
@scene_objects.each { |x| x.update }
# Frame update
update
# Abort loop if screen is changed
break if $scene != self
end
# Prepare for transition
Graphics.freeze
# Dispose Scene Objects
@scene_objects.each { |x| x.dispose }
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If Skill List Window Active
if @skill_list_window.active
update_skill_select
return
# If Confirmation Window Active
elsif @confirmation_window.active
update_confirmation
return
end
end
#--------------------------------------------------------------------------
# * Frame Update : Skill Select
#--------------------------------------------------------------------------
def update_skill_select
# If Up or Down Is Pressed
if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
# Refresh Windows
@skill_cost_window.refresh(@skill_list_window.skill_id)
@skill_data_window.refresh(@skill_list_window.skill_id)
end
# If B Button Is Pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Switch to map screen
$scene = Scene_Map.new
return
end
# If C Button Is Pressed
if Input.trigger?(Input::C)
# Can learn Check
unless @actor.can_learn_shop_skill?(@skill_list_window.skill_id)
# Play Buzzer SE
$game_system.se_play($data_system.buzzer_se)
# Set Help Text
@help_window.set_text('Cannot Learn Skill', 1)
return
end
# Play Decision SE
$game_system.se_play($data_system.decision_se)
# Turn Off Skill List Window
@skill_list_window.active = false
# Resets Index
@confirmation_window.index = 0
# Turns Window On
@confirmation_window.visible = @confirmation_window.active = true
# Gets Skill Name
skill_name = $data_skills[@skill_list_window.skill_id].name
# Updates Help Text
@help_window.set_text("Do You Want to Learn #{skill_name} #{@actor.name}?", 1)
end
# If L is Pressed
if Input.trigger?(Input::LEFT)
# Play Cursor SE
$game_system.se_play($data_system.cursor_se)
# Changes Actor Index
@actor_index == 0 ? @actor_index = $game_party.actors.size - 1: @actor_index -= 1
# Resets Scene
$scene = Scene_SkillShop.new(@actor_index)
end
# If R is Pressed
if Input.trigger?(Input::RIGHT)
# Play Cursor SE
$game_system.se_play($data_system.cursor_se)
# Changes Actor Index
@actor_index == $game_party.actors.size - 1 ? @actor_index = 0 : @actor_index += 1
# Resets Scene
$scene = Scene_SkillShop.new(@actor_index)
end
end
#--------------------------------------------------------------------------
# * Frame Update : Confirmation
#--------------------------------------------------------------------------
def update_confirmation
# If B Button Pressed
if Input.trigger?(Input::B)
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# Turn On Skill List Window
@skill_list_window.active = true
# Turns Off Confirmation Window
@confirmation_window.visible = @confirmation_window.active = false
# Updates Help Text
@help_window.set_text("Welcome To the Skill Shop #{@actor.name} ~ Select Skill To Learn", 1)
end
# If C Button Pressed
if Input.trigger?(Input::C)
# Play Decision SE
$game_system.se_play($data_system.decision_se)
# Gets Skill ID
skill_id = @skill_list_window.skill_id
# Lose Gold
if Skill_Shop::Spend_Gold
cost = Skill_Shop::Skill_Gold_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Gold_Cost[skill_id] : Skill_Shop::Default_Skill_Gold_Cost
$game_party.lose_gold(cost)
end
# Lose Skill Points
if Skill_Shop::Spend_Skill_Points
cost = Skill_Shop::Skill_Point_Cost.has_key?(skill_id) ?
Skill_Shop::Skill_Point_Cost[skill_id] : Skill_Shop::Default_SP_Cost
@actor.skill_shop_points -= cost
end
# Learn Skill
@actor.learn_shop_skill(skill_id)
# Refresh Windows
@skill_list_window.refresh
@skill_cost_window.refresh(@skill_list_window.skill_id)
@skill_data_window.refresh(@skill_list_window.skill_id)
# Turn On Skill List Window
@skill_list_window.active = true
# Turns Off Confirmation Window
@confirmation_window.visible = @confirmation_window.active = false
# Gets Skill Name
skill_name = $data_skills[@skill_list_window.skill_id].name
# Updates Help Text
@help_window.set_text("#{@actor.name} Learned #{skill_name}!", 1)
end
end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end