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 5408
157 파티 Party Changer 3.9 by Dargor 5 file Alkaid 2010.09.12 2364
156 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2363
155 기타 다른 방식의 테트리스 미니게임 7 file 사람이라면? 2010.08.17 2362
154 날씨 스크립트ㅎㅎ 9 Man... 2008.10.27 2360
153 전투 맨손 공격시 2번공격하는 스크립트 5 아방스 2008.01.24 2358
152 전투 [RPG VX]기술에 쿨타임을 부여하는 스크립트 3 스리아씨 2013.12.05 2353
151 스킬 Simple Sort Skill Inventory 1.1 by cozziekuns 5 file Alkaid 2010.11.10 2350
150 스킬 Simple Sort Inventory 2.0 by cozziekuns 1 file Alkaid 2011.09.29 2350
149 전투 [덮어씌우기]Window_ActorCommand_EX 4 맛난호빵 2011.03.12 2346
148 폴스 세이브 4 Man... 2008.10.28 2343
147 변수/스위치 HG_SelfVariables 셀프 변수 8 file 허걱 2010.11.19 2341
146 상태/속성 Stat Distribution System 1.71 by Lettuce 7 file Alkaid 2010.09.14 2339
145 기타 ひきも記 RMVX 샘플 프로젝트 9 file Alkaid 2010.09.15 2338
144 오디오 무작위 전투음악 12 file RPGbooster 2008.10.08 2335
143 타이틀/게임오버 타이틀에 날씨 효과 주는 스크립트 (Melmarvin's Rainy Title Screen) 6 MinaAubert 2012.09.13 2329
142 기타 그림을 각도로 회전시키기 1 허걱 2009.06.30 2328
141 메뉴 kgc 파라미터 배분 09/07/25 13 시트르산 2010.09.24 2327
140 이동 및 탈것 스위치 on일때 못 움직이게...(이동고정) 6 허걱 2009.07.14 2326
139 기타 (좀 이상한 or 쓸모없을 듯 한)화면상에 몬스터와 만나려면 몇걸음 남았는지 표시하는 스크립트! 2 루시페르 2009.06.06 2318
138 기타 스크립트로 커먼 이벤트 실행 [수정] 3 허걱 2009.08.17 2311
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