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
497 타이틀/게임오버 타이틀에 날씨 효과 주는 스크립트 (Melmarvin's Rainy Title Screen) 6 MinaAubert 2012.09.13 2323
496 메뉴 kgc 파라미터 배분 09/07/25 13 시트르산 2010.09.24 2327
495 기타 그림을 각도로 회전시키기 1 허걱 2009.06.30 2328
494 오디오 무작위 전투음악 12 file RPGbooster 2008.10.08 2335
493 기타 ひきも記 RMVX 샘플 프로젝트 9 file Alkaid 2010.09.15 2338
492 상태/속성 Stat Distribution System 1.71 by Lettuce 7 file Alkaid 2010.09.14 2339
491 변수/스위치 HG_SelfVariables 셀프 변수 8 file 허걱 2010.11.19 2341
490 전투 [덮어씌우기]Window_ActorCommand_EX 4 맛난호빵 2011.03.12 2341
489 폴스 세이브 4 Man... 2008.10.28 2343
488 전투 [RPG VX]기술에 쿨타임을 부여하는 스크립트 3 스리아씨 2013.12.05 2348
487 스킬 Simple Sort Skill Inventory 1.1 by cozziekuns 5 file Alkaid 2010.11.10 2350
486 스킬 Simple Sort Inventory 2.0 by cozziekuns 1 file Alkaid 2011.09.29 2350
485 전투 맨손 공격시 2번공격하는 스크립트 5 아방스 2008.01.24 2357
484 날씨 스크립트ㅎㅎ 9 Man... 2008.10.27 2360
483 기타 다른 방식의 테트리스 미니게임 7 file 사람이라면? 2010.08.17 2362
482 기타 [XP / VX 공용] rand() 함수 확장 스크립트 4 허걱 2011.09.13 2363
481 저장 Advanced Files 1.3 by Dargor 6 file Alkaid 2010.09.02 2364
480 파티 Party Changer 3.9 by Dargor 5 file Alkaid 2010.09.12 2364
479 기타 타격관계도 등의 한계돌파 11 시트르산 2010.09.10 2365
478 기타 [VX] Anti-Lag 1.2c by Anaryu[예제첨부] 3 file WMN 2008.04.06 2371
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