Try a different packet id
|
|
I've been working on adding full DFS to my server.
My only problem I've run into is how to actually make the special attack work.
I've got charging and inspecting/releasing and whatnot.
I added this into buttonhandler to keep the shield from un-equipping when activated
If anyone could help with attacking npcs/players with the special, I would be very grateful.Code:else if (componentId == 21 && packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET && player.getEquipment().getShieldId() == 11283) // Not sure what to do here else if (componentId == 21 && !(packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET)) ButtonHandler.sendRemove(player, Equipment.SLOT_SHIELD);

Try a different packet id
He has that correct and that isn't even the problem. The problem is not knowing how to send the special attack when you do click activate.
PlayerCombat.java
Combat.javaCode:if (player.getEquipment().getShieldId() == 11283 && player.DFS >= 1 && player.canSpec == true) { player.setNextGraphics(new Graphics(1165)); player.setNextAnimation(new Animation(6696)); player.DFS--; delayMagicHit(2, getMagicHit(player, Utils.random(0, 300))); World.sendProjectile(player, target, 1166, 41, 16, 31, 35, 16, 0); player.canSpec = false; return combatDelay; }
buttonhandler.javaCode:public static boolean hasDragonFire(Entity target) { if (target instanceof NPC) return false; Player p2 = (Player) target; int shieldId = p2.getEquipment().getShieldId(); if (shieldId == 11283 && p2.DFS >= 1) { p2.canSpec = true; return true; } return shieldId == 11283; }
done it a while ago, adjust it to your needs, obviously using a boolean for it is a bad idea, but it works none of the lessCode:else if (componentId == 21 && packetId == 67 && player.getEquipment().getShieldId() == 11283) Combat.hasDragonFire(player);
| « item bonus error all stats 0 (paying 5$ 667) | How do i fix this [Matrix] » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |