Ok, but it's BLizzard's script, not mine. The specific code is:
#==============================================================================
# Blizz-Art Gradient styler with HP/SP/EXP bars by Blizzard
# Version: 4.0
# Date: 13.11.2006
#
# v2.0+
# - 2 styles, better code
# v3.0+
# - 6 styles, far better code
# v4.0+
# - 6 styles, overworked and extremely delagged, enjoy the most lagless
# gradient/slant bar code ever
#==============================================================================
if TONS_OF_ADDONS::BARS
#==============================================================================
# Game_System
#==============================================================================
class Game_System
attr_accessor :bar_style
attr_reader :bar_opacity
alias init_blizzart_later initialize
def initialize
init_blizzart_later
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#
# Configure this part manually if you have no "Options" controller for the
# styles and the opacity. (style: 0~5, opacity: 0~256)
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@bar_style = 2
@bar_opacity = 256
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
def bar_opacity=(alpha)
if alpha > 256
alpha = 256
elsif alpha < 0
alpha = 0
end
@bar_opacity = alpha
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
#==============================================================================
# Bitmap
#==============================================================================
class Bitmap
def gradient_bar(x, y, w, color1, color2, color3, rate)
styles = [1, 3, 4, 5]
rx = color3.red
gx = color3.green
bx = color3.blue
offset = 5
x += offset
y += 26
if styles.include?($game_system.bar_style)
offset += 2
w = w / 8 * 8
y -= 1
if $game_system.bar_style == 5
y -= 2
else
x += 1
end
end
r = color1.red
g = color1.green
b = color1.blue
r_rate = color2.red - r
g_rate = color2.green - g
b_rate = color2.blue - b
alpha = $game_system.bar_opacity
return if alpha == 0
alpha -= 1 if alpha == 256
if $game_system.bar_style < 5
for i in 0...(offset + 3)
fill_rect(x - i, y + i - 2, w + 3, 1, Color.new(0, 0, 0, 255))
end
for i in 0...(offset + 1)
fill_rect(x - i, y + i - 1, w + 1, 1, Color.new(255, 255, 255, 255))
end
if $game_system.bar_style < 2
for i in 0...w + offset
red = color3.red * i / (w + offset)
green = color3.green * i / (w + offset)
blue = color3.blue * i / (w + offset)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w ? w+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue, alpha))
end
if (w*rate).to_i >= offset
for i in 0...((w*rate).to_i+offset)
red = r + r_rate * i / ((w + offset)* rate)
green = g + g_rate * i / ((w + offset)* rate)
blue = b + b_rate * i / ((w + offset)* rate)
oy = i < offset ? offset-i : 0
off = i < offset ? i : i > w*rate ? (w*rate).to_i+offset-i : offset
fill_rect(x+i-offset+1, y+oy-1, 1, off, Color.new(red, green, blue, alpha))
end
else
for i in 0...(w * rate).to_i
for j in 0...offset
red = r + r_rate * i / (w * rate)
green = g + g_rate * i / (w * rate)
blue = b + b_rate * i / (w * rate)
set_pixel(x + i - j + 1, y + j - 1, Color.new(red, green, blue, alpha))
end
end
end
else
for i in 0...offset
red = color3.red * i / offset
green = color3.green * i / offset
blue = color3.blue * i / offset
fill_rect(x - i + 1, y + i - 1, w, 1, Color.new(red, green, blue, alpha))
if $game_system.bar_style == 4
if i < offset / 2
red = (r + r_rate) * (i+1) / (offset / 2)
green = (g + g_rate) * (i+1) / (offset / 2)
blue = (b + b_rate) * (i+1) / (offset / 2)
else
red = (r + r_rate) * (offset+1-i) / (offset / 2 + 1)
green = (g + g_rate) * (offset+1-i) / (offset / 2 + 1)
blue = (b + b_rate) * (offset+1-i) / (offset / 2 + 1)
end
else
red = r + r_rate * i / offset
green = g + g_rate * i / offset
blue = b + b_rate * i / offset
end
fill_rect(x - i + 1, y + i - 1, w*rate, 1, Color.new(red, green, blue, alpha))
end
end
if styles.include?($game_system.bar_style)
for i in 0...w
for j in 0...offset
if styles.include?($game_system.bar_style) and i % 8 < 2
set_pixel(x + i - j + 1, y + j - 1, Color.new(0, 0, 0, alpha))
end
end
end
end
else
fill_rect(x+1, y-3, w+2, 12, Color.new(255, 255, 255, 192))
for i in 0...10
if i < 5
red = rx * (i+1) / 5
green = gx * (i+1) / 5
blue = bx * (i+1) / 5
else
red = rx * (11-i) / 6
green = gx * (11-i) / 6
blue = bx * (11-i) / 6
end
fill_rect(x+2, y+i-2, w, 1, Color.new(red, green, blue, alpha))
if i < 5
red = (r + r_rate) * (i+1) / 5
green = (g + g_rate) * (i+1) / 5
blue = (b + b_rate) * (i+1) / 5
else
red = (r + r_rate) * (11-i) / 6
green = (g + g_rate) * (11-i) / 6
blue = (b + b_rate) * (11-i) / 6
end
fill_rect(x+2, y+i-2, w*rate, 1, Color.new(red, green, blue, alpha))
end
for i in 0...w/8
fill_rect(x+2+i*8, y-2, 1, 10, Color.new(0, 0, 0, alpha))
fill_rect(x+2+(i+1)*8-1, y-2, 1, 10, Color.new(0, 0, 0, alpha))
end
end
end
end
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
alias draw_actor_hp_blizzart_later draw_actor_hp
def draw_actor_hp(actor, x, y, w = 148)
w -= 12
rate = actor.hp.to_f / actor.maxhp
if rate > 0.6
color1 = Color.new(80 - 150 * (rate-0.6), 80, 50 * (rate-0.6), 192)
color2 = Color.new(240 - 450 * (rate-0.6), 240, 150 * (rate-0.6), 192)
elsif rate > 0.2 and rate <= 0.6
color1 = Color.new(80, 200 * (rate-0.2), 0, 192)
color2 = Color.new(240, 600 * (rate-0.2), 0, 192)
elsif rate <= 0.2
color1 = Color.new(400 * rate, 0, 0, 192)
color2 = Color.new(240, 0, 0, 192)
end
color3 = Color.new(0, 80, 0, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
if $scene.is_a?(Scene_Battle)
draw_actor_hp_blizzart_later(actor, x, y, w)
else
draw_actor_hp_blizzart_later(actor, x, y)
end
end
alias draw_actor_sp_blizzart_later draw_actor_sp
def draw_actor_sp(actor, x, y, w = 148)
w -= 12
rate = actor.sp.to_f / actor.maxsp
if rate > 0.4
color1 = Color.new(60 - 66 * (rate-0.4), 20, 80, 192)
color2 = Color.new(180 - 200 * (rate-0.4), 60, 240, 192)
elsif rate <= 0.4
color1 = Color.new(20 + 100 * rate, 50 * rate, 26 + 166 * rate, 192)
color2 = Color.new(60 + 300 * rate, 150 * rate, 80 + 400 * rate, 192)
end
color3 = Color.new(0, 0, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
if $scene.is_a?(Scene_Battle)
draw_actor_sp_blizzart_later(actor, x, y, w)
else
draw_actor_sp_blizzart_later(actor, x, y)
end
end
alias draw_actor_exp_blizzart_later draw_actor_exp
def draw_actor_exp(actor, x, y, w = 148)
w += 12
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
if rate < 0.5
color1 = Color.new(20 * rate, 60, 80, 192)
color2 = Color.new(60 * rate, 180, 240, 192)
elsif rate >= 0.5
color1 = Color.new(20 + 120 * (rate-0.5), 60 + 40 * (rate-0.5), 80, 192)
color2 = Color.new(60 + 360 * (rate-0.5), 180 + 120 * (rate-0.5), 240, 192)
end
color3 = Color.new(80, 80, 80, 192)
self.contents.gradient_bar(x, y, w, color1, color2, color3, rate)
draw_actor_exp_blizzart_later(actor, x, y)
end
end
end
Hope that helps.