#======================================= # ** Scene_Quests # ** Created by coolmariners98 #------------------------------------------------------------------------------ # Please do not copy and distribute claiming to have created this. # I would like full credit, even though this script is kind of crappy. #======================================= class Scene_Quests attr_accessor :reputation # reputation of character attr_accessor :tax_change # the difference in prices with tax attr_accessor :qupdate # for the quest script # * Object Initialization def initialize(quest_index = 0) @quest_index = quest_index if $qdata == nil $qdata = Quest_Data.new end end def main # creates the quest window based upon how many totalquests questwin = [] # temp array for i in 0...$qdata.totalquests # for loop makes menu eval "questwin.push($qdata.questname[i])" end @command_window = Window_Qmand.new(160, questwin) # actually makes window @command_window.index = @quest_index # while loop determines what to show tmp = 1 tmp2 = 10 tmp3 = 0 $qdata.totalcompleted = 0 $qdata.totalfound = 0 $qdata.moneyearned = 0 $qdata.expearned = 0 $qdata.rpearned = 0 while (tmp3 < $qdata.totalquests) if $qdata.showdisabledquests == true and $game_system.qupdate[tmp] == false @command_window.disable_item(tmp3) elsif $game_system.qupdate[tmp] == false @command_window.delete_item(tmp3) else $qdata.totalfound += 1 end if $game_system.qupdate[tmp2] == true @command_window.finished(tmp3) $qdata.moneyearned += $qdata.goldreward[tmp3] $qdata.expearned += $qdata.expreward[tmp3] $qdata.rpearned += $qdata.rpreward[tmp3] $qdata.totalcompleted += 1 end tmp += 10 tmp2 += 10 tmp3 +=1 end # while loop determines if all are accessible if $qdata.shownondisabledquests == true int = 1 max = (($qdata.totalquests * 10) - 9) + 1 while int < max $game_system.qupdate[int] = true int += 10 end end # Make quest status window @qs_window = Quest_Status.new @qs_window.x = 160 @qs_window.y = 0 # Determine PreQuest Number preq = 2 temp = 1 query = false if $qdata.totalfound != $qdata.totalcompleted $qdata.whichprequest = 0 elsif $qdata.totalfound == $qdata.totalquests $qdata.whichprequest = 1 else while (query == false) if $game_system.qupdate[temp] == false $qdata.whichprequest = preq query = true else temp += 10 preq += 1 end end end # Make quest info window @qi_window = Quest_Info.new @qi_window.x = 360 @qi_window.y = 0 # Make quest window @status_window = Quest.new @status_window.x = 160 @status_window.y = 180 Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end Graphics.freeze # Dispose of windows @command_window.dispose @status_window.dispose @qs_window.dispose @qi_window.dispose end def update @command_window.update @status_window.update if @command_window.active update_command return end if @status_window.active update_status return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen $scene = Scene_Map.new return end # If C button was pressed if Input.trigger?(Input::C) index = @command_window.index #pattern on switch is index * 10 + 1 if $game_system.qupdate[index * 10 + 1] == false $game_system.se_play($data_system.buzzer_se) return else $qdata.whichquest = index $game_system.se_play($data_system.decision_se) @status_window.dispose @status_window = Quest.new @status_window.x = 160 @status_window.y = 180 @status_window.update end return end end end #======================================= # ** Quest_Status # ** Created by coolmariners98 #------------------------------------------------------------------------------ # This displays what has been done so far in your quests (upper middle window) #======================================= class Quest_Status < Window_Base def initialize super(0, 0, 200, 180) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 150, 32, "Total Quests: " + $qdata.totalquests.to_s) self.contents.font.color = normal_color self.contents.draw_text(4, 20, 150, 32, "Quests Found: " + $qdata.totalfound.to_s) self.contents.font.color = system_color self.contents.draw_text(4, 40, 150, 32, "Total Completed: " + $qdata.totalcompleted.to_s) self.contents.font.color = normal_color self.contents.draw_text(4, 80, 150, 32, "Money Earned: " + $qdata.moneyearned.to_s) self.contents.font.color = system_color self.contents.draw_text(4, 100, 150, 32, "Exp Earned: " + $qdata.expearned.to_s) self.contents.font.color = normal_color self.contents.draw_text(4, 120, 150, 32, "AP Earned: " + $qdata.rpearned.to_s) end end #======================================= # ** Quest_Info # ** Created by coolmariners98 #------------------------------------------------------------------------------ # This displays all the quest information in the upper right window #======================================= class Quest_Info < Window_Base def initialize super(0, 0, 280, 180) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 250, 32, "Where To Go") self.contents.font.color = normal_color self.contents.draw_text(4, 40, 250, 32, $qdata.preinfo[($qdata.whichprequest * 4)]) self.contents.draw_text(4, 60, 250, 32, $qdata.preinfo[(($qdata.whichprequest * 4) + 1)]) self.contents.draw_text(4, 80, 250, 32, $qdata.preinfo[(($qdata.whichprequest * 4) + 2)]) self.contents.draw_text(4, 100, 250, 32, $qdata.preinfo[(($qdata.whichprequest * 4) + 3)]) end end #======================================= # ** Quest # ** Created by coolmariners98 #------------------------------------------------------------------------------ # This displays all the quest information in the bottom right window #======================================= class Quest < Window_Base def initialize super(0, 0, 480, 300) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear if $qdata.totalfound != 0 bitmap = RPG::Cache.character($qdata.charsprite[$qdata.whichquest], 0) cw = bitmap.width / 4 ch = bitmap.height / 4 src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(4, 16, bitmap, src_rect) self.contents.font.color = system_color self.contents.draw_text(50, 0, 385, 45, "Name: " + $qdata.charname[$qdata.whichquest]) self.contents.font.color = normal_color self.contents.draw_text(50, 0, 385, 80, "Location: " + $qdata.location[$qdata.whichquest]) self.contents.font.color = system_color self.contents.draw_text(50, 0, 385, 115, "Reward: " + $qdata.textreward[$qdata.whichquest]) self.contents.font.color = normal_color self.contents.draw_text(0, 0, 435, 175, "Quest Objectives:") temp = $qdata.whichquest script = (temp * 8) easy = 0 switch = 2 while (switch < 10) if $game_system.qupdate[switch] == true self.contents.font.color = disabled_color self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $qdata.objs[script]) else self.contents.font.color = normal_color self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $qdata.objs[script]) end easy += 1 script += 1 switch += 1 end end end end #======================================= # ** Window_Qmand # ** Created by coolmariners98 #------------------------------------------------------------------------------ # This displays all the quest information in the bottom right window #======================================= class Window_Qmand < Window_Selectable def initialize(width, commands) super(0, 0, width, 480) @item_max = commands.size @commands = commands self.contents = Bitmap.new(width - 32, @item_max * 32) refresh self.index = 0 end def refresh self.contents.clear for i in 0...@item_max draw_item(i, normal_color) end end def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) end def disable_item(index) draw_item(index, disabled_color) end def delete_item(index) rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) end def finished(index) draw_item(index, system_color) end end class Game_System attr_accessor :reputation attr_accessor :qupdate # for the quest script alias qinitialize initialize def initialize qinitialize @qupdate = [] for i in 0...5000 @qupdate[i] = false end end end class Quest_Data attr_accessor :totalquests attr_accessor :totalfound attr_accessor :moneyearned attr_accessor :expearned attr_accessor :apearned attr_accessor :totalcompleted attr_accessor :showdisabledquests attr_accessor :shownondisabledquests attr_accessor :preinfo attr_accessor :charsprite attr_accessor :questname attr_accessor :charname attr_accessor :location attr_accessor :textreward attr_accessor :goldreward attr_accessor :expreward attr_accessor :rpreward attr_accessor :objs attr_accessor :whichquest attr_accessor :whichprequest alias datainitialize initialize def initialize datainitialize @preinfo = [] @charsprite = [] @questname = [] @charname = [] @location = [] @textreward = [] @goldreward = [] @expreward = [] @rpreward = [] @objs = [] @totalfound = 0 @moneyearned = 0 @expearned = 0 @apearned = 0 @totalcompleted = 0 @whichquest = 0 @whichprequest = 0 # ========================= end end #===================== # Quests #===================== module QUESTS # Quests Total TOTAL = 15 # Quest in Process message; PROCESS = "Finish the current quest" # All Quests is completed; COMPLETED = "All quests completed!!" end class Quest_Data alias quests initialize def initialize quests # kinda big things @showdisabledquests = true # displays all the quests, but they are disabled @shownondisabledquests = false # makes all quests accessible @totalquests = QUESTS::TOTAL # initialize the total number of quests you created @preinfo.push(QUESTS::PROCESS) # info message for quest in progress @preinfo.push(" ") @preinfo.push(" ") @preinfo.push(" ") @preinfo.push(QUESTS::COMPLETED) # info message for all quests done @preinfo.push(" ") @preinfo.push(" ") @preinfo.push(" ") # Quest 1 information @preinfo.push("You should probably go and talk") # info that will show @preinfo.push("to that strange looking lancer at") # in the "Where to Go?" @preinfo.push("the top-right portion of the screen") # window prior to quest @preinfo.push(" ") @questname.push("Greeting") # the name of quest @charsprite.push("009-Lancer01") # the name of the character sprite @charname.push("Sir Lancelot") # the name of the character who gave the quest @location.push("World Map") # the location of quest @textreward.push("1000 Gold and 200 Experience") # the text representation of the reward @goldreward[0] = 1000 # the actual amount of gold reward @expreward[0] = 0 # the actual amount of exp reward @apreward[0] = 200 # the actual amount of ap reward @objs.push(" - You must go and find the chicken") # quest objective 1 @objs.push(" - You must give the chicken to the clown") # quest objective 2 @objs.push(" - You must go and find the dog") # quest objective 3 @objs.push(" - You much give the dog to the other clown") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 2 information @preinfo.push("I think you are done until later") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[1] = 0 # the actual amount of gold reward @expreward[1] = 0 # the actual amount of exp reward @apreward[1] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 3 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[2] = 0 # the actual amount of gold reward @expreward[2] = 0 # the actual amount of exp reward @apreward[2] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 4 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[3] = 0 # the actual amount of gold reward @expreward[3] = 0 # the actual amount of exp reward @apreward[3] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 5 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[4] = 0 # the actual amount of gold reward @expreward[4] = 0 # the actual amount of exp reward @apreward[4] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 6 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[5] = 0 # the actual amount of gold reward @expreward[5] = 0 # the actual amount of exp reward @apreward[5] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 7 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[6] = 0 # the actual amount of gold reward @expreward[6] = 0 # the actual amount of exp reward @apreward[6] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 8 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[7] = 0 # the actual amount of gold reward @expreward[7] = 0 # the actual amount of exp reward @apreward[7] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 9 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[8] = 0 # the actual amount of gold reward @expreward[8] = 0 # the actual amount of exp reward @apreward[8] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 10 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[9] = 0 # the actual amount of gold reward @expreward[9] = 0 # the actual amount of exp reward @apreward[9] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 11 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[10] = 0 # the actual amount of gold reward @expreward[10] = 0 # the actual amount of exp reward @apreward[10] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 12 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[11] = 0 # the actual amount of gold reward @expreward[11] = 0 # the actual amount of exp reward @apreward[11] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 13 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[12] = 0 # the actual amount of gold reward @expreward[12] = 0 # the actual amount of exp reward @apreward[12] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 14 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[13] = 0 # the actual amount of gold reward @expreward[13] = 0 # the actual amount of exp reward @apreward[13] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 # Quest 15 information @preinfo.push(" ") # info that will show @preinfo.push(" ") # in the "Where to Go?" @preinfo.push(" ") # window prior to quest @preinfo.push(" ") @questname.push("Just a filler") # the name of quest @charsprite.push(" ") # the name of the character sprite @charname.push(" ") # the name of the character who gave the quest @location.push(" ") # the location of quest @textreward.push(" ") # the text representation of the reward @goldreward[14] = 0 # the actual amount of gold reward @expreward[14] = 0 # the actual amount of exp reward @apreward[14] = 0 # the actual amount of ap reward @objs.push(" ") # quest objective 1 @objs.push(" ") # quest objective 2 @objs.push(" ") # quest objective 3 @objs.push(" ") # quest objective 4 @objs.push(" ") # quest objective 5 @objs.push(" ") # quest objective 6 @objs.push(" ") # quest objective 7 @objs.push(" ") # quest objective 8 end end