mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-03 00:31:51 +00:00
Random fixes (#273)
- Cant open nest if you do not have space - Added working yo yo - Added monks robe spawns - Added ability to make god pages - Removed a few warnings closes #265 closes #262 closes #259 closes #243
This commit is contained in:
committed by
Daniel Ginovker
parent
8ec8a92d20
commit
6ad9d1f7e9
@@ -11,6 +11,8 @@
|
|||||||
1935:1:3211:3212
|
1935:1:3211:3212
|
||||||
88:1:2654:9767
|
88:1:2654:9767
|
||||||
1931:1:3209:3214
|
1931:1:3209:3214
|
||||||
|
542:1:3059:3488:1
|
||||||
|
544:1:3059:3487:1
|
||||||
1923:1:3208:3214
|
1923:1:3208:3214
|
||||||
882:1:3205:3228
|
882:1:3205:3228
|
||||||
2313:1:3033:9849
|
2313:1:3033:9849
|
||||||
|
|||||||
@@ -1439,7 +1439,11 @@ public class ItemAssistant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wearID == 4079) {
|
||||||
|
c.startAnimation(1458);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
switch (wearID) {
|
switch (wearID) {
|
||||||
// Dragon daggers/sword
|
// Dragon daggers/sword
|
||||||
case 1215:
|
case 1215:
|
||||||
|
|||||||
@@ -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.GrindingAction;
|
||||||
import com.rebotted.game.content.skills.herblore.Herblore;
|
import com.rebotted.game.content.skills.herblore.Herblore;
|
||||||
import com.rebotted.game.items.impl.CapeDye;
|
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.items.impl.WeaponPoison;
|
||||||
import com.rebotted.game.npcs.impl.MilkCow;
|
import com.rebotted.game.npcs.impl.MilkCow;
|
||||||
import com.rebotted.game.objects.impl.CrystalChest;
|
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);
|
LogCuttingInterface.handleItemOnItem(player, itemUsed, useWith);
|
||||||
ArrowMaking.makeArrow(player, itemUsed, useWith);
|
ArrowMaking.makeArrow(player, itemUsed, useWith);
|
||||||
Stringing.StringBow(player, itemUsed, useWith);
|
Stringing.StringBow(player, itemUsed, useWith);
|
||||||
@@ -111,6 +112,7 @@ public class UseItem {
|
|||||||
}
|
}
|
||||||
GrindingAction.init(player, itemUsed, useWith);
|
GrindingAction.init(player, itemUsed, useWith);
|
||||||
CapeDye.dyeItem(player, itemUsed, useWith);
|
CapeDye.dyeItem(player, itemUsed, useWith);
|
||||||
|
GodPages.itemOnItemHandle(player, useWith, itemUsed);
|
||||||
if (Herblore.isIngredient(itemUsed) || Herblore.isIngredient(useWith)) {
|
if (Herblore.isIngredient(itemUsed) || Herblore.isIngredient(useWith)) {
|
||||||
Herblore.setupPotion(player, itemUsed, useWith);
|
Herblore.setupPotion(player, itemUsed, useWith);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.rebotted.net.packets.impl;
|
package com.rebotted.net.packets.impl;
|
||||||
|
|
||||||
import com.rebotted.GameConstants;
|
|
||||||
import com.rebotted.game.content.random.PartyRoom;
|
import com.rebotted.game.content.random.PartyRoom;
|
||||||
import com.rebotted.game.items.GameItem;
|
import com.rebotted.game.items.GameItem;
|
||||||
import com.rebotted.game.items.Item;
|
import com.rebotted.game.items.Item;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.rebotted.GameConstants;
|
|||||||
import com.rebotted.GameEngine;
|
import com.rebotted.GameEngine;
|
||||||
import com.rebotted.game.content.music.Music;
|
import com.rebotted.game.content.music.Music;
|
||||||
import com.rebotted.game.globalworldobjects.Doors;
|
import com.rebotted.game.globalworldobjects.Doors;
|
||||||
import com.rebotted.game.players.Client;
|
|
||||||
import com.rebotted.game.players.Player;
|
import com.rebotted.game.players.Player;
|
||||||
import com.rebotted.net.packets.PacketType;
|
import com.rebotted.net.packets.PacketType;
|
||||||
import com.rebotted.world.GlobalDropsHandler;
|
import com.rebotted.world.GlobalDropsHandler;
|
||||||
|
|||||||
@@ -72,7 +72,9 @@ public class ClickItem implements PacketType {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
|
case 4079:
|
||||||
|
player.startAnimation(1457);
|
||||||
|
break;
|
||||||
case 407:
|
case 407:
|
||||||
if (Misc.random(1) == 0) {
|
if (Misc.random(1) == 0) {
|
||||||
player.getItemAssistant().addItem(409, 1);
|
player.getItemAssistant().addItem(409, 1);
|
||||||
@@ -182,25 +184,37 @@ public class ClickItem implements PacketType {
|
|||||||
// break;
|
// break;
|
||||||
|
|
||||||
case 5070:
|
case 5070:
|
||||||
player.getPacketSender().sendMessage("You search the nest.");
|
if (player.getItemAssistant().freeSlots() >= 2) {
|
||||||
player.getItemAssistant().addItem(5076, 1);
|
player.getPacketSender().sendMessage("You search the nest.");
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
player.getItemAssistant().addItem(5076, 1);
|
||||||
player.getItemAssistant().addItem(5075, 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;
|
break;
|
||||||
|
|
||||||
case 5071:
|
case 5071:
|
||||||
|
if (player.getItemAssistant().freeSlots() >= 2) {
|
||||||
player.getPacketSender().sendMessage("You search the nest.");
|
player.getPacketSender().sendMessage("You search the nest.");
|
||||||
player.getItemAssistant().addItem(5078, 1);
|
player.getItemAssistant().addItem(5078, 1);
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
player.getItemAssistant().deleteItem(itemId, 1);
|
||||||
player.getItemAssistant().addItem(5075, 1);
|
player.getItemAssistant().addItem(5075, 1);
|
||||||
break;
|
} else {
|
||||||
|
player.getPacketSender().sendMessage("You do not have enough inventory space to do that.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 5072:
|
case 5072:
|
||||||
player.getPacketSender().sendMessage("You search the nest.");
|
if (player.getItemAssistant().freeSlots() >= 2) {
|
||||||
player.getItemAssistant().addItem(5077, 1);
|
player.getPacketSender().sendMessage("You search the nest.");
|
||||||
player.getItemAssistant().deleteItem(itemId, 1);
|
player.getItemAssistant().addItem(5077, 1);
|
||||||
player.getItemAssistant().addItem(5075, 1);
|
player.getItemAssistant().deleteItem(itemId, 1);
|
||||||
break;
|
player.getItemAssistant().addItem(5075, 1);
|
||||||
|
} else {
|
||||||
|
player.getPacketSender().sendMessage("You do not have enough inventory space to do that.");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case 5073:
|
case 5073:
|
||||||
player.getItemAssistant().handleTreeSeeds(itemId);
|
player.getItemAssistant().handleTreeSeeds(itemId);
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ public class ItemClick2 implements PacketType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
|
case 4079:
|
||||||
|
c.startAnimation(1459);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,10 @@ public class ItemClick3 implements PacketType {
|
|||||||
player.endCurrentTask();
|
player.endCurrentTask();
|
||||||
|
|
||||||
switch (itemId) {
|
switch (itemId) {
|
||||||
|
case 4079:
|
||||||
|
player.startAnimation(1460);
|
||||||
|
break;
|
||||||
|
|
||||||
case 2552:
|
case 2552:
|
||||||
case 2554:
|
case 2554:
|
||||||
case 2556:
|
case 2556:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ public class ItemOnItem implements PacketType {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
player.endCurrentTask();
|
player.endCurrentTask();
|
||||||
UseItem.ItemonItem(player, itemUsed, useWith);
|
UseItem.itemOnItem(player, itemUsed, useWith);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import com.rebotted.game.content.skills.firemaking.Firemaking;
|
|||||||
import com.rebotted.game.content.skills.firemaking.LogData;
|
import com.rebotted.game.content.skills.firemaking.LogData;
|
||||||
import com.rebotted.game.items.ItemAssistant;
|
import com.rebotted.game.items.ItemAssistant;
|
||||||
import com.rebotted.game.items.impl.RareProtection;
|
import com.rebotted.game.items.impl.RareProtection;
|
||||||
import com.rebotted.game.players.Client;
|
|
||||||
import com.rebotted.game.players.Player;
|
import com.rebotted.game.players.Player;
|
||||||
import com.rebotted.net.packets.PacketType;
|
import com.rebotted.net.packets.PacketType;
|
||||||
import com.rebotted.util.GameLogger;
|
import com.rebotted.util.GameLogger;
|
||||||
|
|||||||
Reference in New Issue
Block a user