Mathy 344 Posted July 25, 2017 Report Share Posted July 25, 2017 (edited) Hey, Alright so I'm trying to make it so a certain staff (other than a magic staff, e.g. A royal sceptre) can use every god spell. So basically the royal sceptre would replace the 3 god staffs (zamorak staff, guthix, ect). Here's the method: public boolean needsRune(int runeId) { Item weapon = player.getEquipment().getItems()[3]; Item shield = player.getEquipment().getItems()[3]; if (weapon == null) { return true; } int wep = weapon.getId(); switch (runeId) { case 2415: case 2416: case 2417: if (wep == 12439) { return false; } return true; case 556: if ((wep == 1381) || (wep == 20730) || (wep == 20733) || (wep == 20736) || (wep == 20739) || (wep == 1397) || (wep == 17293)) { return false; } return true; case 554: if ((wep == 1387) || (wep == 1393) || (wep == 17293)) { return false; } return true; case 555: if ((wep == 1383) || (wep == 20730) || (wep == 20733) || (wep == 1395) || (wep == 17293) || ((shield != null) && (shield.getId() == 18346))) { return false; } return true; case 557: if ((wep == 1385) || (wep == 20736) || (wep == 20739) || (wep == 1399) || (wep == 17293)) { return false; } return true; } return true; } But then I checked the other cases and I realised that, for example, the mist battlestaff does not provide an unlimited amount of air and water runes but, for example, the air staff provides an unlimited supply of air runes. So some staffs are recognised to provide unlimited runes but others aren't... How can I fix this? I tried to be as clear as possible, if I wasn't just comment any questions and I'll answer asap Thanks ! Edited July 25, 2017 by Mathy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now