Dinasty RPG
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Dinasty RPG

Fórum para interessados em Rpgs, Indie Games, RPG Maker e afins
 
InícioPortalProcurarÚltimas imagensRegistrarEntrar

 

 Omegas7's Quest System Script 3.0 editado

Ir para baixo 
5 participantes
AutorMensagem
driko-rios
Viajante
Viajante
driko-rios


Mensagens : 9
Data de inscrição : 24/08/2011

Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: Omegas7's Quest System Script 3.0 editado   Omegas7's Quest System Script 3.0 editado I_icon_minitimeQua Ago 24, 2011 7:27 pm

Omegas7's Quest System Script 3.0.
Author: Omegas7.
Version: 3.0.


Criar quests em seus jogos com facilidade, preenchido com muitas características úteis e grande!

características:
* Fácil de criar quests no script.
* Muito flexível, somente uma variável necessária para sua busca!
* Mostra Apoio variável na página de tarefas quest.
* Suporte All, completa, e as categorias incompleta.
* Suporte ícones completo e incompleto.
* Tarefas Unlimited (to-do) para o seu quests.
* Scrollable página tarefa se for necessário.
* Caixa Descrição.
* Caixa Stats atual.


Screenshots:
Spoiler:
Spoiler:


Link:
Omegas7's Version 3.0:

http://www.mediafire.com/download.php?z5n5mlzzmzd


KIN23G's edited version:

KIN23G fez uma versão editada do script (3.0), aqui é o seu código e seus screenshots.
Créditos, neste caso, ir para KIN23G e Omegas7


codigo:
Código:
# =============================================================================
#                Omegas7's Ultimate Quest System Script.
# =============================================================================
#  Author: Omegas7.
#  Edited by: Kin23g
#  Version: 3.0 - Kin23g.
# =============================================================================
#  Features:
#  V3.0 - Kin23g
#    > Easy to create quests in the script.
#    > A quest works with a variable, no switches!
#    > Unlimited tasks for each quest! (Scroll Function)
#    > Incomplete and Complete icons.
#    > Set Background and HUD graphics for your own menu style!
#    > You can use pictures for each quest!
#    > Descriptions of each quest.
#    > Variable support! Display variables values for complex quests!
#    > Categories for ALL, COMPLETE, and INCOMPLETE quests.
#    > Automatically adds "Quest Completed" unlike older versions.
#    > Change Font sizes.
#    > Lots of customization options, check below.
#  NEW Features
#    > Windows fits the whole screen now.
#    > Much better layout.
#    > Rewards of each quest.
#    > Change Font colors.
#    > Much more customization options, check below.
# =============================================================================
#  Instructions:            (First time? Better read them)
#
#    Thanks for using this script.
#    It is quite an useful system, take your time reading the next:
#
#    First of all, let's create a new quest for our game.
#    Below, in the configurations area, you will find the
#    [QUEST CREATION AREA]. To create your own quest, you will
#    need to add some code. Here is the basic template:
#
#    QUESTS[0] = ["Name",Var,IconA,IconB,"image"]
#    TASKS[0] = [
#    "Do this",
#    "And this",
#    "And this.",
#    ]
#    DESCRIPTIONS[0] = [
#    "          ralph the Old man",
#    "              Worka",
#    "",
#    "An old man in worka needs your",
#    "help in finding his wedding ring",
#    ]
#    REWARDS[0] = ["","        1000              250","",
#    "1- Queen's Sheild",
#    "2- King's Sword�2"
#    ]
#
#
#    ID will be your quest ID number.
#    So if you got 20 quests, your new quest ID would be 21.
#    'Name' is... The name lol. Make sure it to be inside quotes " ".
#    VAR is the variable ID which controls this quest.
#    IconA is the incomplete icon index number.
#    IconB ia the complete one.
#    "Image" will be the picture displayed on top of your quest.
#    You can disable it by putting "nil" (no quotes).
#
#    TASKS will be the array containing all the To-Do stuff of the
#    quest. Each task is a string, inside quotes " ".
#    Each task, is separated by a comma.
#    You can have unlimited tasks
#    (the window will become scrollable(overlaps with the image)).
#    You can put \v[id] for showing variables in your tasks!
#
#    DESCRIPTIONS is like TASKS. Just that it will be the description
#    being shown in the main menu for the quest.
#    Each element is a text line.
#
#    Note that you must put spaces in the beginning of some lines so they
#    don't overlap.
#
#    The first line is the name of the guy(or shop) who gave you the quest.
#    The second line is his(the guy you took the quest from) location.
#    Leave the third line always empty.
#    Start your description from the fourth line(don't write more than 4 lines of description)
#
#    REWARDS is like TASKS too. Just that it will be the rewards
#    shown in the main menu for the quest.
#    Leave the first line always empty.
#    Put the gold amount and exp amount in the second line(make sure you put spaces).
#    Leave the third line always empty.
#    The fourth line is the first item(or weapon, armor...etc)reward.
#    The fifth line is the second one.
#
#    For further help PM either Kin23g or Omega7 at rpgmakervx.com
# =============================================================================

module OMEGAS7
  module QUEST
    # =========================================================================
    #  Configuration Options.
    # =========================================================================
   
    # Exit returns to MAP or to MENU?
    EXIT_TO = "MENU"
    # If MENU, then, what slot will it appear on? (Counting from 0)
    MENU_RETURN_SLOT = 6
   
    # Tasks prefix and icon spacing (spaces before the quest name for the icon).
    TASKS_PREFIX = "> "
    ICON_SPACING = "    "
   
    # Background and HUD graphics, both in pictures folder.
    # Set both to nil with no qoutes, if youu're using windowskins.
    BACKGROUND = nil
    HUD = nil
    # windows opacity, set to 0 if you're using background
    WINDOWS_OPACITY = 255
   
    # Tasks window background in pictures folder, if you don't want a background put nil
    # with no qoutes. 
    TASKS_BACKGROUND = nil
    # Tasks window opacity, set to 0 if you're using background
    TASKS_OPACITY = 255
   
    # Main menu quests and task lines font sizes:
    QUESTS_FONT_SIZE = 18
    TASKS_FONT_SIZE = 18
   
    # Font Colors
    TITLES_COLOR = Color.new(255,0,0)
    COMPLETED_COLOR = Color.new(0,102,255)
    ACTIVE_COLOR = Color.new(0,255,0)
   
   
    # Categories Window
    ALL = "All Quests"
    COMPLETED = "Completed"
    ACTIVE = "Active"
   
    # Quest description window.
    QUEST_DESCRIPTION = "Quest Description"
    FROM = "From:"
    LOCATION = "Location:"
   
    # Quest rewards window.
    REWARDS_TITLE = "Quest Rewards"
    ITEMS = "Items"
   
    # Gold and Exp terms.
    GOLD = "Gold: "
    EXP = "Exp: "
   
    # what to show in the command window If there are no quests.
    NO_QUESTS = ""
   
    # Category Icon Indexes.
    # [All,Completed,Incompleted]
    CATEGORY_ICONS = [141,150,149]
   
    # =========================================================================
    QUESTS = []              # Don't edit.
    TASKS = []                # Don't edit.
    DESCRIPTIONS = []        # Don't edit.
    REWARDS = []              # Don't edit.
    # =========================================================================
   
   
   
   
#==============================================================================   
# QUEST TEMPLATE (Make your quest using this template)
#==============================================================================   
=begin
    QUESTS[0] = ["Name",Var,IconA,IconB,"image"]
    TASKS[0] = [
    "Do this",
    "And this",
    "And this.",
    ]
    DESCRIPTIONS[0] = [
    "          ralph the Old man",
    "              Worka",
    "",
    "An old man in worka needs your",
    "help in finding his wedding ring",
    ]
    REWARDS[0] = ["","        1000              250","",
    "1- Queen's Sheild",
    "2- King's Sword�2"
    ]
=end

#==============================================================================
# Quest creation area
#==============================================================================


#==============================================================================
# Quest1
#==============================================================================
    QUESTS[0] = ["The desert thief",101,149,150,nil]
    TASKS[0] = [
    "Ask the citizens of worka about the thief.",
    "Head to the west side of worka, where you might find him.",
    "Ask the citizens in here about him.",
    "The thief is hiding in an inn go find him.",
    "Defeat him.",
    "Grab the old man's wedding ring from the thief's pocket.",
    "Go back to the old man and give him his ring.",
    ]
    DESCRIPTIONS[0] = [
    "          ralph the Old man",
    "              Worka",
    "",
    "An old man in worka needs your",
    "help in finding his wedding ring",
    ]
    REWARDS[0] = ["","        1000              250","",
    "1- Queen's Sheild",
    "2- King's Sword�2"
    ]
   
#==============================================================================
# Quest2
#==============================================================================

    QUESTS[1] = ["The desert thief",102,149,150,nil]
    TASKS[1] = [
    "Ask the citizens of worka about the thief.",
    "Head to the west side of worka, where you might find him.",
    "Ask the citizens in here about him.",
    "The thief is hiding in an inn go find him.",
    "Defeat him.",
    "Grab the old man's wedding ring from the thief's pocket.",
    "Go back to the old man and give him his ring.",
    ]
    DESCRIPTIONS[1] = [
    "          ralph the Old man",
    "              Worka",
    "",
    "An old man in worka needs your",
    "help in finding his wedding ring",
    ]
    REWARDS[1] = ["","        1000              250","",
    "1- Queen's Sheild",
    "2- King's Sword�2"
    ]


  end
end



class 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_quest_reward
    create_category
    create_information
  end
  def create_background
    if BACKGROUND != nil
      @background = Sprite_Base.new
      @background.bitmap = Cache.picture(BACKGROUND.to_s)
      @background.z = 50
    else
    end
    if HUD != nil
      @hud = Sprite_Base.new
      @hud.bitmap = Cache.picture(HUD.to_s)
      @hud.z = 60
    else
    end
  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 = 56
    @command_window.x = 0
    @command_window.width = 250
    @command_window.height = 200
    @command_window.opacity = WINDOWS_OPACITY
    @index = @command_window.index
  end
  def create_quest_description
    @window_description = Window_Base.new(250, 56, 294, 200)
    @window_description.contents.font.size = QUESTS_FONT_SIZE
    @window_description.opacity = WINDOWS_OPACITY
    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,23*i,260,23,txt.to_s)
        @window_description.contents.font.color = TITLES_COLOR
        @window_description.contents.draw_text(0,  0, 260, 24, FROM)
        @window_description.contents.draw_text(0, 24, 260, 24, LOCATION)
        @window_description.contents.draw_text(0, 48, 260, 24, QUEST_DESCRIPTION, 1)
        @window_description.contents.font.color = Color.new(255,255,255)
      end
    end
  end
 
  def create_quest_reward
    @window_reward = Window_Base.new(250, 256, 294, 160)
    @window_reward.contents.font.size = QUESTS_FONT_SIZE
    @window_reward.opacity = WINDOWS_OPACITY
    refresh_reward
  end
  def refresh_reward
    @window_reward.contents.clear
    if @list[@mode][@command_window.index][2] != nil
      for i in 0...REWARDS[@list[@mode][@command_window.index][2]].size
        txt = REWARDS[@list[@mode][@command_window.index][2]][i].to_s
        @window_reward.contents.draw_text(0,24*i,260,24,txt.to_s)
        @window_reward.contents.font.color = TITLES_COLOR
        @window_reward.contents.draw_text(  0,  0, 260, 24, REWARDS_TITLE, 1)
        @window_reward.contents.draw_text(  0, 24, 260, 24, GOLD)
        @window_reward.contents.draw_text(120, 24, 260, 24, EXP)
        @window_reward.contents.draw_text(  0, 48, 260, 24, ITEMS, 1)
        @window_reward.contents.font.color = Color.new(255,255,255)
      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
      refresh_reward
    end
    if @index != @command_window.index
      @index = @command_window.index
      refresh_description
      refresh_reward
    end
    if Input.trigger?(Input::C) && @list[@mode][@command_window.index][2] != nil
      Sound.play_decision
      @command_window.dispose
      @window_description.dispose
      @window_reward.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)
      Sound.play_cancel
      finish
    end
  end
  def create_category
    @category = Window_Categories_Command.new(544)
    @category.opacity = WINDOWS_OPACITY
    @category.x = 0
    @category.y = 0
  end
  def create_information
    @information = Window_Base.new(0,256,250,160)
    @information.opacity = WINDOWS_OPACITY
    @information.contents.font.size = QUESTS_FONT_SIZE
    if @empty_list == true
      @information.contents.draw_text(0,48,250,24,"Current Total Quests: 0")
    else
      @information.contents.draw_text(0,48,250,24,"Current Total Quests: " + @list[0].size.to_s)
    end
    @information.contents.font.color = TITLES_COLOR
    @information.contents.draw_text(60,0,260,24,"Information")
    @information.contents.font.color = COMPLETED_COLOR
    @information.contents.draw_text(0,76,250,24, COMPLETED + "Quests: " + @list[1].size.to_s)
    @information.contents.font.color = ACTIVE_COLOR
    @information.contents.draw_text(0,96,250,24, ACTIVE + "Quests: " + @list[2].size.to_s)
  end
  def finish
    Sound.play_cancel
    @background.dispose if BACKGROUND != nil
    @hud.dispose if HUD != nil
    @command_window.dispose
    @window_description.dispose
    @window_reward.dispose
    @category.dispose
    @information.dispose
    case EXIT_TO
    when "MENU"
      $scene = Scene_Menu.new(MENU_RETURN_SLOT)
    when "MAP"
      $scene = Scene_Map.new
    end
  end
end


class Omega_Quest_View < Scene_Base
  include OMEGAS7::QUEST
  def initialize(id)
    create_menu_background
    @font_size = QUESTS_FONT_SIZE
    @line_height = 24
    @id = id
    @limit_y = 0
    draw_picture if QUESTS[@id][4] != nil
    set_tasks
    create_window
    refresh_window
  end
 
 
 
  def create_menu_background
    if TASKS_BACKGROUND != nil
      @menuback_sprite = Sprite.new
      @menuback_sprite.bitmap = Cache.picture(TASKS_BACKGROUND)
      update_menu_background
    else
      super
    end
  end
 
 
  def draw_picture
    @picture = Sprite_Base.new
    @picture.bitmap = Cache.picture (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.opacity = TASKS_OPACITY
    @window.contents.font.size = @font_size
    @display = []
    for i in 0...@tasks.size
      @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)
      Sound.play_cancel
      @picture.dispose if @picture != nil
      @window.dispose
      @menuback_sprite.dispose if TASKS_BACKGROUND != nil
      $scene = Omega_Quest.new
    end
  end
end


class 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 = ACTIVE_COLOR
    self.contents.font.color.alpha = enabled ? 255 : 128
    if @empty == false
      if @commands[index][1] == true
        self.contents.font.color = COMPLETED_COLOR
        draw_icon(QUESTS[@commands[index][2]][3].to_i,rect.x,rect.y)
      else
        self.contents.font.color = ACTIVE_COLOR
        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)
  end
end

class 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)
    self.contents.font.color = TITLES_COLOR
    self.contents.draw_text(30, 0, 77, WLH, ALL)
    self.contents.font.color = COMPLETED_COLOR
    self.contents.draw_text(215, 0, 77, WLH, COMPLETED)
    self.contents.font.color = ACTIVE_COLOR
    self.contents.draw_text(390, 0, 77, WLH, ACTIVE)
   
  end
end

KIN32G's version screenshots

Spoiler:
Spoiler:
Ir para o topo Ir para baixo
Zendion
Cordenador
Cordenador
Zendion


Mensagens : 372
Data de inscrição : 31/07/2011
Idade : 27
Localização : Leme

Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: q massa   Omegas7's Quest System Script 3.0 editado I_icon_minitimeQua Ago 24, 2011 7:31 pm

Vei esse script é massa
Boa msm
Vou ver se eu curto
Se sim vou usalo
FUI
Ir para o topo Ir para baixo
https://www.youtube.com/user/Zendionx
XDJonasXD
Administrador
Administrador
XDJonasXD


Mensagens : 179
Data de inscrição : 26/07/2011
Idade : 27
Localização : São Paulo

Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: Re: Omegas7's Quest System Script 3.0 editado   Omegas7's Quest System Script 3.0 editado I_icon_minitimeQui Ago 25, 2011 12:28 pm

Nunca havia visto não, mas vai ser útil para muitos membros.
Ir para o topo Ir para baixo
https://dynastyrpg.forumeiros.com
Thiago_Lief
Expert
Expert
Thiago_Lief


Mensagens : 148
Data de inscrição : 03/08/2011
Idade : 29
Localização : Presidente Prudente - SP

Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: Re: Omegas7's Quest System Script 3.0 editado   Omegas7's Quest System Script 3.0 editado I_icon_minitimeQui Ago 25, 2011 1:18 pm

Eu tenho um script de quests aki (axo q eh do mog), mas num eh tao bonito quando esse, realmente parece seh muito bom xD
Ir para o topo Ir para baixo
http://www.wix.com/diegoxbm/new_dreams
Ryugo
Administrador
Administrador
Ryugo


Mensagens : 285
Data de inscrição : 30/07/2011
Idade : 26
Localização : São José dos Campos

Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: Re: Omegas7's Quest System Script 3.0 editado   Omegas7's Quest System Script 3.0 editado I_icon_minitimeQui Ago 25, 2011 6:53 pm

Já havia visto,é muito bom!! +1 Crédito
Ir para o topo Ir para baixo
https://dynastyrpg.forumeiros.com
Conteúdo patrocinado





Omegas7's Quest System Script 3.0 editado Empty
MensagemAssunto: Re: Omegas7's Quest System Script 3.0 editado   Omegas7's Quest System Script 3.0 editado I_icon_minitime

Ir para o topo Ir para baixo
 
Omegas7's Quest System Script 3.0 editado
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Script FF7
» Zelda File System v1.1
» Castlevania HUD
» Script de Save avançado
» RubySoft - Action System

Permissões neste sub-fórumNão podes responder a tópicos
Dinasty RPG  :: Scripts (RGSS/RGSS2) :: Scripts (RGSS2)-
Ir para: