forked from 2009Scape/Server
Changes to Gold Satchel
Only coal will be used from the satchel when smelting, the other ores must be in the inventory (to prevent smelting more than you can carry). Bars and gems (cut and uncut) can now also be stored in the satchel.
This commit is contained in:
parent
7be39c73b9
commit
4991b07ff8
3 changed files with 9 additions and 7 deletions
|
|
@ -138,9 +138,9 @@ class SnowscapeSatchelListener : InteractionListener {
|
|||
when (satchelId) {
|
||||
plainSatchelId -> return itemId !in satchelIds
|
||||
greenSatchelId -> return (Item(itemId).getName().contains(" seed") || Item(itemId).getName().contains("Grimy") || Item(itemId).getName().contains("Clean "))
|
||||
redSatchelId -> return itemId in intArrayOf(12158,12159,12160,12161,12162,12163,12164,12165,12166,12167,12168) || Item(itemId).getName().equals("Clue scroll")
|
||||
redSatchelId -> return itemId in intArrayOf(*(12158..12168).toList().toIntArray()) || Item(itemId).getName().equals("Clue scroll")
|
||||
blackSatchelId -> return itemId in intArrayOf(995)
|
||||
goldSatchelId -> return itemId in intArrayOf(436,438,440,442,444,446,447,449,451,453,668,2892)
|
||||
goldSatchelId -> return itemId in intArrayOf(436,438,440,442,444,446,447,449,451,453,668,2892,2349,2351,2353,2355,2357,2359,2361,2363,2365,1601,1603,1605,1607,1609,1611,1613,1615,1617,1619,1621,1623,1625,1627,1629,1631,6571,6573)
|
||||
runeSatchelId -> return itemId in intArrayOf(558,559,564,562,9075,561,563,560,565,566) || (getAttribute(player,"snowscape:boostedmode",false) && itemId in intArrayOf(556,555,557,554,4694,4695,4696,4697,4698,4699))
|
||||
}
|
||||
return false
|
||||
|
|
|
|||
|
|
@ -99,10 +99,12 @@ public class SmeltingPulse extends SkillPulse<Item> {
|
|||
return false;
|
||||
}
|
||||
for (Item item : bar.getOres()) {
|
||||
//Snowscape modification: check gold satchel for ores as well, if carried
|
||||
if (!player.getInventory().contains(item.getId(), item.getAmount()) && !(inEquipmentOrInventory(player, 10881, 1) && player.goldSatchel.contains(item.getId(), item.getAmount()))) {
|
||||
player.getPacketDispatch().sendMessage("You do not have the required ores to make this bar.");
|
||||
return false;
|
||||
//Snowscape modification: check gold satchel for coal as well, if carried
|
||||
if (!player.getInventory().contains(item.getId(), item.getAmount())) {
|
||||
if (!(item.getId() == Items.COAL_453 && inEquipmentOrInventory(player, 10881, 1) && player.goldSatchel.contains(item.getId(), item.getAmount()))) {
|
||||
player.getPacketDispatch().sendMessage("You do not have the required ores to make this bar.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ public final class NPCDropTables {
|
|||
//Snowscape modification: loot certain items into the satchels if carried
|
||||
private boolean handleSatchel(Player player, Item item) {
|
||||
for (int satchelId = 10877; satchelId <= 10882; satchelId++) {
|
||||
if (inEquipmentOrInventory(player,satchelId,1) && SnowscapeSatchelListener.Companion.isAllowed(player,satchelId,item.getId())){
|
||||
if (inEquipmentOrInventory(player,satchelId,1) && SnowscapeSatchelListener.Companion.isAllowed(player,satchelId,unnote(item).getId())){
|
||||
if (satchelId == 10877 && !player.plainSatchel.contains(item.getId(),1)) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue