$nonq est le non de la quête entre guillemet $tipeq est le type de la quête selon cela
Spoiler:
1 => vaincre tel monstre 2 => ramener un objet 3 => apporter un objet 4 => Tuer x monstre 5 => aller a tel endroit 6=> trouve quelle quelle qu'un 7 => avis de recherche
$cible est cible de la quête cela peut être
Spoiler:
l'id d un monstre dans les types 1 , 4 et 7 l'id d'un objet dans les types 2 et 3 l'id d'une map dans le type 5 un non entre guillemet pour le cas 6
$cible2 est cible secondaire de la quête cela peut être
Spoiler:
un non entre guillemet pour le cas 3 le nombre de fois ou il faut vaincre un monstre dans le type 4
ou id est l'id de l'interrupteur correspondant a la quête
ou bien
Code:
make_quete(id)
si vous ne souhaiter pas le scène quête : la quête sera alors visible unique dans la liste ou id est l'id de l'interrupteur correspondant a la quête
Pour appeler la liste de quête ecrivez dans un appelle de script
puis mettez ceci [code]$scene = Scene_Quete.new(id)[/code] ou id est l'id de l'interrupteur correspondant a la quête
ou bien make_quete(id)[ si vous ne souhaiter pas le scène quête : la quête sera alors visible unique dans la liste ou id est l'id de l'interrupteur correspondant a la quête
=begin Categorie 1 => gagne tel monstre 2 => ramene un objet 3 => aporte un objet 4 => Tue x monstre 5 => Va a tel endroi 6=> trouve quelle quelle qu'un 7 => gagne tel PNJ =end
def draw_recompense1 if $item[0] ==1 draw_item_name($data_items[$item[1]], 0, 148+24) elsif $item[0] == 2 draw_item_name($data_skills[$item[1]], 0, 148+24) elsif $item[0] == 3 draw_item_name($data_armors[$item[1]], 0, 148+24) elsif $item[0] == 4 draw_item_name($data_weapons[$item[1]], 0, 148+24) end def draw_recompense2 x = (self.width-32)/2 if $item2[0] ==1 draw_item_name($data_items[$item2[1]], x, 148+24) elsif $item2[0] == 2 draw_item_name($data_skills[$item2[1]], x, 148+24) elsif $item2[0] == 3 draw_item_name($data_armors[$item2[1]], x, 148+24) elsif $item2[0] == 4 draw_item_name($data_weapons[$item2[1]], x, 148+24) end end end def chek_type case $tipeq when 1 a = "Vaincs " + $data_enemies[$cible].name + " !" when 2 a = "Ramène moi " + $data_items[$cible].name + " !" when 3 a = "Apporte " + $data_items[$cible].name + " à " + $cible2.to_s + " !" when 4 a = "Vaincs " +$cible2.to_s+" " + $data_enemies[$cible].name + "s !" when 5 map = load_data("Data/MapInfos.rvdata") a = "Rends toi a ''"+map[$cible].name.to_s+"'' !" when 6 a = "Trouve " + $cible.to_s+ " !" when 7 a = "On recherche : " + $data_enemies[$cible].name + " !" else a = "" end return a end
def draw_item_name(item, x, y, enabled = true) if item != nil draw_icon(item.icon_index, x, y, enabled) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y,160, WLH, item.name) end end
end ################################################ ######################################## ############################ ################# ####### ####### ################# ############################ ######################################## ################################################ class Scene_Quete < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(id) @id = id end
#-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background @quete = Window_quette.new((544-384)/2,416/6,@id) create_command_window unless $quete.include?(@id) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @quete.dispose @command_window.dispose unless $quete.include?(@id) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background @quete.update @command_window.update unless $quete.include?(@id) update_command_selection unless $quete.include?(@id) update_command_quite if $quete.include?(@id) end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = "Oui" s2 = "Non" @command_window = Window_Command.new(@quete.width, [s1, s2],2) @command_window.y = (416/6)+ @quete.height @command_window.x = @quete.x @command_window.index = 0 end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::C) Sound.play_decision if @command_window.index == 0 make_quete(@id) @command_window.dispose end $scene = Scene_Map.new end end
def update_command_quite if Input.trigger?(Input::C) Sound.play_decision $scene = Scene_Map.new end end end ################################################ ######################################## ############################ ################# ####### ####### ################# ############################ ######################################## ################################################
class Scene_quete__liste < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize
end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background @qlib = Window_Qlib.new @quete = Window_quette.new(@qlib.width , 0) @quete.visible = false end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @qlib.dispose @quete.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background update_command_selection @qlib.update end # # # # def update_command_selection
if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new end retour_quete(@qlib.retour_key) @quete.refresh(@qlib.retour_key) @quete.visible = true
def initialize super(0, 0, 160, 416) @item_max = $quete.size refresh self.index = 0 @indexn = 1 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear a= [] $quete.each_key do |@key_index| a = a + @key_index.to_a end for i in 0...a.size draw_item(i,a) end @tab =a end #-------------------------------------------------------------------------- # * Draw Item # index : item number # enabled : enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_item(index, tab) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) key_p = tab[index] self.contents.font.color = normal_color unless $quete[key_p][9] self.contents.font.color = Color.new(139,0,0) if $quete[key_p][9] self.contents.draw_text(rect, $quete[key_p][0]) end
def retour_key a = @tab[self.index] return a end end ################################################ ######################################## ############################ ################# #######
####### ################# ############################ ######################################## class Scene_File < Scene_Base alias adurna_write write_save_data alias adurna_read read_save_data def write_save_data(file) adurna_write (file) Marshal.dump($quete, file) end def read_save_data(file) adurna_read (file) $quete = Marshal.load(file) end end ################################################ ######################################## ############################ ################# #######
Oups j'avais oublier le bonus
regarder amis scripteur
Spoiler:
Code:
def hk_to_a(hash) a= [] hash.each_key do |key_index| a = a + key_index.to_a return a end end
Donate_rpg >>> Quetion 1===} tu peut lancer une quete sans ce oui/non j'ai decrit la marche a suivre dans le premier poste
Spoiler:
Citation :
puis mettez ceci Code: $scene = Scene_Quete.new(id)
ou id est l'id de l'interrupteur correspondant a la quête
ou bien Code: make_quete(id) si vous ne souhaiter pas le scène quête : la quête sera alors visible unique dans la liste ou id est l'id de l'interrupteur correspondant a la quête
mais peut etre veut tu quand meme faire aparaitre la fenetre de quete ? dis le moi et je m'en ocuperait
Quetion 2===} ce problème survient si tu n'as aucune quête de lancer ou de terminer il faut donc t'assurer que le joueur a toujours au moins une quête
razore
Maire Lv.9
Age : 27 Avertissements : 1Inscrit le : 18/04/2010 Messages : 332
puis mettez ceci [code]$scene = Scene_Quete.new(id)[/code] ou id est l'id de l'interrupteur correspondant a la quête
ou bien make_quete(id)[ si vous ne souhaiter pas le scène quête : la quête sera alors visible unique dans la liste ou id est l'id de l'interrupteur correspondant a la quête
=begin Categorie 1 => gagne tel monstre 2 => ramene un objet 3 => aporte un objet 4 => Tue x monstre 5 => Va a tel endroi 6=> trouve quelle quelle qu'un 7 => gagne tel PNJ =end
def draw_recompense1 if $item[0] ==1 draw_item_name($data_items[$item[1]], 0, 148+24) elsif $item[0] == 2 draw_item_name($data_skills[$item[1]], 0, 148+24) elsif $item[0] == 3 draw_item_name($data_armors[$item[1]], 0, 148+24) elsif $item[0] == 4 draw_item_name($data_weapons[$item[1]], 0, 148+24) end def draw_recompense2 x = (self.width-32)/2 if $item2[0] ==1 draw_item_name($data_items[$item2[1]], x, 148+24) elsif $item2[0] == 2 draw_item_name($data_skills[$item2[1]], x, 148+24) elsif $item2[0] == 3 draw_item_name($data_armors[$item2[1]], x, 148+24) elsif $item2[0] == 4 draw_item_name($data_weapons[$item2[1]], x, 148+24) end end end def chek_type case $tipeq when 1 a = "Vaincs " + $data_enemies[$cible].name + " !" when 2 a = "Ramène moi " + $data_items[$cible].name + " !" when 3 a = "Apporte " + $data_items[$cible].name + " à " + $cible2.to_s + " !" when 4 a = "Vaincs " +$cible2.to_s+" " + $data_enemies[$cible].name + "s !" when 5 map = load_data("Data/MapInfos.rvdata") a = "Rends toi a ''"+map[$cible].name.to_s+"'' !" when 6 a = "Trouve " + $cible.to_s+ " !" when 7 a = "On recherche : " + $data_enemies[$cible].name + " !" else a = "" end return a end
def draw_item_name(item, x, y, enabled = true) if item != nil draw_icon(item.icon_index, x, y, enabled) self.contents.font.color = normal_color self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_text(x + 24, y,160, WLH, item.name) end end
end ################################################ ######################################## ############################ ################# ####### ####### ################# ############################ ######################################## ################################################ class Scene_Quete < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(id) @id = id end
#-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background @quete = Window_quette.new((544-384)/2,416/6,@id) create_command_window unless $quete.include?(@id) end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @quete.dispose @command_window.dispose unless $quete.include?(@id) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background @quete.update @command_window.update unless $quete.include?(@id) update_command_selection unless $quete.include?(@id) update_command_quite if $quete.include?(@id) end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = "Oui" s2 = "Non" @command_window = Window_Command.new(@quete.width, [s1, s2],2) @command_window.y = (416/6)+ @quete.height @command_window.x = @quete.x @command_window.index = 0 end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::C) Sound.play_decision if @command_window.index == 0 make_quete(@id) @command_window.dispose end $scene = Scene_Map.new end end
def update_command_quite if Input.trigger?(Input::C) Sound.play_decision $scene = Scene_Map.new end end end ################################################ ######################################## ############################ ################# ####### ####### ################# ############################ ######################################## ################################################
class Scene_quete__liste < Scene_Base #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize
end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background @qlib = Window_Qlib.new @quete = Window_quette.new(@qlib.width , 0) @quete.visible = false end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @qlib.dispose @quete.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background update_command_selection @qlib.update end # # # # def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) retour_quete(@qlib.retour_key) @quete.refresh(@qlib.retour_key) @quete.visible = true end end
end ################################################ ######################################## ############################ ################# #######
def initialize super(0, 0, 160, 416) @item_max = $quete.size refresh self.index = 0 @indexn = 1 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear a= [] $quete.each_key do |@key_index| a = a + @key_index.to_a end for i in 0...a.size draw_item(i,a) end @tab =a end #-------------------------------------------------------------------------- # * Draw Item # index : item number # enabled : enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_item(index, tab) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) key_p = tab[index] self.contents.font.color = normal_color unless $quete[key_p][9] self.contents.font.color = Color.new(139,0,0) if $quete[key_p][9] self.contents.draw_text(rect, $quete[key_p][0]) end
def retour_key a = @tab[self.index] return a end end ################################################ ######################################## ############################ ################# #######
####### ################# ############################ ######################################## class Scene_File < Scene_Base alias adurna_write write_save_data alias adurna_read read_save_data def write_save_data(file) adurna_write (file) Marshal.dump($quete, file) end def read_save_data(file) adurna_read (file) $quete = Marshal.load(file) end end ################################################ ######################################## ############################ ################# #######
tu remarquera une modification autre je met ce script dans le premier post
Pour tous ceux qui se plaigne de mon orthographe (et ils ont raison) les textes sont modifiable dans le script ; ceux sont tous ce qu'y est en violet dans l'editeure de script de RPG MAKER a l'exeption de
Code:
"Audio/SE/Chime2" a la ligne 119 "Data/MapInfos.rvdata" a la ligne 167