por Dook Qui Set 20, 2012 11:44 am
Isso já está virando flod, então ta ae o script editado:
- Código:
#==============================================================================
# ** HUD
#------------------------------------------------------------------------------
# By Marlos Gama
# 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(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)
# 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 <= 99999999
self.contents.draw_text(140, 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 <= 99999999
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
Eu não gosto de dar tudo de mão beijada, mais o topico já estava virando flod.
@EDIT
Caso você não tenha o script que muda os parâmetros mude:
- Código:
if $game_party.actors[0].level <= 99999999
Para:
- Código:
if $game_party.actors[0].level <= 98
NOTA: Tem que ser 98 porque na data base do script o level máximo é 98.
Isso é pelo que eu sei, se você quiser pode testar com o número 99, pode dar até certo.
Última edição por ŤHΞ•ИΞщ•MاŤΞŘ em Qui Set 20, 2012 12:50 pm, editado 3 vez(es)