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
721 Run-Smoother! ( 렉 줄이는 스크립트 ) 12 file Bera 2010.10.16 2295
720 메뉴 Ryex's Collapsing CMS 2.51 3 Alkaid 2010.09.05 1667
719 전투 S ABS_NonSDK ver 1 file 백호 2009.02.22 1458
718 전투 S ABS_NonSDK(구버전용) 5 file 백호 2009.02.22 1494
717 전투 S.G DamageShield Script 백호 2009.02.22 935
716 기타 sandgolem Script Archive (RMXP SDK 1.5 이상 필요) file Alkaid 2011.02.17 1453
715 sbabs - 몬스터 게이지 표시 스크립트 13 file 아방스 2007.11.09 3667
714 전투 SBABS v3 6 file 백호 2009.02.22 2046
713 전투 SBABS v4 (A-RPG) 5 file 백호 2009.02.22 2055
712 SBABS 버전3.2 - 액알 스크립트 사용법 34 아방스 2007.11.09 5631
711 전투 SBABS 버전3.2 - 액알 스크립트 시스템 설명 13 아방스 2007.11.09 5685
710 전투 SBABS게이지바 file 백호 2009.02.21 2284
709 기타 Selected phyolomortis.com scripts 1 file 백호 2009.02.22 789
708 Seph's Test Bed 0.4 (SDK2 호환, Method & Class Library 2 WMN 2008.04.06 1330
707 기타 Seph's Test Bed v.4 (파일첨부) (SDK2.x용) Alkaid 2010.10.08 1533
706 기타 SFont 사용 스크립트 by Trickster Alkaid 2010.10.05 1512
» 메뉴 SG_Artifact Colors by sandgolem (SDK 호환) 1 백호 2009.02.22 1003
704 전투 SG_Attack Break by sandgolem (SDK호환) 백호 2009.02.22 813
703 전투 SG_Auto battle by sandgolem (SDK호환) 백호 2009.02.22 1031
702 저장 SG_Automatic Save 백호 2009.02.22 970
Board Pagination Prev 1 ... 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 ... 52 Next
/ 52