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
477 맵/타일 Tileset Reader VX 2.1 by DerVVulfman 4 Alkaid 2010.09.20 2376
476 전투 대미지 MP전환 스테이트 : 수정 => 마나쉴드 7 Evangelista 2009.08.29 2384
» 아이템 아이템 프라이스 체인저?? Man... 2008.10.28 2385
474 변수/스위치 다른 이벤트 셀프스위치 조작 - xp, vx 사용가능 3 허걱 2009.07.18 2388
473 스킬 훔치기 스킬을 만드는 스크립트! 5 우켈킁 2011.03.31 2390
472 기타 회피,명중,크리 스테이트를 작성하는 스크립트 9 카르와푸딩의아틀리에 2009.06.30 2393
471 메시지 넘버님의로딩수정101번눌르긴그레서..... 7 file 알피지vx초짜 2010.01.22 2394
470 상태/속성 Full Status CMS 1.0d by Modern Algebra 1 file Alkaid 2010.09.03 2408
469 Enable Usage of Rmxp 캐릭터(?) 5 Man... 2008.10.28 2413
468 아이템 아이템의 공격횟수 추가 8 star211 2010.01.19 2413
467 맵/타일 Map Saver 17 file 비극ㆍ 2010.04.18 2415
466 이동 및 탈것 느리게 걷기 5 허걱 2009.08.23 2424
465 기타 좀 뭐랄까... 어이없는 "비행선 더 높게 날아오르게 하기!"스크립트.... 8 루시페르 2009.06.06 2426
464 기타 레벨업 시 증가분의 HP/MP 회복 10 시트르산 2010.09.12 2427
463 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2430
462 제작도구 Window Maker by Jet 12 Alkaid 2010.09.26 2438
461 저장 Neo Save System V by Helladen(Original by Woratana) 8 Alkaid 2010.09.02 2439
460 HUD 변수 표시 HUD 8 Tofuman 2009.02.15 2469
459 기타 능력치에 따른 스테이트변화 / 능력치한계지정 5 Evangelista 2009.05.26 2479
458 전투 전투후 HP/MP 퍼센테이지(지정) 회복 5 하얀슬픔 2010.12.06 2490
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