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
477 HUD PRABS v1.0 [hud,주석액알,원거리공격,hotkeys,vx] 대박감이다. 47 유칸지 2008.08.13 11114
476 메시지 Quick Face Border 12 아방스 2008.03.05 4161
475 타이틀/게임오버 Rafidelis KaHh Box 타이틀화면 20 카르와푸딩의아틀리에 2009.08.23 5004
474 타이틀/게임오버 Random Title Screen 2 Man... 2008.10.28 1454
473 이동 및 탈것 Rei Advanced Movement System 8 file 카르와푸딩의아틀리에 2009.08.19 2631
472 장비 Rei(레이)의 Paperdoll(비쥬얼 장비)스크립트 20 file 루시페르 2009.07.29 4467
471 기타 reijubv - New Balloon Command (VXA에서도 작동) 1 file 혜인 2013.04.08 1332
470 Repel Effect 1 Man... 2008.10.28 1753
469 전투 Requiem ABS 8 - 액션 배틀 시스템 8 36 아방스 2009.06.24 8540
468 전투 Requiem ABS Hero Edition by Falcao 습작 2013.05.13 2009
467 전투 Requiem SBABS (Requiem Squad Based Battle System) 14 vk 2009.02.07 7542
466 기타 Resize and Scale by OriginalWij 1 습작 2013.05.13 1349
465 기타 RMVX Patcher 1.2.0 by Yeyinde 5 file Alkaid 2010.11.12 2118
464 영상 RMVX에서 AVI 재생 스크립트 12 Nymph 2008.07.07 4108
463 맵/타일 Roguelike Random Dungeon Generator 2.0 by cozziekuns 4 file Alkaid 2011.09.29 2560
462 기타 RPG 2000이나 RPG 2003처럼 전체화면으로 나오게 하는 스크립트(대박) 21 Man... 2008.10.28 4822
461 전투 RPG Tankentai SBS 3.3 + ATB Kaduki Eng 58 아방스 2009.02.05 9071
460 전투 RPG Tankentai SBS 3.3 Kaduki Eng 2 아방스 2009.02.05 5467
459 전투 RPG Tankentai SBS 3.4d + ATB 1.2c Kaduki 18 시트르산 2010.09.10 6449
458 전투 RPG tankentai에서의 치명적 문제점을 보완한 스크립트 2 file 톰소여동생 2010.11.03 3117
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