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
48 메뉴 수정, 추가 링메뉴 10 file 백호 2009.02.22 2912
47 메뉴 SG_Hide zero SP cost by sandgolem (SDK호환) 백호 2009.02.22 1064
» 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
45 메뉴 스테이터스 화면 from Harts Horn 2 백호 2009.02.22 1571
44 메뉴 넷플레이 업그레이드됀 메뉴 스크립트 4 백호 2009.02.22 2040
43 메뉴 링 메뉴 Edited by Hypershadow180@rmxp.net 1 file 백호 2009.02.22 1974
42 메뉴 KGC 메뉴화면 개조 스크립트 번역 3 file 백호 2009.02.22 1940
41 메뉴 자작 커스텀 메뉴(데모 첨부) 3 백호 2009.02.22 2347
40 메뉴 Event Spawner 1 file 백호 2009.02.22 979
39 메뉴 새로운 cms 4 file 백호 2009.02.22 2117
38 메뉴 콤보 스크립트 백호 2009.02.22 1399
37 메뉴 Materia System 2 file 백호 2009.02.22 1222
36 메뉴 화살표 모양 셀렉트 커서 사용 2 백호 2009.02.22 2118
35 메뉴 스탯올리기 시스템 (액알가능) 27 file 백호 2009.02.22 3403
34 메뉴 FF7 Menu version 3 by AcedentProne (SDK 호환) file 백호 2009.02.22 1116
33 메뉴 제가 쓰는 메뉴 14 file 백호 2009.02.21 2318
32 메뉴 Tales Of Symphonia Menu 8 file 백호 2009.02.21 1744
31 메뉴 Breath Of Fire 스타일의 메뉴 3 file 백호 2009.02.21 2342
30 메뉴 각 메뉴를 호화롭게 하는 스크립트 3 file 백호 2009.02.21 2616
29 메뉴 메뉴화면 변경 스크립트 1 file 백호 2009.02.21 2769
Board Pagination Prev 1 2 3 4 5 Next
/ 5