mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Add Varrock shops
This commit is contained in:
@@ -22,7 +22,7 @@ end
|
||||
private
|
||||
|
||||
# The `Currency` used by default.
|
||||
DEFAULT_CURRENCY = Currency.new(995, 'money')
|
||||
DEFAULT_CURRENCY = Currency.new(995, 'coins')
|
||||
|
||||
# The default capacity of a shop.
|
||||
DEFAULT_CAPACITY = 30
|
||||
|
||||
@@ -190,7 +190,7 @@ on :message, :item_action do |player, message|
|
||||
next
|
||||
end
|
||||
|
||||
if !contains && inventory.free_space == 0
|
||||
if !contains && inventory.free_slots == 0
|
||||
player.send_message('The shop is currently full at the moment.')
|
||||
message.terminate
|
||||
next
|
||||
@@ -237,7 +237,7 @@ def buy(shop, player, message, currency)
|
||||
option = message.option
|
||||
if option == 1
|
||||
player.send_message("#{shop_item.name}: currently costs #{shop_item.cost} #{currency.name}.")
|
||||
next
|
||||
return
|
||||
end
|
||||
|
||||
buy_amount = case option
|
||||
@@ -297,4 +297,4 @@ def buy(shop, player, message, currency)
|
||||
end
|
||||
|
||||
# Declares the open_shop attribute, which contains the id of the currently open shop.
|
||||
declare_attribute(:open_shop, -1)
|
||||
declare_attribute(:open_shop, -1)
|
||||
Reference in New Issue
Block a user