WR Heart rpg
Vuoi reagire a questo messaggio? Crea un account in pochi clic o accedi per continuare.

Suoni diversi nello shop system

Andare in basso

iconvx Suoni diversi nello shop system

Messaggio Da LusianL il Gio Mag 10, 2012 1:19 pm

Suoni diversi nello shop system


Autore:Q

Descrizione
Applica una suono diverso a seconda dell'azione fatta per lo shop

Screen
E' inutile

Script:
Spoiler:

Codice:
# Custom shop sound effects
# Made by Q
# Compatibility: overwrites some of scene_shop
# when you select purchase
Q_PURCHASE_SE = RPG::SE.new("Decision1", 80, 100)
# when you select sell
Q_SELLING_SE = RPG::SE.new("Decision1", 80, 100)
# when you select exit
Q_EXIT_SE = RPG::SE.new("Decision1", 80, 100)
# when you select an item to buy
Q_BUY_SE = RPG::SE.new("Decision1", 80, 100)
# after you select quanity of the item being bought
Q_BUY_DONE_SE = RPG::SE.new("Shop", 80, 100)
# when you select an item to sell
Q_SELL_SE = RPG::SE.new("Decision1", 80, 100)
# after you select quanity of the item being sold
Q_SELL_DONE_SE = RPG::SE.new("Shop", 80, 100)
# end of spot that's easy to edit.
class Scene_Shop
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
case @command_window.index
when 0 # buy
Q_PURCHASE_SE.play
@command_window.active = false
@dummy_window.visible = false
@buy_window.active = true
@buy_window.visible = true
@buy_window.refresh
@status_window.visible = true
when 1 # sell
if $game_temp.shop_purchase_only
Sound.play_buzzer
else
Q_SELLING_SE.play
@command_window.active = false
@dummy_window.visible = false
@sell_window.active = true
@sell_window.visible = true
@sell_window.refresh
end
when 2 # Quit
Q_EXIT_SE.play
$scene = Scene_Map.new
end
end
end
#--------------------------------------------------------------------------
# * Update Buy Item Selection
#--------------------------------------------------------------------------
def update_buy_selection
@status_window.item = @buy_window.item
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@dummy_window.visible = true
@buy_window.active = false
@buy_window.visible = false
@status_window.visible = false
@status_window.item = nil
@help_window.set_text("")
return
end
if Input.trigger?(Input::C)
@item = @buy_window.item
number = $game_party.item_number(@item)
if @item == nil or @item.price > $game_party.gold or number == 99
Sound.play_buzzer
else
Q_BUY_SE.play
max = @item.price == 0 ? 99 : $game_party.gold / @item.price
max = [max, 99 - number].min
@buy_window.active = false
@buy_window.visible = false
@number_window.set(@item, max, @item.price)
@number_window.active = true
@number_window.visible = true
end
end
end
#--------------------------------------------------------------------------
# * Update Sell Item Selection
#--------------------------------------------------------------------------
def update_sell_selection
if Input.trigger?(Input::B)
Sound.play_cancel
@command_window.active = true
@dummy_window.visible = true
@sell_window.active = false
@sell_window.visible = false
@status_window.item = nil
@help_window.set_text("")
elsif Input.trigger?(Input::C)
@item = @sell_window.item
@status_window.item = @item
if @item == nil or @item.price == 0
Sound.play_buzzer
else
Q_SELL_SE.play
max = $game_party.item_number(@item)
@sell_window.active = false
@sell_window.visible = false
@number_window.set(@item, max, @item.price / 2)
@number_window.active = true
@number_window.visible = true
@status_window.visible = true
end
end
end
#--------------------------------------------------------------------------
# * Confirm Number Input
#--------------------------------------------------------------------------
def decide_number_input
@number_window.active = false
@number_window.visible = false
case @command_window.index
when 0 # Buy
Q_BUY_DONE_SE.play
$game_party.lose_gold(@number_window.number * @item.price)
$game_party.gain_item(@item, @number_window.number)
@gold_window.refresh
@buy_window.refresh
@status_window.refresh
@buy_window.active = true
@buy_window.visible = true
when 1 # sell
Q_SELL_DONE_SE.play
$game_party.gain_gold(@number_window.number * (@item.price / 2))
$game_party.lose_item(@item, @number_window.number)
@gold_window.refresh
@sell_window.refresh
@status_window.refresh
@sell_window.active = true
@sell_window.visible = true
@status_window.visible = false
end
end
end


_________________________________________________
Premi RpgMaker
Spoiler:


Suoni diversi nello shop system SCContest1OctSuoni diversi nello shop system SCContest3OctSuoni diversi nello shop system SCContest3OctSuoni diversi nello shop system SCContest3OctSuoni diversi nello shop system SCContest2OctSuoni diversi nello shop system SCContest2OctSuoni diversi nello shop system Bestpixel2Suoni diversi nello shop system BestresourCSist2Suoni diversi nello shop system Mostproductive1Suoni diversi nello shop system Iconap13Suoni diversi nello shop system Iconap14Suoni diversi nello shop system Iconap15Suoni diversi nello shop system Iconap16
Suoni diversi nello shop system Screen10
LusianL
LusianL

Data d'iscrizione : 07.07.11
Età : 119
Località : Charsetlandia

Torna in alto Andare in basso

Torna in alto

- Argomenti simili

 
Permessi in questa sezione del forum:
Non puoi rispondere agli argomenti in questo forum.