XP 스크립트

http://www.gamebaker.com/rmxp/scripts/artifact-colors.htm
  아이템명을 등급에 따라서 다른 색깔로 표시하는 것으로 보입니다.(디아블로2에서 일반 아이템이냐, 유니크이냐, 레어이냐에 따라 이름색이 다른 것처럼)

#=============================================================================
# ** SG Artifact Colors
#=============================================================================
# sandgolem
# Version 1
# 11.05.06
#=============================================================================
#
# This script requires editing and setting elements to your items.
# Create some new elements in your database, call them whatever you'd like
# your artifact system called. Then, assign them to the proper items.
#
# Once you've done that, you need to the edit the sg_artifact_colors part
# of this script (first method). See the two examples provided for how:
#
#    if eval("item.#{sg_temp}.include?(2)")
#      return Color.new(210, 255, 210, 255)
#    end
#
# That shows the item name in pale green if element 2 is assigned.
# Colors are set in this order: Red, Green, Blue, Strength.
# 255 is max and 0 is none. Repeat those sections for each you want to add
# Currently only armor and weapons will use this. Edit for regular items.
#
# You can remove this line if you aren't using some of my other scripts
$sg_artifact_colors = true
#
#=============================================================================
#
# To check for updates or find more scripts, visit:
#      http://www.gamebaker.com/rmxp/scripts/
#
# To use this script, copy it and insert it in a new section above "Main",
# under the default scripts, the SDK if you're using it, and anything else
# that rewrites the window skill scene or that part of battle.
#
# Have problems? You can leave me a message at:
# http://www.gamebaker.com/users/sandgolem
#
#=============================================================================

#--------------------------------------------------------------------------
# * SDK Log Script
#--------------------------------------------------------------------------
begin
  SDK.log("SG Artifact Colors", "sandgolem", 1, "11.05.06")
  if SDK.state("SG Artifact Colors") != true
    @sg_artifactcolors_disabled = true
  end
  rescue
end

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if !@sg_artifactcolors_disabled
 
class Window_Base
  def sg_artifact_colors(item,type = 0)
    if item.is_a?(RPG::Armor)
      sg_temp = 'guard_element_set'
    else
      sg_temp = 'element_set'
    end
    if eval("item.#{sg_temp}.include?(3)")
      return Color.new(255, 255, 210, 255)
    end
    if eval("item.#{sg_temp}.include?(2)")
      return Color.new(210, 255, 210, 255)
    end
    # Edit/copy the ones above and paste them before this line
    if type == 0
      return normal_color
    else
      return disabled_color
    end
  end

  def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
#------------------------------------------------------------------------------
# Begin SG Artifact Colors Edit
#------------------------------------------------------------------------------ 
    self.contents.font.color = sg_artifact_colors(item)
#------------------------------------------------------------------------------ 
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end

class Window_ShopBuy < Window_Selectable
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.price <= $game_party.gold and number < 99
#------------------------------------------------------------------------------
# Begin SG Artifact Colors Edit
#------------------------------------------------------------------------------ 
      self.contents.font.color = sg_artifact_colors(item)   
    else
      self.contents.font.color = sg_artifact_colors(item,1)
#------------------------------------------------------------------------------ 
    end
    x = 4
    y = index * 32
    rect = Rect.new(x, y, self.width - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
  end
end 

class Window_ShopSell < Window_Selectable
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.price > 0
#------------------------------------------------------------------------------
# Begin SG Artifact Colors Edit
#------------------------------------------------------------------------------ 
      self.contents.font.color = sg_artifact_colors(item)
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == disabled_color ? 128 : 255
#------------------------------------------------------------------------------ 
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end

class Window_EquipItem < Window_Selectable
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
#------------------------------------------------------------------------------
# Begin SG Artifact Colors Edit
#------------------------------------------------------------------------------ 
    self.contents.font.color = sg_artifact_colors(item)
#------------------------------------------------------------------------------ 
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end 

class Window_Item < Window_Selectable
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
#------------------------------------------------------------------------------
# Begin SG Artifact Colors Edit
#------------------------------------------------------------------------------ 
    sg_tempicond = nil
    if item.is_a?(RPG::Item) && $game_party.item_can_use?(item.id)
      sg_tempicond = true
    end
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = sg_tempicond == true ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    if item.is_a?(RPG::Item)
      if $game_party.item_can_use?(item.id)
        self.contents.font.color = sg_artifact_colors(item)
      else
        self.contents.font.color = sg_artifact_colors(item,1)
      end
    else
      self.contents.font.color = sg_artifact_colors(item)
    end
#------------------------------------------------------------------------------ 
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
  end
end 

#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '1'
  • ?
    나렌시아 2011.03.29 23:56

    이 스크립트 사용방법을 모르겠는데 사용방법 좀 가르쳐주시면 감사드려요 <<


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6153
88 메뉴 1-Scene CMS 1.03 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 871
87 메뉴 Customizable Ring Menu by SephirothSpawn 백호 2009.02.22 884
86 메뉴 1-Scene CMS 1.1 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 953
85 메뉴 Event Spawner 1 file 백호 2009.02.22 979
» 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
83 메뉴 링메뉴+음악도입스크립트 백호 2009.02.21 1051
82 메뉴 SG_Hide zero SP cost by sandgolem (SDK호환) 백호 2009.02.22 1064
81 메뉴 FF7 Menu version 3 by AcedentProne (SDK 호환) file 백호 2009.02.22 1116
80 메뉴 메뉴에서 실제시간 보기 2 백호 2009.02.21 1124
79 메뉴 Materia System 2 file 백호 2009.02.22 1222
78 메뉴 CogWheel Plug'n'Play Menu Bar by DerVVulfman@rmxp.org 2 백호 2009.02.22 1222
77 메뉴 L's Simple Custom Menu #1 R2 (SDK 2.x 필요) Alkaid 2013.01.18 1227
76 메뉴 Advanced Command Windows by Tsunokiette file 백호 2009.02.22 1307
75 메뉴 플레이 시간 윈도우 개조 file 백호 2009.02.21 1328
74 메뉴 스테이터스 일람 스크립트 file 백호 2009.02.21 1328
73 메뉴 Ring menu edit for SDK2 (Original by Hypershadow180) file Alkaid 2010.09.08 1374
72 메뉴 링메뉴 스크립트 file 백호 2009.02.21 1391
71 메뉴 콤보 스크립트 백호 2009.02.22 1399
70 메뉴 링메뉴에 돈(G)표시하기 백호 2009.02.21 1413
69 메뉴 Leidy's Ring Command Window 1.2 by DerVVulfman Alkaid 2012.09.09 1430
Board Pagination Prev 1 2 3 4 5 Next
/ 5