Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- # Item Art Color
- # Version: 1.21
- # Author : LiTTleDRAgo
- #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
- module LiTTleDRAgo
- #------------------------------------------------------------------------------
- # Config Item Color
- # when (ID Item) then return (Type)
- # or
- # when (ID Item) then return (Color)
- #------------------------------------------------------------------------------
- def self.ItemColor(i)
- color = case i
- when 2,4,5,9 then Type('common')
- when 3,6 then Type('epic')
- when 7,8 then Color.new(120,20,0,255)
- end
- return color
- end
- #------------------------------------------------------------------------------
- # Config Weapon Color
- # when (ID Weapon) then return (Name Type)
- # or
- # when (ID Weapon) then return (Color)
- #------------------------------------------------------------------------------
- def self.WeaponColor(i)
- color = case i
- when 2 then Type('common')
- when 4 then Type('rare')
- end
- return color
- end
- #------------------------------------------------------------------------------
- # Config Armor Color
- # when (ID Armor) then return (Name Type)
- # or
- # when (ID Armor) then return (Color)
- #------------------------------------------------------------------------------
- def self.ArmorColor(i)
- color = case i
- when 1 then Type('fire')
- when 2 then Type('common')
- when 3 then Type('wind')
- when 6,7 then Type('epic')
- end
- return color
- end
- #------------------------------------------------------------------------------
- # Config Type Color
- # when (Name Type) then return (Color)
- #------------------------------------------------------------------------------
- def self.Type(x)
- color = case x
- when 'fire' then Color.red
- when 'ice' then Color.cyan
- when 'thunder' then Color.purple
- when 'wind' then Color.green
- when 'earth' then Color.magenta
- when 'light' then Color.light_gray
- when 'dark' then Color.dark_gray
- when 'common' then Color.new(255, 255, 0 , 255)
- when 'rare' then Color.new(120, 20 , 0 , 255)
- when 'epic' then Color.new(119, 255, 0 , 255)
- when 'awesome' then Color.new(80 , 80 , 240, 255)
- end
- return color
- end
- #------------------------------------------------------------------------------
- # CONFIG END, DON'T EDIT BELOW UNLESS YOU KNOW WHAT YOU DO
- #------------------------------------------------------------------------------
- end
- #------------------------------------------------------------------------------
- # THE SCRIPT START HERE
- #------------------------------------------------------------------------------
- VX = defined?(Window_BattleMessage)
- VXA = defined?(Window_KeyItem)
- class Window_Base
- alias_method :drago_drawitemname, :draw_item_name
- def drago_item_colors(item,type = 0)
- return normal_color if item == nil
- color = case item
- when RPG::Item then LiTTleDRAgo.ItemColor (item.id)
- when RPG::Weapon then LiTTleDRAgo.WeaponColor(item.id)
- when RPG::Armor then LiTTleDRAgo.ArmorColor (item.id)
- end
- return color ? color : normal_color
- end
- def draw_item_name(item, x, y,enabled = true)
- return if !item
- args = VX || VXA ? [item, x, y,enabled] : [item, x, y]
- drago_drawitemname(*args)
- self.contents.font.color = drago_item_colors(item)
- self.contents.font.color.alpha = enabled ? 255 : 128
- if VX || VXA
- self.contents.draw_text(x + 24, y, 172, 24, item.name)
- else
- self.contents.draw_text(x + 28, y, 212, 32, item.name)
- end
- end
- end
- if !VX && !VXA
- Class = ['ShopSell','ShopBuy','Item','EquipItem']
- (0...Class.size).each {|i| eval "
- class Window_#{Class[i]} < 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])
- x,y = 4+index%2 * (288+32), index/2*32
- x,y = 4, index * 32 if '#{Class[i]}' =~ /ShopBuy/i
- self.contents.draw_text(x + 28, y, 212, 32, @data[index].name)
- end
- end#"}
- end
- class Color
- def self.normal_color() Color.new(255,255,255,255)end
- def self.white(a=255) Color.new(255,255,255,a) end
- def self.black(a=255) Color.new(0,0,0,a) end
- def self.red(a=255) Color.new(255,0,0,a) end
- def self.green(a=255) Color.new(0,255,0,a) end
- def self.blue(a=255) Color.new(0,0,255,a) end
- def self.purple(a=255) Color.new(255,0,255,a) end
- def self.yellow(a=255) Color.new(255,255,0,a) end
- def self.cyan(a=255) Color.new(0,255,255,a) end
- def self.magenta(a=255) Color.new(255,255,0,a) end
- def self.light_gray(a=255)Color.new(192,192,192,a) end
- def self.gray(a=255) Color.new(128,128,128,a) end
- def self.dark_gray(a=255) Color.new(64,64,64,a) end
- def self.pink(a=255) Color.new(255,175,175,a) end
- def self.orange(a=255) Color.new(255,200,0,a) end
- end
- #--------------------------------------------------------------------------
- # FOR STCMS
- #--------------------------------------------------------------------------
- if $stormtronics_cms
- Class=[['CMS','Selectable'],['Equipment','CMSItem'],['CMSEquip','Selectable']]
- (0...Class.size).each {|a| eval "
- class Window_#{Class[a][0]}Item < Window_#{Class[a][1]}
- alias_method :drago_itemcolors_drawitem, :draw_item
- def draw_item(i)
- drago_itemcolors_drawitem(i)
- @clas = 1 if '#{Class[a][0]}' =~ /CMS/i
- @clas = 2 if '#{Class[a][0]}' =~ /Equipment/i
- @clas = 3 if '#{Class[a][0]}' =~ /CMSEquip/i
- if (@data[i].is_a?(RPG::Item) || @mode == nil) && @clas == 1
- number = $game_party.item_number(@data[i].id)
- self.contents.font.color = drago_item_colors(@data[i])
- 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 = drago_item_colors(@data[i])
- if @clas == 1 || (@clas == 2 &&
- !@actor.equippable?($data_weapons[@data[i].id]))
- self.contents.font.color.alpha = 128
- end
- elsif @data[i].is_a?(RPG::Armor)
- number = $game_party.armor_number(@data[i].id)
- self.contents.font.color = drago_item_colors(@data[i])
- if @clas == 1 || (@clas == 2 &&
- !@actor.equippable?($data_armors[@data[i].id]))
- self.contents.font.color.alpha = 128
- end
- 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#"}
- end
- #--------------------------------------------------------------------------
- # END OF SCRIPT
- #--------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement