mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Merge pull request #220 from WizardJesse1/master
Fix prayer burying and add Varrock shops
This commit is contained in:
@@ -223,8 +223,8 @@ spawn_npc name: :scavvo, x: 3192, y: 3353, z: 1
|
||||
spawn_npc name: :shop_keeper_551, x: 3206, y: 3399
|
||||
spawn_npc name: :shop_assistant_552, x: 3207, y: 3396
|
||||
|
||||
spawn_npc name: :shop_keeper, x: 3216, y: 3414
|
||||
spawn_npc name: :shop_assistant, x: 3216, y: 3417
|
||||
spawn_npc name: :shop_keeper_522, x: 3216, y: 3414
|
||||
spawn_npc name: :shop_assistant_523, x: 3216, y: 3417
|
||||
|
||||
spawn_npc name: :tea_seller, x: 3271, y: 3411
|
||||
|
||||
|
||||
@@ -9,8 +9,10 @@
|
||||
</authors>
|
||||
<scripts>
|
||||
<script>npcs.rb</script>
|
||||
<script>shops.rb</script>
|
||||
</scripts>
|
||||
<dependencies>
|
||||
<dependency>entity-spawning</dependency>
|
||||
<dependency>shops</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
@@ -0,0 +1,7 @@
|
||||
create_shop :npcs => [553], :name => 'Aubury\'s Rune Shop.', :items => [[554, 5_000], [555, 5_000], [556, 5_000], [557, 5_000], [558, 5_000], [559, 5_000], [562, 250], [560, 250]]
|
||||
create_shop :npcs => [550], :name => 'Lowe\'s Archery Emporium', :items => [[882, 2_000], [884, 1_500], [886, 1_000], [888, 800], [890, 600], [841, 4], [839, 4], [843, 3], [845, 3], [849, 2], [847, 2], [853, 1], [851, 1], [837, 2]]
|
||||
create_shop :npcs => [549], :buys => :all, :name => 'Horvik\s Armour Shop.', :items => [[1103, 5], [1101, 3], [1105, 3], [1109, 1], [1117, 3], [1115, 1], [1119, 1], [1125, 1], [1121, 1], [1067, 1], [1133, 1], [1097, 1]]
|
||||
create_shop :npcs => [548], :name => 'Thessalia\'s Fine Clothes.', :items => [[1005, 3], [1129, 12], [1059, 10], [1061, 10], [1757, 1], [1013, 5], [1015, 3], [1011, 2], [1007, 4], [950, 5], [428, 3], [426, 3]]
|
||||
create_shop :npcs => [522, 523], :buys => :all, :name => 'Varrock General Store', :items => [[1931, 5], [1935, 2], [1735, 2], [1925, 3], [1923, 2], [1887, 2], [590, 2], [1755, 2], [2347, 5], [550, 5]]
|
||||
create_shop :npcs => [551, 552], :name => 'Varrock Swordshop', :items => [[1277, 5], [1279, 4], [1281, 4], [1283, 3], [1285, 3], [1287, 2], [1291, 4], [1293, 3], [1295, 3], [1297, 2], [1299, 2], [1301, 1], [1205, 10], [1203, 6], [1207, 5], [1217, 4], [1209, 3], [1211, 2]]
|
||||
create_shop :npcs => [546], :name => 'Zaff\'s Superior Staffs!', :items => [[1391, 5], [1379, 5], [1389, 5], [1381, 2], [1383, 2], [1385, 2], [1387, 2]]
|
||||
@@ -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)
|
||||
@@ -32,22 +32,20 @@ class BuryBoneAction < Action
|
||||
def execute
|
||||
if @executions == 0
|
||||
mob.send_message('You dig a hole in the ground...')
|
||||
mob.play_animation(BURY_BONE_ANIMATION)
|
||||
@executions += 1
|
||||
elsif @executions == 1
|
||||
if mob.inventory.get(@slot).id == @bone.id
|
||||
mob.play_animation(BURY_BONE_ANIMATION)
|
||||
mob.send_message('You bury the bones.')
|
||||
|
||||
mob.inventory.reset(@slot)
|
||||
mob.skill_set.add_experience(Skill::PRAYER, @bone.experience)
|
||||
end
|
||||
|
||||
stop
|
||||
end
|
||||
end
|
||||
|
||||
def equals(other)
|
||||
get_class == other.get_class && @bone == other.bone
|
||||
get_class == other.get_class
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user