Wzrdary 2 Posted April 8, 2020 Report Share Posted April 8, 2020 Afternoon All! Just a quick one, I'm trying to get Keris to hit more against Kaphite NPC's. Here's what I've written, and for some reason it isn't working? in PlayerCombat.java public boolean hasKeris(Player player) { int weaponId = player.getEquipment().getWeaponId(); return weaponId == 10581 || weaponId == 10582 || weaponId == 10583; } also in PlayerCombat.java if (target instanceof NPC) { NPC n = (NPC) target; if (n.getId() == 1157 && hasKeris(player)) { double strengthBonus = player.getCombatDefinitions().getBonuses()[CombatDefinitions.STRENGTH_BONUS]; strengthBonus += 250; } } I'm attacking the NPC ID 1157 with Keris but it isn't hitting... I also tried dragging the NPC names using the below (which also didn't work!): if (target instanceof NPC) { NPC n = (NPC) target; if (n.getDefinitions().name.contains("Kalphite")) { if(weaponId == 10581) { Does anyone understand why this won't work? Cheers, Wzrd Link to comment Share on other sites More sharing options...
Wzrdary 2 Posted April 8, 2020 Author Report Share Posted April 8, 2020 Bump, really want to understand this! 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