사용법은 저도 잘 몰라요^^
# ▼▲▼ XRXS36. 숍·변동시장 ▼▲▼
# by 앵아 재흙
#==============================================================================
# ■ Interpreter
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# ◇ 아이템의 시세를 설정
#--------------------------------------------------------------------------
def command_item_quote(id, percent)
$data_items[id].quotation_percent = percent
end
#--------------------------------------------------------------------------
# ◇ 무기 의 시세를 설정
#--------------------------------------------------------------------------
def command_weapon_quote(id, percent)
$data_weapons[id].quotation_percent = percent
end
#--------------------------------------------------------------------------
# ◇ 방어구의 시세를 설정
#--------------------------------------------------------------------------
def command_armor_quote(id, percent)
$data_armors[id].quotation_percent = percent
end
end
module RPG
#==============================================================================
# ■ RPG::Item
#==============================================================================
class Item
attr_accessor :quotation_percent
#--------------------------------------------------------------------------
# ● 가격
#--------------------------------------------------------------------------
def price
# 초기화
@quotation_percent = 100 if @quotation_percent.nil?
# 값을 돌려준다
return @price * @quotation_percent / 100
end
end
#==============================================================================
# ■ RPG::Weapon
#==============================================================================
class Weapon
attr_accessor :quotation_percent
#--------------------------------------------------------------------------
# ● 가격
#--------------------------------------------------------------------------
def price
# 초기화
@quotation_percent = 100 if @quotation_percent.nil?
# 값을 돌려준다
return @price * @quotation_percent / 100
end
end
#==============================================================================
# ■ RPG::Armor
#==============================================================================
class Armor
attr_accessor :quotation_percent
#--------------------------------------------------------------------------
# ● 가격
#--------------------------------------------------------------------------
def price
# 초기화
@quotation_percent = 100 if @quotation_percent.nil?
# 값을 돌려준다
return @price * @quotation_percent / 100
end
end
end
아이템의 경우 이벤트 스크립트로
$data_items[아이템 번호].quotation_percent = 몇 %
이렇게 설정하는거 같은데요?
아무튼 감사합니다.