Jump to content
Existing user? Sign In

Sign In



Sign Up

Why doesn't this work (Keris)


Wzrdary

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...