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
100 기타 Free Window Demo 1 file 백호 2009.02.22 1002
99 맵/타일 Map Loop Script 백호 2009.02.21 999
98 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 995
97 기타 특수효과 ElseEX 스크립트 file 백호 2009.02.21 995
96 기타 스크롤되는 파노라마(Autoscrolling Panorama) by RPG Advocate 백호 2009.02.22 993
95 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
94 그래픽 Bitmap update 2.0 by Linkin_T 1 백호 2009.02.22 985
93 기타 필드에서 마력을 출력합니다. 백호 2009.02.22 983
92 메뉴 Event Spawner 1 file 백호 2009.02.22 979
91 스킬 랜덤 스킬 스크립트 2 file 백호 2009.02.21 978
90 저장 SG_Automatic Save 백호 2009.02.22 970
89 기타 ATS-Advanced Time System 1 file 백호 2009.02.21 964
88 키입력 Mouse Input Module v5 by Near Fantastica (SDK호환) 2 백호 2009.02.22 962
87 기타 [All RGSS] File-Ex file Cheapmunk 2014.12.29 961
86 파티 Party & Class Changing script 1 file 백호 2009.02.21 961
85 메뉴 1-Scene CMS 1.1 by LegACy@rmxp.org (SDK호환) file 백호 2009.02.22 953
84 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 939
83 오디오 WinAMP 플러그인을 이용하여 RMXP에서 다른 사운드포맷 지원하기 v3 by Guillame777@rmxp.net 백호 2009.02.22 936
82 전투 S.G DamageShield Script 백호 2009.02.22 935
Board Pagination Prev 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 Next
/ 52