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
177 저장 Neo Save System V by Helladen(Original by Woratana) 8 Alkaid 2010.09.02 2439
176 제작도구 Window Maker by Jet 12 Alkaid 2010.09.26 2438
175 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2430
174 기타 레벨업 시 증가분의 HP/MP 회복 10 시트르산 2010.09.12 2427
173 기타 좀 뭐랄까... 어이없는 "비행선 더 높게 날아오르게 하기!"스크립트.... 8 루시페르 2009.06.06 2426
172 이동 및 탈것 느리게 걷기 5 허걱 2009.08.23 2424
171 맵/타일 Map Saver 17 file 비극ㆍ 2010.04.18 2415
170 아이템 아이템의 공격횟수 추가 8 star211 2010.01.19 2413
169 Enable Usage of Rmxp 캐릭터(?) 5 Man... 2008.10.28 2413
168 상태/속성 Full Status CMS 1.0d by Modern Algebra 1 file Alkaid 2010.09.03 2408
167 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2394
166 기타 회피,명중,크리 스테이트를 작성하는 스크립트 9 카르와푸딩의아틀리에 2009.06.30 2393
165 스킬 훔치기 스킬을 만드는 스크립트! 5 우켈킁 2011.03.31 2390
164 변수/스위치 다른 이벤트 셀프스위치 조작 - xp, vx 사용가능 3 허걱 2009.07.18 2389
» 아이템 아이템 프라이스 체인저?? Man... 2008.10.28 2385
162 전투 대미지 MP전환 스테이트 : 수정 => 마나쉴드 7 Evangelista 2009.08.29 2384
161 맵/타일 Tileset Reader VX 2.1 by DerVVulfman 4 Alkaid 2010.09.20 2376
160 기타 [VX] Anti-Lag 1.2c by Anaryu[예제첨부] 3 file WMN 2008.04.06 2371
159 기타 타격관계도 등의 한계돌파 11 시트르산 2010.09.10 2365
158 파티 Party Changer 3.9 by Dargor 5 file Alkaid 2010.09.12 2364
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