Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Name of script : Darksky Hud
- # Version : v0.1
- # Author : Darksky
- # Website : www.taotrochoi.com
- # Terms of Use : Can be use in a commercial project
- # Credit me :) if you want to use this script. Thanks
- #===============================================================================
- #===============================================================================
- # ** DarkSky_Module
- #===============================================================================
- module DarkSky
- #-----------------------------------------------------------------------------
- HUD_ON_SWITCH = 1 #The switch that turn off or on the hud
- Font_Name = "Times New Roman" #Font of the hud
- Font_Size = 16 #Font size of the hud
- Red = 0 #Red Color
- Gray = 0 #Gray Color
- Blue = 0 #Blue Color
- Actor_id = 0 #Actor id in database. Ex: 0 for Eric
- #-----------------------------------------------------------------------------
- end
- include DarkSky
- #===============================================================================
- # ** DarkSky_Hud
- #===============================================================================
- class Darksky_Hud < Window_Base
- def initialize
- super(-16, -16, Graphics.width + standard_padding * 2, Graphics.height + standard_padding * 2)
- self.opacity = 0
- refresh
- end
- #=============================================================================
- # * Refresh
- #=============================================================================
- def refresh
- self.contents.clear
- self.contents.font = Font.new(Font_Name, Font_Size)
- actor = $game_party.members[Actor_id]
- @sinhluc = actor.hp
- @noiluc = actor.mp
- @msinhluc = actor.mhp
- @mnoiluc = actor.mmp
- index = 0
- colorback = Color.new(Red, Gray, Blue, 150)
- colorback2 = Color.new(Red, Gray, Blue, 190)
- if $game_switches[HUD_ON_SWITCH] == true
- draw_gauge(260, 350, 200, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
- draw_text(200, 354, 100, 32, "Sinh lực:")
- draw_current_and_max_values(200, 358, 200, actor.hp, actor.mhp, hp_color(actor), normal_color)
- draw_gauge(260, 373, 200, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
- draw_text(200, 376, 100, 32, "Nội lực :")
- draw_current_and_max_values(200, 380, 200, actor.mp, actor.mmp, mp_color(actor), normal_color)
- draw_actor_name(actor, -40 + 150, 330, 100)
- draw_actor_level(actor, 110, 395)
- draw_icon(actor.equips[index].icon_index, -64 + 175, 360, true)
- end
- #=============================================================================
- # * Change Hud
- #=============================================================================
- def change_hud
- return true if @hp != $game_party.members[0].hp
- return true if @mp != $game_party.members[0].mp
- return true if $game_switches[HUD_ON_SWITCH] != "OFF"
- return false
- end
- end
- #=============================================================================
- # * Update
- #=============================================================================
- def update
- super
- refresh if change_hud
- end
- end
- #===============================================================================
- # ** Scene_Map
- #-------------------------------------------------------------------------------
- # This class performs the map screen processing.
- #===============================================================================
- class Scene_Map
- alias dark_hud create_all_windows
- def create_all_windows
- create_hud_window
- dark_hud
- end
- def create_hud_window
- @main_hud = Darksky_Hud.new
- end
- end
- #===============================================================================
- # *END OF FIDE
- #===============================================================================
Advertisement
Add Comment
Please, Sign In to add comment