VX 스크립트

#===============================================================
# ● [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
Comment '7'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5408
57 저장 세이브 시스템 확장 스크립트 9 file 신규회원 2012.02.24 3315
56 기타 멥 이름 띄우기 10 신규회원 2012.02.24 3626
55 아이템 드롭 아이템 확장 6 신규회원 2012.02.24 2977
54 맵/타일 Etude87_Map_Remember_VX ver.1.2 3 습작 2012.03.06 2430
53 기타 078656577er님의 스크립트를 개조한, 사격용 스크립트 1 file 타코 2012.03.16 2519
52 그래픽 Arevulopapo's Particle Engine for VX/Ace by PK8 1 Alkaid 2012.05.13 2873
51 퀘스트 퀘스트 마크 표시용 스크립트 10 file 허걱 2012.05.22 3704
50 전투 Etude87_Tankentai_Addon ver.1.0 7 file 습작 2012.06.03 2882
49 기타 Etude87_Hangul_utf8_List 습작 2012.06.04 1665
48 이름입력 Etude87_HG_Hangul_Name_Scene file 습작 2012.06.14 1948
47 기타 Etude87_GAGA_Chat 4 습작 2012.06.14 1916
46 파티 5인 파티 프로젝트 V1.1 4 file 지나가는떡꼬치 2012.06.30 2988
45 맵/타일 누가 이전에 올렸을지도..... KGC_MapLightening 3 file 클로버군 2012.07.02 2745
44 전투 Team_Ilias's_Old_Project_Demo 4 습작 2012.07.11 2101
43 메시지 메시지를 빠르게 넘겨주는 스크립트 3 타카나시 소라 2012.07.23 5038
42 전투 Slip_Damage_Ex - 슬립데미지 확장기능 (상태별 슬립데미지 적용) 7 허걱 2012.07.24 2198
41 기타 Fullscreen++ by Zeus81 (VX/VXA) 2 Alkaid 2012.09.01 2230
40 전투 Animated Battlers VX 3.7 by DerVVulfman Alkaid 2012.09.07 2102
39 액터 동료가 따라다니게 하는 스크립트 (Woratana's Caterpillar System) 5 MinaAubert 2012.09.13 3012
38 타이틀/게임오버 타이틀에 날씨 효과 주는 스크립트 (Melmarvin's Rainy Title Screen) 6 MinaAubert 2012.09.13 2323
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