PDA

View Full Version : [Rs377d] Hint icon packet.



Fire cape
July 4th, 2010, 11:23
Description: Adding the hint icon packet onto a 377.
Assumed Knowledge: How to read.
Tested Server: Rs377d.
Files/Classes modified: ActionSender.
Files/Classes added:


/**
* Creates an arrow over an npcs or players head.
* @param type The type. 10 for player 1 for npc.
* @param id The id of the npc or player.
* @return The action sender instance, for chanining.
*/
public ActionSender createArrow(int type, int id) {
Rs2PacketBuilder bldr = new Rs2PacketBuilder(199);
bldr.put((byte) type);
bldr.putShort(id);
bldr.putTriByte(0);
player.getSession().write(bldr.toPacket());
return this;
}


/**
* Creates an arrow over an object.
* @param x The x coord.
* @param y The y coord.
* @param height The height of the arrow.
* @param pos The position on square.
*/
public ActionSender createObjectArrow(int x, int y, int height, int pos) {
Rs2PacketBuilder bldr = new Rs2PacketBuilder(199);
bldr.put((byte) pos);
bldr.putShort(x);
bldr.putShort(y);
bldr.put((byte) height);
player.getSession().write(bldr.toPacket());
return this;
}

Result:
Only the registered members can see the link.

Faab234
July 4th, 2010, 12:05
Nice job Fire Cape.

Fire cape
July 4th, 2010, 17:26
Updated:

Added hint icon over object.

/**
* Creates an arrow over an object.
* @param x The x coord.
* @param y The y coord.
* @param height The height of the arrow.
* @param pos The position on square.
*/
public ActionSender createObjectArrow(int x, int y, int height, int pos) {
Rs2PacketBuilder bldr = new Rs2PacketBuilder(199);
bldr.put((byte) pos);
bldr.putShort(x);
bldr.putShort(y);
bldr.put((byte) height);
player.getSession().write(bldr.toPacket());
return this;
}

i roll deep
September 4th, 2011, 18:31
createArrow(1, 945);
I't won't show the hint arrow. any help?