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 6659
197 기타 개인판타지메뉴+업그래이드 배틀 23 file 콩밥 2010.08.02 4228
196 키입력 답을 입력하는 텍스트박스 스크립트!! 21 file 좀비사냥꾼 2009.03.29 4231
195 기타 아이콘 캐릭터 17 file 허걱 2010.02.28 4237
194 액터 스탯 시스탬 29 츠키아 2008.08.08 4240
193 전투 XAS Hero Edition VX 15 Alkaid 2011.12.28 4261
192 메시지 네오 메시지 시스템 최신 17 file RPGbooster 2008.10.08 4273
191 기타 (이거 정말 좋군요) 말이나 용을 탈수있게 하는 스크립트. 31 file 아방스가 짱 2010.02.28 4284
190 기타 [자작] 횡스크롤 점프스크립트 18 file 좀비사냥꾼 2009.04.03 4293
189 상태/속성 상태 메뉴 변경 스크립트 45 죄송해욧! 2008.03.01 4306
188 맵/타일 VX Mode 7 스크립트!!!! 42 file Tofuman 2009.01.07 4332
187 이동 및 탈것 자동 이동 시스템 20 file 허걱 2010.04.21 4334
186 그래픽 밤낮 변환 VX용 26 독도2005 2008.03.23 4337
185 메시지 MultiMessage 멀티 메시지 스크립트 9 file 허걱 2010.02.23 4341
184 기타 집안의 가구를 내마음대로 데코레이션하기 15 file EuclidE 2010.09.18 4343
183 기타 심플 마우스 시스템 1.5 애드온 11 file RMdude 2009.02.11 4348
182 메뉴 [자작]명성치 사용 시스템(메뉴 출력) 16 Rainsy 2009.03.22 4380
181 스킬 [ultimate series]스킬,아이템 데미지계산식을 자기입맛에 맞게 고치는 스크립트 16 file EuclidE 2010.05.04 4392
180 HUD 맵 이름 스크립트 21 file 개임맨 2010.10.03 4395
179 메시지 직접 생각해서 만든 "문장 속 특정 단어 색 바꾸기" 10 file X.66 2010.04.28 4397
178 맵/타일 타일셋 변경 10 file 만들어보자꾸나 2008.06.08 4403
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