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
» 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
920 그래픽 Drago - Custom Resolution II 1 Alkaid 2014.09.10 1004
919 기타 프레임 적용 스크립트 1 file 백호 2009.02.21 1007
918 스킬 Equipment Skills 2.0 by SephirothSpawn file 백호 2009.02.22 1007
917 전투 랜덤 전투음악 by Fomar0153@rmxp.org 1 백호 2009.02.22 1008
916 기타 분류 별로 윈도우 스킨 다르게 사용하기 file 백호 2009.02.21 1015
915 기타 강제 종료시키기 1 file 백호 2009.02.22 1015
914 전투 방어시에 속성 저항,스테이트무시 스크립트 1 백호 2009.02.22 1017
913 기타 제련시스템 수정본입니다. 3 file 백호 2009.02.21 1020
912 기타 능력치 무한대 스크립트 (따로 넣을필요없음) 2 백호 2009.02.21 1027
911 전투 SG_Auto battle by sandgolem (SDK호환) 백호 2009.02.22 1031
910 아이템 아이템을 사용하여 기술 습득하기 (기술문서 아이템) 2 file 백호 2009.02.21 1033
909 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1040
908 타이틀/게임오버 타이틀과 타이틀 BGM 랜덤으로 변경하는 스크립트 2 file 백호 2009.02.21 1045
907 파티 파티원 포션 나눠먹기 스크립트 1 file 백호 2009.02.22 1046
906 기타 기본설정 강화ㄴ 1 백호 2009.02.21 1047
905 이동 및 탈것 이동루트에 애니메이션커맨드 추가 1 file 백호 2009.02.21 1047
904 기타 [KGC] 개요 스크립트 2 백호 2009.02.21 1048
903 메뉴 링메뉴+음악도입스크립트 백호 2009.02.21 1051
902 저장 [KGC] 스크립트 저장된 리셋 불어오기 [스샷첨부] 1 file 백호 2009.02.22 1052
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52