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 그래픽 그림자 없에는 스크립트(그런것 같음) 1 Man... 2008.10.27 1641
156 KID's Luck Systems(무슨 뜻?) 4 Man... 2008.10.27 1378
155 엄청 좋음(DEMO)클릭 하이퍼링크 걸려있음(누가 변혁좀 해 줬으면...) 4 Man... 2008.10.27 1745
154 날씨 스크립트ㅎㅎ 9 Man... 2008.10.27 2360
153 무슨 스크립트인지 모름 7 Man... 2008.10.26 1453
152 장비 Equipment Set Bonus 6 Man... 2008.10.25 1849
151 장비 Expansion_Suite V2.1! 6 Man... 2008.10.25 1593
150 중복이지만...제가 올린 단체 액알 스크립트에서 오류가 너무 많이 나서...개인 액알로 다시 올려드리는 겁니다. 15 21stcentury 2008.10.12 3429
149 장비 스킬습득장비 [죄송] 19 file RPGbooster 2008.10.11 4049
148 아이템 아이템 분류 19 file RPGbooster 2008.10.11 3309
147 스킬분류 16 file RPGbooster 2008.10.11 2833
146 ATB v1.0 배틀 시스템 + RPG Tankentai SBS v2.8 16 supergt 2008.10.11 4681
145 상점 상점의 자세한 표시 32 file RPGbooster 2008.10.11 4008
144 맵/타일 Final Fantasy IV 모든 완성된맵 47 RPGbooster 2008.10.11 5086
143 아이템 적과 만나지않는 아이템 12 file RPGbooster 2008.10.11 2718
142 폰 시스템 29 RPGbooster 2008.10.11 3454
141 퀘스트 퀘스트 스크립트 39 file RPGbooster 2008.10.11 6139
140 아이템 편리한 디자인의 아이템메뉴 30 file RPGbooster 2008.10.11 5098
139 아이템 돈 아이템 장비를저장 11 file RPGbooster 2008.10.11 3452
138 커서 애니메이션 12 file RPGbooster 2008.10.11 3127
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