Introdução
Iae galera, hoje trago a você a nova versão da HUD para o np master, a Diverse Netplay Master Hud.
Screens
Script
Imagens requeridas
HUD: https://i.imgur.com/FVH6e.png
XP-BAR: https://i.imgur.com/9fCHo.pngMP-BAR: https://i.imgur.com/pYWDW.png
HP-BAR: https://i.imgur.com/fw6nE.png
Créditos
Marlos Gama pela base;
A mim por criar e postar.
Iae galera, hoje trago a você a nova versão da HUD para o np master, a Diverse Netplay Master Hud.
Screens
Script
- Código:
#==============================================================================
# ** HUD
#------------------------------------------------------------------------------
# By Hatsuki Morturo
#------------------------------------------------------------------------------
class Hud < Sprite
def initialize
super()
self.bitmap = bitmap = Bitmap.new(500-5,120-10)
self.x = +5+4
self.y = -5-3
self.z = 999
refresh
end
def update
super
refresh if something_changed?
end
def refresh
@actor = $game_party.actors[0]
@old_exp = @actor.now_exp
@old_hp = @actor.hp
@old_sp = @actor.sp
self.bitmap.clear
self.bitmap.font.size = 14
self.bitmap.font.name = "Segoe UI"
# Base Geral
hud3 = RPG::Cache.picture("HUD")
hud1 = hud3.width
hud2 = hud3.height
hud4 = Rect.new(0,0,hud1,hud2)
self.bitmap.blt(1,16,hud3,hud4)
# Hp
self.bitmap.font.color = Color.new(0,0,0)
hpbar = RPG::Cache.picture("HP-BAR")
hpbarwidth = hpbar.width * @actor.hp / @actor.maxhp
hpbarheight = hpbar.height
hpbar_rect = Rect.new(0,0,hpbarwidth,hpbarheight)
self.bitmap.blt(26-8,19+11,hpbar,hpbar_rect)
# Valor HP
self.bitmap.font.color = Color.new(0,0,0)
hprect2 = Rect.new(-102-4-26-12, 30-10, self.bitmap.width - 8, 32)
self.bitmap.draw_text(hprect2, "#{@actor.hp}/#{@actor.maxhp}", 1)
sprect2 = Rect.new(-102-4-26-80, 30-10, self.bitmap.width - 8, 32)
self.bitmap.draw_text(sprect2, "HP:", 1)
# Sp
self.bitmap.font.color = Color.new(0,0,0)
mpbar = RPG::Cache.picture("MP-BAR")
mpbarwidth = mpbar.width * @actor.sp / @actor.maxsp
mpbarheight = mpbar.height
mpbar_rect = Rect.new(0,0,mpbarwidth,mpbarheight)
self.bitmap.blt(26-8,57-13,mpbar,mpbar_rect)
# Valor SP
self.bitmap.font.color = Color.new(0,0,0)
sprect2 = Rect.new(-102-4-26-12, 48-14, self.bitmap.width - 8, 32)
self.bitmap.draw_text(sprect2, "#{@actor.sp}/#{@actor.maxsp}", 1)
sprect2 = Rect.new(-102-4-26-80, 48-14, self.bitmap.width - 8, 32)
self.bitmap.draw_text(sprect2, "MP:", 1)
# Exp
self.bitmap.font.color = Color.new(0,0,0)
if $game_party.actors[0].level != 99
xpbar = RPG::Cache.picture("XP-BAR")
xpbarwidth = xpbar.width * @actor.now_exp / @actor.next_exp
xpbarheight = xpbar.height
xpbar_rect = Rect.new(0,0,xpbarwidth,xpbarheight)
self.bitmap.blt(26-8,76-18,xpbar,xpbar_rect)
end
# Valor Exp
self.bitmap.font.color = Color.new(0,0,0)
exprect2 = Rect.new(-102-4-26-12, 66-18, self.bitmap.width - 8, 32)
self.bitmap.draw_text(exprect2, "#{@actor.now_exp}/#{@actor.next_exp}", 1)
sprect2 = Rect.new(-102-4-26-80, 66-18, self.bitmap.width - 8, 32)
self.bitmap.draw_text(sprect2, "EXP:", 1)
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 false
end
end
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.refresh if @Hud.something_changed?
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
Imagens requeridas
HUD: https://i.imgur.com/FVH6e.png
XP-BAR: https://i.imgur.com/9fCHo.pngMP-BAR: https://i.imgur.com/pYWDW.png
HP-BAR: https://i.imgur.com/fw6nE.png
Créditos
Marlos Gama pela base;
A mim por criar e postar.
Última edição por Hatsuki Morturo em Ter Ago 02, 2011 1:52 pm, editado 4 vez(es)