Hey all,
I have master capes in my source, and recently came across the problem of how they require 99 dung to wear as well, so I did a bit of changing in the itemConstants and set this under the canWear method:
Code:
public static boolean canWear(Item item, Player player) {
String itemName = ItemDefinitions.getItemDefinitions(item.getId()).getName().toLowerCase();
/* --------- MASTER CAPES ----------*/
if (item.getId() == 29983 && player.getSkills().getXp(Skills.ATTACK) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29982 && player.getSkills().getXp(Skills.AGILITY) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29981 && player.getSkills().getXp(Skills.COOKING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29980 && player.getSkills().getXp(Skills.DEFENCE) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29979 && player.getSkills().getXp(Skills.CRAFTING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29978 && player.getSkills().getXp(Skills.FARMING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29976 && player.getSkills().getXp(Skills.FISHING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29975 && player.getSkills().getXp(Skills.FLETCHING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29974 && player.getSkills().getXp(Skills.HERBLORE) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29973 && player.getSkills().getXp(Skills.HITPOINTS) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29972 && player.getSkills().getXp(Skills.MAGIC) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29971 && player.getSkills().getXp(Skills.MINING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29970 && player.getSkills().getXp(Skills.PRAYER) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29969 && player.getSkills().getXp(Skills.RANGE) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29968 && player.getSkills().getXp(Skills.RUNECRAFTING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29967 && player.getSkills().getXp(Skills.SLAYER) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29966 && player.getSkills().getXp(Skills.SMITHING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29965 && player.getSkills().getXp(Skills.STRENGTH) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29964 && player.getSkills().getXp(Skills.THIEVING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 29963 && player.getSkills().getXp(Skills.WOODCUTTING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
if (item.getId() == 19709 && player.getSkills().getXp(Skills.DUNGEONEERING) < 200000000) {
player.getPackets().sendGameMessage("You need 200m experience to wear this cape.");
return false;
}
When I have 99 dung, it says this:
Code:
You need 200m experience to wear this cape.
When I have 200m xp but not 99 dung, it says:
Code:
You need a dungeoneering level of 99 to wear this cape.
Any ideas? I've checked almost everything, and even tried using index to search for a string such as "You need a dungeoneering level of 99 to wear this cape", got nothing.
I'll post any code that you request!
THINGS TO NOTE: This is for all master capes, not just dung cape. They all tell me I need 99 dungeoneering to wear them, but also tell me I need 200M xp
-Also, I have tried searching for the message for 99 dung, can't find anything