Raven BellamyDom Feb 10, 2013 8:06 pm
Usuario Nv9
Este script muestra la barra de HP y Sp del enemigo.
Recuerden Colocar sobre el main okno
Script:
Creditos: no se porque del post que lo saque no estaban los creditos.
Recuerden Colocar sobre el main okno
Script:
- Código:
#------------------------------------------------------------------------------
# Script Barras Hp y Sp del Enemigo
#------------------------------------------------------------------------------
class Window_Help < Window_Base
def set_enemy(actor)
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
carol3_draw_hp_bar(actor, 284, 0)
carol3_draw_sp_bar(actor, 460, 0)
@text = nil
self.visible = true
end
def carol3_draw_hp_bar(actor, x, y, width = 128)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.hp / actor.maxhp
self.contents.fill_rect(x, y+18, w,1, Color.new(255, 96, 96, 255))
self.contents.fill_rect(x, y+19, w,1, Color.new(255, 0, 0, 255))
self.contents.fill_rect(x, y+20, w,1, Color.new(128, 0, 0, 255))
self.contents.fill_rect(x, y+21, w,1, Color.new(0, 0, 0, 255))
self.contents.draw_text(x,y,128,32,$data_system.wo rds.hp,1)
self.contents.font.color = normal_color
end
def carol3_draw_sp_bar(actor, x, y, width = 128)
self.contents.font.color = system_color
self.contents.fill_rect(x-1, y+17, width+2,6, Color.new(0, 0, 0, 255))
w = width * actor.sp / actor.maxsp
self.contents.fill_rect(x, y+18, w,1, Color.new(128, 255, 255, 255))
self.contents.fill_rect(x, y+19, w,1, Color.new(0, 255, 255, 255))
self.contents.fill_rect(x, y+20, w,1, Color.new(0, 192, 192, 255))
self.contents.fill_rect(x, y+21, w,1, Color.new(0, 128, 128, 255))
self.contents.draw_text(x,y,128,32,$data_system.wo rds.sp,1)
self.contents.font.color = normal_color
end
end
Creditos: no se porque del post que lo saque no estaban los creditos.