Perfect Hud [NP MASTER / UNP]
Modelo 1:
Modelo 2:
Modelo 1:
Modelo 2:
Criado:
- Criado por Faabinhuu;
- Mostra: HP / MP / Gold / Guilda / Exp / Nome / Level / Face
- Coroa para quem quiser por algum tipo de cash
Opcional:
Faça uma condição de classe para que cada classe seja adicionada uma FACE.
Script = Substitua o [WIN] Hud por este:
- Código:
#==============================================================================
# ** HUD
#------------------------------------------------------------------------------
# By Valentine
# Modificado por Fabinhuu ;
#------------------------------------------------------------------------------
class Hud < Window_Base
def initialize
super(-16,-16,500,200)#(320,350,600,600)
self.back_opacity = 120
self.contents = Bitmap.new(width - 32, height - 32)
self.windowskin = RPG::Cache.windowskin("Blank")
refresh
end
def update
super
refresh if something_changed?
end
def something_changed?
return true if @old_exp != @actor.now_exp
return true if @old_hp != @actor.hp
return true if @old_sp != @actor.sp
return true if @old_level != @actor.level
return true if @old_name != @actor.name
return true if @old_name != @old_gold
return false
end
def refresh
self.contents.clear
@actor = $game_party.actors[0]
@old_exp = @actor.now_exp
@old_hp = @actor.hp
@old_sp = @actor.sp
@old_level = @actor.level
@old_name = @actor.name
@old_gold = $game_party.item_number(Item_Ouro::Item_Id.to_i).to_s
self.contents.clear
shud3 = RPG::Cache.picture("Face")
shud1 = shud3.width
shud2 = shud3.height
shud4 = Rect.new(0,0,shud1,shud2)
self.contents.blt(15,20,shud3,shud4)
hud3 = RPG::Cache.picture("hud")
hud1 = hud3.width
hud2 = hud3.height
hud4 = Rect.new(0,0,hud1,hud2)
self.contents.blt(0,0,hud3,hud4)
self.contents.font.size = 16
rect = Rect.new(-90, 16+1, self.contents.width - 8, 32)
self.contents.font.color = Color.new(0,0,0)
self.contents.draw_text(rect, "#{@old_name}", 1)
self.contents.draw_text(222, 18, 132, 32, "#{@actor.level}")
self.contents.draw_text(120, -5, 132, 32, "#{@old_gold}")
rectc = Rect.new(90, 12+1, self.contents.width - 8, 32)
self.contents.font.color = Color.new(0,255,255)
self.contents.draw_text(rectc, "#{@actor.guild}", 1)
# Hp
self.contents.font.color = Color.new(0,0,0)
hpbar = RPG::Cache.picture("HP")
hpbarwidth = hpbar.width * @actor.hp / @actor.maxhp
hpbarheight = hpbar.height
hpbar_rect = Rect.new(0,0,hpbarwidth,hpbarheight)
self.contents.blt(118,49,hpbar,hpbar_rect)
if $game_party.actors[0].level <= 21
self.contents.draw_text(155, 38, 132, 32, "#{@actor.hp}/#{@actor.maxhp}")
else
self.contents.draw_text(227, 28, 132, 32, "#{@actor.hp}/#{@actor.maxhp}")
end
# Sp
mpbar = RPG::Cache.picture("MP")
mpbarwidth = mpbar.width * @actor.sp / @actor.maxsp
mpbarheight = mpbar.height
mpbar_rect = Rect.new(0,0,mpbarwidth,mpbarheight)
self.contents.blt(118,69,mpbar,mpbar_rect)
if $game_party.actors[0].level <= 34
self.contents.draw_text(155, 58, 132, 32, "#{@actor.sp}/#{@actor.maxsp}")
xpbar = RPG::Cache.picture("XP")
xpbarwidth = xpbar.width * @actor.now_exp / @actor.next_exp
xpbarheight = xpbar.height
xpbar_rect = Rect.new(0,0,xpbarwidth,xpbarheight)
self.contents.blt(33,91,xpbar,xpbar_rect)
self.contents.draw_text(120, 81, 132, 32, "#{@actor.now_exp}/#{@actor.next_exp}")
end
end
end
##49 48
class Scene_Map
alias hud_main main
def main
@Hud = Hud.new
hud_main
@Hud.dispose
end
alias hud_update update
def update
hud_update
@Hud.update
end
end
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
Se gostou do modelo 2 mude essa linha
- Código:
rectc = Rect.new(90, 12+1, self.contents.width - 8, 32)
self.contents.font.color = Color.new(0,255,255)
self.contents.draw_text(rectc, "#{@actor.guild}", 1)
por essa:
- Código:
rectc = Rect.new(75, 11+1, self.contents.width - 8, 32)
self.contents.font.color = Color.new(255,0,0)
self.contents.draw_text(rectc, "#{@actor.guild}", 1)
Barras:
- Spoiler:
HP
MP
XP
Se quiser deixar o nome da guild em vermelho como está no segundo
Mude (azul claro)
- Código:
self.contents.font.color = Color.new(0,255,255)
- Código:
self.contents.font.color = Color.new(255,0,0)
Pasta Pictures: [Nome da Imagem: "hud" sem aspas]
(Modelo 1)
- Spoiler:
- Spoiler:
Pasta Pictures: [Nome da Imagem: "face" sem aspas]
- Spoiler:
Ao usar dê os creditos :)
Creditos:
Faabinhuu;
BOM PROVEITO !!
Última edição por Faabinhuu ; em Qua Mar 07, 2012 2:55 pm, editado 5 vez(es)