Advertisement
Fomar0153

Fomar0153 - More Choices 1.0

Feb 3rd, 2012
3,712
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.87 KB | None | 0 0
  1. =begin
  2. More Choices
  3. by Fomar0153
  4. Version 1.0
  5. ----------------------
  6. Notes
  7. ----------------------
  8. No requirements
  9. Allows you to have more than four choices
  10. ----------------------
  11. Instructions
  12. ----------------------
  13. Edit the method more_choice and then use the call in
  14. a choice option.
  15. ----------------------
  16. Known bugs
  17. ----------------------
  18. None
  19. =end
  20. class Game_Interpreter
  21.   #--------------------------------------------------------------------------
  22.   # ● Edit Here
  23.   # when handle
  24.   #   $game_message.choices.push("a choice")
  25.   #--------------------------------------------------------------------------
  26.   def more_choice(p)
  27.     case p
  28.     when "Pizza Topping"
  29.       $game_message.choices.push("Ham & Pineapple")
  30.       $game_message.choices.push("Meat Feast")
  31.       $game_message.choices.push("Chocolate")
  32.       $game_message.choices.push("BBQ")
  33.       $game_message.choices.push("Diamonds")
  34.       $game_message.choices.push("Spicy Chicken")
  35.       $game_message.choices.push("Garlic")
  36.     else
  37.       $game_message.choices.push(p)
  38.     end
  39.   end
  40.   #--------------------------------------------------------------------------
  41.   # ● Long Choices - Don't edit this bit
  42.   #--------------------------------------------------------------------------
  43.   def setup_choices(params)
  44.     for s in params[0]
  45.       more_choice(s)
  46.     end
  47.     $game_message.choice_cancel_type = params[1]
  48.     $game_message.choice_proc = Proc.new {|n| @branch[@indent] = n }
  49.   end
  50. end
  51.  
  52. class Window_ChoiceList < Window_Command
  53.   #--------------------------------------------------------------------------
  54.   # ● Feel free to change the 1 to another variable that you'd prefer
  55.   #--------------------------------------------------------------------------
  56.   alias mc_call_ok_handler call_ok_handler
  57.   def call_ok_handler
  58.     $game_variables[1] = index
  59.     mc_call_ok_handler
  60.   end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement