Item Art Color




Fitur

  • Liat aja SSnya



Screenshots






Scripts

Code:
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Item Art Color
# Version: 1.01
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=



module LiTTleDRAgo
#------------------------------------------------------------------------------     
# Disini Config Warna Itemnya
#        when (ID Item) then return (Jenis Kategori Item)
# bisa juga kalau
#        when (ID Item) then return (Color/warna yang diinginkan)
#------------------------------------------------------------------------------     
  def self.ItemColor(i)
      case i
      when 2,4,5  then return Type('common')
      when 3  then return Type('epic')
      when 6  then return Color.new(119, 255, 0, 255)
      when 7  then return Color.new(120, 20 , 0, 255)
      end
      return Color.normal_color
    end
#------------------------------------------------------------------------------     
# CONFIG END
#------------------------------------------------------------------------------     

#------------------------------------------------------------------------------     
# Disini Config Warna Senjata
# when (ID Weapon) then return (Jenis Kategori Weapon)
#------------------------------------------------------------------------------     
  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
#------------------------------------------------------------------------------     

#------------------------------------------------------------------------------     
# Disini Config Warna Armor
# when (ID Armor) then return (Jenis Kategori Armor)
#------------------------------------------------------------------------------     
  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,7 then return Type('epic')
      end
      return Color.normal_color
  end
#------------------------------------------------------------------------------     
# CONFIG END
#------------------------------------------------------------------------------     

#------------------------------------------------------------------------------     
# Disini Config Jenis Kategorinya
# when (Jenis Kategori) then return (Color/warna yang diinginkan)
#------------------------------------------------------------------------------     
  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.normal_color
  end
 
end

#------------------------------------------------------------------------------     
# CONFIG SELESAI, KALO EDIT YANG DIBAWAH INI TANGGUNG SENDIRI
#------------------------------------------------------------------------------     

#------------------------------------------------------------------------------
# SDK Check (Ga ada SDK juga ga apa-apa kok)
#------------------------------------------------------------------------------
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
#------------------------------------------------------------------------------     
# KODINGANNYA DIMULAI DARI SINI
#------------------------------------------------------------------------------     
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.normal_color
    return Color.new(255, 255, 255, 255)
  end
  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
#--------------------------------------------------------------------------
# Ini Buat 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
#--------------------------------------------------------------------------


taro dibawah scene_debug, dibawah Stormtronic CMS kalo make

Penulis : Irgi Kusuma ~ Sebuah blog yang menyediakan berbagai macam informasi

Artikel Item Art Color ini dipublish oleh Irgi Kusuma pada hari Minggu, 26 Februari 2012. Semoga artikel ini dapat bermanfaat.Terimakasih atas kunjungan Anda silahkan tinggalkan komentar.sudah ada 0 komentar: di postingan Item Art Color
 

0 komentar:

Posting Komentar