Add Varrock shops

This commit is contained in:
Jesse Woolsey
2016-02-13 16:26:49 -05:00
parent ae9a3098e9
commit f00998d58e
5 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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)