1 Notificação de Level UP Seg 29 Out 2012, 01:46
Carlos
Administrador
Introdução:
Script que muda a notificação de level up. Mostra os atributos que foram aumentados, Mostra EXP ganha por cada personagem. Você pode definir os sons tocados quando um nível maior é alcançado.
Screenshots:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Como usar:
Apenas cole o script acima do main.
Script:
Créditos:
Feito por Blizzard
Script que muda a notificação de level up. Mostra os atributos que foram aumentados, Mostra EXP ganha por cada personagem. Você pode definir os sons tocados quando um nível maior é alcançado.
Screenshots:
[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]
Como usar:
Apenas cole o script acima do main.
Script:
- Código:
=begin
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Notificação de Level UP
# por Blizzard
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
Compatibilidade:
- Se usado com SDK 2.x. VAI corromper o saves antigos.
Pode causar pequenos problemas com os seguintes sistemas e talvez
precide de algumas modificações
- Sistemas exoticos de Batalha
- Sistemas exoticos de Skill
- Sistemas exoticos de atributos
Caracterísicas:
- Mostra os atributos que foram aumentados.
- Mostra EXP ganha por cada personagem.(compatível com o sistems
de Divisão Justa de EXP RTH, para mais detalhes veja abaixo)
- Você pode definir os sons tocados quando um nível maior é alcançado.
Configuração:
- LVLUP_SE - efeito sonoro tocado quando subir de nível
- LEARN_SE - efeito sonoro tocado quando aprender habilidade,
tenha em mente que o script so considera as skills
aprendidas quando se sobe de Nível
- WINDOW_BACK_OPACITY - configura a transparência do fundo da tela(0-255)
- NO_EXP_DISPLAY - deixe true para não mostrar EXP individual ganha
- OLD_EXP_DISPLAY - deixe true para usar o antigo mostrado de EXP ganha.
Usando o sistema de divisão Justa de EXP
Para usar esse sistemas, as seguintes medidas devem ser tomadas:
- O script de Divisão de EXP deve ficar acima deste script
- Procure por essa linha no script de Divisão de EXP
super(160, 0, 320, @treasures.size * 32 + 64 + ($game_party.actors.size * 32))
- troque por esta
super(160, 0, 320, @treasures.size * 32 + 64)
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
=end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Inicio da Configuração
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# RPG::AudioFile.new('Nome do Arquivo', VOLUME, VELOCIDADE)
LVLUP_SE = RPG::AudioFile.new('087-Action02', 80, 100)
LEARN_SE = RPG::AudioFile.new('106-Heal02', 80, 100)
WINDOW_BACK_OPACITY = 160
NO_EXP_DISPLAY = false
OLD_EXP_DISPLAY = false
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# Fim da Configuração
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
$easy_lvlup_notifier = true
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
def all_exp
return @exp
end
#--------------------------------------------------------------------------
def all_exp=(exp)
@exp = exp
end
#--------------------------------------------------------------------------
end
#==============================================================================
# Window_BattleResult
#==============================================================================
class Window_BattleResult < Window_Base
#--------------------------------------------------------------------------
alias easy_lvlup_notfier_refresh refresh
def refresh
if $tons_version != nil && $tons_version >= 4.02 &&
$game_system.WINDOW_BATTLERESULT || OLD_EXP_DISPLAY
easy_lvlup_notfier_refresh
else
self.contents.clear
x = 4
self.contents.font.color = system_color
cx = contents.text_size('Gained').width
self.contents.draw_text(x, 0, cx+4, 32, 'Gained')
x += cx + 4
self.contents.font.color = normal_color
cx = contents.text_size(@gold.to_s).width
self.contents.draw_text(x, 0, cx+4, 32, @gold.to_s)
x += cx + 4
self.contents.font.color = system_color
self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
(0...@treasures.size).each {|i| draw_item_name(@treasures[i], 4, (i+1)*32)}
end
end
#--------------------------------------------------------------------------
end
#==============================================================================
# Window_LevelUp
#==============================================================================
class Window_LevelUp < Window_Base
#--------------------------------------------------------------------------
attr_reader :limit
#--------------------------------------------------------------------------
def initialize(a, d)
if $tons_version != nil && $tons_version >= 4.98 &&
$game_system.CENTER_BATTLER
x = case $game_party.actors.size
when 1 then 240
when 2 then a.index * 320 + 80
when 3 then a.index * 160 + 80
when 4 then a.index * 160
end
else
x = a.index * 160
end
text = []
text.push(['Level:', d[0], a.level]) if d[0] != a.level
text.push([$data_system.words.hp[0, 3], d[1], a.maxhp]) if d[1] != a.maxhp
text.push([$data_system.words.sp[0, 3], d[2], a.maxsp]) if d[2] != a.maxsp
text.push([$data_system.words.str[0, 3], d[3], a.str]) if d[3] != a.str
text.push([$data_system.words.dex[0, 3], d[4], a.dex]) if d[4] != a.dex
text.push([$data_system.words.agi[0, 3], d[5], a.agi]) if d[5] != a.agi
text.push([$data_system.words.int[0, 3], d[6], a.int]) if d[6] != a.int
h = text.size * 24 + (NO_EXP_DISPLAY ? 32 : 56)
@limit, y = 320 - h, 480 - h + (h/64+1)*64
super(x, y, 160, h)
self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
self.contents = Bitmap.new(self.width - 32, self.height - 32)
if $fontface != nil
self.contents.font.name = $fontface
elsif $defaultfonttype != nil
self.contents.font.name = $defaultfonttype
end
self.contents.font.size, self.contents.font.bold = 20, true
unless NO_EXP_DISPLAY
self.contents.font.color = normal_color
self.contents.draw_text(0, 0, 128, 24, "#{a.exp - d[7]} EXP", 1)
end
text.each_index {|i|
index = NO_EXP_DISPLAY ? i : i + 1
self.contents.font.color = system_color
self.contents.draw_text(0, index*24, 128, 24, text[i][0])
self.contents.draw_text(80, index*24, 32, 24, '»')
self.contents.font.color = normal_color
self.contents.draw_text(0, index*24, 76, 24, text[i][1].to_s, 2)
if text[i][1] > text[i][2]
self.contents.font.color = Color.new(255, 64, 0)
else
self.contents.font.color = Color.new(0, 255, 64)
end
self.contents.draw_text(0, index*24, 128, 24, text[i][2].to_s, 2)}
end
#--------------------------------------------------------------------------
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
#--------------------------------------------------------------------------
alias main_lvlup_later main
def main
@lvlup_data = {}
@moving_windows, @pending_windows = [], []
(1...$data_actors.size).each {|i|
actor = $game_actors[i]
@lvlup_data[actor] = [actor.level, actor.maxhp, actor.maxsp, actor.str,
actor.dex, actor.agi, actor.int, actor.exp, actor.skills.clone]}
main_lvlup_later
(@moving_windows + @pending_windows).each {|win| win.dispose if win != nil}
end
#--------------------------------------------------------------------------
alias start_phase5_lvlup_later start_phase5
def start_phase5
start_phase5_lvlup_later
@skill_texts = []
$game_party.actors.each {|actor|
actor.remove_states_battle
if @lvlup_data[actor][0, 7] != [actor.level, actor.maxhp, actor.maxsp,
actor.str, actor.dex, actor.agi, actor.int]
@pending_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
@skill_texts.push('')
new_skills = actor.skills - @lvlup_data[actor][8]
if new_skills.size > 0
new_skills.each {|id|
@skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}
end
elsif @lvlup_data[actor][7] != actor.exp && !NO_EXP_DISPLAY
@moving_windows.push(Window_LevelUp.new(actor, @lvlup_data[actor]))
end}
end
#--------------------------------------------------------------------------
def update_phase5
if @phase5_wait_count > 0
@phase5_wait_count -= 1
if @phase5_wait_count == 0
@result_window.visible, $game_temp.battle_main_phase = true, false
@status_window.refresh
end
return
end
@moving_windows.each {|win|
win.y -= [win.y - win.limit].min}
if Input.trigger?(Input::C)
@result_window.visible = false
if @skill_texts.size > 0
text = @skill_texts.shift
if text == ''
$game_system.se_play(LVLUP_SE)
@moving_windows.push(@pending_windows.shift)
@help_window.visible = false
else
$game_system.se_play(LEARN_SE)
@help_window.set_text(text, 1)
end
else
battle_end(0)
end
end
end
#--------------------------------------------------------------------------
end
[/spoiler]
Créditos:
Feito por Blizzard