~ 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 vx
by: 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 information
author: Enelvon
date: 2011-Apr-30
original script sites
http://www.rpgmakervx.net/index.php?showtopic=45007
http://rmrk.net/index.php/topic,42482.msg485531.html
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 = "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=2629c5097803dc9fcc88a7238892e0e2707763ba) (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=3b9cda963b31422b1ce3521b71cbb7a6cef0ffa4) (http://www.mediafire.com/imageview.php?thumb=5&quickkey=rl6z92k90tqqfr2)
script
MediaFire Link (http://www.mediafire.com/file/t1k5u4n1xreah8w/AcePort EnelvonSeiryuki Sell-Only Shop.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
;)