Atoria Quest Log
+2
Genis-Sage
Zelos Wilder
6 participantes
King Rpg Maker :: Lixeira :: Scripts
Página 1 de 1
Atoria Quest Log
Instruções
Todas as Instruções estão no script,mas se surgir alguma duvida,poste a aqui no topico ou me mande uma PM
Funções
Esse script cria um Menu de quests para seu jogo
ScreenShots
- Spoiler:
- #=======================================
# ** Scene_Quests
# ** Criado por coolmariners98 (Atoria)
# ** Traduzido por Tantive - [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
#------------------------------------------------------------------------------
# Por favor não copie ou distribua dizendo que você o fez,Dê os merecidos
# Creditos...
#=======================================
class Scene_Quests
# * Object Initialization
def initialize(quest_index = 0)
@quest_index = quest_index
end
def main
@command_window = Window_Qmand.new(160, $quest.questname) # actually makes window
@command_window.index = @quest_index
# Enquanto o loop determina oque mostrar
tmp = 1
tmp2 = 10
tmp3 = 0
$quest.totalfound = 0
$quest.moneyearned = 0
$quest.expearned = 0
$quest.rpearned = 0
while (tmp3 < $quest.totalquests)
if $quest.showdisabledquests == true and $quest.qupdate[tmp] == false
@command_window.disable_item(tmp3)
else
$quest.totalfound += 1
end
if $quest.handin[tmp3] == true
@command_window.finished(tmp3)
$quest.moneyearned += $quest.goldreward[tmp3]
$quest.expearned += $quest.expreward[tmp3]
$quest.rpearned += $quest.rpreward[tmp3]
$quest.totalcompleted += 1
end
tmp += 10
tmp2 += 10
tmp3 +=1
end
# Cria a janela Quest Status
@qs_window = Quest_Status.new
@qs_window.x = 0
@qs_window.y = 300
# Cria a informação da quest
@qi_window = Quest_Info.new
@qi_window.x = 160
@qi_window.y = 0
# Cria a janela da quest
@status_window = Quest.new
@status_window.x = 160
@status_window.y = 180
Graphics.transition
# Loop principal
loop do
# Atualiza a tela do game
Graphics.update
# Atualiza a informação do input
Input.update
# Atualiza as frames
update
# Abortar loop se a tela é mudada
if $scene != self
break
end
end
Graphics.freeze
# Dispor de telas
@command_window.dispose
@status_window.dispose
@qs_window.dispose
@qi_window.dispose
end
def update
@command_window.update
@status_window.update
@qi_window.update
if @command_window.active
update_command
return
end
if @status_window.active
update_status
return
end
if @qi_window.active
update_status
return
end
end
#--------------------------------------------------------------------------
# * Atualização da frame (Quando a janela de comando está ativa)
#--------------------------------------------------------------------------
def update_command
# Se o botão B for pressionado
if Input.trigger?(Input::B)
# Tocar Cancelar SE
Sound.play_cancel
# Troca para a tela do mapa
$scene = Scene_Map.new
return
end
# Se o botão C for pressionado
if Input.trigger?(Input::C)
index = @command_window.index
#pattern on switch is index * 10 + 1
if $quest.qupdate[index * 10 + 1] == false
Sound.play_buzzer
return
else
$quest.whichquest = index
Sound.play_decision
@status_window.dispose
@qi_window.dispose
@status_window = Quest.new
@qi_window = Quest_Info.new
@status_window.x = 160
@status_window.y = 180
@qi_window.x = 160
@qi_window.y = 0
@status_window.update
end
return
end
end
end
#=======================================
# ** Quest_Status
# ** Criado por coolmariners98
# ** Traduzido por Tantive - [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
#------------------------------------------------------------------------------
# Isso mostra oque foi feito até agora nas suas quests (Janela do meio acima)
#=======================================
class Quest_Status < Window_Base
def initialize
super(0, 0, 160, 117)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0, -10, 150, 32, "Total Quests: " + $quest.totalfound.to_s)
self.contents.font.color = system_color
self.contents.draw_text(0, 8, 150, 32, "Total Complete: " + $quest.totalcompleted.to_s)
self.contents.font.color = normal_color
self.contents.draw_text(0, 26, 150, 32, "Money: " + $quest.moneyearned.to_s)
self.contents.font.color = system_color
self.contents.draw_text(0, 44, 150, 32, "Exp: " + $quest.expearned.to_s)
self.contents.font.color = normal_color
self.contents.draw_text(0, 62, 150, 32, "RP: " + $quest.rpearned.to_s)
end
end
#=======================================
# ** Quest_Info
# ** Criado por coolmariners98
# ** Traduzido por Tantive - [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
#------------------------------------------------------------------------------
# Isso mostra toda a informação da quest na janela direita acima
#=======================================
class Quest_Info < Window_Selectable
def initialize
super(0, 0, 385, 180)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = true
self.index = -1
end
def refresh
self.contents.clear
self.contents.font.color = text_color(14)
self.contents.draw_text(0, -10, 380, 32, "Informação da Quest")
self.contents.font.color = normal_color
if $quest.totalfound != 0
self.contents.draw_wrap_text(0, 20, 350, 16, $quest.preinfo[$quest.whichquest])
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#=======================================
# ** Quest
# ** Criado por coolmariners98
# ** Traduzido por Tantive - [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
#------------------------------------------------------------------------------
# Isso mostra toda a informação da tela no canto direito da tela
#=======================================
class Quest < Window_Selectable
def initialize
super(0, 0, 385, 237)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
if $quest.totalfound != 0
bitmap = Cache.character($quest.charspriteN[$quest.whichquest])
sign = $quest.charspriteN[$quest.whichquest][/^[\!\$]./]
if sign != nil and sign.include?('$')
cw = bitmap.width / 3
ch = bitmap.height / 4
else
cw = bitmap.width / 12
ch = bitmap.height / 8
end
n = $quest.charspriteI[$quest.whichquest]
src_rect = Rect.new((n%4*3+1)*cw, (n/4*4)*ch, cw, ch)
self.contents.blt(19 - cw / 2, 57 - ch, bitmap, src_rect)
if $quest.qupdate[(($quest.whichquest * 10) + 10)]
bitmap2 = Cache.picture("complete.png")
src_rect2 = Rect.new(0, 0, bitmap2.width, bitmap2.height)
self.contents.blt(300, 10, bitmap2, src_rect2)
end
self.contents.font.color = system_color
self.contents.draw_text(50, 0, 385, 45, "Nome: " + $quest.charname[$quest.whichquest])
self.contents.font.color = normal_color
self.contents.draw_text(50, 0, 385, 80, "Localização: " + $quest.location[$quest.whichquest])
self.contents.font.color = system_color
self.contents.draw_text(50, 0, 385, 115, "Recompensa: " + $quest.textreward[$quest.whichquest])
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 435, 175, "Objetivos da Quest:")
temp = $quest.whichquest
script = (temp *
easy = 0
switch = 2
switch2 = (temp * 10) + 2
while (switch < 10)
if $quest.objs[script] == " "
$quest.qupdate[switch2] = true
end
if $quest.qupdate[switch2]
self.contents.font.color = text_color(7)
self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $quest.objs[script])
else
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 435, 210 + (easy * 35), $quest.objs[script])
end
easy += 1
script += 1
switch += 1
switch2 += 1
end
end
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
else
self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
end
end
end
#=======================================
# ** Window_Qmand
# ** Criado por coolmariners98
# ** Traduzido por Tantive - [Tens de ter uma conta e sessão iniciada para poderes visualizar este link]
#------------------------------------------------------------------------------
# Isso mostra toda a infomação da quest no canto direito da tela
#=======================================
class Window_Qmand < Window_Selectable
def initialize(width, commands)
super(0, 0, width, 300)
@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, true)
end
end
def draw_item(index, color, enabled = true)
self.contents.font.color = color
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index])
end
def disable_item(index)
draw_item(index, text_color(7), true)
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, text_color(3), true)
end
end
#==============================================================================
#==============================================================================
#==============================================================================
# ** NÃO TOQUE NO script ABAIXO,HÁ NÃO SER QUE VC SAIBA OQUE ESTÁ FAZENDO
#==============================================================================
#==============================================================================
#==============================================================================
#==============================================================================
# ** Display do texto do evento
#==============================================================================
# Criado por: Áص¹
# Modificado por: SephirothSpawn
# Modificado por: Me
# Modificado por: Atoria
# Traduzido por: Tantive
# Version 2.1
# 2006-03-04
#==============================================================================
# * Instruções :
#
# ~ Criando um evento com um texto aparecendo
# - Coloque um Comentario no evento com
# [CD____]
# - Coloque o texto que será mostrado no espaço
#------------------------------------------------------------------------------
# * Customização :
#
# ~ Cor dos eventos dos NPC
# - Event_Color = Color
#
# ~ Cor do jogador
# - Player_Color = Color
#
# ~ Cor do texto do jogador
# - Player_Text = text_display *
#
# ~ text_display
# - 'Name', 'Class', 'Level', 'Hp', 'Sp'
#==============================================================================
#==============================================================================
# ** Game_Character
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Dispaly Text Color (Event & Player)
#--------------------------------------------------------------------------
Event_Color = Color.new(0, 0, 200)
Player_Color = Color.new(200, 0, 0)
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :text_display
attr_accessor :isQuest
attr_accessor :foundQuest
attr_accessor :doneQuest
attr_accessor :bounce
attr_accessor :bounceFlip
end
#==============================================================================
# ** Game_Event
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_gevent_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh Method
seph_characterdisplay_gevent_refresh
# Checks to see if display text
# If the name contains CD, it takes the rest of the name as the text
@bounce = 0
@bounceFlip = false
unless @list.nil?
for i in [Tens de ter uma conta e sessão iniciada para poderes visualizar este link] # for all the commands in event
if @list[i].code == 108 # if it is a comment
@list[i].parameters[0].dup.gsub!(/\[[Cc][Dd](.+?)\]/) do
@text_display = [$1, Event_Color]
@isQuest = false
end
@list[i].parameters[0].dup.gsub!(/\[[Qq][Dd](.+?)\]/) do
@text_display = [$1, Event_Color]
@isQuest = true
end
end
end
end
@text_display = nil if @erased
end
end
#==============================================================================
# ** Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_gplayer_refresh refresh
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh Method
seph_characterdisplay_gplayer_refresh
# Creates Text Display
@text_display = ["Hero", Player_Color]
end
end
#==============================================================================
# ** Sprite_Character
#==============================================================================
class Sprite_Character < Sprite_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_characterdisplay_scharacter_update update
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Original update Method
seph_characterdisplay_scharacter_update
# Character Display Update Method
update_display_text
unless @character.bounce.nil?
if @character.bounce < -2
@character.bounceFlip = true
end
if @character.bounce > 2
@character.bounceFlip = false
end
if @character.bounceFlip
@character.bounce = @character.bounce + 0.2
else
@character.bounce = @character.bounce - 0.2
end
end
end
#--------------------------------------------------------------------------
# * Create Display Sprite
#--------------------------------------------------------------------------
def create_display_sprite(args)
Font.default_size = 12
Font.default_name = "Verdana"
# Creates Display Bitmap
bitmap = Bitmap.new(160, 24)
bitmap2 = Bitmap.new(160, 24)
# Changes Font Color
bitmap.font.color = args[1]
# Draws Text
if @character.isQuest
bitmap2 = Cache.picture("quest.png")
@_quest_display = Sprite.new(self.viewport)
@_quest_display.bitmap = bitmap2
@_quest_display.ox = 8
@_quest_display.oy = 40
@_quest_display.x = self.x
@_quest_display.y = self.y - self.oy / 2 - 24
@_quest_display.z = 30001
@_quest_display.visible = self.visible #true
end
bitmap.draw_text(0, 0, 160, 24, args[0], 1)
# Creates Display Text Sprite
@_text_display = Sprite.new(self.viewport)
@_text_display.bitmap = bitmap
@_text_display.ox = 80
@_text_display.oy = 12
@_text_display.x = self.x
@_text_display.y = self.y - self.oy / 2 - 24
@_text_display.z = 30001
@_text_display.visible = self.visible #true
end
#--------------------------------------------------------------------------
# * Dispose Display Sprite
#--------------------------------------------------------------------------
def dispose_display_text
unless @_text_display.nil?
@_text_display.dispose
end
#reset font colors
Font.default_size = 14
Font.default_name = "Verdana"
end
#--------------------------------------------------------------------------
# * Dispose Quest Sprite
#--------------------------------------------------------------------------
def dispose_quest_text
unless @_quest_display.nil?
@_quest_display.dispose
end
#reset font colors
Font.default_size = 14
Font.default_name = "Verdana"
end
#--------------------------------------------------------------------------
# * Update Display Sprite
#--------------------------------------------------------------------------
def update_display_text
unless @character.text_display.nil?
if @_text_display.nil?
create_display_sprite(@character.text_display)
end
switch = ($quest.whichquest * 10) + 2
if $quest.qupdate[switch]
if $quest.qupdate[switch + 1]
if $quest.qupdate[switch + 2]
if $quest.qupdate[switch + 3]
if $quest.qupdate[switch + 4]
if $quest.qupdate[switch + 5]
if $quest.qupdate[switch + 6]
if $quest.qupdate[switch + 7]
$quest.qupdate[switch + 8] = true
end
end
end
end
end
end
end
end
@_text_display.x = self.x
@_text_display.y = self.y - self.oy / 2 - 24
if @character.isQuest
@_quest_display.x = self.x
@_quest_display.y = self.y - self.oy / 2 - 24 + @character.bounce
end
else
unless @_text_display.nil?
dispose_display_text
end
unless @_quest_display.nil?
dispose_quest_text
end
end
#reset font colors
Font.default_size = 14
Font.default_name = "Verdana"
end
end
#C[RRBBGG] Changes the Color (RR,BB,GG)
#C[N] Changes to color back to normal
#I[] Changes the font to Italics
#B[] Changes the font to Bold
#T[] A Tab
#N[] New Line
#==============================================================================
# ** Bitmap
#------------------------------------------------------------------------------
# Additions add a draw wrap text method which draws word wrapped text
# Text Automattically goes to the next line if the text can not fit on the line
#==============================================================================
class Bitmap
def draw_wrap_text(x,y,width, height, text)
array = text.split
for i in array
word = i + ' '
word_width = text_size(word).width
if x + word_width > width
y += height
x = 0
end
self.draw_text(x, y, 350, height, word)
x += word_width
end
end
end
Atoria Quest Log Data
Código:
#=======================================
# ** Scene_Quests
# ** Created by coolmariners98
# ** Traduzido por Tantive
#------------------------------------------------------------------------------
# Por favor não copie ou distribua dizendo que você o fez,Dê os merecidos
# Creditos...
#=======================================
class Quest_Data
attr_accessor :totalquests, :totalfound, :moneyearned, :expearned, :rpearned, :totalcompleted,
:showdisabledquests, :shownondisabledquests, :preinfo, :charsprite, :questname,
:charname, :location, :textreward, :goldreward, :expreward, :rpreward, :objs,
:whichquest, :qupdate, :charspriteN, :charspriteI, :whichicon, :handin
def initialize
# ========NÃO MUDE======
@preinfo = []
@charspriteN = []
@charspriteI = []
@questname = []
@charname = []
@location = []
@textreward = []
@goldreward = []
@expreward = []
@rpreward = []
@handin = []
@objs = []
@totalfound = 0
@moneyearned = 0
@expearned = 0
@rpearned = 0
@totalcompleted = 0
@whichquest = 0
@icon = []
@whichicon = 0
@qupdate = []
for i in 0...5000
@qupdate[i] = false
end
for k in 0...500
@handin[k] = false
end
# =========================
# Coisas grandes
@showdisabledquests = true # Mostra todas as quests,mas elas estão inativas
@totalquests = 2 # Inicializa com o numero de quests que você criou
# Quest 0 information
@preinfo.push("Não se distraia com os nomes legais e os pontos de exclamação na cabeça dos NPC.Você está aqui Para ver o script,então você ira!") # Informação que vai mostrar
@questname.push("Entendendo") # o Nome da quest
@charspriteN.push("Monster.png") # o Nome do grafico do char
@charspriteI[0] = 0 # o Index do personagem 0,1,2,3
@charname.push("Ghoul") # o nome do char que deu a quest
@location.push("Mapa - Mundi") # a localização da quest
@textreward.push("1 moeda e 10 EXP") # o Texto que representa a recompensa
@goldreward[0] = 1 # a quantia atual de recompensa em ouro
@expreward[0] = 10 # a quantia atual de recompensa em EXP
@rpreward[0] = 1 # a atual quantia de recompensa em RP
@objs.push(" - Va falar com Flamey") # Primeiro Objetivo da quest
@objs.push(" - Va falar com Skele") # Segundo Objetivo da quest
@objs.push(" ") # Terceiro Objetivo da Quest
@objs.push(" ") # Quarto Objetivo da Quest
@objs.push(" ") # Quinto Objetivo da Quest
@objs.push(" ") # Sexto Objetivo da Quest
@objs.push(" ") # Setimo Objetivo da Quest
@objs.push(" ") # Oitavo Objetivo da Quest
# Informação da Primeira Quest
@preinfo.push("Os padres que estavam cuidando dos animais Acidentalmente deixaram eles escaparem.Ajude a encontrar seu Gato,Seu Cachorro,e sua ovelha,paar que ela nao fique com problemas.") # Informação que vai mostrar
@questname.push("A Caçada") # o Nome da quest
@charspriteN.push("People2.png") # o Nome do grafico do char
@charspriteI[1] = 1 # o Index do personagem 0,1,2,3
@charname.push("Vania") # o nome do char que deu a quest
@location.push("Mapa Mundi") # a localização da quest
@textreward.push("1000 moedas e 200 EXP") # o Texto que representa a recompensa
@goldreward[1] = 1000 # a quantia atual de recompensa em ouro
@expreward[1] = 200 # a quantia atual de recompensa em EXP
@rpreward[1] = 100 # a atual quantia de recompensa em RP
@objs.push(" - Você deve ir e econtrar a ovelha") # Primeiro Objetivo da quest
@objs.push(" - Você deve ir e econtrar o Gato") # Segundo Objetivo da quest
@objs.push(" - VOcê deve ir e encontrar o Cachorro") # Terceiro Objetivo da Quest
@objs.push(" ") # Terceiro Objetivo da Quest
@objs.push(" ") # Quarto Objetivo da Quest
@objs.push(" ") # Quinto Objetivo da Quest
@objs.push(" ") # Sexto Objetivo da Quest
@objs.push(" ") # Setimo Objetivo da Quest
@objs.push(" ") # Oitavo Objetivo da Quest
end
end[
Zelos WilderKing - Mensagens : 496
Moedas KRM : 6123
Localização : Rio de Janeiro
Especialidade : Designer
Engine Favorita : RPG Maker VX
Re: Atoria Quest Log
OOh yeah Baby
Regal Bryant- Novato
- Mensagens : 80
Moedas KRM : 5350
Localização : Segredo .
Especialidade : Pixel Artist
Engine Favorita : RPG Maker VX
Re: Atoria Quest Log
Regal Bryant escreveu:OOh yeah Baby
Gostei
Muito bom o Script!!
Mas fala,por eventos não seria mais facil fazer?
Obrigado por Disponibilizar.
Última edição por Mamber em Qua Jan 27, 2010 8:29 am, editado 1 vez(es)
MamberKing - Mensagens : 226
Moedas KRM : 5593
Localização : São Paulo
Especialidade : Mapper
Engine Favorita : RPG Maker VX
Re: Atoria Quest Log
num entendi oq ele faz (nõ baixei só vi a ss)
nanpaval- Novato
- Mensagens : 90
Moedas KRM : 5361
Especialidade : Eventer
Engine Favorita : RPG Maker VX
Re: Atoria Quest Log
cria icone emcima dos que tem quest
Zelos WilderKing - Mensagens : 496
Moedas KRM : 6123
Localização : Rio de Janeiro
Especialidade : Designer
Engine Favorita : RPG Maker VX
Re: Atoria Quest Log
O link ta quebrado, tem como por outro please
Nichan- Novato
- Mensagens : 9
Moedas KRM : 4962
Especialidade : Eventer
Engine Favorita : RPG Maker VX
King Rpg Maker :: Lixeira :: Scripts
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|