[Script] [ACE] Angelo HUD v2.5 - VXA - Hud Nhìn Cũng Được !

nhoxboy73nhoxboy73 Posts: 776Registered
Angelo HUD v2.5 - VXA - Hud Nhìn Cũng Được !

SS :angelohud25.jpg
Script đây :
#==============================================================================
# ■ Angelo HUD v2.5
#------------------------------------------------------------------------------
#  Created by Brandon *** 8(13) customization options *** Plug N' Play!
#==============================================================================

            #==================================================#
            #                   ▼ UPDATE LOG                   #
            #--------#--------------------------------#--------#
                     #   v1   ● first release.        #
                     #   v1.2 ● not released,         #
                     #        ● add HUDVISIBLESWITCH  #
                     #        ● add HP, MPSWITCH      #
                     #   v1.5 ● not released,         #
                     #        ● add FONT NAME & SIZE  #
                     #   v1.8 ● not released,         #
                     #        ● add WEAPONSWITCH      #
                     #   v1.9 ● not released          #
                     #        ● *BUG* Lag             #
                     #        ● *BUG* Texts disappea- #
                     #          rence.                #
                     #   v2   ● second release        #
                     #        ● fixed v1.9 *BUGS*     #
                     #        ● add R, G, B _BLA &    #
                     #          _BDA                  #
                     #        ● *BUG* Transfer Player #
                     #          crash.                #
                     #   v2.1 ● third release         #
                     #        ● fixed v2 *BUG*        #
                     #        ● changed update method #
                     #        ● changed Scene_Map     #
                     #          update and dispose    #
                     #          methods.              #
                     #        ● *BUG* Lag             #
                     #   v2.2 ● fourth release        #
                     #        ● fixed v2.1 *BUG*      #
                     #        ● now HUD will only re- #
                     #          fresh when the stats  #
                     #          change.               #
                     #        ● improved performance  #
            #--------#--------------------------------#--------#
            #   v2.5 ● current release                         #
            #        ● improved stability                      #
            #        ● added a option to link with other Angelo#
            #          scripts                                 #
            #        ● --------------------------------        #
            #        ● added gold count if Angelo Menu is pre- #
            #          sent.                                   #
            #==================================================#
            #        ▼ THANKS TO:                              #
            #               ● King of Sadism                   #
            #               ● YF                               #
            #               ● Valiant                          #
            #               ● Amy Pond                         #
            #               ● Jet                              #
            #==================================================#

#------------------------------------------------------------------------------
# ▼ Customization Options
#----------------------------#-------------------------------------------------
#   ● HUD_VISIBLE_SWITCH    #
#- - - - - - - - - - - - - #
#  Define the switch that you want to use to turn the HUD 'ON' or 'OFF', by de-
#  fault it's 1. When the switch is turned 'ON' the HUD will be turned 'ON' too,
#  and when the switch is turned 'OFF' the HUD is turned 'OFF' too.
#------------------------------#-----------------------------------------------
#   ● FONT_NAME & FONT_SIZE   #
#- - - - - - - - - - - - - - #
#  In FONTNAME you define the font that you want to use with the HUD information.
#  In FONTSIZE you define the size of the font you've decided in FONTNAME. 
#-------------------#----------------------------------------------------------
#   ● HP_SWITCH    #
#- - - - - - - - -#
#  Define the switch that you want to use to turn the HP Display 'ON' or 'OFF',
#  by default it's 2. When the switch is turned 'ON' the HP Display will be 
#  turned 'ON' too, and when the switch is turned 'OFF' the HP Display is turned
#  'OFF' too.
#-------------------#----------------------------------------------------------
#   ● MP_SWITCH    #
#- - - - - - - - -#
#  Define the switch that you want to use to turn the MP Display 'ON' or 'OFF',
#  by default it's 3. When the switch is turned 'ON' the MP Display will be 
#  turned 'ON' too, and when the switch is turned 'OFF' the MP Display is turned
#  'OFF' too.
#------------------------------#-----------------------------------------------
#   ● WEAPON_AND_NAME_SWITCH  #
#- - - - - - - - - - - - - - #
#  Define the switch that you want to use to turn the Currently Equipped Weapon
#  Display and Actor Name 'ON' or 'OFF', by default it's 4. When the switch is 
#  turned 'ON' this option will be turned 'ON' too, and when the switch is  
#  turned 'OFF' this option is turned 'OFF' too.
#---------------------#--------------------------------------------------------
#   ● R, G, B _BLA   #
#- - - - - - - - - -#
#  Define the amount of each color(Red, Green, Blue) presented in the lighter a-
#  rea of the Back of the HUD. By default it's black which means that R, G and B
#  are setted to '0'.
#---------------------#--------------------------------------------------------
#   ● R, G, B _BDA   #
#- - - - - - - - - -#
#  Define the amount of each color(Red, Green, Blue) presented in the darker a-
#  rea of the Back of the HUD. By default it's black which means that R, G and B
#  are setted to '0'.
#------------------------------------------------------------------------------
# ▼ Post Scriptum
#------------------------------------------------------------------------------
#   ● "I want to turn all the HUD or only some part of her at the same time with
#      the same switch, it's possible?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
#              Yes, just set the parts you wanted in the same
#              switch as the HUDVISIBLESWITCH.
#------------------------------------------------------------------------------
#   ● "Which values you recommend to use in FONTSIZE?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
#              Use between 8 and 18, or the text will be too
#              small or too bigger. But some times it depends
#              on your FONTNAME.
#------------------------------------------------------------------------------
#   ● "Which values you recommend to use in R, G, B _BLA and _BDA?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
#              You MUST use ONLY values between 0 and 255.
#------------------------------------------------------------------------------

module ANGELO

  HUD_VISIBLE_SWITCH = 1

  FONT_NAME = "Times New Roman"
  FONT_SIZE = 16

  HP_SWITCH = 2
  MP_SWITCH = 3
  WEAPON_AND_NAME_SWITCH = 4
  
  #=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT
  #       * * *  IF YOU ARE USING OTHER ANGELO SCRIPTS, ENABLE THIS  * * *
  #=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT=======IMPORTANT
  
  ENABLE_ANGELO_LINK = false

  R_BLA = 0
  G_BLA = 0
  B_BLA = 0

  R_BDA = 0
  G_BDA = 0
  B_BDA = 0

end

#------------------------------------------------------------------------------
#      !!!!DO NOT EDIT FROM HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!!
#------------------------------------------------------------------------------

include ANGELO

class AngeloHUD < Window_Base
  def initialize
        super(-16, -16, Graphics.width + standard_padding * 2, Graphics.height + standard_padding * 2)
        self.opacity = 0
        $AngeloHUD = true
        refresh
    end

  def refresh
    self.contents.clear
    self.contents.font = Font.new(FONT_NAME, FONT_SIZE)
    actor = $game_party.members[0]
    @hp = actor.hp
    @mp = actor.mp
    @mhp = actor.mhp
    @mmp = actor.mmp
    index = 0
    colorback = Color.new(R_BLA, G_BLA, B_BLA, 150)
    colorback2 = Color.new(R_BDA, G_BDA, B_BDA, 190)
 
    if $game_switches[HUD_VISIBLE_SWITCH] == true

        unless $game_switches[HP_SWITCH] == false
          self.contents.fill_rect(3, 364, 238, 16, colorback)
          self.contents.fill_rect(3, 368, 238, 8, colorback2)
          draw_gauge(19, 353, 200, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
          draw_text(40, 354, 100, 32, Vocab::hp_a)
          draw_current_and_max_values(90, 358, 116, actor.hp, actor.mhp, hp_color(actor), normal_color)
        end

        unless $game_switches[MP_SWITCH] == false
          self.contents.fill_rect(3, 395, 238, 16, colorback)
          self.contents.fill_rect(3, 399, 238, 8, colorback2)
          draw_gauge(19, 384, 200, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
          draw_text(40, 385, 100, 32, Vocab::mp_a)
          draw_current_and_max_values(90, 389, 116, actor.mp, actor.mmp, mp_color(actor), normal_color)
        end

        unless $game_switches[WEAPON_AND_NAME_SWITCH] == false
          self.contents.fill_rect(-64 + 85, 376, 125, 19, colorback)
          self.contents.fill_rect(-64 + 90, 376, 115, 19, colorback2)
          draw_actor_name(actor,  -40 + 92, 373, 100)
              return unless actor.equips[index]
          draw_icon(actor.equips[index].icon_index, -64 + 92, 372, true)#(actor.equips[index], -64 + 92, 376, true)
        end

        end
      def hud_changed
        return true if @hp != $game_party.members[0].hp
        return true if @mp != $game_party.members[0].mp
        return true if $game_switches[HP_SWITCH] != "OFF"
        return true if $game_switches[MP_SWITCH] != "OFF"
        return true if $game_switches[WEAPON_AND_NAME_SWITCH] != "OFF"
        return true if $game_switches[HUD_VISIBLE_SWITCH] != "OFF"
        return false
        end      
      end
      
    def update
        super
        refresh if hud_changed      
      end
    end

    class Scene_Map
      alias hud_main create_all_windows
      
      def create_all_windows
        create_hud_window
        hud_main
      end
      def create_hud_window
        @hud = AngeloHUD.new
        if ENABLE_ANGELO_LINK && $Menu_Angelo == true
         @gold = Window_Gold.new
         @gold.opacity = 0
         @gold.x = 544 - @gold.contents.width - 10
         @gold.y = 375
        end
      end
    end
Nguồn : http://www.rpgmakervxace.net
Sign In or Register to comment.