Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- #
- # Quests v. 1.0
- # by MHRajang
- #
- #==============================================================================
- #==============================================================================
- # o Compatibility o
- #------------------------------------------------------------------------------
- # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
- # it will run with RPG Maker VX without adjusting.
- #
- # It only works with the window 640*480 (with Yanfly Core Engine or others
- # script that extend the window)
- #==============================================================================
- #==============================================================================
- # o Rights on this script o
- #------------------------------------------------------------------------------
- # You can use it in free or commercial games,
- # but just credit me and give me a free copy of your game
- #==============================================================================
- #==============================================================================
- # o How to use it ? o
- #------------------------------------------------------------------------------
- # Call quests : SceneManager.call(Scene_MHRquests)
- #------------------------------------------------------------------------------
- # Just enter the title and the description of the quests
- # You can choose what variable will modify the state of the quest
- # 0 = quest not discovered yet
- # 1 = quest discovered
- # 2 or 3 = quest complete
- #------------------------------------------------------------------------------
- # example :
- #
- # def quest1
- # display_message($game_variables[103], "Save the princess", <= begin of customization
- # "Description", ^ this is the variable you will change in events
- # "Bla Bla", you can choose an other
- # "bla",
- # "This description",
- # "is",
- # "the",
- # "description",
- # "oooooooooooooooooooo",
- # "that's all folks !") <= end of customization
- # SceneManager.call(Scene_MHRquests)
- # end
- #==============================================================================
- # Nice making, my friends ! ;)
- #==============================================================================
- # Scene journal
- class Scene_MHRquests < Scene_Base
- # Lancement de la scène
- def start
- super
- create_title
- create_commands
- create_window_message
- end
- # Création de la fenêtre de titre
- def create_title
- @title = Window_Help.new(1)
- @title.set_text(" Journal de quêtes")
- end
- # Création de la fenêtre de sélection
- def create_commands
- @window_selection = Window_List.new(0, 48)
- @window_selection.set_handler(:quest1, method(:quest1))
- @window_selection.set_handler(:quest2, method(:quest2))
- @window_selection.set_handler(:quest3, method(:quest3))
- @window_selection.set_handler(:quest4, method(:quest4))
- @window_selection.set_handler(:quest5, method(:quest5))
- @window_selection.set_handler(:quest6, method(:quest6))
- @window_selection.set_handler(:quest7, method(:quest7))
- @window_selection.set_handler(:quest8, method(:quest8))
- @window_selection.set_handler(:quest9, method(:quest9))
- @window_selection.set_handler(:quest10, method(:quest10))
- @window_selection.set_handler(:quest11, method(:quest11))
- @window_selection.set_handler(:quest12, method(:quest12))
- @window_selection.set_handler(:quest13, method(:quest13))
- @window_selection.set_handler(:quest14, method(:quest14))
- @window_selection.set_handler(:quest15, method(:quest15))
- @window_selection.set_handler(:quest16, method(:quest16))
- @window_selection.set_handler(:cancel, method(:return_scene))
- @window_selection.set_handler(:unknowquest, method(:unknowquest))
- end
- def create_window_message
- @message = Window_Base.new(160, 48, 480, 432)
- end
- def display_message(number, text, text2, text3, text4,
- text5, text6, text7, text8, text9, text10)
- # Description =
- @message.draw_text(0, 20, 600, 80, text)
- @message.draw_text(100, 70, 600, 38, "_____________________")
- @message.draw_text(0, 120, 600, 38, text2)
- @message.draw_text(0, 145, 600, 38, text3)
- @message.draw_text(0, 170, 600, 38, text4)
- @message.draw_text(0, 195, 600, 38, text5)
- @message.draw_text(0, 220, 600, 38, text6)
- @message.draw_text(0, 245, 600, 38, text7)
- @message.draw_text(0, 270, 600, 38, text8)
- @message.draw_text(0, 295, 600, 38, text9)
- @message.draw_text(0, 320, 600, 38, text10)
- # Si accompli (3), ou non (1) =
- if number <= 1
- message = "To do"
- else message = "Complete !"
- end
- @message.draw_text(120, 0, 280, 38, message)
- @message.show
- end
- def quest1
- display_message($game_variables[103], "Titre", # <= You can choose another
- "Description ligne 1", # variable if you want
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- def quest2
- display_message($game_variables[104], "Titre",
- "Description ligne 1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- def quest3
- display_message($game_variables[105], "Titre",
- "Description ligne 1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- def quest4
- display_message($game_variables[106], "Titre",
- "Description ligne 1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- def quest5
- display_message($game_variables[107], "Titre",
- "Description ligne 1",
- "",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- def quest6
- end
- def quest7
- end
- def quest8
- end
- def quest9
- end
- def quest10
- end
- def quest11
- end
- def quest12
- end
- def quest13
- end
- def quest14
- end
- def quest15
- end
- def quest16
- end
- def unknowquest
- display_message($game_variables[120], "Inconnu",
- "",
- "A decouvrir !",
- "",
- "",
- "",
- "",
- "",
- "",
- "")
- SceneManager.call(Scene_MHRquests)
- end
- # Attente de la pression du bouton C
- def pre_terminate
- super
- loop do
- Graphics.update
- Input.update
- break if Input.trigger?(:C)
- end
- end
- end
- # Fenêtre de sélection
- class Window_List < Window_Command
- # Création de la liste de selection
- def make_command_list
- if $game_variables[103] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 01-", :quest1)
- end
- if $game_variables[104] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 02-", :quest1)
- end
- if $game_variables[105] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 03-", :quest1)
- end
- if $game_variables[106] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 04-", :quest1)
- end
- if $game_variables[107] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 05-", :quest1)
- end
- if $game_variables[108] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 06-", :quest1)
- end
- if $game_variables[109] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 07-", :quest1)
- end
- if $game_variables[110] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 08-", :quest1)
- end
- if $game_variables[111] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 09-", :quest1)
- end
- if $game_variables[112] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 10-", :quest1)
- end
- if $game_variables[113] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 11-", :quest1)
- end
- if $game_variables[114] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 12-", :quest1)
- end
- if $game_variables[115] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 13-", :quest1)
- end
- if $game_variables[116] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 14-", :quest1)
- end
- if $game_variables[117] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 15-", :quest1)
- end
- if $game_variables[118] == 0
- add_command("inconnu", :unknowquest)
- else add_command("-Quête 16-", :quest1)
- end
- add_command("Back", :cancel)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement