Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Player Stat Allocation Choice 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.
- Instructions: Use a Script Call command (Page 3) in an Event with the following:
- give_stats( amount, Actor ID)
- Example(Natalie gets 5 points):
- give_stats(5, 2)
- If the second value is left out it will default to Actor 1.
- =end
- class Game_Interpreter
- def give_stats(count, actor = 1)
- @loop_count = count
- actor = $game_actors[actor]
- while @loop_count > 0
- $game_message.add("Spend your attribute points.\nPoints to spend: #{@loop_count}")
- params = []
- choices = []
- choices.push("Power (Current: #{actor.atk})")
- choices.push("Tenacity (Current: #{actor.def})")
- choices.push("Moxie (Current: #{actor.mdf})")
- choices.push("Cunning (Current: #{actor.mat})")
- choices.push("Reflexes (Current: #{actor.agi})")
- choices.push("Favor (Current: #{actor.luk})")
- params.push(choices)
- params.push(0)
- $choice_result = 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)
- case $choice_result
- when 1
- actor.add_param(2, 1)
- when 2
- actor.add_param(3, 1)
- when 3
- actor.add_param(4, 1)
- when 4
- actor.add_param(5, 1)
- when 5
- actor.add_param(6, 1)
- when 6
- actor.add_param(7, 1)
- end
- @loop_count -= 1
- end
- actor.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
- $choice_result = n + 1
- }
- end
- end=begin
- Player Stat Allocation Choice 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.
- Instructions: Use a Script Call command (Page 3) in an Event with the following:
- give_stats( amount, Actor ID)
- Example(Natalie gets 5 points):
- give_stats(5, 2)
- If the second value is left out it will default to Actor 1.
- =end
- class Game_Interpreter
- def give_stats(count, actor = 1)
- @loop_count = count
- actor = $game_actors[actor]
- while @loop_count > 0
- $game_message.add("Spend your attribute points.\nPoints to spend: #{@loop_count}")
- params = []
- choices = []
- choices.push("Power (Current: #{actor.atk})")
- choices.push("Tenacity (Current: #{actor.def})")
- choices.push("Moxie (Current: #{actor.mdf})")
- choices.push("Cunning (Current: #{actor.mat})")
- choices.push("Reflexes (Current: #{actor.agi})")
- choices.push("Favor (Current: #{actor.luk})")
- params.push(choices)
- params.push(0)
- $choice_result = 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)
- case $choice_result
- when 1
- actor.add_param(2, 1)
- when 2
- actor.add_param(3, 1)
- when 3
- actor.add_param(4, 1)
- when 4
- actor.add_param(5, 1)
- when 5
- actor.add_param(6, 1)
- when 6
- actor.add_param(7, 1)
- end
- @loop_count -= 1
- end
- actor.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
- $choice_result = n + 1
- }
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement