Quest system la vendetta
autore=Omega7Traduttore=Xemnas
Allegati:
ecco il download della demo postato da me le immagini stanno dentro la cartella system buon divertimento
Istruzioni per l'uso:copia sotto Materials
Spoiler
#==============================#=================== #============================# Omegas7's Ultimate Quest sistema di script.# ================================================= ============================# Autore: Omegas7.# Version: 3.0 (finale).# Il mio sito: baseomega.forumer.com# ================================================= ============================# La versione finale viene caricato con uno più bello layout,# Una zona più personalizzabile di configurazione, ecc ..# ================================================= ============================# Caratteristiche:#> Facile per creare missioni nello script.#> Una ricerca funziona con una variabile, non passa!#> Attività Unlimited per ogni quest! (Scroll Function)#> Icone completi e incompleti.#> Imposta sfondo e la grafica HUD per il vostro stile di menu own!#> È possibile utilizzare le immagini per ogni quest!#> Descrizioni di ogni ricerca.#> Supporto per le variabili! Valori variabili di visualizzazione per le missioni complesse!#> Categorie per tutti, completa e missioni INCOMPLETO.#> Aggiunge automaticamente "Quest Completato" A differenza delle versioni precedenti.#> Cambia le dimensioni dei caratteri.#> Un sacco di opzioni di personalizzazione, di controllo sotto.# ================================================= ============================# Istruzioni: (primo tempo? Meglio leggerli)## Grazie per aver utilizzato questo script.# E 'un sistema utile, prendi il tuo tempo per leggere i prossimi:## Prima di tutto, creiamo una nuova ricerca per il nostro gioco.# Sotto, nella zona di configurazioni, si trova il# [AREA CREAZIONE DI QUEST]. Per creare la tua personale ricerca, si# Necessità di aggiungere un po 'di codice. Ecco il template di base:## Quest [ID] = [ 'Nome', VAR, Icona, IconB, 'Immagine']# COMPITI [ID] = [ 'Fate questo', 'e questo', 'E']# DESCRIZIONI [ID] = [ 'Si tratta di una ricerca awesome', 'per noobs']## ID sarà il vostro numero di identificazione ricerca.# Quindi, se hai 20 missioni, la vostra nuova ricerca ID sarebbero 21.# 'Name' è ... Lol il nome. Assicurarsi di essere racchiusa tra virgolette '.# VAR è la variabile ID che controlla questa ricerca.# Icona è il numero incompleta indice icona.# Ia IconB quella completa.# 'Immagine' sarà l'immagine visualizzata sulla parte superiore della sua ricerca.# Si può disabilitare mettendo 'zero' (senza virgolette).#COMPITI # sarà l'array contenente tutti i To-Do roba del# Quest. Ogni attività è una stringa, racchiusa tra virgolette '.# Ogni operazione, è separato da una virgola.# Si possono avere compiti di merito (la finestra diventerà scorrevole).# Si può mettere \ v [id] per mostrare le variabili nella vostra attività!#DESCRIZIONE # è come COMPITI. Solo che sarà la descrizione# Viene mostrato nel menu principale per la ricerca.# Ogni elemento è una riga di testo.## Guarda la demo, se hai bisogno di aiuto.# Per ulteriore assistenza, me lo faccia sapere. Il mio sito è:# Baseomega.forumer.com# Traduzione by Xemnas================================================= ============================module OMEGAS7 module QUEST # ========================================================================= # Configuration Options. # ========================================================================= # Exit dovue vuoi che ti porta? Alla MAP o al MENU? EXIT_TO = "MENU" # Se il menu, allora, In quale slot vuoi che appaia il comando? (Contando da 0) MENU_RETURN_SLOT = 6 # Sfondo e la grafica HUD, sia nella cartella di sistema. BACKGROUND = 'QUEST BG' HUD = 'QUEST HUD' # Compiti prefisso e icona di spaziatura (spazi prima del nome della ricerca per l'icona). TASKS_PREFIX = "> " ICON_SPACING = " " # Quest menu principale e le linee di attività le dimensioni dei caratteri: QUESTS_FONT_SIZE = 13 TASKS_FONT_SIZE = 16 # Category Icon Indexes. # [All,Completed,Incompleted] CATEGORY_ICONS = [100,101,99] # ========================================================================= QUESTS = [] # Don't edit. TASKS = [] # Don't edit. DESCRIPTIONS = [] # Don't edit. # ========================================================================= QUESTS[0] = ['Sacred Sword.',1,99,101,'legendary'] TASKS[0] = ['I must grab the sacred blade on the table.', 'I think I got the right Blade. Go talk with the master.', 'Now I have to purify 4 crystals. \v[3] so far.', 'It is better I report back to my master about the crystals.', 'I should turn the switch. Something might happen.', 'Go and kill the bad guy.'] DESCRIPTIONS[0] = ['My master has a few easy tasks','for me, he is so awesome.'] QUESTS[1] = ['Example',2,99,101,'lol'] TASKS[1] = ['1st task...','2nd task...','3rd task...'] DESCRIPTIONS[1] = ['The second quest is always harder','than the first one.'] endendclass Omega_Quest < Scene_Base include OMEGAS7::QUEST def initialize @index = 0 @mode = 0 @empty_list = false create_background create_quest_list create_quest_commands create_quest_description create_category create_information end def create_background @background = Sprite_Base.new @background.bitmap = Cache.system(BACKGROUND.to_s) @background.z = 50 @hud = Sprite_Base.new @hud.bitmap = Cache.system(HUD.to_s) @hud.z = 60 end def create_quest_list @list = [] @list[0] = [] @list[1] = [] @list[2] = [] for i in 0...QUESTS.size if $game_variables[QUESTS[i][1].to_i].to_i > TASKS[i].size @list[0][i] = [QUESTS[i][0].to_s,true,i] @list[1][i] = [QUESTS[i][0].to_s,true,i] elsif $game_variables[QUESTS[i][1].to_i].to_i > 0 @list[0][i] = [QUESTS[i][0].to_s,false,i] @list[2][i] = [QUESTS[i][0].to_s,false,i] end end @list[0].compact! @list[1].compact! @list[2].compact! @list.compact! if @list[0].empty? @empty_list = true end end def create_quest_commands create_quest_list @command_window = Window_Quest_Command.new(250,@list[@mode]) @command_window.y = 90 @command_window.x = 12 @command_window.opacity = 0 @index = @command_window.index end def create_quest_description @window_description = Window_Base.new(280,80,250,170) @window_description.contents.font.size = QUESTS_FONT_SIZE @window_description.opacity = 0 refresh_description end def refresh_description @window_description.contents.clear if @list[@mode][@command_window.index][2] != nil for i in 0...DESCRIPTIONS[@list[@mode][@command_window.index][2]].size txt = DESCRIPTIONS[@list[@mode][@command_window.index][2]][i].to_s @window_description.contents.draw_text(0,18*i,260,18,txt.to_s) end end end def update @command_window.update @category.update if @mode != @category.index @mode = @category.index @command_window.dispose create_quest_commands refresh_description end if @index != @command_window.index @index = @command_window.index refresh_description end if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil @background.dispose @hud.dispose @command_window.dispose @window_description.dispose @category.dispose @information.dispose $scene = Omega_Quest_View.new(@list[@mode][@command_window.index][2]) elsif Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] == nil Sound.play_buzzer end if Input.trigger?(Input::B) finish end end def create_category @category = Window_Categories_Command.new(180) @category.opacity = 0 @category.x = -6 @category.y = 40 end def create_information @information = Window_Base.new(544-250,416-120,250,120) @information.opacity = 0 @information.contents.font.size = 16 if @empty_list == true @information.contents.draw_text(0,0,250,24,"Current Total Quests: 0") else @information.contents.draw_text(0,0,250,24,"Current Total Quests: " + @list[0].size.to_s) end @information.contents.font.color = Color.new(0,255,0) @information.contents.draw_text(0,24,250,24,"Completed Quests: " + @list[1].size.to_s) @information.contents.font.color = Color.new(255,167,0) @information.contents.draw_text(0,48,250,24,"Incomplete Quests: " + @list[2].size.to_s) end def finish @background.dispose @hud.dispose @command_window.dispose @window_description.dispose @category.dispose @information.dispose case EXIT_TO when "MENU" $scene = Scene_Menu.new(MENU_RETURN_SLOT) when "MAP" $scene = Scene_Map.new end endendclass Omega_Quest_View < Scene_Base include OMEGAS7::QUEST def initialize(id) @font_size = 16 @line_height = 18 @id = id @limit_y = 0 draw_picture if QUESTS[@id][4] != nil set_tasks create_window refresh_window end def draw_picture @picture = Sprite_Base.new @picture.bitmap = Cache.system(QUESTS[@id][4].to_s) @picture.x = (544/2) - (@picture.width/2) @picture.z = 250 end def set_tasks @tasks = [] for i in 0...TASKS[@id].size if $game_variables[QUESTS[@id][1]].to_i >= i + 1 @tasks[i] = TASKS[@id][i].to_s end end if $game_variables[QUESTS[@id][1]].to_i > TASKS[@id].size @tasks.push('Quest Completed!') end end def create_window height = @line_height * @tasks.size + 32 y = 0 if @picture != nil y += @picture.height @limit_y = @picture.height end @window = Window_Base.new(0,y,544,height) end def refresh_window @window.contents.clear @window.contents.font.size = @font_size @display = [] for i in [email protected] @display[i] = @tasks[i].clone @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] } @display[i].to_s.gsub!(/\\V\[([0-9]+)\]/i) { $game_variables[$1.to_i] } @window.contents.draw_text(0,i * @line_height,500,@line_height,TASKS_PREFIX.to_s + @display[i].to_s) end end def update if Input.press?(Input::DOWN) && ((@window.y + @window.height) > 416) @window.y -= 3 elsif Input.press?(Input::UP) && (@window.y < @limit_y) @window.y += 3 end if Input.trigger?(Input::B) @picture.dispose if @picture != nil @window.dispose $scene = Omega_Quest.new end endendclass Window_Quest_Command < Window_Selectable include OMEGAS7::QUEST attr_reader :commands def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32) @commands = commands @empty = false if @commands.empty? @commands[0] = ["No quests.",false] @empty = true end if row_max == 0 row_max = (@commands.size + column_max - 1) / column_max end super(0, 0, width, row_max * WLH + 32, spacing) @item_max = commands.size @column_max = column_max self.contents.font.size = TASKS_FONT_SIZE refresh self.index = 0 end def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end def draw_item(index, enabled = true) spacing = ICON_SPACING.to_s rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) self.contents.font.color = Color.new(255,0,0) self.contents.font.color.alpha = enabled ? 255 : 128 if @empty == false if @commands[index][1] == true self.contents.font.color = Color.new(0,255,0) draw_icon(QUESTS[@commands[index][2]][3].to_i,rect.x,rect.y) else self.contents.font.color = Color.new(255,0,0) draw_icon(QUESTS[@commands[index][2]][2].to_i,rect.x,rect.y) end elsif @empty == true spacing = "" end self.contents.draw_text(rect, spacing + @commands[index][0].to_s) endendclass Window_Categories_Command < Window_Selectable include OMEGAS7::QUEST attr_reader :commands def initialize(width, column_max = 3, row_max = 1, spacing = 32) super(0, 0, width, row_max * WLH + 32, spacing) @commands = ['','',''] @item_max = commands.size @column_max = column_max @icons = CATEGORY_ICONS refresh self.index = 0 end def refresh self.contents.clear for i in 0...@item_max draw_item(i) end end def draw_item(index, enabled = true) rect = item_rect(index) rect.x += 4 rect.width -= 8 self.contents.clear_rect(rect) draw_icon(@icons[index],rect.x,rect.y) endend
Bugs e conflitti noti:
Nessuno per ora...
spero di aver rispettato il Template
A presto
Xemnas
Modificato da Xemnas, 13 November 2009 - 18:38 PM.