Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Skills Choice On Every Third Level v 1.0
- Created by Kio Kurashi
- Version History:
- 1.0 = Initial Version
- Free for commercial and personal use. Credit is not required, but appreciated.
- Known bugs: None.
- =end
- module Class_Skillsets
- CLASS = []#<-- Do not touch.
- =begin
- Setup is CLASS[Class Id] = ['level0','level1','level2','level3',
- [First skill ID,Second skill ID],'level5',
- 'level6']
- Unfortunatly you must have the space for each level though the
- ones that don't get skills can have whatever you want in them as
- they will not be read for the script. Still needs to be valid syntax though.
- Example:
- CLASS[1] = ['level0','level1','level2','level3',
- [30,5],'level5','level6']
- Add in yours below.
- =end
- end
- #### ####
- ### DO NOT EDIT BEYOND THIS POINT. ###
- #### ####
- class Game_Actor
- include Class_Skillsets
- def level_up
- @level += 1
- #~ $game_message.add("#{name} Leveled Up!!")
- if (@level-1) % 3 == 0
- $game_message.add("Pick a skill for #{name} to learn.")
- params = []
- choices = []
- classidis = @class_id
- levelis = @level
- p CLASS[classidis][levelis]
- skills = CLASS[classidis][levelis]
- choices.push("#{$data_skills[skills[0]].name}")
- choices.push("#{$data_skills[skills[1]].name}")
- params.push(choices)
- params.push(0)
- setup_choices(params)
- Fiber.yield while $game_message.choice? if SceneManager.scene.is_a?(Scene_Map)
- SceneManager.scene.wait_for_message while $game_message.choice? if SceneManager.scene.is_a?(Scene_Battle)
- choice_result = $skill_choice_result
- case choice_result
- when 1
- learn_skill(skills[0])
- when 2
- learn_skill(skills[1])
- end
- $skill_choice_result = 0
- end
- refresh
- end
- def setup_choices(params)
- params[0].each {|s| $game_message.choices.push(s) }
- $game_message.choice_cancel_type = params[1]
- $game_message.choice_proc = Proc.new {|n|
- begin; @branch[@indent] = n;rescue;end
- $skill_choice_result = n + 1
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement