if Input.repeat?(Input::RIGHT)
if item.price > 0 and number-shopnumber > 0
$game_system.se_play($data_system.cursor_se)
gain_shopitem(1)
$game_party.gain_shopgold(item.price/2)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
if Input.repeat?(Input::X)
if item.price > 0 and number-shopnumber > 10
$game_system.se_play($data_system.cursor_se)
gain_shopitem(10)
$game_party.gain_shopgold(item.price/2*10)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
#--------------------------------------------------------------------------
if Input.repeat?(Input::LEFT)
if $game_party.item_shopnumber(item.id) > 0
gain_shopitem(-1)
$game_party.gain_shopgold(-item.price/2)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
if Input.repeat?(Input::Y)
if $game_party.item_shopnumber(item.id) > 10
gain_shopitem(-10)
$game_party.gain_shopgold(-item.price/2*10)
$game_system.se_play($data_system.cursor_se)
refresh
else
$game_system.se_play($data_system.buzzer_se)
end
end
#--------------------------------------------------------------------------
if Input.repeat?(Input::C)
if $game_party.shopgold > 0
for i in 1..$data_items.size-1
$game_party.gain_item(i, -$game_party.item_shopnumber(i))
$game_party.gain_gold($data_items.price/2*$game_party.item_shopnumber(i))
$game_party.gain_shopgold(-$data_items.price/2*$game_party.item_shopnumber(i))
$game_party.gain_shopitem(i, -99)
end
for i in 1..$data_weapons.size-1
$game_party.gain_weapon(i, -$game_party.weapon_shopnumber(i))
$game_party.gain_gold($data_weapons.price/2*$game_party.weapon_shopnumber(i))
$game_party.gain_shopgold(-$data_weapons.price/2*$game_party.weapon_shopnumber(i))
$game_party.gain_shopweapon(i, -99)
end
for i in 1..$data_armors.size-1
$game_party.gain_armor(i, -$game_party.armor_shopnumber(i))
$game_party.gain_gold($data_armors.price/2*$game_party.armor_shopnumber(i))
$game_party.gain_shopgold(-$data_armors.price/2*$game_party.armor_shopnumber(i))
$game_party.gain_shoparmor(i, -99)
end
$game_system.se_play($data_system.shop_se)
else
$game_system.se_play($data_system.buzzer_se)
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |