Zeriab

[RGSS] Quest Book - Example usage

Nov 13th, 2011
771
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #==============================================================================
  2. # ** Quest settings
  3. #------------------------------------------------------------------------------
  4. #  This place is for you to set some settings to the quest menu
  5. #==============================================================================
  6. # The opacity of the windows. 0 = invisible and 255 = totally visible
  7. WINDOW_OPACITY = 225
  8.  
  9. # The directory of the backgrounds
  10. BACKGROUND_DIR = "Quest/Backgrounds/"
  11.  
  12. # Number of the variable used
  13. BACK_VAR = 15
  14.  
  15. # A hash which contains the names of the pictures used for the background
  16. # 2 => "Somename.png" means that the picture named Somename.png will be
  17. # displayed as background picture if the variable has value 2
  18. #
  19. # 3 are displayed here but you can declare more
  20. #
  21. # The first one ('standard' => "Back1.png") defines the standard background
  22. # picture. It is used if another picture can't be found. For example if the
  23. # variable for some reason is -2315.
  24.  
  25. BACK_PICS = {'standard' => "Back1.png",
  26.     0 => "Back1.png",
  27.     2 => "Somename.png",
  28.     7 => "2.png"}
  29.    
  30. #==============================================================================
  31. # ** Quests
  32. #------------------------------------------------------------------------------
  33. #  This place is for you to enter the quests.
  34. #==============================================================================
  35.  
  36. ####################
  37. ## THE MAIN QUEST ##
  38. ####################
  39. # Part 1
  40. gq = Game_Quest.new  
  41. dq = Data_Quest.new
  42. dq.icon = "mainquest1.png"
  43. dq.owner = "Nephalie"
  44. dq.location = "Training Grounds"
  45. dq.goal = "Meet Mr. Khan"
  46. dq.info = "Nephalie told you that Mr. Khan wanted to see you.\n"+
  47.           "He will be waiting for you at the training grounds.\n"+
  48.           "Meet Mr. Khan at the Training Grounds"
  49. qc = Quest_Criteria.new   # No criteria, active from the start
  50. gq.add_quest(dq,qc)
  51.  
  52. # Part 2
  53. dq = Data_Quest.new
  54. dq.icon = "mainquest2.png"
  55. dq.owner = "Mr. Khan"
  56. dq.location = "Training Grounds"
  57. dq.goal = "Learn the fighting style of the monk"
  58. dq.info = "You met with Mr Khan\n" +
  59.           "He got a sparring partner for you to teach you some\n" +
  60.           "techniques and styles of the monk\n" +
  61.           "Part 2"
  62. qc = Quest_Criteria.new(["Switch", 2, true])  # Switch 2 must be true
  63. gq.add_quest(dq,qc)
  64.  
  65. # The completed quest part
  66. dq = Data_Quest.new
  67. dq.icon = "mainquestCompleted.png"
  68. dq.owner = "Death of the tyrant"
  69. dq.location = "Castle Dungeon"
  70. dq.goal = "Kill the dark tyran"
  71. dq.info = "Congratulations!\n You have completed the main quest"
  72. qc = Quest_Criteria.new(["Variable", 4, "==", 8],
  73.                         ["Switch", 6, false],
  74.                         ["Switch", 27, true])
  75. gq.set_completed_quest(dq,qc)
  76.  
  77. # Adds the final quest to $game_quests
  78. $game_quests.add(gq)
  79.  
  80. #-------------------------------#
  81. # THE YELLOW-GLIMMER CAKE QUEST #
  82. #-------------------------------#
  83. # The first part
  84. gq = Game_Quest.new
  85. dq = Data_Quest.new
  86. dq.owner = "Mr. Bean"
  87. dq.location = "Mount Everest"
  88. dq.goal = "The Yellow-Glimmer Cake"
  89. dq.info = "Mr. Beans has an insane craving for some very\n"+
  90.           "delicious cake. A cake only one baker is able to make.\n"+
  91.           "The problem is that this baker lives on a mountain far\n"+
  92.           "far away.\n"+
  93.           "Mr. Bean want you to travel to Mount Everest,\n"+
  94.           "contact the baker and return with the most\n"+
  95.           "delicious cake.\n"+
  96.           "Mr. Bean ask you to pick up some nice looking herbs\n"+
  97.           "if you find any while you travel.\n" +
  98.           "You must return with the Yellow-Glimmer Cake!"
  99. qc = Quest_Criteria.new
  100. gq.add_quest(dq,qc)
  101.  
  102. # The completed quest part
  103. dq = Data_Quest.new
  104. dq.icon = "subquest.png"
  105. dq.owner = "Mr. Bean"
  106. dq.location = "Mount Everest"
  107. dq.goal = "The Yellow-Glimmer Cake"
  108. dq.info = "You succesfully delivered the cake back to Mr. Bean\n"+
  109.           "Mr. Bean gave you a piece of the cake as a reward"
  110. qc = Quest_Criteria.new(["Variable", 9, ">=", 3])
  111. gq.set_completed_quest(dq,qc)
  112.  
  113. # Adds the final quest to $game_quests
  114. $game_quests.add(gq)
  115.  
  116.  
  117. #--------------------#
  118. # Just another Quest #
  119. #--------------------#
  120. # The first part
  121. gq = Game_Quest.new
  122. dq = Data_Quest.new
  123. dq.owner = "Someone"
  124. dq.location = "Some place"
  125. dq.goal = "A goal"
  126. dq.info = "Loads of info"
  127. qc = Quest_Criteria.new(["Variable",1,"<=",1])
  128. gq.add_quest(dq,qc)
  129.  
  130. # The completed quest part
  131. dq = Data_Quest.new
  132. dq.icon = "subquest.png"
  133. dq.owner = "Someone"
  134. dq.location = "Some place"
  135. dq.goal = "A completed goal"
  136. dq.info = "Loads of completed info"
  137. qc = Quest_Criteria.new(["Switch", 8, true])
  138. gq.set_completed_quest(dq,qc)
  139.  
  140. # Adds the final quest to $game_quests
  141. $game_quests.add(gq)
  142.  
  143.  
  144.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×