VX 스크립트

Item Price Changer
Version
1.0
by Woratana
Release Date: 27/06/2008


Introduction
This script will allow you to change item/weapon/armor's price easily with call script.

So you can make item that its price can change all the time. biggrin.gif

Enjoy~ laugh.gif


Screenshots
-No screenshot-


Script
Place it above main

시작
#===============================================================
# ● [VX] ◦ Item Price Changer ◦ □
# * Change item/weapon/armor's price in-game *
#--------------------------------------------------------------
# ◦ by Woratana [woratana@hotmail.com]
# ◦ Thaiware RPG Maker Community
# ◦ Released on: 26/06/2008
# ◦ Version: 1.0
#--------------------------------------------------------------

#==================================================================
# ** HOW TO USE **
#-----------------------------------------------------------------
# ** To change item's price, call script:
#  Price_Edit.item(id, price)
#
# * id: ID of item you want to change price
# * price: New price
#
# ** To change weapon's price, call script:
#  Price_Edit.weapon(id, price)
#
# ** To change armor's price, call script:
#  Price_Edit.armor(id, price)
#
# ** You can leave the price blank to reset item's price:
#  Price_Edit.item(id)
#  Price_Edit.weapon(id)
#  Price_Edit.armor(id)
# * This will use default price you set in database.
#===============================================================

module Price_Edit
  def self.item(id, price = nil)
    price ||= $data_items[id].real_price
    $game_system.new_price['item'][id] = price
  end
  
  def self.weapon(id, price = nil)
    price ||= $data_weapons[id].real_price
    $game_system.new_price['weapon'][id] = price
  end
  
  def self.armor(id, price = nil)
    price ||= $data_armors[id].real_price
    $game_system.new_price['armor'][id] = price
  end
end

class Game_System
  def new_price
    if @new_price.nil?
      @new_price = {}
      @new_price['item'] = []
      @new_price['weapon'] = []
      @new_price['armor'] = []
    end
    return @new_price
  end
end

module RPG
  class BaseItem
    def real_price
      return @price
    end
  end
  
  class Item
    def price
      return $game_system.new_price['item'][@id].nil? ? @price :
    $game_system.new_price['item'][@id]
    end
  end
  
  class Weapon
    def price
      return $game_system.new_price['weapon'][@id].nil? ? @price :
    $game_system.new_price['weapon'][@id]
    end
  end
  
  class Armor
    def price
      return $game_system.new_price['armor'][@id].nil? ? @price :
    $game_system.new_price['armor'][@id]
    end
  end
end

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
197 Side View CBS 사이드뷰배틀 블리치버젼 13 RPGbooster 2008.10.11 5232
196 상점 Shopoholic(한글 설명) 11 Man... 2008.10.29 3185
195 SephirothSpawn's Slanted Bars in VX 1.1 2 Man... 2008.10.28 1572
194 Screen Shortcut Script Man... 2008.10.27 1142
193 Screen Resolution 3 Man... 2008.10.28 1171
192 Scene_Credit script Plug & Play 1 Man... 2008.10.27 1085
191 전투 sbs battler configuration 한글 번역 13 file 시트르산 2010.09.23 4475
190 기타 RTS? 미니게임 스크립트 7 file 사람이라면? 2010.08.16 2788
189 전투 rpgvx 간단액알 스크립트 제작: 41 *PS 2008.02.07 9822
188 온라인 RPGVX 3D스크립트 11 file 고자몬 2011.07.10 5050
187 전투 RPGTankentai SBS3.3b 버전 (사이드뷰) 21 file 카르와푸딩의아틀리에 2009.07.01 8455
186 메뉴 rpg 만들기 vx 정보창에 조금더 자세한 정보가 나오게 하는 스크립트 28 아방스 2008.01.25 5077
185 맵/타일 RPG 만들기 VX 로 구현한 3D~ 42 아방스 2008.09.02 8405
184 HUD rpg 만들기 vx - 맵이름 띠우는 스크립트 ^^ 74 아방스 2008.01.27 11924
183 그래픽 RPG XP의 Transitions효과를 VX에도 적용을 해보자 4 아방스 2008.01.27 3930
182 기타 rpg vx 렉 줄이는 스크립트 34 아방스 2008.03.09 4815
181 타이틀/게임오버 RPG VX - 타이틀 스크린 스크립트 23 아방스 2008.01.24 5740
180 전투 RPG tankentai에서의 치명적 문제점을 보완한 스크립트 2 file 톰소여동생 2010.11.03 3117
179 전투 RPG Tankentai SBS 3.4d + ATB 1.2c Kaduki 18 시트르산 2010.09.10 6449
178 전투 RPG Tankentai SBS 3.3 Kaduki Eng 2 아방스 2009.02.05 5467
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32