#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Item Art Color
# Version: 1.00
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module LiTTleDRAgo
#------------------------------------------------------------------------------
# Config Item Color
# when (ID Item) then return (Type)
# or
# when (ID Item) then return (Color)
#------------------------------------------------------------------------------
def self.ItemColor(i)
case i
when 2 then return Type('common')
when 3 then return Type('epic')
when 4 then return Type('common')
when 5 then return Type('common')
when 6 then return Color.new(119, 255, 0, 255)
when 7 then return Color.new(120, 20 , 0, 255)
when 8 then return Color.new(120, 20 , 0 , 255)
when 9 then return Color.new(255, 255, 0 , 255)
end
return Color.normal_color
end
#------------------------------------------------------------------------------
# CONFIG END
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Config Weapon Color
# when (ID Weapon) then return (Name Type)
# or
# when (ID Weapon) then return (Color)
#------------------------------------------------------------------------------
def self.WeaponColor(i)
case i
when 2 then return Type('common')
when 4 then return Type('rare')
end
return Color.normal_color
end
#------------------------------------------------------------------------------
# CONFIG END
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Config Armor Color
# when (ID Armor) then return (Name Type)
# or
# when (ID Armor) then return (Color)
#------------------------------------------------------------------------------
def self.ArmorColor(i)
case i
when 1 then return Type('fire')
when 2 then return Type('common')
when 3 then return Type('wind')
when 6 then return Type('epic')
when 7 then return Type('epic')
end
return Color.normal_color
end
#------------------------------------------------------------------------------
# CONFIG END
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# Config Type Color
# when (Name Type) then return (Color)
#------------------------------------------------------------------------------
def self.Type(x)
case x
when 'common' then return Color.new(255, 255, 0 , 255)
when 'rare' then return Color.new(120, 20 , 0 , 255)
when 'epic' then return Color.new(119, 255, 0 , 255)
when 'awesome' then return Color.new(80 , 80 , 240, 255)
#------------------------------------------------------------------------------
when 'fire' then return Color.red
when 'ice' then return Color.cyan
when 'thunder' then return Color.purple
when 'wind' then return Color.green
when 'earth' then return Color.magenta
when 'light' then return Color.light_gray
when 'dark' then return Color.dark_gray
#------------------------------------------------------------------------------
end
return Color.new(255, 255, 255, 255)
end
end
#------------------------------------------------------------------------------
# CONFIG END, DON'T EDIT BELOW UNLESS YOU KNOW WHAT YOU DO
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# SDK Check (This script will work with/without SDK)
#------------------------------------------------------------------------------
if Object.const_defined?('SDK')
SDK.log('Item Art Color', 'LiTTleDRAgo', 4, '01.02.11')
@drago_artcolors_disabled = true if !SDK.enabled?('Item Art Color')
end
if !@drago_artcolors_disabled
#------------------------------------------------------------------------------
# THE SCRIPT START HERE
#------------------------------------------------------------------------------
class Window_Base
alias_method :drago_drawitemname, :draw_item_name
def drago_item_colors(item,type = 0)
return normal_color if item == nil
@item_colored = true
case item
when RPG::Item then return LiTTleDRAgo.ItemColor (item.id)
when RPG::Weapon then return LiTTleDRAgo.WeaponColor(item.id)
when RPG::Armor then return LiTTleDRAgo.ArmorColor (item.id)
end
@item_colored = nil
return disabled_color
end
def draw_item_name(item, x, y)
drago_drawitemname(item, x, y)
return if item == nil
self.contents.font.color = drago_item_colors(item)
self.contents.draw_text(x + 28, y, 212, 32, item.name) if @item_colored
end
end
class Window_ShopBuy < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(index)
drago_itemcolors_drawitem(index)
self.contents.font.color = drago_item_colors(@data[index])
if @item_colored
self.contents.draw_text(32,index * 32, 212, 32, @data[index].name, 0)
end
end
end
class Window_ShopSell < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(index)
drago_itemcolors_drawitem(index)
self.contents.font.color = drago_item_colors(@data[index])
if @item_colored
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
self.contents.draw_text(x + 28, y, 212, 32, @data[index].name)
end
end
end
class Window_EquipItem < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(index)
drago_itemcolors_drawitem(index)
self.contents.font.color = drago_item_colors(@data[index])
if @item_colored
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
self.contents.draw_text(x + 28, y, 212, 32, @data[index].name)
end
end
end
class Window_Item < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(index)
drago_itemcolors_drawitem(index)
self.contents.font.color = drago_item_colors(@data[index])
if @item_colored
x = 4 + index % 2 * (288 + 32)
y = index / 2 * 32
self.contents.draw_text(x + 28, y, 212, 32, @data[index].name)
end
end
end
class Color
def Color.white(a = 255)
return Color.new(255, 255, 255, a)
end
def Color.black(a = 255)
return Color.new(0, 0, 0, a)
end
def Color.red(a = 255)
return Color.new(255, 0, 0, a)
end
def Color.green(a = 255)
return Color.new(0, 255, 0, a)
end
def Color.blue(a = 255)
return Color.new(0, 0, 255, a)
end
def Color.purple(a = 255)
return Color.new(255, 0, 255, a)
end
def Color.yellow(a = 255)
return Color.new(255, 255, 0, a)
end
def Color.cyan(a = 255)
return Color.new(0, 255, 255, a)
end
def Color.magenta(a = 255)
return Color.new(255, 255, 0, a)
end
def Color.light_gray(a = 255)
return Color.new(192, 192, 192, a)
end
def Color.gray(a = 255)
return Color.new(128, 128, 128, a)
end
def Color.dark_gray(a = 255)
return Color.new(64, 64, 64, a)
end
def Color.pink(a = 255)
return Color.new(255, 175, 175, a)
end
def Color.orange(a = 255)
return Color.new(255, 200, 0, a)
end
end
#--------------------------------------------------------------------------
# FOR STCMS
#--------------------------------------------------------------------------
if $stormtronics_cms
class Window_CMSItem < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(i)
drago_itemcolors_drawitem(i)
if @data[i].is_a?(RPG::Item) || @mode == nil
number = $game_party.item_number(@data[i].id)
self.contents.font.color = LiTTleDRAgo.ItemColor(@data[i].id)
if !$game_party.item_can_use?(@data[i].id)
self.contents.font.color.alpha = 128
end
elsif @data[i].is_a?(RPG::Weapon)
number = $game_party.weapon_number(@data[i].id)
self.contents.font.color = LiTTleDRAgo.WeaponColor(@data[i].id)
self.contents.font.color.alpha = 128
elsif @data[i].is_a?(RPG::Armor)
number = $game_party.armor_number(@data[i].id)
self.contents.font.color = LiTTleDRAgo.ArmorColor(@data[i].id)
self.contents.font.color.alpha = 128
end
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
class Window_EquipmentItem < Window_CMSItem
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(i)
drago_itemcolors_drawitem(i)
case @data[i]
when RPG::Weapon
self.contents.font.color = LiTTleDRAgo.WeaponColor(@data[i].id)
if !@actor.equippable?($data_weapons[@data[i].id])
self.contents.font.color.alpha = 128
end
number = $game_party.weapon_number(@data[i].id)
when RPG::Armor
self.contents.font.color = LiTTleDRAgo.ArmorColor(@data[i].id)
if !@actor.equippable?($data_armors[@data[i].id])
self.contents.font.color.alpha = 128
end
number = $game_party.armor_number(@data[i].id)
end
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(308, i*32, 16, 32, ':', 1)
self.contents.draw_text(324, i*32, 24, 32, number.to_s, 2)
end
end
class Window_CMSEquipItem < Window_Selectable
alias_method :drago_itemcolors_drawitem, :draw_item
def draw_item(i)
drago_itemcolors_drawitem(i)
case @data[i]
when RPG::Weapon
number = $game_party.weapon_number(@data[i].id)
self.contents.font.color = LiTTleDRAgo.WeaponColor(@data[i].id)
when RPG::Armor
number = $game_party.armor_number(@data[i].id)
self.contents.font.color = LiTTleDRAgo.ArmorColor(@data[i].id)
end
self.contents.draw_text(32, i*32, 212, 32, @data[i].name, 0)
self.contents.draw_text(212, i*32, 16, 32, ':', 1)
self.contents.draw_text(228, i*32, 24, 32, number.to_s, 2)
end
end
end
#--------------------------------------------------------------------------
# SDK Check End
#--------------------------------------------------------------------------
end
#--------------------------------------------------------------------------
# END OF SCRIPT
#--------------------------------------------------------------------------