#==============================================================================
# ** Quests
#------------------------------------------------------------------------------
# By Marlos Gama
#------------------------------------------------------------------------------
# Máximo de 20 Missões, caso queira um número maior, configure no
# Script: [NET] Switch & Variables
#------------------------------------------------------------------------------
module Configurar_Quests
MISSION_NAME = []
MISSION_START = []
MISSION = []a
#Nome das Missões
MISSION_NAME[1] = ["Baú Mágico"]
MISSION_NAME[2] = ["Mate o Monstro"]
#Switches que Começa as Missões
MISSION_START[1] = [14]
MISSION_START[2] = [16]
#Informações das Missões
# Informação, Item Requerido, Gráfico do Monstro, Quantidade de Monstros, Switche, level, Item que Ganha
MISSION[1] = ["Fale com o NPC de Quests", 14, "090-Monster04", 1, 15, 1, 1]
MISSION[2] = ["Algo Aqui", 29, "075-Devil01", 5, 17, 2, 4]
end
class Window_Quests < Window_Base
def initialize
super(310,80,232,230)
self.contents = Bitmap.new(width - 32, height - 32)
@dragable = true
@closable = true
self.z = 999999
self.back_opacity = 200
refresh
end
def update
super
#refresh if something_changed?
end
#def mission
#return @mission
#end
#def set_mission(mission)
#@mission = mission
#refresh
#end
def on_close
self.visible = false
self.active = false
$fechando_ativar = true
end
def refresh
@actor = $game_party.actors[0]
self.contents.clear
#for quest in 0..(Configurar_Quests::MISSION.size-1)
#@name = Configurar_Quests::MISSION[quest]
#return if quest != $quest_list.index
@id = $quest_list.index+1
@name = Configurar_Quests::MISSION_NAME[@id][0]
@information = Configurar_Quests::MISSION[@id][1-1]
@requeriments = Configurar_Quests::MISSION[@id][2-1]
@monsters = Configurar_Quests::MISSION[@id][3-1]
@quantidade = Configurar_Quests::MISSION[@id][4-1]
@gain_item = Configurar_Quests::MISSION[@id][7-1]
@level = Configurar_Quests::MISSION[@id][6-1]
@andamento = Configurar_Quests::MISSION[@id][5-1]
# Nome
self.contents.font.color = Color.new(255,0,0)
rect = Rect.new(4, 0, self.contents.width - 8, 32)
self.contents.draw_text(rect, @name.to_s, 1)
self.contents.font.color = normal_color
# Informação
rect2 = Rect.new(4, 25, self.contents.width - 8, 32)
self.contents.draw_text(rect2, @information.to_s, 1)
# Requerimentos
self.contents.draw_text(0, 50, 262, 32, "Requerimentos: "+$data_items[@requeriments].name)
draw_item_name2($data_items[@requeriments], 90-3, 50)
# Nível
self.contents.draw_text(0, 70, 262, 32, "Nível: " +@level.to_s)
# Status
self.contents.draw_text(0, 90, 262, 32, "Status: ")
if $game_switches[@andamento] == true #and $game_party.actors[0].level == @level or $game_party.actors[0].level >= @level
@status_quest = "Concluida"
self.contents.font.color = Color.new(0,128,0)
elsif $game_switches[@andamento] == false
@status_quest = "Em andamento"
end
self.contents.draw_text(40, 90, 262, 32, @status_quest.to_s)
self.contents.font.color = normal_color
# Recompensa
self.contents.draw_text(0, 110, 262, 32, "Recompensa: "+$data_items[@gain_item].name)
draw_item_name2($data_items[@gain_item], 70, 110)
# Monstros
self.contents.draw_text(0, 160, 262, 32, "Monstros: " +@quantidade.to_s+"x")
bitmap = RPG::Cache.character(@monsters,0)
cw = bitmap.width / 4
ch = bitmap.height / 4
facing = 0
src_rect = Rect.new(0, facing * ch, cw, ch)
self.contents.blt(59, 160-15, bitmap, src_rect)
#end
end
def something_changed?
return true if @name != @name
return true if @information != @name
return true if @requeriments != @name
return true if @monsters != @name
return true if @gain_item != @name
return true if @level != @name
return false
end
end