Might save someone some time.
Code:
/**
* @param Tree object id
* @return The name of logs it provides
*/
public static String getLogName(int objectId) {
switch (objectId) {
case 2023:
return "achey tree logs";
case 1281:
return "oak logs";
case 1308:
return "willow logs";
case 1307:
return "maple logs";
case 9034:
return "mahogany logs";
case 1309:
return "yew logs";
case 1306:
return "magic logs";
}
return "logs";
}
Code:
/**
* @param The tree object id
* @return The xp that tree provides
*/
public static int getTreeXp(int objectId) {
switch (objectId) {
case 1281:// oak
return 35;
case 1308:// willow
return 45;
case 9034:// mahogany
return 55;
case 1307:// maple
return 65;
case 1309:// yew
return 75;
case 1306:// magic
return 95;
}
return 25;
}
Code:
/**
* @param The tree object id
* @return The log item id
*/
public static int getTreeLogs(int objectId) {
switch (objectId) {
case 2023://achey
return 2862;
case 1281:// oak
return 1521;
case 1308:// willow
return 1519;
case 1307:// maple
return 1517;
case 9034:// mahogany
return 6332;
case 1309:// yew
return 1515;
case 1306:// magic
return 1513;
}
return 1511;
}
Code:
/**
* @param The tree object id
* @return The woodcutting level required
*/
public static int getTreeRequirement(int objectId) {
switch (objectId) {
case 1281:// oak
return 15;
case 1308:// willow
return 30;
case 1307:// maple
return 45;
case 9034:// mahogany
return 50;
case 1309:// yew
return 60;
case 1306:// magic
return 75;
}
return 1;
}
Code:
/**
* @param The axe the player is wielding
* @return The level required to use the axe
*/
public static int axeLevelRequirement(int axe) {
switch (axe) {
case 1353:
case 1361:
return 6;
case 1355:
return 21;
case 1357:
return 31;
case 1359:
return 41;
case 6739:
return 61;
}
return 1;
}
Code:
/**
* @param The axe the player is wearing
* @return The animation for that axe
*/
public static int getAxeAnimation(int weapon) {
switch (weapon) {
case 1351:
return 879;
case 1349:
return 877;
case 1353:
return 875;
case 1361:
return 873;
case 1355:
return 871;
case 1357:
return 869;
case 1359:
return 867;
case 6739:
return 865;
}
return -1;
}
Code:
/**
* @param The players weapon
* @return Is it an axe?
*/
public static boolean hasAxe(int weapon) {
switch (weapon) {
case 1351:
case 1349:
case 1353:
case 1361:
case 1355:
case 1357:
case 1359:
case 6739:
return true;
}
return false;
}
Code:
/**
* @param players axe
* @param players woodcutting level
* @return Can use the axe?
*/
public static boolean canUseAxe(int weapon, int woodcutting) {
if (axeLevelRequirement(weapon) <= woodcutting)
return true;
return false;
}