| Assunto: Nome acima do char Dom Set 23, 2012 11:29 pm | |
| Aew, Mais um script para voc^s, dessa vez um de nome acima do char e level ^^ Itrodução: o Script mostra o nome e o level do char acima dele Lag Gerado: NuloPlataforma: RMVXA|O script:| - Código:
-
#nome em cima do char # #BY:Samuka_Maker # #E RD12 com me incentivar# ##########################
module Player_Name Font_Name = "Segoe UI" Font_Size = 14 Font_Color = Color.new(255,0,0) Show_Level = true end
class Player_Name_Text < Sprite_Base def initialize super() self.bitmap = Bitmap.new(100, 24) refresh end
def refresh self.bitmap.clear self.x = $game_player.screen_x - 50 self.y = $game_player.screen_y - 55 self.bitmap.font.size = Player_Name::Font_Size self.bitmap.font.name = Player_Name::Font_Name self.bitmap.font.color = Player_Name::Font_Color actor = $game_party.members[0] if Player_Name::Show_Level == true self.bitmap.draw_text(self.bitmap.rect, "#{actor.name} / Lvl: [#{actor.level}]", 1) else self.bitmap.draw_text(self.bitmap.rect, actor.name, 1) end end end
class Sprite_Character < Sprite_Base alias qicon_alias_initialize initialize def initialize(*args) @q_icon = nil @npc_icon = nil @npc_name = nil @font_color = nil qicon_alias_initialize(*args) end alias init initialize def initialize(view, char) init(view, char) if @character.is_a?(Game_Player) @player_name = Player_Name_Text.new end end alias qicon_alias_update update def update qicon_alias_update if @character.is_a?(Game_Player) and @player_name != nil @player_name.refresh end end end |
|