diff --git a/2006Redone Server/data/cfg/globaldrops.txt b/2006Redone Server/data/cfg/globaldrops.txt index c0f50c54..497fc254 100644 --- a/2006Redone Server/data/cfg/globaldrops.txt +++ b/2006Redone Server/data/cfg/globaldrops.txt @@ -11,6 +11,8 @@ 1935:1:3211:3212 88:1:2654:9767 1931:1:3209:3214 +542:1:3059:3488:1 +544:1:3059:3487:1 1923:1:3208:3214 882:1:3205:3228 2313:1:3033:9849 diff --git a/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java b/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java index 02c26f05..c24c6fc5 100644 --- a/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java +++ b/2006Redone Server/src/com/rebotted/game/items/ItemAssistant.java @@ -1439,7 +1439,11 @@ public class ItemAssistant { } } } - + + if (wearID == 4079) { + c.startAnimation(1458); + return false; + } switch (wearID) { // Dragon daggers/sword case 1215: diff --git a/2006Redone Server/src/com/rebotted/game/items/UseItem.java b/2006Redone Server/src/com/rebotted/game/items/UseItem.java index 2121e08a..f9a989f1 100644 --- a/2006Redone Server/src/com/rebotted/game/items/UseItem.java +++ b/2006Redone Server/src/com/rebotted/game/items/UseItem.java @@ -13,6 +13,7 @@ import com.rebotted.game.content.skills.fletching.Stringing; import com.rebotted.game.content.skills.herblore.GrindingAction; import com.rebotted.game.content.skills.herblore.Herblore; import com.rebotted.game.items.impl.CapeDye; +import com.rebotted.game.items.impl.GodPages; import com.rebotted.game.items.impl.WeaponPoison; import com.rebotted.game.npcs.impl.MilkCow; import com.rebotted.game.objects.impl.CrystalChest; @@ -98,7 +99,7 @@ public class UseItem { } - public static void ItemonItem(Player player, int itemUsed, int useWith) { + public static void itemOnItem(Player player, int itemUsed, int useWith) { LogCuttingInterface.handleItemOnItem(player, itemUsed, useWith); ArrowMaking.makeArrow(player, itemUsed, useWith); Stringing.StringBow(player, itemUsed, useWith); @@ -111,6 +112,7 @@ public class UseItem { } GrindingAction.init(player, itemUsed, useWith); CapeDye.dyeItem(player, itemUsed, useWith); + GodPages.itemOnItemHandle(player, useWith, itemUsed); if (Herblore.isIngredient(itemUsed) || Herblore.isIngredient(useWith)) { Herblore.setupPotion(player, itemUsed, useWith); } diff --git a/2006Redone Server/src/com/rebotted/game/items/impl/GodPages.java b/2006Redone Server/src/com/rebotted/game/items/impl/GodPages.java new file mode 100644 index 00000000..620fbb13 --- /dev/null +++ b/2006Redone Server/src/com/rebotted/game/items/impl/GodPages.java @@ -0,0 +1,40 @@ +package com.rebotted.game.items.impl; + +import com.rebotted.game.players.Player; + +public class GodPages { + + public static void fillBook(Player player, int oldBook, int newBook, int page1, int page2, int page3) { + if (player.getItemAssistant().playerHasItem(oldBook, 1) && player.getItemAssistant().playerHasItem(page1, 1) && player.getItemAssistant().playerHasItem(page2, 1) && player.getItemAssistant().playerHasItem(page3, 1)) { + player.getItemAssistant().deleteItem(oldBook, player.getItemAssistant().getItemSlot(oldBook), 1); + player.getItemAssistant().deleteItem(page1, player.getItemAssistant().getItemSlot(page1), 1); + player.getItemAssistant().deleteItem(page2, player.getItemAssistant().getItemSlot(page2), 1); + player.getItemAssistant().deleteItem(page3, player.getItemAssistant().getItemSlot(page3), 1); + player.getItemAssistant().addItem(newBook, 1); + } else { + player.getPacketSender().sendMessage("You need all 3 pages to fill the book!"); + } + } + + public static void itemOnItemHandle(Player player, int useWith, int itemUsed) { + if ((useWith == 3827) || (useWith == 3827) || (useWith == 3827) && (itemUsed == 3839)) { // sara + fillBook(player, 3839, 3840, 3827, 3828, 3829); + } + if ((itemUsed == 3827) || (itemUsed == 3828) || (itemUsed == 3829) || (useWith == 3839)) {// sara + fillBook(player, 3839, 3840, 3827, 3828, 3829); + } + if ((useWith == 3831) || (useWith == 3832) || (useWith == 3833) && (itemUsed == 3841)) { // zam + fillBook(player, 3841, 3842, 3831, 3832, 3833); + } + if ((itemUsed == 3831) || (itemUsed == 3832) || (itemUsed == 3833) || (useWith == 3841)) { // zam + fillBook(player, 3841, 3842, 3831, 3832, 3833); + } + if ((useWith == 3835) || (useWith == 3836) || (useWith == 3837) && (itemUsed == 3843)) { // guth + fillBook(player, 3843, 3844, 3835, 3836, 3837); + } + if ((itemUsed == 3835) || (itemUsed == 3836) || (itemUsed == 3837) || (useWith == 3843)) { // guth + fillBook(player, 3843, 3844, 3835, 3836, 3837); + } + } + +} \ No newline at end of file diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/BankAll.java b/2006Redone Server/src/com/rebotted/net/packets/impl/BankAll.java index 0a8498f8..c832b7a5 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/BankAll.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/BankAll.java @@ -1,6 +1,5 @@ package com.rebotted.net.packets.impl; -import com.rebotted.GameConstants; import com.rebotted.game.content.random.PartyRoom; import com.rebotted.game.items.GameItem; import com.rebotted.game.items.Item; diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ChangeRegions.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ChangeRegions.java index da224321..f330c4b3 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ChangeRegions.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ChangeRegions.java @@ -4,7 +4,6 @@ import com.rebotted.GameConstants; import com.rebotted.GameEngine; import com.rebotted.game.content.music.Music; import com.rebotted.game.globalworldobjects.Doors; -import com.rebotted.game.players.Client; import com.rebotted.game.players.Player; import com.rebotted.net.packets.PacketType; import com.rebotted.world.GlobalDropsHandler; diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickItem.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickItem.java index 63049df2..894a79c7 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ClickItem.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ClickItem.java @@ -72,7 +72,9 @@ public class ClickItem implements PacketType { return; } switch (itemId) { - + case 4079: + player.startAnimation(1457); + break; case 407: if (Misc.random(1) == 0) { player.getItemAssistant().addItem(409, 1); @@ -182,25 +184,37 @@ public class ClickItem implements PacketType { // break; case 5070: - player.getPacketSender().sendMessage("You search the nest."); - player.getItemAssistant().addItem(5076, 1); - player.getItemAssistant().deleteItem(itemId, 1); - player.getItemAssistant().addItem(5075, 1); + if (player.getItemAssistant().freeSlots() >= 2) { + player.getPacketSender().sendMessage("You search the nest."); + player.getItemAssistant().addItem(5076, 1); + player.getItemAssistant().deleteItem(itemId, 1); + player.getItemAssistant().addItem(5075, 1); + } else { + player.getPacketSender().sendMessage("You do not have enough inventory space to do that."); + } break; case 5071: + if (player.getItemAssistant().freeSlots() >= 2) { player.getPacketSender().sendMessage("You search the nest."); player.getItemAssistant().addItem(5078, 1); player.getItemAssistant().deleteItem(itemId, 1); player.getItemAssistant().addItem(5075, 1); - break; + } else { + player.getPacketSender().sendMessage("You do not have enough inventory space to do that."); + } + break; case 5072: - player.getPacketSender().sendMessage("You search the nest."); - player.getItemAssistant().addItem(5077, 1); - player.getItemAssistant().deleteItem(itemId, 1); - player.getItemAssistant().addItem(5075, 1); - break; + if (player.getItemAssistant().freeSlots() >= 2) { + player.getPacketSender().sendMessage("You search the nest."); + player.getItemAssistant().addItem(5077, 1); + player.getItemAssistant().deleteItem(itemId, 1); + player.getItemAssistant().addItem(5075, 1); + } else { + player.getPacketSender().sendMessage("You do not have enough inventory space to do that."); + } + break; case 5073: player.getItemAssistant().handleTreeSeeds(itemId); diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick2.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick2.java index d62fb385..3203163d 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick2.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick2.java @@ -27,6 +27,9 @@ public class ItemClick2 implements PacketType { } switch (itemId) { + case 4079: + c.startAnimation(1459); + break; } } diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick3.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick3.java index cdcd9eb8..92cffcfe 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick3.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemClick3.java @@ -33,7 +33,10 @@ public class ItemClick3 implements PacketType { player.endCurrentTask(); switch (itemId) { - + case 4079: + player.startAnimation(1460); + break; + case 2552: case 2554: case 2556: diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnItem.java b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnItem.java index 0797752b..ca4fc479 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnItem.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/ItemOnItem.java @@ -16,7 +16,7 @@ public class ItemOnItem implements PacketType { return; } player.endCurrentTask(); - UseItem.ItemonItem(player, itemUsed, useWith); + UseItem.itemOnItem(player, itemUsed, useWith); } } diff --git a/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java b/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java index 2c164799..9ab6cbe2 100644 --- a/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java +++ b/2006Redone Server/src/com/rebotted/net/packets/impl/PickupItem.java @@ -11,7 +11,6 @@ import com.rebotted.game.content.skills.firemaking.Firemaking; import com.rebotted.game.content.skills.firemaking.LogData; import com.rebotted.game.items.ItemAssistant; import com.rebotted.game.items.impl.RareProtection; -import com.rebotted.game.players.Client; import com.rebotted.game.players.Player; import com.rebotted.net.packets.PacketType; import com.rebotted.util.GameLogger;