Falco Menu 4.7
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Falco Menu 4.7
Olá galera, postando aqui o Menu 4.7 agora totalmente traduzido e com bugs da versão 4.5 corrigidos.
CRÉDITOS
-Menu 2.0
-Distribuição de Pontos 1.7
- Advanced Options Menu
- Monster Book II (Bestiário)
Instruções:
1º- Cole todos os scripts acima do Main (Junte todos em um só)
2º- E essa imagem na pasta Parallaxes do seu jogo com o nome "mn_back":
Screens:
Ufa, agora vem a parte mais esperada, os scripts:
Que pena, num deu só num topico
CRÉDITOS
-Menu 2.0
- SilverLink por criar
- Falco por adicionar o atalho para a Distribuição de pontos, para as opções e para o bestiário
-Distribuição de Pontos 1.7
- Lettuce por criar
- Falco por traduzir, aperfeiçoar e modificar um pouco
- Advanced Options Menu
- Akin por criar
- Falco por aperfeiçoar e traduzir
- Monster Book II (Bestiário)
- Woratana por criar
- Falco por aperfeiçoar e traduzir
Instruções:
1º- Cole todos os scripts acima do Main (Junte todos em um só)
2º- E essa imagem na pasta Parallaxes do seu jogo com o nome "mn_back":
- Imagem:
Screens:
- 1 (Tela Principal):
- 2 (Distribuição de Atributos):
- 3 (Opções1):
- 4 (Opções2):
- 5 (Opções3):
- 6 (Bestiário):
- 7 (Bestiário):
Ufa, agora vem a parte mais esperada, os scripts:
Que pena, num deu só num topico
FranMAD- Moderador
- Mensagens : 1848
Fama : 172
Re: Falco Menu 4.7
- Script (Configs):
- Código:
=begin
================================== INTRUÇÕES =================================
--------------------------------------------------------------------------------
Stat points distribution system 1.7
By Lettuce.
--------------------------------------------------------------------------------
Chame usando: $scene = Scene_Stat_Dist.new(0)
Você pode dar pontos ao ator usando o código:
$game_party.members[<member ID>].points += <amount of pt>
Onde <member ID> deve ser substituido pelo id do membro.
E <amount of pt> deve ser substituido pelo número de pontos;
--------------------------------------------------------------------------------
Custom Options Menu
By Akin
--------------------------------------------------------------------------------
Chame usando: "$scene = Scene_Options.new"
--------------------------------------------------------------------------------
● ◦ Monster Book II ◦ ●
By Woratana
Chame usando: $scene = Scene_MonsterBook.new
Complete com a informação de todos os inimigos chamando:
$game_system.set_monbook_complete
Apage a informação de todos os inimigos chamando:
$game_system.reset_monbook
Complete a informação de um inimigo chamando:
$game_system.monbook[enemy_id] = true
Onde enemy_id é o id do inimigo.
Apage a informação de um inimigo chamando:
$game_system.monbook[enemy_id] = false
Onde enemy_id é o id do inimigo.
--------------------------------------------------------------------------------
=end
#==============================================================================#
# CONFIGURE AQUI #
#==============================================================================#
#------------- Stat Points Distribuition System Configuration ----------------#
StartPoints = 20 #Pontos iniciais
$ptsperlv = 5 # Quantos pontos ganha por level?
# Stats Máximos
MaxStat = 255
MaxHP = 9999 # HP
MaxMP = 999 # MP
MaxHIT = 80 # 100 = nunca erra
MaxEVA = 60 # 100 = sempre desvia
MaxCRIT = 15 # 100 = sempre crítico
#Quantos pontos são nescessários para evoluir 1 nível de:
PointsPerHP = 2 #HP
PointsPerMP = 2 #MP
PointsPerHIT = 15 #HIT
PointsPerEVA = 7 #Evasão
PointsPerCRIT = 5 #Critico
#Quanto de cada irá aumentar por cada ponto dado
IncreaseBy = 2
HPIncreaseBy = 25 #HP
MPIncreaseBy = 15 #MP
HITIncreaseBy = 5 #Hit
EVAIncreaseBy = 1 #Evasão
CRITIncreaseBy = 1 #Critico
#Fonte
Fontname = Font.default_name # Nome da fonte
Fontsize = 20 # Tamanho da fonte
#------------------------------ Menu 2.0 ------------------------------------#
module BACK
def self.img
("Mn_Back") # Nome da imagem de fundo no menu que está pasta parallaxes
# Não tire as aspas e não coloque a extenção, somente o nome
end
end
#------------------------------ Menu de opções ------------------------------#
module OptionCommand
# Opções da aba principal
Audio = 'Audio' # Nome da aba que controla o audio
Controls = 'Controles' # Nome da aba de controles
Resolution = 'Resolução' # Nome da aba de resolução
Exit_Options = 'Voltar' # Nome da opção voltar
# Controle de audio (VOLUME)
Audiobgm = 'Volume da música' # Nome da aba da música
Audiobgs = 'Volume dos efeitos de fundo' # Nome da aba dos efeitos de fundo
Audiome = 'Volume dos efeitos musicais' # Nome da aba dos efeitos musicais
Audiose = 'Volume dos efeitos de som' # Nome da aba dos efeitos de som
#BGM Options
AudiobgmV = [" -", " +"] # Simbolos Aumentar \ Diminuir
#BGS Options
AudiobgsV = [' -', ' +'] # Simbolos Aumentar \ Diminuir
#SE Options
AudioseV = [' -', ' +'] # Simbolos Aumentar \ Diminuir
#ME Options
AudiomeV = [' -', ' +'] # Simbolos Aumentar \ Diminuir
#Opções de resolução
ResolutionS = ['Padrão', '800x600', '1024x768', '1280x1024', '1600x1200']
# Obs.: Mesmo que você mude aqui, somente os nomes que aparecem na janela
# irão mudar, a resolução de cada uma das opções fica a mesma.
# Ou seja, não adianta nada mudar aqui.
end
MA_AMS = false # Defina isso com True se você usa o "Modern Algebra's Advanced
# Text System"
#----------------------------- Monster Book II ------------------------------#
module Wora_Monbook
TEXT_TITLE = 'Bestiário' # Nome do Bestiário (Será mostrado no canto superior
# esquerdo)
TEXT_FOUND = 'Encontrados: '# Texto que vem antes de mostrar quantos monstros
# foram encontrados
TEXT_COMPLETED = 'Completo: ' # Texto que mostra a porcentagem de quantos mons.
# foram encontrados
TEXT_DOT = '.' # Texto que vai depois do nome do monstro.
COMPARE_STATUS = true # Usar sistema de comparação?
# Isso irá comparar cada monstro com o ator mais forte do grupo
# Vai monstrar números verdes, se o monstro for comparado como fraco.
# Vai monstrar números vermelhos, se o monstro for comparado como forte.
# Use true para sim e false para não
NO_RECORD_SWITCH = 10 # Switch de registro nulo. Se esta switch estiver ligada
# todos os monstros que o grupo\Ator batalhar, não serão
# catalogados.
NO_DATA_MONSTER = [] # ID dos monstros que de jeito nenhum irão ser catalogados
# EXEMPLO:
# Se você deseja que os monstros 3,6 e 9 não sejam listados, coloque
# NO_DATA_MONSTER = [3,6,9]
end
#============================ Fim da configuração ============================
- Distribuição de Atributos:
- Código:
#==============================================================================
# Essa janela mostra a mensagem de inicio
#==============================================================================
LayoutMode = 2
OFFSET = -10
Mode = 1
def return_scene
$scene = Scene_Menu.new
end
class Lettuce_Window_Top < Window_Base
def initialize
super(0,0,544,70)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
refresh
end
def refresh
self.contents.clear
self.contents.font.size = Fontsize-4
self.contents.draw_text(0,-10,544-32,32,"Distribuição de pontos",1)
self.contents.font.size = Fontsize-6
self.contents.draw_text(0,10,544-32,32,"Direita ou esquerda para mudar o personagem",1)
end
end
class Game_Actor < Game_Battler
def change_exp(exp, show)
last_level = @level
last_skills = skills
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
level_up
end
while @exp < @exp_list[@level]
level_down
end
@hp = [@hp, maxhp].min
@mp = [@mp, maxmp].min
if show and @level > last_level
display_level_up(skills - last_skills)
end
difference = @level - last_level
if (difference == 1)
$game_actors[@actor_id].points += ($ptsperlv)
end
end
end
#==============================================================================
# Essa janela mostra os pontos do membro
#==============================================================================
class Lettuce_Window_Points < Window_Base
def initialize(member_index)
super(401,320,144,52)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
refresh(member_index)
end
def refresh(member_index)
actor = $game_party.members[member_index]
points = actor.points
self.contents.clear
self.contents.draw_text(0,0,162,20,"Pontos: "+points.to_s)
end
end
#==============================================================================
# Essa janela mostra os status do membro
#==============================================================================
class Lettuce_Window_Info < Window_Base
def initialize(member_index)
super(0,71,400,346)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.name = Fontname
self.contents.font.size = Fontsize
@exo = 25 #equipment section X coordinate offset
@exo2 = 35 #equipment section X coordinate offset
@eyo = -10 #equipment section Y coordinate offset
refresh(member_index)
end
def refresh(member_index)
actor = $game_party.members[member_index]
self.contents.clear
self.contents.font.size = Fontsize
draw_actor_face(actor,10,10,92)
draw_actor_name(actor,120,10)
self.contents.font.size = Fontsize
self.contents.draw_text(190,30,200,20,"Classe: "+actor.class.name)
self.contents.draw_text(120,30,200,20,"Lv. "+actor.level.to_s)
if LayoutMode == 1
draw_actor_state(actor,200,280,168)
elsif LayoutMode == 2
draw_actor_state(actor,220,10)
end
s1 = actor.exp_s # Exp Total
s2 = actor.current_lvl_exp # Experiencia ganha no level atual
if s1.is_a?(Numeric)
s3 = s1-s2 # Progresso
s4 = actor.next_lvl_exp # Exp necessária para evoluir
self.contents.font.size = Fontsize - 5
self.contents.draw_text(230,74,90,20,"EXP: "+s3.to_s+"/"+s4.to_s,0)
self.contents.font.size = Fontsize
else
self.contents.draw_text(230,74,85,20,"-----/-----",2)
end
#Preparando barras de cores
back_color = Color.new(30, 30, 30, 255)
str_color1 = Color.new(229, 153, 73, 255)
str_color2 = Color.new(255, 72, 0, 255)
def_color1 = Color.new(210, 255, 0, 255)
def_color2 = Color.new(85, 129, 9, 255)
spi_color1 = Color.new(99, 133, 161, 255)
spi_color2 = Color.new(10, 60,107, 255)
agi_color1 = Color.new(167, 125, 180, 255)
agi_color2 = Color.new(90, 11, 107, 255)
hp_color1 = Color.new(66, 114, 164, 255)
hp_color2 = Color.new(122, 175, 229, 255)
mp_color1 = Color.new(93, 50, 158, 255)
mp_color2 = Color.new(145, 122, 229, 255)
exp_color1 = Color.new(246, 243, 224, 255)
exp_color2 = Color.new(255, 182, 0, 255)
if s1.is_a?(Numeric)
self.contents.fill_rect(230,90,89,7,back_color)
self.contents.gradient_fill_rect(232,92,(85*s3)/s4,3,exp_color1,exp_color2)
else
self.contents.fill_rect(230,60,89,7,back_color)
end
self.contents.fill_rect(120,67,104,7,back_color)
self.contents.gradient_fill_rect(122,69,100*actor.hp/actor.maxhp,3,str_color1,str_color2)
self.contents.draw_text(120,44,100,30,"HP",0)
self.contents.draw_text(120,44,100,30,actor.hp.to_s + "/" + actor.maxhp.to_s,2)
self.contents.fill_rect(120,90,104,7,back_color)
self.contents.gradient_fill_rect(122,92,100*actor.mp/actor.maxmp,3,spi_color1,spi_color2)
self.contents.draw_text(120,67,100,30,"MP",0)
self.contents.draw_text(120,67,100,30,actor.mp.to_s + "/" + actor.maxmp.to_s,2)
#Armas
weapon = $data_weapons[actor.weapon_id]
shield = $data_armors[actor.armor1_id]
helm =$data_armors[actor.armor2_id]
body =$data_armors[actor.armor3_id]
accessory =$data_armors[actor.armor4_id]
bonus_atk = 0
bonus_def = 0
bonus_spi = 0
bonus_agi = 0
evasion = 0
crit = 4
if $data_actors[actor.id].critical_bonus
crit +=4
end
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
if weapon.critical_bonus
crit += 4
end
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
evasion += shield.eva
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
evasion += helm.eva
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
evasion += body.eva
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
evasion += accessory.eva
end
if LayoutMode == 1
draw_item_name(weapon,160+@exo,125+@eyo,true)
if weapon
two_hand = true if weapon.two_handed == true
end
if two_hand
draw_item_name(weapon,160+@exo,155+@eyo,true)
else
draw_item_name(shield,160+@exo,155+@eyo,true)
end
draw_item_name(helm,160+@exo,185+@eyo,true)
draw_item_name(body,160+@exo,215+@eyo,true)
draw_item_name(accessory,160+@exo,245+@eyo,true)
self.contents.font.color = Color.new(87,87,87,255)
if !weapon
#draw_icon(216,160+@exo,125+@eyo,true)
self.contents.draw_text(184+@exo,107+@eyo,200,20," Arma")
self.contents.draw_text(184+@exo,127+@eyo,200,20,"Não equipada")
end
if !shield
#draw_icon(217,160+@exo,155+@eyo,true)
if !two_hand
self.contents.draw_text(184+@exo,137+@eyo,200,20,"Segunda arma")
self.contents.draw_text(184+@exo,157+@eyo,200,20,"Não equipada")
end
end
if !helm
#draw_icon(218,160+@exo,185+@eyo,true)
self.contents.draw_text(184+@exo,167+@eyo,200,20," Capacete")
self.contents.draw_text(184+@exo,187+@eyo,200,20,"Não equipado")
end
if !body
#draw_icon(219,160+@exo,215+@eyo,true)
self.contents.draw_text(184+@exo,197+@eyo,200,20," Armadura")
self.contents.draw_text(184+@exo,217+@eyo,200,20,"Não equipada")
end
if !accessory
#draw_icon(220,160+@exo,245+@eyo,true)
self.contents.draw_text(184+@exo,227+@eyo,200,20,"Não equipado")
self.contents.draw_text(184+@exo,247+@eyo,200,20,"Não equipado")
end
self.contents.font.color = Color.new(255,255,255,255)
elsif LayoutMode == 2
draw_item_name(weapon,160+@exo2,125+OFFSET+@eyo,true)
if weapon
two_hand = true if weapon.two_handed
end
if two_hand
draw_item_name(weapon,160+@exo2,165+OFFSET+@eyo,true)
else
draw_item_name(shield,160+@exo2,165+OFFSET+@eyo,true)
end
draw_item_name(helm,160+@exo2,205+OFFSET+@eyo,true)
draw_item_name(body,160+@exo2,245+OFFSET+@eyo,true)
draw_item_name(accessory,160+@exo2,285+OFFSET+@eyo,true)
self.contents.font.color = Color.new(87,87,87,255)
if !weapon
#draw_icon(216,160+@exo2,125+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,127+OFFSET+@eyo,200,20," Arma")
self.contents.draw_text(184+@exo2,147+OFFSET+@eyo,200,20,"Não equipada")
end
if weapon
if !shield and weapon.two_handed == false
#draw_icon(217,160+@exo2,165+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,167+OFFSET+@eyo,200,20,"Segunda arma")
self.contents.draw_text(184+@exo2,187+OFFSET+@eyo,200,20,"Não equipado")
end
else
if !shield
#draw_icon(217,160+@exo2,165+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,167+OFFSET+@eyo,200,20," Escudo")
self.contents.draw_text(184+@exo2,187+OFFSET+@eyo,200,20,"Não equipada")
end
end
if !helm
#draw_icon(218,160+@exo2,205+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,207+OFFSET+@eyo,200,20," Elmo")
self.contents.draw_text(184+@exo2,227+OFFSET+@eyo,200,20,"Não equipado")
end
if !body
#draw_icon(219,160+@exo2,245+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,247+OFFSET+@eyo,200,20," Armadura")
self.contents.draw_text(184+@exo2,267+OFFSET+@eyo,200,20,"Não equipada")
end
if !accessory
#draw_icon(220,160+@exo2,285+OFFSET+@eyo,true)
self.contents.draw_text(184+@exo2,287+OFFSET+@eyo,200,20," Acessório")
self.contents.draw_text(184+@exo2,307+OFFSET+@eyo,200,20,"Não equipado")
end
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.font.size = Fontsize - 5
self.contents.draw_text(10,120,100,20,"Atk.: ")
self.contents.draw_text(10,120,100,20,(actor.atk-bonus_atk).to_s+" + "+bonus_atk.to_s,2)
self.contents.fill_rect(10,140,104,7,back_color)
self.contents.gradient_fill_rect(12,142,((actor.atk-bonus_atk)*100)/MaxStat,3,hp_color1,hp_color2)
self.contents.draw_text(10,150,100,20,"Def.: ")
self.contents.draw_text(10,150,100,20,(actor.def-bonus_def).to_s+" + "+bonus_def.to_s,2)
self.contents.fill_rect(10,170,104,7,back_color)
self.contents.gradient_fill_rect(12,172,((actor.def-bonus_def)*100)/MaxStat,3,def_color1,def_color2)
self.contents.draw_text(10,180,100,20,"Int.: ")
self.contents.draw_text(10,180,100,20,(actor.spi-bonus_spi).to_s+" + "+bonus_spi.to_s,2)
self.contents.fill_rect(10,200,104,7,back_color)
self.contents.gradient_fill_rect(12,202,((actor.spi-bonus_spi)*100)/MaxStat,3,mp_color1,mp_color2)
self.contents.draw_text(10,210,100,20,"Agi.: ")
self.contents.draw_text(10,210,100,20,(actor.agi-bonus_agi).to_s+" + "+bonus_agi.to_s,2)
self.contents.fill_rect(10,230,104,7,back_color)
self.contents.gradient_fill_rect(12,232,((actor.agi-bonus_agi)*100)/MaxStat,3,agi_color1,agi_color2)
if weapon
hit_rate = weapon.hit
else
hit_rate = 95
end
self.contents.font.size = Fontsize - 5
self.contents.font.color = Color.new(162,212,98,255)
self.contents.draw_text(1,245,100,20,"Ataque Maximo :",2)
self.contents.draw_text(1,260,100,20,"Taxa de Acer. (%) :",2)
self.contents.draw_text(1,275,100,20,"Taxa de Eva. (%) :",2)
self.contents.draw_text(1,290,100,20,"Taxa de Crit. (%) :",2)
self.contents.draw_text(105,245,60,20,(actor.atk*4).to_s,0)
self.contents.draw_text(105,260,60,20,actor.base_hit.to_s + "+" + actor.hitr.to_s,0)
self.contents.draw_text(105,275,60,20,actor.base_eva.to_s + "+" +actor.evar.to_s,0)
self.contents.draw_text(105,290,60,20,actor.base_cri.to_s + "+" + actor.crir.to_s,0)
self.contents.font.size = Fontsize-6
self.contents.font.color = text_color(16)
self.contents.draw_text(135,260,60,20,"[Req:"+PointsPerHIT.to_s+"pt.]",2)
self.contents.draw_text(135,275,60,20,"[Req:"+PointsPerEVA.to_s+"pt.]",2)
self.contents.draw_text(135,290,60,20,"[Req:"+PointsPerCRIT.to_s+"pt.]",2)
if LayoutMode == 1
self.contents.font.color = Color.new(155,199,206,255)
self.contents.font.size = Fontsize - 8
if weapon
self.contents.draw_text(185+@exo,140+@eyo,100,20,Vocab::atk+"+"+weapon.atk.to_s)
self.contents.draw_text(219+@exo,140+@eyo,100,20,Vocab::def+"+"+weapon.def.to_s)
self.contents.draw_text(253+@exo,140+@eyo,100,20,Vocab::spi+"+"+weapon.spi.to_s)
self.contents.draw_text(287+@exo,140+@eyo,100,20,Vocab::agi+"+"+weapon.agi.to_s)
end
if shield
self.contents.draw_text(185+@exo,170+@eyo,100,20,Vocab::atk+"+"+shield.atk.to_s)
self.contents.draw_text(219+@exo,170+@eyo,100,20,Vocab::def+"+"+shield.def.to_s)
self.contents.draw_text(253+@exo,170+@eyo,100,20,Vocab::spi+"+"+shield.spi.to_s)
self.contents.draw_text(287+@exo,170+@eyo,100,20,Vocab::agi+"+"+shield.agi.to_s)
end
if helm
self.contents.draw_text(185+@exo,200+@eyo,100,20,Vocab::atk+"+"+helm.atk.to_s)
self.contents.draw_text(219+@exo,200+@eyo,100,20,Vocab::def+"+"+helm.def.to_s)
self.contents.draw_text(253+@exo,200+@eyo,100,20,Vocab::spi+"+"+helm.spi.to_s)
self.contents.draw_text(287+@exo,200+@eyo,100,20,Vocab::agi+"+"+helm.agi.to_s)
end
if body
self.contents.draw_text(185+@exo,230+@eyo,100,20,Vocab::atk+"+"+body.atk.to_s)
self.contents.draw_text(219+@exo,230+@eyo,100,20,Vocab::def+"+"+body.def.to_s)
self.contents.draw_text(253+@exo,230+@eyo,100,20,Vocab::spi+"+"+body.spi.to_s)
self.contents.draw_text(287+@exo,230+@eyo,100,20,Vocab::agi+"+"+body.agi.to_s)
end
if accessory
self.contents.draw_text(185+@exo,260+@eyo,100,20,Vocab::atk+"+"+accessory.atk.to_s)
self.contents.draw_text(219+@exo,260+@eyo,100,20,Vocab::def+"+"+accessory.def.to_s)
self.contents.draw_text(253+@exo,260+@eyo,100,20,Vocab::spi+"+"+accessory.spi.to_s)
self.contents.draw_text(287+@exo,260+@eyo,100,20,Vocab::agi+"+"+accessory.agi.to_s)
end
end
if Mode == 2
self.contents.font.size = Fontsize - 8
self.contents.font.color = Color.new(155,199,206,255)
self.contents.draw_text(23,100,125,20,"PONTOS",2)
self.contents.draw_text(29,110,125,20,"REQUERIDOS",2)
self.contents.font.size = Fontsize - 4
self.contents.draw_text(20,125,115,20,required(actor.atk-bonus_atk).to_s,2)
self.contents.draw_text(20,155,115,20,required(actor.def-bonus_def).to_s,2)
self.contents.draw_text(20,185,115,20,required(actor.spi-bonus_spi).to_s,2)
self.contents.draw_text(20,215,115,20,required(actor.agi-bonus_agi).to_s,2)
end
if LayoutMode == 2
self.contents.font.color = Color.new(155,199,206,255)
self.contents.font.size = Fontsize - 8
if weapon
self.contents.draw_text(185+@exo2,140+OFFSET+@eyo,100,20,Vocab::atk+"+"+weapon.atk.to_s)
self.contents.draw_text(185+@exo2,150+OFFSET+@eyo,100,20,Vocab::def+"+"+weapon.def.to_s)
self.contents.draw_text(243+@exo2,140+OFFSET+@eyo,100,20,Vocab::spi+"+"+weapon.spi.to_s)
self.contents.draw_text(243+@exo2,150+OFFSET+@eyo,100,20,Vocab::agi+"+"+weapon.agi.to_s)
end
if shield
self.contents.draw_text(185+@exo2,180+OFFSET+@eyo,100,20,Vocab::atk+"+"+shield.atk.to_s)
self.contents.draw_text(185+@exo2,190+OFFSET+@eyo,100,20,Vocab::def+"+"+shield.def.to_s)
self.contents.draw_text(243+@exo2,180+OFFSET+@eyo,100,20,Vocab::spi+"+"+shield.spi.to_s)
self.contents.draw_text(453+@exo2,190+OFFSET+@eyo,100,20,Vocab::agi+"+"+shield.agi.to_s)
end
if helm
self.contents.draw_text(185+@exo2,220+OFFSET+@eyo,100,20,Vocab::atk+"+"+helm.atk.to_s)
self.contents.draw_text(185+@exo2,230+OFFSET+@eyo,100,20,Vocab::def+"+"+helm.def.to_s)
self.contents.draw_text(243+@exo2,220+OFFSET+@eyo,100,20,Vocab::spi+"+"+helm.spi.to_s)
self.contents.draw_text(243+@exo2,230+OFFSET+@eyo,100,20,Vocab::agi+"+"+helm.agi.to_s)
end
if body
self.contents.draw_text(185+@exo2,260+OFFSET+@eyo,100,20,Vocab::atk+"+"+body.atk.to_s)
self.contents.draw_text(185+@exo2,270+OFFSET+@eyo,100,20,Vocab::def+"+"+body.def.to_s)
self.contents.draw_text(243+@exo2,260+OFFSET+@eyo,100,20,Vocab::spi+"+"+body.spi.to_s)
self.contents.draw_text(243+@exo2,270+OFFSET+@eyo,100,20,Vocab::agi+"+"+body.agi.to_s)
end
if accessory
self.contents.draw_text(185+@exo2,300+OFFSET+@eyo,100,20,Vocab::atk+"+"+accessory.atk.to_s)
self.contents.draw_text(185+@exo2,310+OFFSET+@eyo,100,20,Vocab::def+"+"+accessory.def.to_s)
self.contents.draw_text(243+@exo2,300+OFFSET+@eyo,100,20,Vocab::spi+"+"+accessory.spi.to_s)
self.contents.draw_text(243+@exo2,310+OFFSET+@eyo,100,20,Vocab::agi+"+"+accessory.agi.to_s)
end
end
end
def required(base)
return (((base-1)/10)+2).floor
end
end
#==============================================================================
# Essa janela mostra a propriedade de cada atributo
#==============================================================================
class Lettuce_Window_Help < Window_Base
def initialize(index)
super(401,372,144,44)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.size = Fontsize - 6
refresh(index)
end
def refresh(index)
self.contents.clear
self.contents.font.color = text_color(16)
case index
when 0
self.contents.draw_text(0,-5,112,20,"HP + "+HPIncreaseBy.to_s)
when 1
self.contents.draw_text(0,-5,112,20,"MP + "+MPIncreaseBy.to_s)
when 2
self.contents.draw_text(0,-5,112,20,Vocab::atk+" + "+IncreaseBy.to_s)
when 3
self.contents.draw_text(0,-5,112,20,Vocab::def+" + "+IncreaseBy.to_s)
when 4
self.contents.draw_text(0,-5,112,20,Vocab::spi+" + "+IncreaseBy.to_s)
when 5
self.contents.draw_text(0,-5,112,20,Vocab::agi+" + "+IncreaseBy.to_s)
when 6
self.contents.draw_text(0,-5,112,20,"HIT + "+HITIncreaseBy.to_s)
when 7
self.contents.draw_text(0,-5,112,20,"EVA + "+EVAIncreaseBy.to_s)
when 8
self.contents.draw_text(0,-5,112,20,"CRIT + "+CRITIncreaseBy.to_s)
end
end
end
if Input.trigger?(Input::X)
return_scene
end
#==============================================================================
# Faz a distribuição de pontos
#==============================================================================
class Scene_Stat_Dist < Scene_Base
def initialize(menu_index)
@menu_index = menu_index
end
def start
super
create_menu_background
ihp = Vocab::hp
imp = Vocab::mp
i1 = Vocab::atk
i2 = Vocab::def
i3 = Vocab::spi
i4 = Vocab::agi
i5 = "HIT"
i6 = "EVA"
i7 = "CRIT"
@window_select = Window_Command.new(144,[ihp,imp,i1,i2,i3,i4,i5,i6,i7])
if $position
@window_select.index = $position - 1
else
@window_select.index = 0
end
@window_select.active = true
@window_select.x = 401
@window_select.y = 71
@window_top = Lettuce_Window_Top.new
@window_points = Lettuce_Window_Points.new(@menu_index)
@window_info = Lettuce_Window_Info.new(@menu_index)
@window_help = Lettuce_Window_Help.new(@window_select.index)
end
def terminate
super
dispose_menu_background
@window_top.dispose
@window_points.dispose
@window_info.dispose
@window_help.dispose
@window_select.dispose
end
def update
update_menu_background
@window_select.update
if Input.trigger?(Input::UP) or Input.trigger?(Input::DOWN)
@window_help.refresh(@window_select.index)
end
@changes = 0
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Menu.new
elsif Input.trigger?(Input::R) or Input.trigger?(Input::RIGHT)
@menu_index += 1
@menu_index %= $game_party.members.size
$scene = Scene_Stat_Dist.new(@menu_index)
elsif Input.trigger?(Input::L) or Input.trigger?(Input::LEFT)
@menu_index += $game_party.members.size - 1
@menu_index %= $game_party.members.size
$scene = Scene_Stat_Dist.new(@menu_index)
elsif Input.trigger?(Input::C)
if Mode == 1
do_point_reg
elsif Mode == 2
do_point_rag
end
end
end
def do_point_reg
@att = @window_select.index
actor = $game_party.members[@menu_index]
#Armas
weapon = $data_weapons[actor.weapon_id]
shield = $data_armors[actor.armor1_id]
helm =$data_armors[actor.armor2_id]
body =$data_armors[actor.armor3_id]
accessory =$data_armors[actor.armor4_id]
bonus_atk = 0
bonus_def = 0
bonus_spi = 0
bonus_agi = 0
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
end
case @att
when 0 #HP
if actor.points < PointsPerHP
Sound.play_cancel
elsif actor.maxhp >= MaxHP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxhp += HPIncreaseBy
if $game_party.members[@menu_index].maxhp > MaxHP
$game_party.members[@menu_index].maxhp = MaxHP
end
actor.points -= PointsPerHP
@changes += 1
$position = 1
end
when 1 #MP
if actor.points < PointsPerMP
Sound.play_cancel
elsif actor.maxmp >= MaxMP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxmp += MPIncreaseBy
if $game_party.members[@menu_index].maxmp > MaxMP
$game_party.members[@menu_index].maxmp = MaxMP
end
actor.points -= PointsPerMP
@changes += 1
$position = 1
end
when 2 #ATK
if actor.points < 1
Sound.play_cancel
elsif (actor.atk-bonus_atk) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].atk += IncreaseBy
if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
$game_party.members[@menu_index].atk = MaxStat+bonus_atk
end
actor.points -= 1
@changes += 1
$position = 1
end
when 3 #DEF
if actor.points < 1
Sound.play_cancel
elsif (actor.def-bonus_def) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].def += IncreaseBy
if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
$game_party.members[@menu_index].def = MaxStat+bonus_def
end
actor.points -= 1
@changes += 1
$position = 2
end
when 4 #SPI
if actor.points < 1
Sound.play_cancel
elsif (actor.spi-bonus_spi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].spi += IncreaseBy
if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
$game_party.members[@menu_index].spi = MaxStat+bonus_spi
end
actor.points -= 1
@changes += 1
$position = 3
end
when 5 #AGI
if actor.points < 1
Sound.play_cancel
elsif (actor.agi-bonus_agi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].agi += IncreaseBy
if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
$game_party.members[@menu_index].agi = MaxStat+bonus_agi
end
actor.points -= 1
@changes += 1
$position = 4
end
when 6 #HIT
if actor.points < PointsPerHIT
Sound.play_cancel
elsif actor.hitr >= MaxHIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].hitr += HITIncreaseBy
if $game_party.members[@menu_index].hitr > MaxHIT
$game_party.members[@menu_index].hitr = MaxHIT
end
actor.points -= PointsPerHIT
@changes += 1
$position = 1
end
when 7 #EVA
if actor.points < PointsPerEVA
Sound.play_cancel
elsif actor.evar >= MaxEVA
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].evar += EVAIncreaseBy
if $game_party.members[@menu_index].evar > MaxEVA
$game_party.members[@menu_index].evar = MaxEVA
end
actor.points -= PointsPerEVA
@changes += 1
$position = 1
end
when 8 #CRIT
if actor.points < PointsPerCRIT
Sound.play_cancel
elsif actor.crir >= MaxCRIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].crir += CRITIncreaseBy
if $game_party.members[@menu_index].crir > MaxCRIT
$game_party.members[@menu_index].crir = MaxCRIT
end
actor.points -= PointsPerCRIT
@changes += 1
$position = 1
end
end
if @changes > 0
@window_info.refresh(@menu_index)
@window_points.refresh(@menu_index)
end
end
def do_point_rag
@att = @window_select.index
actor = $game_party.members[@menu_index]
#Armas
weapon = $data_weapons[actor.weapon_id]
shield = $data_armors[actor.armor1_id]
helm =$data_armors[actor.armor2_id]
body =$data_armors[actor.armor3_id]
accessory =$data_armors[actor.armor4_id]
bonus_atk = 0
bonus_def = 0
bonus_spi = 0
bonus_agi = 0
if weapon
bonus_atk += weapon.atk
bonus_def += weapon.def
bonus_spi += weapon.spi
bonus_agi += weapon.agi
end
if shield
bonus_atk += shield.atk
bonus_def += shield.def
bonus_spi += shield.spi
bonus_agi += shield.agi
end
if helm
bonus_atk += helm.atk
bonus_def += helm.def
bonus_spi += helm.spi
bonus_agi += helm.agi
end
if body
bonus_atk += body.atk
bonus_def += body.def
bonus_spi += body.spi
bonus_agi += body.agi
end
if accessory
bonus_atk += accessory.atk
bonus_def += accessory.def
bonus_spi += accessory.spi
bonus_agi += accessory.agi
end
case @att
when 0 #HP
if actor.points < PointsPerHP
Sound.play_cancel
elsif actor.maxhp >= MaxHP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxhp += HPIncreaseBy
if $game_party.members[@menu_index].maxhp > MaxHP
$game_party.members[@menu_index].maxhp = MaxHP
end
actor.points -= PointsPerHP
@changes += 1
$position = 1
end
when 1 #MP
if actor.points < PointsPerMP
Sound.play_cancel
elsif actor.maxmp >= MaxMP
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].maxmp += MPIncreaseBy
if $game_party.members[@menu_index].maxmp > MaxMP
$game_party.members[@menu_index].maxmp = MaxMP
end
actor.points -= PointsPerMP
@changes += 1
$position = 1
end
when 2 #ATK
base_value = actor.atk-bonus_atk
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.atk-bonus_atk) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].atk += IncreaseBy
if ($game_party.members[@menu_index].atk-bonus_atk) > MaxStat
$game_party.members[@menu_index].atk = MaxStat+bonus_atk
end
actor.points -= required(base_value)
@changes += 1
$position = 1
end
when 3 #DEF
base_value = actor.def-bonus_def
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.def-bonus_def) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].def += IncreaseBy
if ($game_party.members[@menu_index].def-bonus_def) > MaxStat
$game_party.members[@menu_index].def = MaxStat+bonus_def
end
actor.points -= required(base_value)
@changes += 1
$position = 2
end
when 4 #SPI
base_value = actor.spi-bonus_spi
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.spi-bonus_spi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].spi += IncreaseBy
if ($game_party.members[@menu_index].spi-bonus_spi) > MaxStat
$game_party.members[@menu_index].spi = MaxStat+bonus_spi
end
actor.points -= required(base_value)
@changes += 1
$position = 3
end
when 5 #AGI
base_value = actor.agi-bonus_agi
points = actor.points
if enough_point(base_value,points)
Sound.play_cancel
elsif (actor.agi-bonus_agi) >= MaxStat
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].agi += IncreaseBy
if ($game_party.members[@menu_index].agi-bonus_agi) > MaxStat
$game_party.members[@menu_index].agi = MaxStat+bonus_agi
end
actor.points -= required(base_value)
@changes += 1
$position = 4
end
when 6 #HIT
if actor.points < PointsPerHIT
Sound.play_cancel
elsif actor.hitr >= MaxHIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].hitr += HITIncreaseBy
if $game_party.members[@menu_index].hitr > MaxHIT
$game_party.members[@menu_index].hitr = MaxHIT
end
actor.points -= PointsPerHIT
@changes += 1
$position = 1
end
when 7 #EVA
if actor.points < PointsPerEVA
Sound.play_cancel
elsif actor.evar >= MaxEVA
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].evar += EVAIncreaseBy
if $game_party.members[@menu_index].evar > MaxEVA
$game_party.members[@menu_index].evar = MaxEVA
end
actor.points -= PointsPerEVA
@changes += 1
$position = 1
end
when 8 #CRIT
if actor.points < PointsPerCRIT
Sound.play_cancel
elsif actor.crir >= MaxCRIT
Sound.play_cancel
else
Sound.play_use_item
$game_party.members[@menu_index].crir += CRITIncreaseBy
if $game_party.members[@menu_index].crir > MaxCRIT
$game_party.members[@menu_index].crir = MaxCRIT
end
actor.points -= PointsPerCRIT
@changes += 1
$position = 1
end
end
if @changes > 0
@window_points.refresh(@menu_index)
@window_info.refresh(@menu_index)
end
end
def enough_point(base,points)
required = (((base-1)/10)+2).floor
if required > points
return true
elsif required <= points
return false
end
end
def required(base)
return (((base-1)/10)+2).floor
end
end
if Input.trigger?(Input::X)
return_scene
end
#==============================================================================
# Dando pontos ao ator X
# -> $game_party.member[x].points
#==============================================================================
class Game_Actor < Game_Battler
attr_accessor :points
attr_accessor :hit_bonus
attr_accessor :eva_bonus
attr_accessor :cri_bonus
attr_accessor :hitr
attr_accessor :evar
attr_accessor :crir
alias Lettuce_Game_Actor_Ini initialize
def initialize(actor_id)
Lettuce_Game_Actor_Ini(actor_id)
@points = StartPoints
@hitr = 0
@evar = 0
@crir = 0
end
def points
return @points
end
#--------------------------------------------------------------------------
# * Pega taxa de HIT
#--------------------------------------------------------------------------
def hit
if two_swords_style
n1 = weapons[0] == nil ? 95 : weapons[0].hit
n2 = weapons[1] == nil ? 95 : weapons[1].hit
n = [n1, n2].min
else
n = weapons[0] == nil ? 95 : weapons[0].hit
end
if n+@hitr <= MaxHIT
return n+@hitr
else return MaxHIT
end
end
#--------------------------------------------------------------------------
# * pega taxa de Evasão
#--------------------------------------------------------------------------
def eva
n = 5
for item in armors.compact do n += item.eva end
if n+@evar <= MaxEVA
return n+@evar
else return MaxEVA
end
end
#--------------------------------------------------------------------------
# * Pega taxa de Critico
#--------------------------------------------------------------------------
def cri
n = 4
n += 4 if actor.critical_bonus
for weapon in weapons.compact
n += 4 if weapon.critical_bonus
end
if n+@crir <= MaxCRIT
return n+@crir
else return MaxCRIT
end
end
#--------------------------------------------------------------------------
# * Pega taxa de HIT base
#--------------------------------------------------------------------------
def base_hit
if two_swords_style
n1 = weapons[0] == nil ? 95 : weapons[0].hit
n2 = weapons[1] == nil ? 95 : weapons[1].hit
n = [n1, n2].min
else
n = weapons[0] == nil ? 95 : weapons[0].hit
end
return n
end
#--------------------------------------------------------------------------
# * Pega taxa de Evasão base
#--------------------------------------------------------------------------
def base_eva
n = 5
for item in armors.compact do n += item.eva end
return n
end
#--------------------------------------------------------------------------
# * Pega taxa de Critico Base
#--------------------------------------------------------------------------
def base_cri
n = 4
n += 4 if actor.critical_bonus
for weapon in weapons.compact
n += 4 if weapon.critical_bonus
end
return n
end
#--------------------------------------------------------------------------
# * Taxas Bonus
#--------------------------------------------------------------------------
def hitr
return @hitr
end
def evar
return @evar
end
def crir
return @crir
end
def current_lvl_exp
return @exp_list[@level]
end
def next_lvl_exp
return @exp_list[@level+1]-@exp_list[@level]
end
end
if Input.trigger?(Input::X)
return_scene
end
FranMAD- Moderador
- Mensagens : 1848
Fama : 172
Re: Falco Menu 4.7
- Tela Principal:
- Código:
################################################################################
################### MENU \ MENU \ MENU \ MENU \ MENU ###########################
################################################################################
#Janela de Passos
class Window_Steps < Window_Base
def initialize
super(0, 0, 160, 55)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Passos")
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 32, $game_party.steps.to_s, 2)
end
end
#Janela de Tempo de Jogo
class Window_PlayTime < Window_Base
def initialize
super(0, 0, 160, 72)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, "Tempo de Jogo")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 18, 120, 32, text, 2)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
class Window_Gold2 < Window_Base
def initialize(x, y)
super(x, y, 160, WLH + 32)
refresh
end
def refresh
self.contents.clear
draw_currency_value($game_party.gold, 4, 0, 120)
end
end
#Menu Principal
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
criar_background
@gold_window = Window_Gold2.new(0, 365)
@gold_window.x = 385
@gold_window.opacity = 100
@status_window = Window_MenuStatus.new(160, 0)
@status_window.x = 0
@status_window.opacity = 100
@window_steps = Window_Steps.new
@window_steps.x = 385
@window_steps.y = 245
@window_steps.opacity = 100
@window_playtime = Window_PlayTime.new
@window_playtime.x = 385
@window_playtime.y = 297
@window_playtime.opacity = 100
end
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@window_steps.dispose
@window_playtime.dispose
@back.dispose
@back2.dispose
end
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@window_steps.update
@window_playtime.update
@back.oy += 1
@back.ox += 1
@back2.oy += 1
@back2.ox -= 1
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
s7 = 'Pontos'
s8 = 'Opções'
s9 = 'Bestiário'
@command_window = Window_Command.new(160, [s1, s2, s3, s7, s4, s9, s5, s8, s6])
@command_window.index = @menu_index
@command_window.x = 385
@command_window.opacity = 100
if $game_party.members.size == 0
@command_window.draw_item(0, false)
@command_window.draw_item(1, false)
@command_window.draw_item(2, false)
@command_window.draw_item(3, false)
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0
$scene = Scene_Item2.new
when 1,2,4
start_actor_selection
when 3
$scene = Scene_Stat_Dist.new(0)
when 5
$scene = Scene_MonsterBook.new
when 6
$scene = Scene_File2.new(true,false,false)
when 7
$scene = Scene_Options.new
when 8
$scene = Scene_End.new
end
end
end
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1
$scene = Scene_Skill2.new(@status_window.index)
when 2
$scene = Scene_Equip2.new(@status_window.index)
when 4
$scene = Scene_Status2.new(@status_window.index)
end
end
end
def criar_background
@back = Plane.new
@back.bitmap = Cache.parallax(BACK.img)
@back.blend_type = 0
@back.z = 5
@back2 = Plane.new
@back2.bitmap = Cache.parallax(BACK.img)
@back2.blend_type = 0
@back2.z = 5
end
end
#Menu de Itens
class Scene_Item2 < Scene_Base
def start
super
create_menu_background
criar_background
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@help_window.y = 360
@item_window = Window_Item.new(0, 56, 544, 360)
@item_window.viewport = @viewport
@item_window.help_window = @help_window
@item_window.active = false
@item_window.y = 0
@item_window.opacity = 255
@target_window = Window_MenuStatus.new(0, 0)
hide_target_window
end
def terminate
super
dispose_menu_background
@back.dispose
@back2.dispose
@viewport.dispose
@help_window.dispose
@item_window.dispose
@target_window.dispose
end
def return_scene
$scene = Scene_Menu.new(0)
end
def update
super
update_menu_background
@back.oy += 1
@back.ox += 1
@back2.oy += 1
@back2.ox -= 1
@help_window.update
@item_window.update
@target_window.update
if @item_window.active
update_item_selection
elsif @target_window.active
update_target_selection
end
end
def update_item_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$game_temp.map_bgm
return_scene
elsif Input.trigger?(Input::C)
@item = @item_window.item
if @item != nil
$game_party.last_item_id = @item.id
end
if $game_party.item_can_use?(@item)
Sound.play_decision
determine_item
else
Sound.play_buzzer
end
end
end
def determine_item
if @item.for_friend?
show_target_window(@item_window.index % 2 == 0)
if @item.for_all?
@target_window.index = 99
else
if $game_party.last_target_index < @target_window.item_max
@target_window.index = $game_party.last_target_index
else
@target_window.index = 0
end
end
else
use_item_nontarget
end
end
def update_target_selection
if Input.trigger?(Input::B)
Sound.play_cancel
if $game_party.item_number(@item) == 0
@item_window.refresh
end
hide_target_window
elsif Input.trigger?(Input::C)
if not $game_party.item_can_use?(@item)
Sound.play_buzzer
else
determine_target
end
end
end
def determine_target
used = false
if @item.for_all?
for target in $game_party.members
target.item_effect(target, @item)
used = true unless target.skipped
end
else
$game_party.last_target_index = @target_window.index
target = $game_party.members[@target_window.index]
target.item_effect(target, @item)
used = true unless target.skipped
end
if used
use_item_nontarget
else
Sound.play_buzzer
end
end
def show_target_window(right)
@item_window.active = false
width_remain = 544 - @target_window.width
@target_window.x = right ? width_remain : 0
@target_window.visible = true
@target_window.active = true
if right
@viewport.rect.set(0, 0, width_remain, 416)
@viewport.ox = 0
else
@viewport.rect.set(@target_window.width, 0, width_remain, 416)
@viewport.ox = @target_window.width
end
end
def hide_target_window
@item_window.active = true
@target_window.visible = false
@target_window.active = false
@viewport.rect.set(0, 0, 544, 416)
@viewport.ox = 0
end
def use_item_nontarget
Sound.play_use_item
$game_party.consume_item(@item)
@item_window.draw_item(@item_window.index)
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
elsif @item.common_event_id > 0
$game_temp.common_event_id = @item.common_event_id
$scene = Scene_Map.new
end
end
def criar_background
@back = Plane.new
@back.bitmap = Cache.parallax(BACK.img)
@back.blend_type = 0
@back.z = 5
@back.opacity = 50
@back2 = Plane.new
@back2.bitmap = Cache.parallax(BACK.img)
@back2.blend_type = 0
@back2.z = 5
@back2.opacity = 50
end
end
#Menu de Habilidades
class Scene_Skill2 < Scene_Base
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
end
def start
super
create_menu_background
criar_background
@actor = $game_party.members[@actor_index]
@viewport = Viewport.new(0, 0, 544, 416)
@help_window = Window_Help.new
@help_window.viewport = @viewport
@status_window = Window_SkillStatus.new(0, 56, @actor)
@status_window.viewport = @viewport
@skill_window = Window_Skill.new(0, 112, 544, 304, @actor)
@skill_window.viewport = @viewport
@skill_window.help_window = @help_window
@target_window = Window_MenuStatus.new(0, 0)
hide_target_window
end
def terminate
super
dispose_menu_background
@back.dispose
@back2.dispose
@help_window.dispose
@status_window.dispose
@skill_window.dispose
@target_window.dispose
end
def return_scene
$scene = Scene_Menu.new(1)
end
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Skill.new(@actor_index)
end
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Skill.new(@actor_index)
end
def update
super
update_menu_background
@back.oy += 1
@back.ox += 1
@back2.oy += 1
@back2.ox -= 1
@help_window.update
@status_window.update
@skill_window.update
@target_window.update
if @skill_window.active
update_skill_selection
elsif @target_window.active
update_target_selection
end
end
def update_skill_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
@skill = @skill_window.skill
if @skill != nil
@actor.last_skill_id = @skill.id
end
if @actor.skill_can_use?(@skill)
Sound.play_decision
determine_skill
else
Sound.play_buzzer
end
end
end
def determine_skill
if @skill.for_friend?
show_target_window(@skill_window.index % 2 == 0)
if @skill.for_all?
@target_window.index = 99
elsif @skill.for_user?
@target_window.index = @actor_index + 100
else
if $game_party.last_target_index < @target_window.item_max
@target_window.index = $game_party.last_target_index
else
@target_window.index = 0
end
end
else
use_skill_nontarget
end
end
def update_target_selection
if Input.trigger?(Input::B)
Sound.play_cancel
hide_target_window
elsif Input.trigger?(Input::C)
if not @actor.skill_can_use?(@skill)
Sound.play_buzzer
else
determine_target
end
end
end
def determine_target
used = false
if @skill.for_all?
for target in $game_party.members
target.skill_effect(@actor, @skill)
used = true unless target.skipped
end
elsif @skill.for_user?
target = $game_party.members[@target_window.index - 100]
target.skill_effect(@actor, @skill)
used = true unless target.skipped
else
$game_party.last_target_index = @target_window.index
target = $game_party.members[@target_window.index]
target.skill_effect(@actor, @skill)
used = true unless target.skipped
end
if used
use_skill_nontarget
else
Sound.play_buzzer
end
end
def show_target_window(right)
@skill_window.active = false
width_remain = 544 - @target_window.width
@target_window.x = right ? width_remain : 0
@target_window.visible = true
@target_window.active = true
if right
@viewport.rect.set(0, 0, width_remain, 416)
@viewport.ox = 0
else
@viewport.rect.set(@target_window.width, 0, width_remain, 416)
@viewport.ox = @target_window.width
end
end
def hide_target_window
@skill_window.active = true
@target_window.visible = false
@target_window.active = false
@viewport.rect.set(0, 0, 544, 416)
@viewport.ox = 0
end
def use_skill_nontarget
Sound.play_use_skill
@actor.mp -= @actor.calc_mp_cost(@skill)
@status_window.refresh
@skill_window.refresh
@target_window.refresh
if $game_party.all_dead?
$scene = Scene_Gameover.new
elsif @skill.common_event_id > 0
$game_temp.common_event_id = @skill.common_event_id
$scene = Scene_Map.new
end
end
def criar_background
@back = Plane.new
@back.bitmap = Cache.parallax(BACK.img)
@back.blend_type = 0
@back.z = 5
@back.opacity = 50
@back2 = Plane.new
@back2.bitmap = Cache.parallax(BACK.img)
@back2.blend_type = 0
@back2.z = 5
@back2.opacity = 50
end
end
#Menu de Equipamentos
class Scene_Equip2 < Scene_Base
EQUIP_TYPE_MAX = 5
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
def start
super
create_menu_background
criar_background
@actor = $game_party.members[@actor_index]
@help_window = Window_Help.new
@help_window.y = 360
create_item_windows
@equip_window = Window_Equip.new(208, 56, @actor)
@equip_window.help_window = @help_window
@equip_window.index = @equip_index
@equip_window.y = 207
@status_window = Window_EquipStatus.new(0, 56, @actor)
@status_window.y = 207
end
def terminate
super
dispose_menu_background
@back.dispose
@back2.dispose
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
end
def return_scene
$scene = Scene_Menu.new(2)
end
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Equip.new(@actor_index, @equip_window.index)
end
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Equip.new(@actor_index, @equip_window.index)
end
def update
super
update_menu_background
@back.oy += 1
@back.ox += 1
@back2.oy += 1
@back2.ox -= 1
@help_window.update
update_equip_window
update_status_window
update_item_windows
if @equip_window.active
update_equip_selection
elsif @item_window.active
update_item_selection
end
end
def create_item_windows
@item_windows = []
for i in 0...EQUIP_TYPE_MAX
@item_windows[i] = Window_EquipItem.new(0, 208, 544, 208, @actor, i)
@item_windows[i].help_window = @help_window
@item_windows[i].visible = (@equip_index == i)
@item_windows[i].y = 208
@item_windows[i].height = 208
@item_windows[i].active = false
@item_windows[i].index = -1
@item_windows[i].y = 0
end
end
def dispose_item_windows
for window in @item_windows
window.dispose
end
end
def update_item_windows
for i in 0...EQUIP_TYPE_MAX
@item_windows[i].visible = (@equip_window.index == i)
@item_windows[i].update
end
@item_window = @item_windows[@equip_window.index]
end
def update_equip_window
@equip_window.update
end
def update_status_window
if @equip_window.active
@status_window.set_new_parameters(nil, nil, nil, nil)
elsif @item_window.active
temp_actor = @actor.clone
temp_actor.change_equip(@equip_window.index, @item_window.item, true)
new_atk = temp_actor.atk
new_def = temp_actor.def
new_spi = temp_actor.spi
new_agi = temp_actor.agi
@status_window.set_new_parameters(new_atk, new_def, new_spi, new_agi)
end
@status_window.update
end
def update_equip_selection
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
if @actor.fix_equipment
Sound.play_buzzer
else
Sound.play_decision
@equip_window.active = false
@item_window.active = true
@item_window.index = 0
end
end
end
def update_item_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
elsif Input.trigger?(Input::C)
Sound.play_equip
@actor.change_equip(@equip_window.index, @item_window.item)
@equip_window.active = true
@item_window.active = false
@item_window.index = -1
@equip_window.refresh
for item_window in @item_windows
item_window.refresh
end
end
end
def criar_background
@back = Plane.new
@back.bitmap = Cache.parallax(BACK.img)
@back.blend_type = 0
@back.z = 5
@back.opacity = 250
@back2 = Plane.new
@back2.bitmap = Cache.parallax(BACK.img)
@back2.blend_type = 0
@back2.z = 5
@back2.opacity = 250
end
end
#Menu de Status
class Scene_Status2 < Scene_Base
def initialize(actor_index = 0)
@actor_index = actor_index
end
def start
super
create_menu_background
criar_background
@actor = $game_party.members[@actor_index]
@status_window = Window_Status.new(@actor)
@status_window.opacity = 170
end
def terminate
super
dispose_menu_background
@back.dispose
@back2.dispose
@status_window.dispose
end
def return_scene
$scene = Scene_Menu.new(3)
end
def next_actor
@actor_index += 1
@actor_index %= $game_party.members.size
$scene = Scene_Status.new(@actor_index)
end
def prev_actor
@actor_index += $game_party.members.size - 1
@actor_index %= $game_party.members.size
$scene = Scene_Status.new(@actor_index)
end
def update
update_menu_background
@back.oy += 1
@back.ox += 1
@back2.oy += 1
@back2.ox -= 1
@status_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::R)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::L)
Sound.play_cursor
prev_actor
end
super
end
def criar_background
@back = Plane.new
@back.bitmap = Cache.parallax(BACK.img)
@back.blend_type = 0
@back.z = 5
@back.opacity = 250
@back2 = Plane.new
@back2.bitmap = Cache.parallax(BACK.img)
@back2.blend_type = 0
@back2.z = 5
@back2.opacity = 250
end
end
#Menu de Salvar
class Scene_File2 < Scene_Base
#--------------------------------------------------------------------------
# Inicialização do objeto
#--------------------------------------------------------------------------
def initialize(saving, from_title, from_event)
@saving = saving
@from_title = from_title
@from_event = from_event
end
#--------------------------------------------------------------------------
# Inicialização do processo
#--------------------------------------------------------------------------
def start
super
create_menu_background
@help_window = Window_Help.new
create_savefile_windows
if @saving
@index = $game_temp.last_file_index
@help_window.set_text(Vocab::SaveMessage)
else
@index = self.latest_file_index
@help_window.set_text(Vocab::LoadMessage)
end
@savefile_windows[@index].selected = true
end
#--------------------------------------------------------------------------
# Fim do processo
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@help_window.dispose
dispose_item_windows
end
#--------------------------------------------------------------------------
# Retornar à tela original
#--------------------------------------------------------------------------
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
$scene = Scene_Menu.new(4)
end
end
#--------------------------------------------------------------------------
# Atualização da tela
#--------------------------------------------------------------------------
def update
super
update_menu_background
@help_window.update
update_savefile_windows
update_savefile_selection
end
#--------------------------------------------------------------------------
# Criação da janela de save
#--------------------------------------------------------------------------
def create_savefile_windows
@savefile_windows = []
for i in 0..3
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
@item_max = 4
end
#--------------------------------------------------------------------------
# Dispose da janela de save
#--------------------------------------------------------------------------
def dispose_item_windows
for window in @savefile_windows
window.dispose
end
end
#--------------------------------------------------------------------------
# Atualização da janela de save
#--------------------------------------------------------------------------
def update_savefile_windows
for window in @savefile_windows
window.update
end
end
#--------------------------------------------------------------------------
# Atualização da seleção de arquivo save
#--------------------------------------------------------------------------
def update_savefile_selection
if Input.trigger?(Input::C)
determine_savefile
elsif Input.trigger?(Input::B)
Sound.play_cancel
return_scene
else
last_index = @index
if Input.repeat?(Input::DOWN)
cursor_down(Input.trigger?(Input::DOWN))
end
if Input.repeat?(Input::UP)
cursor_up(Input.trigger?(Input::UP))
end
if @index != last_index
Sound.play_cursor
@savefile_windows[last_index].selected = false
@savefile_windows[@index].selected = true
end
end
end
#--------------------------------------------------------------------------
# Decisão de arquivo
#--------------------------------------------------------------------------
def determine_savefile
if @saving
Sound.play_save
do_save
else
if @savefile_windows[@index].file_exist
Sound.play_load
do_load
else
Sound.play_buzzer
return
end
end
$game_temp.last_file_index = @index
end
#--------------------------------------------------------------------------
# Mover cursor
#--------------------------------------------------------------------------
def cursor_down(wrap)
if @index < @item_max - 1 or wrap
@index = (@index + 1) % @item_max
end
end
def cursor_up(wrap)
if @index > 0 or wrap
@index = (@index - 1 + @item_max) % @item_max
end
end
#--------------------------------------------------------------------------
# Criar um nome de arquivo
#--------------------------------------------------------------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rvdata"
end
#--------------------------------------------------------------------------
# Arquivo de última seleção
#--------------------------------------------------------------------------
def latest_file_index
index = 0
latest_time = Time.at(0)
for i in 0...@savefile_windows.size
if @savefile_windows[i].time_stamp > latest_time
latest_time = @savefile_windows[i].time_stamp
index = i
end
end
return index
end
#--------------------------------------------------------------------------
# Salvando arquivos
#--------------------------------------------------------------------------
def do_save
file = File.open(@savefile_windows[@index].filename, "wb")
write_save_data(file)
file.close
return_scene
end
#--------------------------------------------------------------------------
# Carregando arquivos
#--------------------------------------------------------------------------
def do_load
file = File.open(@savefile_windows[@index].filename, "rb")
read_save_data(file)
file.close
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
@last_bgm.play
@last_bgs.play
end
#--------------------------------------------------------------------------
# Escreve dados de save
#--------------------------------------------------------------------------
def write_save_data(file)
characters = []
for actor in $game_party.members
characters.push([actor.character_name, actor.character_index])
end
$game_system.save_count += 1
$game_system.version_id = $data_system.version_id
@last_bgm = RPG::BGM::last
@last_bgs = RPG::BGS::last
Marshal.dump(characters, file)
Marshal.dump(Graphics.frame_count, file)
Marshal.dump(@last_bgm, file)
Marshal.dump(@last_bgs, file)
Marshal.dump($game_system, file)
Marshal.dump($game_message, file)
Marshal.dump($game_switches, file)
Marshal.dump($game_variables, file)
Marshal.dump($game_self_switches, file)
Marshal.dump($game_actors, file)
Marshal.dump($game_party, file)
Marshal.dump($game_troop, file)
Marshal.dump($game_map, file)
Marshal.dump($game_player, file)
end
#--------------------------------------------------------------------------
# Lê dados de save
#--------------------------------------------------------------------------
def read_save_data(file)
characters = Marshal.load(file)
Graphics.frame_count = Marshal.load(file)
@last_bgm = Marshal.load(file)
@last_bgs = Marshal.load(file)
$game_system = Marshal.load(file)
$game_message = Marshal.load(file)
$game_switches = Marshal.load(file)
$game_variables = Marshal.load(file)
$game_self_switches = Marshal.load(file)
$game_actors = Marshal.load(file)
$game_party = Marshal.load(file)
$game_troop = Marshal.load(file)
$game_map = Marshal.load(file)
$game_player = Marshal.load(file)
if $game_system.version_id != $data_system.version_id
$game_map.setup($game_map.map_id)
$game_player.center($game_player.x, $game_player.y)
end
end
end
- Menu de Opções:
- Código:
################################################################################
##################################OPÇÕES########################################
################################################################################
#==============================================================================
# Janela de Opções
#==============================================================================
class Scene_Options < Scene_Base
#--------------------------------------------------------------------------
# * Initializa
#--------------------------------------------------------------------------
def initialize(options_index = 0)
@options_index = options_index
options_init
end
#--------------------------------------------------------------------------
# * Define Comandos
#--------------------------------------------------------------------------
def options_init
@options = []
op1 = OptionCommand::Audio
op2 = OptionCommand::Controls
op3 = OptionCommand::Resolution
op4 = OptionCommand::Exit_Options
@options.push(op1, op2, op3, op4).flatten!
@audio_options = []
aud1 = OptionCommand::Audiobgm
aud2 = OptionCommand::Audiobgs
aud3 = OptionCommand::Audiome
aud4 = OptionCommand::Audiose
@audio_options.push(aud1, aud2, aud3, aud4).flatten!
@bgm_options = OptionCommand::AudiobgmV
@bgs_options = OptionCommand::AudiobgsV
@se_options = OptionCommand::AudioseV
@me_options = OptionCommand::AudiomeV
@resolution_options = OptionCommand::ResolutionS
end
def start
super
create_menu_background
create_options_window
create_audio_window
create_bgm_window
create_bgs_window
create_se_window
create_me_window
create_resolution_window
create_controls_window
@help_window = Window_Help.new
@help_window.viewport = @viewport
@help_window.set_text("Opções")
end
def terminate
super
dispose_menu_background
@options_window.dispose
@audio_options_window.dispose
@bgm_options_window.dispose
@bgs_options_window.dispose
@se_options_window.dispose
@me_options_window.dispose
@resolution_options_window.dispose
@controls_window.dispose
@help_window.dispose
end
def update
super
update_menu_background
@options_window.update
@audio_options_window.update
@bgm_options_window.update
@bgs_options_window.update
@se_options_window.update
@me_options_window.update
@resolution_options_window.update
@controls_window.update
@help_window.update
if @options_window.active
update_options_selection
elsif @audio_options_window.active
update_audio_options_selection
elsif @bgm_options_window.active
update_bgm_options_selection
elsif @bgs_options_window.active
update_bgs_options_selection
elsif @se_options_window.active
update_se_options_selection
elsif @me_options_window.active
update_me_options_selection
elsif @resolution_options_window.active
update_resolution_options_selection
elsif @controls_window.active
update_controls_selection
end
end
#--------------------------------------------------------------------------
# * Cria as opções da Janela "Main Option"
#--------------------------------------------------------------------------
def create_options_window
@options_window = Window_Command.new(160, @options)
@options_window.index = @options_index
@options_window.y = 64
end
#--------------------------------------------------------------------------
# * Cria as opções da janela "Opções de Audio"
#--------------------------------------------------------------------------
def create_audio_window
@audio_options_window = Window_Command.new(277, @audio_options)
@audio_options_window.visible = false
@audio_options_window.active = false
@audio_options_window.x = 160
@audio_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria as Opções da janela "Audio-BGM"
#--------------------------------------------------------------------------
def create_bgm_window
@bgm_options_window = Window_Command.new(70, @bgm_options)
@bgm_options_window.visible = false
@bgm_options_window.active = false
@bgm_options_window.x = 437
@bgm_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria as Opções da janela "Audio-BGS"
#--------------------------------------------------------------------------
def create_bgs_window
@bgs_options_window = Window_Command.new(70, @bgs_options)
@bgs_options_window.visible = false
@bgs_options_window.active = false
@bgs_options_window.x = 437
@bgs_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria as Opções da janela "Audio-SE"
#--------------------------------------------------------------------------
def create_se_window
@se_options_window = Window_Command.new(70, @se_options)
@se_options_window.visible = false
@se_options_window.active = false
@se_options_window.x = 437
@se_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria as Opções da janela "Audio-ME"
#--------------------------------------------------------------------------
def create_me_window
@me_options_window = Window_Command.new(70, @me_options)
@me_options_window.visible = false
@me_options_window.active = false
@me_options_window.x = 437
@me_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria as Opções da janela de resoluções
#--------------------------------------------------------------------------
def create_resolution_window
@resolution_options_window = Window_Command.new(120, @resolution_options)
@resolution_options_window.visible = false
@resolution_options_window.active = false
@resolution_options_window.x = 160
@resolution_options_window.y = 56
end
#--------------------------------------------------------------------------
# * Cria a janela de Comandos
#--------------------------------------------------------------------------
def create_controls_window
@controls_window = Window_Base.new(161, 57, 292, 300)
@controls_window.contents.draw_text(0, -2, 100, 24, "Controles")
@controls_window.contents.draw_text(5, 160, 265, 24, "Shift")
@controls_window.contents.draw_text(40, 40, 300, 24, "X")
@controls_window.contents.draw_text(5, 60, 265, 24, "Enter")
@controls_window.contents.draw_text(40, 80, 300, 24, "Q")
@controls_window.contents.draw_text(40, 100, 300, 24, "W")
@controls_window.contents.draw_text(40, 120, 300, 24, "A")
@controls_window.contents.draw_text(40, 140, 300, 24, "S")
@controls_window.contents.draw_text(60, 160, 300, 24, ":: Correr")
@controls_window.contents.draw_text(60, 40, 300, 24, ":: Cancela/Menu")
@controls_window.contents.draw_text(60, 60, 300, 24, ":: Confirma/Fala")
@controls_window.contents.draw_text(60, 80, 300, 24, ":: Menu Anterior")
@controls_window.contents.draw_text(60, 100, 300, 24, ":: Próximo Menu")
@controls_window.contents.draw_text(60, 120, 300, 24, ":: Não Usado")
@controls_window.contents.draw_text(60, 140, 300, 24, ":: Não Usado")
@controls_window.visible = false
@controls_window.active = false
end
#--------------------------------------------------------------------------
# * Retorna para o menu
#--------------------------------------------------------------------------
def return_scene
$scene = Scene_Menu.new
end
#--------------------------------------------------------------------------
# * Atualiza a janela de opções
#--------------------------------------------------------------------------
def update_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Menu.new
#return_scene
elsif Input.trigger?(Input::C)
main_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio Options"
#--------------------------------------------------------------------------
def update_audio_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@options_window.active = true
@audio_options_window.active = false
@audio_options_window.visible = false
@audio_options_window.index = 0
return
elsif Input.trigger?(Input::C)
audio_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio-BGM"
#--------------------------------------------------------------------------
def update_bgm_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@audio_options_window.active = true
@bgm_options_window.active = false
@bgm_options_window.visible = false
@bgm_options_window.index = 0
return
elsif Input.trigger?(Input::C)
bgm_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio-BGS Options"
#--------------------------------------------------------------------------
def update_bgs_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@audio_options_window.active = true
@bgs_options_window.active = false
@bgs_options_window.visible = false
@bgs_options_window.index = 0
return
elsif Input.trigger?(Input::C)
bgs_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio-SE Options"
#--------------------------------------------------------------------------
def update_se_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@audio_options_window.active = true
@se_options_window.active = false
@se_options_window.visible = false
@se_options_window.index = 0
return
elsif Input.trigger?(Input::C)
se_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio-ME Options"
#--------------------------------------------------------------------------
def update_me_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@audio_options_window.active = true
@me_options_window.active = false
@me_options_window.visible = false
@me_options_window.index = 0
return
elsif Input.trigger?(Input::C)
me_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela de resoluções
#--------------------------------------------------------------------------
def update_resolution_options_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@options_window.active = true
@resolution_options_window.active = false
@resolution_options_window.visible = false
@resolution_options_window.index = 0
return
elsif Input.trigger?(Input::C)
resolution_options_input
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela de comandos
#--------------------------------------------------------------------------
def update_controls_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@options_window.active = true
@controls_window.active = false
@controls_window.visible = false
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Main Options InputCheck"
#--------------------------------------------------------------------------
def main_options_input
option = @options[@options_window.index]
Sound.play_decision
# Checa Opções de Comandos
case option
when OptionCommand::Audio # Chama sub-janela de Audio
@audio_options_window.active = true
@audio_options_window.visible = true
@options_window.active = false
when OptionCommand::Controls # Chama sub-janela de Controles
@controls_window.active = true
@controls_window.visible = true
@options_window.active = false
when OptionCommand::Resolution # Chama sub-janela de Resolução
@resolution_options_window.active = true
@resolution_options_window.visible = true
@options_window.active = false
when OptionCommand::Exit_Options #Retorna para a janela principal
return_scene
end
end
#--------------------------------------------------------------------------
# * Atualiza a janela "Audio Options InputCheck"
#--------------------------------------------------------------------------
def audio_options_input
audio_option = @audio_options[@audio_options_window.index]
Sound.play_decision
# Checa Opções gráficas de comando
case audio_option
when OptionCommand::Audiobgm # Ajusta BGM
@bgm_options_window.index = 0
@bgm_options_window.active = true
@bgm_options_window.visible = true
@audio_options_window.active = false
when OptionCommand::Audiobgs #Ajusta BGS
@bgs_options_window.index = 0
@bgs_options_window.active = true
@bgs_options_window.visible = true
@audio_options_window.active = false
when OptionCommand::Audiome #Ajusta ME
@me_options_window.index = 0
@me_options_window.active = true
@me_options_window.visible = true
@audio_options_window.active = false
when OptionCommand::Audiose #Ajusta SE
@se_options_window.index = 0
@se_options_window.active = true
@se_options_window.visible = true
@audio_options_window.active = false
end
end
#--------------------------------------------------------------------------
# * Atualiza janela "Audio-BGM Options InputCheck"
#--------------------------------------------------------------------------
def bgm_options_input
bgm_option = @bgm_options[@bgm_options_window.index]
Sound.play_decision
# Checa Opções BGM
case bgm_option
when OptionCommand::AudiobgmV[0] #BGM -Volume
if $game_system.bgm_volume >= 10
$game_system.bgm_volume = $game_system.bgm_volume - 10
Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)
end
when OptionCommand::AudiobgmV[1] #BGM +Volume
if $game_system.bgm_volume <= 90
$game_system.bgm_volume = $game_system.bgm_volume + 10
Audio.play_adjust(RPG::BGM.last, $game_system.bgm_volume)
end
end
end
#--------------------------------------------------------------------------
# * Atualiza janela "Audio-BGS Options InputCheck"
#--------------------------------------------------------------------------
def bgs_options_input
bgs_option = @bgs_options[@bgs_options_window.index]
Sound.play_decision
# Checa opções BGM
case bgs_option
when OptionCommand::AudiobgsV[0] #BGS -Volume
if $game_system.bgs_volume >= 10
$game_system.bgs_volume = $game_system.bgs_volume - 10
Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)
end
when OptionCommand::AudiobgsV[1] #BGS +Volume
if $game_system.bgs_volume <= 90
$game_system.bgs_volume = $game_system.bgs_volume + 10
Audio.play_adjust(RPG::BGS.last, $game_system.bgs_volume)
end
end
end
#--------------------------------------------------------------------------
# * Atualiza janela "Audio-SE Options InputCheck"
#--------------------------------------------------------------------------
def se_options_input
se_option = @se_options[@se_options_window.index]
Sound.play_decision
# Checa opções BGM
case se_option
when OptionCommand::AudioseV[0] #SE -Volume
if $game_system.se_volume >= 10
$game_system.se_volume = $game_system.se_volume - 10
end
when OptionCommand::AudioseV[1] #SE +Volume
if $game_system.se_volume <= 90
$game_system.se_volume = $game_system.se_volume + 10
end
end
end
#--------------------------------------------------------------------------
# * Atualiza janela "Audio-ME Options InputCheck"
#--------------------------------------------------------------------------
def me_options_input
me_option = @me_options[@me_options_window.index]
Sound.play_decision
# Checa opções BGM
case me_option
when OptionCommand::AudiomeV[0] #ME -Volume
if $game_system.me_volume >= 10
$game_system.me_volume = $game_system.me_volume - 10
end
when OptionCommand::AudiomeV[1] #ME +Volume
if $game_system.me_volume <= 90
$game_system.me_volume = $game_system.me_volume + 10
end
end
end
#--------------------------------------------------------------------------
# * Atualiza janela de opções de Resolução
#--------------------------------------------------------------------------
def resolution_options_input
resolution_option = @resolution_options[@resolution_options_window.index]
Sound.play_decision
# Checa opções de resolução
case resolution_option
when OptionCommand::ResolutionS[0]
getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
moveWindow.call(win, (sw - 544) / 2, (sh - 416) / 2, 544, 416, 1)
when OptionCommand::ResolutionS[1]
getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
moveWindow.call(win, (sw - 800) / 2, (sh - 600) / 2, 800, 600, 1)
when OptionCommand::ResolutionS[2]
getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
moveWindow.call(win, (sw - 1024) / 2, (sh - 768) / 2, 1024, 768, 1)
when OptionCommand::ResolutionS[3]
getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
moveWindow.call(win, (sw - 1280) / 2, (sh - 1024) / 2, 1280, 1024, 1)
when OptionCommand::ResolutionS[4]
getSystemMetrics = Win32API.new('user32', 'GetSystemMetrics', 'i', 'i')
moveWindow = Win32API.new('user32', 'MoveWindow', 'liiiil', 'l')
findWindowEx = Win32API.new('user32', 'FindWindowEx', 'llpp', 'i')
win = findWindowEx.call(0, 0 , 'RGSS Player', 0)
sw, sh = getSystemMetrics.call(0), getSystemMetrics.call(1)
moveWindow.call(win, (sw - 1600) / 2, (sh - 1200) / 2, 1600, 1200, 1)
end
end
#--------------------------------------------------------------------------
# * Atualiza janela de ajuda
#--------------------------------------------------------------------------
def update_help
@help_window.set_text("Opções")
end
end
#===============================================================================
# Audio Adjustment Script version 1.1
#===============================================================================
# Isso adiciona o modulo de Audio e ajusta volumes de fundo.
module Audio
def self.play_adjust(sound_file, adjustment) # Aceita o gerenciamento de som
original_volume = sound_file.volume # Dá o volume original
sound_file.volume = (original_volume * adjustment / 100) # Reseta o som
sound_file.play # Roda o arquivo de som
sound_file.volume = original_volume # Reseta para o arquivo base
end
end
# Muda o modulo de som original para que todos os efeitos de som tenham o volume
# que o jogador selecionou.
module Sound
# Cursor
def self.play_cursor
Audio.play_adjust($data_system.sounds[0], $game_system.se_volume)
end
# Decidir
def self.play_decision
Audio.play_adjust($data_system.sounds[1], $game_system.se_volume)
end
# Cancela
def self.play_cancel
Audio.play_adjust($data_system.sounds[2], $game_system.se_volume)
end
# Buzzer
def self.play_buzzer
Audio.play_adjust($data_system.sounds[3], $game_system.se_volume)
end
# Equipa
def self.play_equip
Audio.play_adjust($data_system.sounds[4], $game_system.se_volume)
end
# Salva
def self.play_save
Audio.play_adjust($data_system.sounds[5], $game_system.se_volume)
end
# Carrega
def self.play_load
Audio.play_adjust($data_system.sounds[6], $game_system.se_volume)
end
# Batalha começa
def self.play_battle_start
Audio.play_adjust($data_system.sounds[7], $game_system.se_volume)
end
# Escapa
def self.play_escape
Audio.play_adjust($data_system.sounds[8], $game_system.se_volume)
end
# Inimigo Ataca
def self.play_enemy_attack
Audio.play_adjust($data_system.sounds[9], $game_system.se_volume)
end
# Inimigo \ Dano
def self.play_enemy_damage
Audio.play_adjust($data_system.sounds[10], $game_system.se_volume)
end
# Colapso Inimigo
def self.play_enemy_collapse
Audio.play_adjust($data_system.sounds[11], $game_system.se_volume)
end
# Ator \ Dano
def self.play_actor_damage
Audio.play_adjust($data_system.sounds[12], $game_system.se_volume)
end
# Colapso Ator
def self.play_actor_collapse
Audio.play_adjust($data_system.sounds[13], $game_system.se_volume)
end
# Recupera
def self.play_recovery
Audio.play_adjust($data_system.sounds[14], $game_system.se_volume)
end
# Missa
def self.play_miss
Audio.play_adjust($data_system.sounds[15], $game_system.se_volume)
end
# Evade
def self.play_evasion
Audio.play_adjust($data_system.sounds[16], $game_system.se_volume)
end
# Shop
def self.play_shop
Audio.play_adjust($data_system.sounds[17], $game_system.se_volume)
end
# Usa Item
def self.play_use_item
Audio.play_adjust($data_system.sounds[18], $game_system.se_volume)
end
# Usa Skill
def self.play_use_skill
Audio.play_adjust($data_system.sounds[19], $game_system.se_volume)
end
end
# Modifica o sistema do jogo para adicionar o volume em seus ajustamentos
class Game_System
attr_accessor :bgm_volume
attr_accessor :se_volume
attr_accessor :bgs_volume
attr_accessor :me_volume
attr_accessor :battle_music_mode
alias akin_sound_ini_game_system initialize
def initialize
akin_sound_ini_game_system
# BGM, BGS, SE and ME Volume
@bgm_volume = 100; @se_volume = 100; @bgs_volume = 100; @me_volume = 100; @battle_music_mode = 0;
end
end
# Edita o "game_interpreter" para todos os sons de eventos serem rodados com o
# volume correto
class Game_Interpreter
def command_241
Audio.play_adjust(@params[0], $game_system.bgm_volume) #BGM
return true
end
def command_245
Audio.play_adjust(@params[0], $game_system.bgs_volume) #BGS
return true
end
def command_249
Audio.play_adjust(@params[0], $game_system.me_volume) #ME
return true
end
def command_250
Audio.play_adjust(@params[0], $game_system.se_volume) #SE
return true
end
end
# Edita o "game_map" para todos os sons tocados automaticamente serem rodados
# com o volume correto
class Game_Map
def autoplay
Audio.play_adjust(@map.bgm, $game_system.bgm_volume) if @map.autoplay_bgm
Audio.play_adjust(@map.bgs, $game_system.bgs_volume) if @map.autoplay_bgs
end
end
# Edita "game_vehicle" para rodar os sons corretamente quanto o ator está em um
# veículo
class Game_Vehicle < Game_Character
def get_on
@driving = true
@walk_anime = true
@step_anime = true
if @type == 2 # If airship
@priority_type = 2 # Change priority to "Above Characters"
end
Audio.play_adjust(@bgm, $game_system.bgm_volume) # Start BGM
end
end
# Edita "game_vehicle" para rodar os sons corretamente quanto o ator sai do veí-
# culo
class Game_Player < Game_Character
def get_off_vehicle
if in_airship? # Airship
return unless airship_land_ok?(@x, @y) # Can't land?
else # Boat/ship
front_x = $game_map.x_with_direction(@x, @direction)
front_y = $game_map.y_with_direction(@y, @direction)
return unless can_walk?(front_x, front_y) # Can't touch land?
end
$game_map.vehicles[@vehicle_type].get_off # Get off processing
if in_airship? # Airship
@direction = 2 # Face down
else # Boat/ship
force_move_forward # Move one step forward
@transparent = false # Remove transparency
end
@vehicle_getting_off = true # Start getting off operation
@move_speed = 4 # Return move speed
@through = false # Passage OFF
Audio.play_adjust(@walking_bgm, $game_system.bgm_volume) # Restore walking BGM
make_encounter_count # Initialize encounter
end
end
# Edita "sprite_base" para rodar os efeitos de som da batalha corretamente
class Sprite_Base < Sprite
def animation_process_timing(timing)
Audio.play_adjust(timing.se, $game_system.se_volume)
case timing.flash_scope
when 1
self.flash(timing.flash_color, timing.flash_duration * 4)
when 2
if viewport != nil
viewport.flash(timing.flash_color, timing.flash_duration * 4)
end
when 3
self.flash(nil, timing.flash_duration * 4)
end
end
end
# Edits "scene_map" para rodar os sons de batalha com o volume correto
class Scene_Map < Scene_Base
def call_battle
@spriteset.update
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
$game_temp.map_bgm = RPG::BGM.last
$game_temp.map_bgs = RPG::BGS.last
unless $game_system.battle_music_mode == 1 # Does not stop current must if battle_music mode is 1
RPG::BGM.stop
RPG::BGS.stop
end
Sound.play_battle_start
unless $game_system.battle_music_mode == 1
Audio.play_adjust($game_system.battle_bgm, $game_system.bgm_volume) # Does not play battle music if battle mode is 1
end
$game_temp.next_scene = nil
$scene = Scene_Battle.new
end
end
# Edita "scene_battle" para rodar BGM e BGS do retorno ao mapa e da vitoria
# corretamente
class Scene_Battle < Scene_Base
def battle_end(result)
if result == 2 and not $game_troop.can_lose
call_gameover
else
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST or $game_system.battle_music_mode == 1 #does not restore BGM if battle music mode 1 is enabled
Audio.play_adjust($game_temp.map_bgm, $game_system.bgm_volume)
Audio.play_adjust($game_temp.map_bgs, $game_system.bgs_volume)
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
end
$game_temp.in_battle = false
end
def process_victory
@info_viewport.visible = false
@message_window.visible = true
unless $game_system.battle_music_mode == 1 #does not play victory ME if battle music mode 1 is enabled
RPG::BGM.stop
Audio.play_adjust($game_system.battle_end_me, $game_system.me_volume)
end
unless $BTEST or $game_system.battle_music_mode == 1 #does not restore BGM if battle music mode 1 is enabled
Audio.play_adjust($game_temp.map_bgm, $game_system.bgm_volume)
Audio.play_adjust($game_temp.map_bgs, $game_system.bgs_volume)
end
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
end
# Edita "scene_gameover" para rodar o volume de Gameover corretamente
class Scene_Gameover < Scene_Base
def start
super
RPG::BGM.stop
RPG::BGS.stop
Audio.play_adjust($data_system.gameover_me, $game_system.me_volume)
Graphics.transition(120)
Graphics.freeze
create_gameover_graphic
end
end
# Edita "scene_file" para rodar o som com volume correto no carregamento
class Scene_File < Scene_Base
def do_load
file = File.open(@savefile_windows[@index].filename, "rb")
read_save_data(file)
file.close
$scene = Scene_Map.new
RPG::BGM.fade(1500)
Graphics.fadeout(60)
Graphics.wait(40)
Audio.play_adjust(@last_bgm, $game_system.bgm_volume)
Audio.play_adjust(@last_bgs, $game_system.bgs_volume)
end
end
FranMAD- Moderador
- Mensagens : 1848
Fama : 172
Re: Falco Menu 4.7
- Bestiário:
- Código:
################################################################################
############################### MONSTER BOOK II ###############################
################################################################################
#===============================================================
# ** Adaptando Game_System para o Bestiário
#--------------------------------------------------------------
class Game_System
attr_accessor :monbook
alias :wora_monbook_gamsys_ini :initialize
def initialize
wora_monbook_gamsys_ini
create_monbook
end
def create_monbook
@monbook ||= Array.new($data_enemies.size) {false}
end
def set_monbook_complete
@monbook = Array.new($data_enemies.size) {true}
@monbook[0] = false
end
def reset_monbook
@monbook = Array.new($data_enemies.size) {false}
end
end
#===============================================================
# ** Adaptando Game_Troop para o Bestiário
#--------------------------------------------------------------
class Game_Troop < Game_Unit
alias :wora_monbook_gamtroop_setup :setup
def setup(*args)
wora_monbook_gamtroop_setup(*args)
$game_system.create_monbook
unless $game_switches[Wora_Monbook::NO_RECORD_SWITCH]
@enemies.each {|e| $game_system.monbook[e.enemy_id] = true }
end
end
end
#===============================================================
# ** Criando "Window_MonsterBHelp" (Janela de ajuda)
#--------------------------------------------------------------
class Window_MonsterBHelp < Window_Base
include Wora_Monbook
def initialize
super(0, 0, 544, WLH + 32)
# Escreve o título
contents.font.color = system_color
contents.draw_text(0, 0, contents.width, WLH, TEXT_TITLE)
# Calcula os monstros encontrados e a porcentagem
found_count = 0
$game_system.monbook.each {|e| found_count += 1 if e }
percent_count = (found_count * 100) / ($data_enemies.size - 1)
# Coleta & armazena Texto em variaveis
found_text = found_count.to_s + '/' + ($data_enemies.size - 1).to_s
percent_text = percent_count.to_s + '%'
mid_text = ' | '
right_text = TEXT_FOUND + found_text + mid_text + TEXT_COMPLETED +
percent_text
# Calcula largura do Texto
found_t_width = contents.text_size(TEXT_FOUND).width
found_width = contents.text_size(found_text).width
percent_t_width = contents.text_size(TEXT_COMPLETED).width
mid_width = contents.text_size(mid_text).width
right_width = contents.text_size(right_text).width
# Escreve monstros encontrados e a porcentagem
contents.font.color = normal_color
contents.draw_text(contents.width - right_width, 0, contents.width, WLH,
TEXT_FOUND)
contents.draw_text(contents.width - right_width + found_t_width +
found_width, 0, contents.width, WLH, mid_text + TEXT_COMPLETED)
contents.font.color = crisis_color
contents.draw_text(contents.width - right_width + found_t_width, 0,
contents.width, WLH, found_text)
contents.draw_text(contents.width - right_width + found_t_width +
found_width + mid_width + percent_t_width, 0, contents.width, WLH,
percent_text)
end
end
#===============================================================
# ** Criando "Window_MonsterBDetail" (Janela de detalhes)
#--------------------------------------------------------------
class Window_MonsterBDetail < Window_Base
def initialize(window_temp)
super(window_temp.x, window_temp.y, window_temp.width, window_temp.height)
self.opacity = 0
@win_image = Window_Base.new(self.x, self.y, self.width, self.height)
self.z = @win_image.z + 1
@last_enemy = 0
end
def visible=(bool)
super
@win_image.visible = bool
end
def dispose
@win_image.dispose
super
end
def write_detail(enemy_id)
return if @last_enemy == enemy_id
contents.clear
@win_image.contents.clear
@last_enemy = enemy_id
data = $data_enemies[enemy_id]
# Desenha os gráficos do inimigo
bitmap = Cache.battler(data.battler_name, data.battler_hue)
bw = bitmap.width < 160 ? (160 - bitmap.width) / 2 : 0
bh = contents.height - bitmap.height
@win_image.contents.blt(bw, bh, bitmap, bitmap.rect)
bitmap.dispose
# Escreve o nome
contents.font.color = normal_color
contents.draw_text(0, 0, contents.width, WLH,
data.id.to_s + Wora_Monbook::TEXT_DOT + ' ' + data.name)
# Escreve os status do inimigo
hpx = 120
draw_enemy_stat(data, contents.width - (hpx * 2) - 32, 0, hpx, 'hp')
draw_enemy_stat(data, contents.width - hpx, 0, hpx, 'mp')
draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 2, hpx, 'atk')
draw_enemy_stat(data, contents.width - hpx, WLH * 2, hpx, 'def')
draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 3, hpx, 'spi')
draw_enemy_stat(data, contents.width - hpx, WLH * 3, hpx, 'agi')
draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 4, hpx, 'hit')
draw_enemy_stat(data, contents.width - hpx, WLH * 4, hpx, 'eva')
draw_enemy_stat(data, contents.width - (hpx * 2) - 32, WLH * 6, hpx, 'exp')
draw_enemy_stat(data, contents.width - hpx, WLH * 6, hpx, 'gold')
rect = Rect.new(contents.width - (hpx * 2) - 8, (WLH * 8) - 8, 216,
(WLH * 4) + 16)
contents.fill_rect(rect, Color.new(0,0,0,140))
lsize = 2 # Line Size
lcolor = Color.new(255,255,255,160) # Line Color
contents.fill_rect(rect.x, rect.y, lsize, rect.height, lcolor)
contents.fill_rect(rect.x, rect.y, rect.width, lsize, lcolor)
contents.fill_rect(rect.x + rect.width - lsize, rect.y, lsize,
rect.height, lcolor)
contents.fill_rect(rect.x, rect.y + rect.height - lsize, rect.width,
lsize, lcolor)
contents.font.color = system_color
contents.draw_text(contents.width - (hpx * 2), WLH * 8, 200, WLH,
'Drop Item 1')
draw_enemy_drop(data, 1, contents.width - (hpx * 2), WLH * 9)
contents.font.color = system_color
contents.draw_text(contents.width - (hpx * 2), WLH * 10, 200, WLH,
'Drop Item 2')
draw_enemy_drop(data, 2, contents.width - (hpx * 2), WLH * 11)
end
def draw_enemy_stat(actor, x, y, width, stat)
color1 = system_color
color2 = normal_color
slash = false
# Acha o ator mais forte no grupo
if Wora_Monbook::COMPARE_STATUS
hactor = ($game_party.members.sort {|a,b| a.level <=> b.level })
hactor = hactor[hactor.size - 1]
end
case stat
when 'hp'
vocab = Vocab::hp
number = actor.maxhp
hnumber = hactor.maxhp if Wora_Monbook::COMPARE_STATUS
slash = true
when 'mp'
vocab = Vocab::mp
number = actor.maxmp
hnumber = hactor.maxmp if Wora_Monbook::COMPARE_STATUS
slash = true
when 'atk'
vocab = Vocab::atk
number = actor.atk
hnumber = hactor.atk if Wora_Monbook::COMPARE_STATUS
when 'def'
vocab = Vocab::def
number = actor.def
hnumber = hactor.def if Wora_Monbook::COMPARE_STATUS
when 'spi'
vocab = Vocab::spi
number = actor.spi
hnumber = hactor.spi if Wora_Monbook::COMPARE_STATUS
when 'agi'
vocab = Vocab::agi
number = actor.agi
hnumber = hactor.agi if Wora_Monbook::COMPARE_STATUS
when 'hit'
vocab = 'HIT'
number = actor.hit
hnumber = hactor.hit if Wora_Monbook::COMPARE_STATUS
when 'eva'
vocab = 'EVA'
number = actor.eva
hnumber = hactor.eva if Wora_Monbook::COMPARE_STATUS
when 'exp'
vocab = 'EXP'
number = actor.exp
color2 = crisis_color
when 'gold'
vocab = 'Gold'
number = actor.gold
color2 = crisis_color
end
if Wora_Monbook::COMPARE_STATUS and !hnumber.nil?
if hnumber > number # Mais alto
color2 = power_up_color
elsif hnumber < number # Mais Baixo
color2 = power_down_color
elsif hnumber == number # Igual
color2 = normal_color
end
end
contents.font.color = color1
contents.draw_text(x, y, 80, WLH, vocab)
xr = x + width
contents.font.color = color2
if slash
contents.draw_text(xr - 95, y, 40, WLH, number, 2)
contents.draw_text(xr - 55, y, 11, WLH, '/', 2)
end
w_ava = slash ? 40 : 80
contents.draw_text(xr - w_ava, y, w_ava, WLH, number, 2)
end
def draw_enemy_drop(actor, drop_id, x, y)
drop = eval('actor.drop_item' + drop_id.to_s)
if drop.kind.zero?
contents.font.color = normal_color
contents.draw_text(x, y, 200, WLH, " ---------")
else
case drop.kind
when 1; item = $data_items[drop.item_id]
when 2; item = $data_weapons[drop.weapon_id]
when 3; item = $data_armors[drop.armor_id]
end
draw_item_name(item, x, y)
end
end
end
#===============================================================
# ** Scene_MonsterBook (Janela Principal)
#--------------------------------------------------------------
class Scene_MonsterBook < Scene_Base
def initialize(from_menu = false)
@from_menu = from_menu
end
def start
super
create_menu_background
$game_system.create_monbook
@window_help = Window_MonsterBHelp.new
# Cria A lista de monstros
monlist = []
$game_system.monbook.each_index do |i|
next if i == 0 # A primeira index em "$data_enemies" é branca
# Se o jogador achar um monstro
if $game_system.monbook[i] and
!Wora_Monbook::NO_DATA_MONSTER.include?(i)
montext = i.to_s + Wora_Monbook::TEXT_DOT + ' ' + $data_enemies[i].name
else # Se o jogador não encontrou
montext = i.to_s + Wora_Monbook::TEXT_DOT
end
monlist << montext
end
@window_monlist = Window_Command.new(544, monlist, 2)
@window_monlist.y = @window_help.height
@window_monlist.height = Graphics.height - @window_help.height
@window_monlist.active = true
@window_mondetail = Window_MonsterBDetail.new(@window_monlist)
@window_mondetail.visible = false
end
def update
super
if @window_monlist.active
@window_monlist.update
if Input.trigger?(Input::C)
# Ve o detalhe do monstro
if $game_system.monbook[@window_monlist.index + 1] and
!Wora_Monbook::NO_DATA_MONSTER.include?(@window_monlist.index + 1)
Sound.play_decision
@window_monlist.active = false
@window_monlist.visible = false
@window_mondetail.active = true
@window_mondetail.visible = true
@window_mondetail.write_detail(@window_monlist.index + 1)
else
Sound.play_cancel
end
elsif Input.trigger?(Input::B)
Sound.play_cancel
# Retorna
$scene = @from_menu ? Scene_Menu.new(Wora_Monbook::MENU_INDEX) :
Scene_Menu.new
end
elsif @window_mondetail.active
if Input.trigger?(Input::B)
Sound.play_cancel
@window_monlist.active = true
@window_monlist.visible = true
@window_mondetail.active = false
@window_mondetail.visible = false
end
end
end
def terminate
super
dispose_menu_background
@window_help.dispose
@window_monlist.dispose
@window_mondetail.dispose
end
end
#=============================================================
# * Window_Command (Inserindo novos registros)
#=============================================================
class Window_Command < Window_Selectable
unless method_defined? :wora_cominstool_wincom_ini
alias wora_cominstool_wincom_ini initialize
alias wora_cominstool_wincom_drawitem draw_item
end
#------------------------------------
# * Inicializa
#------------------------------------
def initialize(*args)
@disabled_commands = []
wora_cominstool_wincom_ini(*args)
end
#------------------------------------
# * Desenha_Item
#------------------------------------
def draw_item(*args)
wora_cominstool_wincom_drawitem(*args)
@disabled_commands[args[0]] = args[1].nil? || args[1] ? nil : true
end
#------------------------------------
# * Insere ~> Comando
#------------------------------------
def ins_command(index, text)
@commands.insert(index, text) # Insere novos comandos
@disabled_commands.insert(index, nil)
# Define nova altura para a janela
old_disabled_commands = @disabled_commands.dup
self.height = (@commands.size + @column_max - 1) / @column_max * WLH + 32
@item_max = @commands.size # Atualiza "@item_max" para atualizar corretamente
create_contents # Cria novo conteúdo porque o tamanho da janela mudou
refresh # Redesenha o conteúdo da janela
old_disabled_commands.each_index do |i|
if !old_disabled_commands[i].nil?
draw_item(i, false) # Desenha comandos desligados depois
end
end
end
#------------------------------------
# * Adicionando Comando
#------------------------------------
def add_command(text)
ins_command(@commands.size, text) # Adiciona novo comando para nova index
end
end
FranMAD- Moderador
- Mensagens : 1848
Fama : 172
Tópicos semelhantes
» Gold Menu Mod Mog Menu Yui
» Falco Save & Load Windows
» New Style Menu
» Menu Horizontal
» Menu Principal
» Falco Save & Load Windows
» New Style Menu
» Menu Horizontal
» Menu Principal
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos