Não tem como tirar o nome de cima da barra de fome e por o nome Fome no lugar do nome do Heroi?? Isso ia me ajudar bastante 

Bom não só profissional em rgss3 mais com base no que eu sei creio que isso posa te ajudarLordSparda escreveu:Não tem como tirar o nome de cima da barra de fome e por o nome Fome no lugar do nome do Heroi?? Isso ia me ajudar bastante
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#|Autor: RD12| Script de Fome 07/06/12
#
# Acesse: www.aldeiarpgbr.com Para mais scripts meus
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# A fome vai de 0 a 100, quanto maior o valor mais com fome o membro estará
# Se a fome chegar no 100 o membro irá fifcar com hp=0 (morre)
#
# Para um item diminuir a fome bote em sua Nota: -fome valor
# E para um item aumentar a fomt, bote na nota: +fome valor
module Fome
#Tempo em segundos que irá aumentar a fome
Segundos = 30
#Valor que irá aumentar de fome quando o tempo acima chegar
Valor = 5 # A Fome vai até 100, aí morre
#Modifique a posição das Huds aqui
HUDs_x = 1
HUDs_y = 190
Texto = "Fome"
end
class Hud_Fome < Sprite
def initialize
super
self.bitmap = bitmap = Bitmap.new(100,300)
self.bitmap.font.size = 14
self.bitmap.font.name = "Segoe UI"
self.x = Fome::HUDs_x
self.y = Fome::HUDs_y
refresh
end
def update
super
refresh
end
def refresh
self.bitmap.clear
if $game_party.members.size >= 1
#---------------------------------------------------------------------------
#Hud de Fome do 1° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,21,base,rect)
self.bitmap.draw_text(10, 0, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[0]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,21,base,rect)
end
if $game_party.members.size >= 2
#---------------------------------------------------------------------------
#Hud de Fome do 2° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45,base,rect)
self.bitmap.draw_text(10, 24, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[1]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45,base,rect)
end
if $game_party.members.size >= 3
#---------------------------------------------------------------------------
#Hud de Fome do 3° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+24,base,rect)
self.bitmap.draw_text(10, 24*2, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[2]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+24,base,rect)
end
if $game_party.members.size >= 4
#---------------------------------------------------------------------------
#Hud de Fome do 4° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+(24*2),base,rect)
self.bitmap.draw_text(10, 24*3, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[3]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+(24*2),base,rect)
end
if $game_party.members.size >= 5
#---------------------------------------------------------------------------
#Hud de Fome do 5° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+(24*3),base,rect)
self.bitmap.draw_text(10, 24*4, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[4]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+(24*3),base,rect)
end
if $game_party.members.size >= 6
#---------------------------------------------------------------------------
#Hud de Fome do 6° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+(24*4),base,rect)
self.bitmap.draw_text(10, 24*5, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[5]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+(24*4),base,rect)
end
if $game_party.members.size >= 7
#---------------------------------------------------------------------------
#Hud de Fome do 7° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+(24*5),base,rect)
self.bitmap.draw_text(10, 24*6, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[6]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+(24*5),base,rect)
end
if $game_party.members.size >= 8
#---------------------------------------------------------------------------
#Hud de Fome do 8° Membro - .members[0]
#---------------------------------------------------------------------------
base = Cache.picture("Fome_Base")
rect = Rect.new(0,0,base.width,base.height)
self.bitmap.blt(10,45+(24*6),base,rect)
self.bitmap.draw_text(10, 24*7, 100, 32, Fome::Texto, 0)
@actor = $game_party.members[7]
if @actor.fome >= 100
@actor.hp = 0
hud_name = "Fome_100"
else
hud_name = "Fome_Hud"
end
base = Cache.picture(hud_name)
rect = Rect.new(0,0,base.width * @actor.fome / 100,base.height)
self.bitmap.blt(10,45+(24*6),base,rect)
end
end
end
#Bota a HUD no mapa e atualiza ela de acordo com o tempo configurado
class Scene_Map
alias rd12_main main
def main
$Fome = Hud_Fome.new
@tocomfome = 0
rd12_main
$Fome.dispose
end
alias rd12_update update
def update
if Graphics.frame_count % 80 == 0
@tocomfome += 1
end
if @tocomfome == Fome::Segundos
for i in 0..$game_party.members.size-1
$game_party.members[i].fome = (Fome::Valor)
end
@tocomfome = 0
end
rd12_update
end
end
# Adiciona o $game_party.members[x].fome
# Pra adicionar mais fome: $game_party.members[x].fome = quantidade
# Pra remover fome: $game_party.members[x].fome = -quantidade
class Game_Actor < Game_Battler
alias rd12_initialize initialize
def initialize(actor_id)
@fome = 0
rd12_initialize(actor_id)
end
def fome=(arg)
@fome = 0 if @fome == nil
@fome += arg
$Fome.refresh
end
def fome
@fome
end
end
#Modifica o método para ganhar ou perder Fome
class Scene_Item < Scene_ItemBase
def use_item_to_actors
item_target_actors.each do |target|
arg = item.note.split
if arg[0] == "-fome"
target.fome = -arg[1].to_i
#Mostra mensagem com a fome atual
msgbox("Fome atual: #{target.fome}/100")
end
if arg[0] == "+fome"
target.fome = arg[1].to_i
#Mostra mensagem com a fome atual
msgbox("Fome atual: #{target.fome}/100")
end
item.repeats.times { target.item_apply(user, item) }
end
end
end
|
|