~ Sell-Only Shop Script v1.0 ~
a very simple script that allows the creation
of a shop where the player can only
sell items
ported from vxby: Seiryuki
date: 2011-Dec-29
latest version: 1.0
modifications: you no longer need to manually deactivate the sell-only shop in the shop event as it is done automatically by the script when the player exits the shop. also, instead of disabling the "buy" command, it is removed.
additions: ability to change shop command texts for "sell" and "cancel"
original script informationauthor: Enelvon
date: 2011-Apr-30
original script siteshttp://www.rpgmakervx.net/index.php?showtopic=45007
http://rmrk.net/index.php/topic,42482.msg485531.htmlinstructions------------------------------------------------------------------------------
Place this script above Main, below Materials and above any other scripts that modify the command window of Scene_Shop.
Rather than using a switch, this uses a script command in an event.
To make your shops sell-only, call this script before shop processing:
By default, a shop is not sell-only (shop_sell_only = false)
This script-call must be done for every shop that you want to be sell-only.
$game_temp.shop_sell_only = trueOptional: Change text of SELL command (do before shop processing).
Only works for a sell-only shop.
By default, it is "Sell"
$game_temp.es_sell_text = "Selling"Optional: Change text of CANCEL command (do before shop processing).
Only works for a sell-only shop.
By default, it is "Cancel"
$game_temp.es_cancel_text = "Goodbye"NOTE: When exiting the shop, the script calls above automatically
revert to their defaults i.e. shop_sell_only=false, etc.
------------------------------------------------------------------------------
EXAMPLE OF A SELL-ONLY SHOP EVENT:
@> Script: $game_temp.shop_sell_only = true
@> Script: $game_temp.es_cancel_text = "Bye!"
@> Shop Processing: [Potion]
: : [Hi-Potion]
------------------------------------------------------------------------------
screenshots(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.mediafire.com%2Fimgbnc.php%2F2eff7d5dcc89f6e2da2462d899420b243be00c74810041c336340e30eca9c2724g.jpg&hash=a8c232f2ce3130fb28a3c5b48c52d46b05bc06ec) (http://www.mediafire.com/imageview.php?thumb=5&quickkey=lchy53wr5n1ut4c)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fwww.mediafire.com%2Fimgbnc.php%2F5955569ec4945def3c1fea62209018b7514286704c1f187b2c97613b0fa68f7a4g.jpg&hash=608919bd673e917331d446c87d30f99505703f58) (http://www.mediafire.com/imageview.php?thumb=5&quickkey=rl6z92k90tqqfr2)
scriptMediaFire Link (http://www.mediafire.com/file/t1k5u4n1xreah8w/AcePort%20EnelvonSeiryuki%20Sell-Only%20Shop.txt) or,
#=============================================================================#
#= Ported to RPG Maker VX Ace
#= by: Seiryuki
#= on: 2011.12.29
#= VXA version: 1.0
#= additions: shop command text can be changed
#=============================================================================#
###############################################################################
# ~~~~~~~~~~~~~~~~~~~~~~SELL-ONLY SHOP SCRIPT v1.0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~by Enelvon~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~concept, assistance by Seiryuki~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~Last Update: 2011.04.30~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# site: rpgmakervx.net~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# post: http://www.rpgmakervx.net/index.php?showtopic=45007~~~~~~~~~~~~~~~~~~~~
###############################################################################
# This script allows you to have a shop that you can only sell to by removing
# the "Buy" option. Remember, you must enter at least one item to create the
# shop.
###############################################################################
#------------------------------------------------------------------------------
# COMPATIBILITY:
# Unknown: Haven't been tested with other RMVXAce shop scripts.
#------------------------------------------------------------------------------
# INSTRUCTIONS:
# Place this script above Main, below materials and above any other scripts
# that modify the command window of Scene_Shop.
# Rather than using a switch, this uses a script command in an event.
#
# To make your shops sell-only, call this script before shop processing:
# By default, a shop is not sell-only (shop_sell_only = false)
# This script-call must be done for every shop that you want to be sell-only.
# $game_temp.shop_sell_only = true
#
# Optional: Change text of SELL command (do before shop processing).
# Only works for a sell-only shop.
# By default, it is "Sell"
# $game_temp.es_sell_text = "Give"
#
# Optional: Change text of CANCEL command (do before shop processing).
# Only works for a sell-only shop.
# By default, it is "Cancel"
# $game_temp.es_cancel_text = "Bye!"
#
# NOTE: When exiting the shop, the script calls above automatically
# revert to their defaults i.e. shop_sell_only=false, etc.
#------------------------------------------------------------------------------
# EXAMPLE OF A SELL-ONLY SHOP EVENT:
#
# @> Script: $game_temp.shop_sell_only = true
# @> Script: $game_temp.es_cancel_text = "Bye!"
# @> Shop Processing: [Potion]
# : : [Hi-Potion]
#
###############################################################################
###############################################################################
class Game_Temp
attr_accessor :shop_sell_only
attr_accessor :es_sell_text
attr_accessor :es_cancel_text
alias enelvon_seiryuki_temp_init initialize
def initialize
enelvon_seiryuki_temp_init
# Initialise the variables.
@shop_sell_only = false
@es_sell_text = Vocab::ShopSell
@es_cancel_text = Vocab::ShopCancel
end
end
class Window_ShopCommand < Window_HorzCommand
alias es_make_command_list make_command_list
def make_command_list
# Make the shop a sell-only shop.
if $game_temp.shop_sell_only == true
add_command($game_temp.es_sell_text, :sell, !@purchase_only)
add_command($game_temp.es_cancel_text, :cancel)
elsif $game_temp.shop_sell_only == false
$game_temp.es_sell_text = Vocab::ShopSell
$game_temp.es_cancel_text = Vocab::ShopCancel
es_make_command_list
end
end
end
class Scene_Shop < Scene_MenuBase
alias es_terminate terminate
def terminate
es_terminate
# Revert to defaults.
$game_temp.shop_sell_only = false
$game_temp.es_sell_text = Vocab::ShopSell
$game_temp.es_cancel_text = Vocab::ShopCancel
end
end
#END OF SCRIPT;)
Nice script, works for my game.
Erm hi, It's been a while since anyone has looked at this, I hope Its okay to post a question here, but..
In the example there is Potion and de-petrify in the call shop event, which I assumed meant the shop keeper would only buy Potions and de-petrify from you, but when I call my shop, its a Sell EVERYTHING-only shop :P
He'll buy anything worth anything which is not what I wanted... anyone see a way of just having the shopkeeper buy from you, the things in the call shop list???
Quote from: Geodessia on December 20, 2012, 06:57:19 AM
In the example there is Potion and de-petrify in the call shop event, which I assumed meant the shop keeper would only buy Potions and de-petrify from you, but when I call my shop, its a Sell EVERYTHING-only shop :P
He'll buy anything worth anything which is not what I wanted... anyone see a way of just having the shopkeeper buy from you, the things in the call shop list???
Hi, sorry for being so late to post. Your question is an excellent one - it is the reason I wanted a Sell Only Shop script.
Get the Limit Shop Buy script from here:
http://www.rpgmakervxace.net/topic/603-limit-sell-items-to-buy-item-selections/?hl=%2Blimit+%2Bshop
It is a script that only allows the shopkeeper to only buy the items (from you) that he sells! It is a script done by Mithran for RMVX that was ported to VXAce by Mr. Bubble.
I have done a small script to Hide Shop Item Categories (http://rmrk.net/index.php/topic,44739.0.html), if you need further restrictions/customisation.
Hope that helps.
I apologise for this thread necro, but I figured it was better to use this as my question is relevant, rather than start a new one.
So, to my simple question. I got this script working perfectly and was very simple to implement, so I thank you for that, however, I was wondering how I would go about adapting it to only show a 'sell only' option when the player chooses 'sell' from a list of options.
You see, in my game, I want the player to choose from a list of buy/sell/exit BEFORE opening the shop processing. I can get it 'buy only' for buying easy enough, but not selling.
Any advice would be much appreciated. Thanks.
It's ok, I got this working fine now.