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
497 장비 Multi-Slot Equipment VX 1.6 by DerVVulfman 1 file Alkaid 2010.09.02 1637
496 Multi-threader snippet by Omegazion Man... 2008.10.28 1107
495 메시지 MultiMessage 멀티 메시지 스크립트 9 file 허걱 2010.02.23 4298
494 그래픽 Multiple Fogs 1.0 4 아방스 2008.03.05 2886
493 저장 Neo Save System V by Helladen(Original by Woratana) 8 Alkaid 2010.09.02 2439
492 저장 Neo Save System VI by Helladen 2 Alkaid 2012.01.15 2886
491 온라인 net VX[ RPGVX 온라인 스크립트 ] 19 file 제로스S2 2009.08.03 6391
490 온라인 NETVX 2버전 18 아방스 2009.02.04 3908
489 타이틀/게임오버 New Title Screen 3 Man... 2008.10.28 1832
488 메시지 NMS 3.0 Beta 주석 번역본(한글) 4 인천항 2010.01.13 3369
487 키입력 No F1, F12 and Alt+Return (Kein F1, F12 und Alt+Eingabe) by cremno 습작 2013.04.19 1046
486 퀘스트 Omegas7's Quest System 3.0 퀘스트 스크립트 5 리프네버 2010.01.09 3452
485 전투 ORBS [새로운 전투 방식] 48 file 아방스 2009.03.04 10210
484 전투 ORBS_v1[1].06 전투시스템. 22 file 할렘 2009.02.06 7407
483 기타 OriginalWij's Script Compilation 1.2 2 Alkaid 2010.09.20 1583
482 이동 및 탈것 Paper Mario Walk 7 file 카르와푸딩의아틀리에 2009.08.19 2701
481 파티 Party Changer 3.9 by Dargor 5 file Alkaid 2010.09.12 2364
480 Path Finding 6 Man... 2008.10.08 1530
479 액터 Point Spend System 1.05 by Drago del Fato (포인트로 스탯 올리기) 6 Alkaid 2010.09.08 2612
478 전투 PRABS 2.0 액션배틀시스템 58 file RPGbooster 2008.10.08 7575
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 32 Next
/ 32