mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 00:32:01 +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
@@ -1439,7 +1439,11 @@ public class ItemAssistant {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (wearID == 4079) {
|
||||
c.startAnimation(1458);
|
||||
return false;
|
||||
}
|
||||
switch (wearID) {
|
||||
// Dragon daggers/sword
|
||||
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.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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user