Belxebu Posted April 20, 2008 Share Posted April 20, 2008 (edited) Window_HUDDescrizioneUn bellissimo HUD,script riadattato da uno vecchio per l'XP.RICHIEDE LA TOTAL CONVERSION AutoreRinnegatamante(ovvero io,lo script reale non so di chi sia) Allegatihttp://img155.imageshack.us/img155/5398/hudgraphiczx7.pnghttp://img166.imageshack.us/img166/9620/hudgraphic1aj4.pnghttp://img166.imageshack.us/img166/4182/hudgraphic2dx6.pnghttp://img155.imageshack.us/img155/9849/hudgraphic3lh9.png http://rapidshare.com/files/108916679/System.rar.html Istruzioni per l'usoCopiate le 4 immagini qui sopra in Graphics/Pictures chiamandole in seguenza hud graphic,hud graphic1,hud graphic2,hud graphic3,le tre icone presenti nell'archivio da scaricare invece vanno in Graphics/System e copiate il codice sotto la total conversion. #============================================================================== # ** Window_HUD modificato e adattato da Rinnegatamante #------------------------------------------------------------------------------ # This class is used to display HP, SP and Gold on the map. #============================================================================== class Window_HUD < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(-16, -16, 672, 150) self.contents = Bitmap.new(width-32, height-32) self.opacity = 0 self.contents.font.size = 14 self.contents.font.name = "Monotype Corsiva" @actors = [] @old_hp = [] @old_sp = [] @old_exp = [] @old_level = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) @old_hp.push(@actors[i].hp) @old_sp.push(@actors[i].sp) @old_exp.push(@actors[i].now_exp) @old_level.push(@actors[i].level) end @old_gold = $game_party.gold refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color #self.contents.draw_text(6, 0, 32, 14, $data_system.words.hp + "") #self.contents.draw_text(6, 14, 32, 14, $data_system.words.sp + "") self.contents.draw_text(6, 28, 32, 14, "") #self.contents.draw_text(6, 42, 32, 14, $data_system.words.gold + "") self.contents.font.color = normal_color #Images case @actors.size when 1 bitmap = Cache.picture("HUD Graphic") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 2 bitmap = Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 3 bitmap = Cache.picture("HUD Graphic2") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) when 4 bitmap = Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) when 5 bitmap = Cache.picture("HUD Graphic3") self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 640, 500)) end #bitmap = Cache.picture("HUD Graphic") #self.contents.blt(0, 0, bitmap, Rect.new(0, 10, 500, 500)) bitmap = Cache.icon("HP Symbol") self.contents.blt(0, 15, bitmap, Rect.new(0, 0, 28, 24)) bitmap = Cache.icon("SP Symbol") self.contents.blt(0, 35, bitmap, Rect.new(0, 0, 24, 24)) bitmap = Cache.icon("EXP Symbol") self.contents.blt(-5, 55, bitmap, Rect.new(0, 0, 37, 24)) bitmap = Cache.icon("Hero") self.contents.blt(25, 67, bitmap, Rect.new(0, 0, 24, 24)) if $game_switches[99] == true if $game_variables[99] == 0 self.contents.draw_text(x, y, 210, 14, $game_party.item_number[1]) elsif $game_variables[8] == 1 self.contents.draw_text(x, y, 210, 14, $game_party.item_number(2)) elsif $game_variables[8] ==2 self.contents.draw_text(x, y, 110, 14, @actors[i].name) end end x = 32 for i in 0...@actors.size y = 6 self.contents.draw_text(x, y, 110, 14, @actors[i].name) self.contents.draw_text(x, y, 110, 14, "Lv: #{@actors[i].level}", 2) y += 16 draw_hp_bar(@actors[i], x, y, 112, 5) y += 19 draw_sp_bar(@actors[i], x, y, 104, 5) y += 19 draw_exp_bar(@actors[i], x, y, 88, 5) y += 19 x += 130 end x = 32 self.contents.draw_text(40, 73, 110, 14, $game_party.gold.to_s) self.contents.draw_text(75, 73, 110, 14, "Guil") end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if @actors.size != $game_party.actors.size @actors = [] for i in 0...$game_party.actors.size @actors.push($game_party.actors[i]) end refresh return end for i in 0...@actors.size if @old_hp[i] != @actors[i].hp or @old_sp[i] != @actors[i].sp or @old_exp[i] != @actors[i].now_exp or @old_level[i] != @actors[i].level or @old_gold != $game_party.gold refresh @old_hp[i] = @actors[i].hp @old_sp[i] = @actors[i].sp @old_exp[i] = @actors[i].now_exp @old_level[i] = @actors[i].level @old_gold = $game_party.gold end end end #-------------------------------------------------------------------------- # * Draw HP Bar #-------------------------------------------------------------------------- def draw_hp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(255, 0, 0) c2 = Color.new(155, 0, 0) e1 = actor.hp e2 = actor.maxhp self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255)) w = width * e1 / e2 for i in 0..height r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a)) end end #-------------------------------------------------------------------------- # * Draw SP Bar #-------------------------------------------------------------------------- def draw_sp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(0, 0, 255) c2 = Color.new(0, 0, 155) e1 = actor.mp e2 = actor.maxmp self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0)) w = width * e1 / e2 for i in 0..height r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a)) end end #-------------------------------------------------------------------------- # * Draw EXP Bar #-------------------------------------------------------------------------- def draw_exp_bar(actor, x, y, length, thick) width = length height = thick c1 = Color.new(158, 208, 9) c2 = Color.new(58, 108, 0) e1 = actor.now_exp e2 = actor.next_exp if actor.next_exp == 0 e1 = 1 e2 = 1 end self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255)) self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255)) w = width * e1 / e2 for i in 0..height r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a)) end end end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs map screen processing. #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # * Object Aliasing #-------------------------------------------------------------------------- alias hud_scene_map_main main alias hud_scene_map_update update #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def main @HUD = Window_HUD.new hud_scene_map_main @HUD.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @HUD.update hud_scene_map_update end end Screenshot http://img253.imageshack.us/img253/471/hudscreentw4.png Edited February 2, 2009 by Eikichi Link to comment Share on other sites More sharing options...
Pat94 Posted April 25, 2008 Share Posted April 25, 2008 posso sapere come si fa a disattivare l'HU quando n serve? Link to comment Share on other sites More sharing options...
Ken Shiro X Posted October 15, 2008 Share Posted October 15, 2008 Mi da un errore.. manca l'iconia Hero dice. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now