You probably have your "Rune" requirements checking for "itemName.toLowerCase().contains("rune")" Just make itCode:itemName.toLowerCase().contains("rune") && !itemName.toLowerCase().endsWith("robe")
|
Well i'm trying to make runecrafting robes 1 defence req to wear but i'm not sure where to do that, already tried the obvious places but can't seem to figure it out.
If anyone knows how to fix this explain
You probably have your "Rune" requirements checking for "itemName.toLowerCase().contains("rune")" Just make itCode:itemName.toLowerCase().contains("rune") && !itemName.toLowerCase().endsWith("robe")
The code for where you're handling your item requirements should not be too different from any other source, in itemAssistant look for getRequirements. Just an example. If yours is much different i suggest either changing source or trying to learn the packaging. This is a really simple modification.
What are the current def requirements for em? 40? Go to the itemassistants class and look for the wearItem method, there should be something like he said there. Just search ("rune"), once you find it, add something like && !itemId.equalsIgnoreCase("runecrafting") or whatever there
And thats the method thats being called for giving different items different stats. Which is a horrible way to do it, but is just the way every PI server has by default.Code:getRequirements(getItemName(wearID).toLowerCase(), wearID);
search for "getRequirements(String"
public void getRequirements(String itemName, int itemId) {
c.attackLevelReq = c.defenceLevelReq = c.strengthLevelReq = c.rangeLevelReq = c.magicLevelReq = c.prayerLevelReq = c.hitpointsLevelReq = 0;
if (itemName.contains("mystic") || itemName.contains("nchanted")) {
if (itemName.contains("staff")) {
c.magicLevelReq = 20;
c.attackLevelReq = 40;
} else {
c.magicLevelReq = 20;
c.defenceLevelReq = 20;
}
}
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |