send type 10 with the target id.
|
Hello,
So i was fixing my target system.
But after trying to find a fix for the arrow above head and on minimap, i didn't find anything...
( only thing i found: )
So i was wondering how could i display ,Code:public void createArrow(int type, int id) { c.outStream.createFrame(254); //The packet ID c.outStream.writeByte(type); //1=NPC, 10=Player c.outStream.writeWord(id); //NPC/Player ID c.outStream.write3Byte(0); //Junk }
It will display for the opponent the arrow.Code:if targetId = 1;
My find target method:
My int and boolean:Code:public int bestTarget(int playerCb, Client aquired) { for (Player p : PlayerHandler.players) { if (p != null && p.inWild() && p != c && p.targetId == 0) { Client c2 = (Client) p; if (goodCombatLevel(c, c2) && goodWildLevel(c, c2) && c2.inWild()) { System.out.println("Target Found PID: " + c2.playerId + " for oPID: " + c.playerId); return c2.playerId; } } } System.out.println("No target found for oPID: " + c.playerId); return 0; }
I hope someone could help me outCode:public int targetId = 0; public boolean targetSearching = false;
Thanks
send type 10 with the target id.
Thank you for your reply
I tried to do something like this:
And add at the targetkilling method:Code:public int bestTarget(int playerCb, Client aquired) { for (Player p : PlayerHandler.players) { if (p != null && p.inWild() && p != c && p.targetId == 0) { Client c2 = (Client) p; /*if (!p.playerName.equalsIgnoreCase(c.playerName)) { p.targetId = c.playerId; c.targetId = p.playerId; c.getPA().createPlayerHints(10, p.playerId); c.getPA().requestUpdates(); }*/ if (goodCombatLevel(c, c2) && goodWildLevel(c, c2) && c2.inWild()) { p.targetId = c.playerId; c.targetId = p.playerId; c.getPA().createPlayerHints(10, p.playerId); c.getPA().requestUpdates(); c.getPA().createPlayerHints(10, c.playerIndex); System.out.println("Target Found PID: " + c2.playerId + " for oPID: " + c.playerId); return c2.playerId; } } } System.out.println("No target found for oPID: " + c.playerId); return 0; }
But that didn't work..Code:c.headIcon = -1; c.getPA().requestUpdates();
If you could give any more assistance through tv,skype,rune-server i would love that
Thank you alot for the answer
Instead of doing targetId, simply fetch the other players index and use it to send the type. You shouldn't need to tamper with headicons.
int index = bestTarget(#, #);
createArrow(10, index);
I still can't figure out how to do this ..
Bump
I still can't figure out how to do this ..
Bump
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |