0x0B Packet

Open discussion forum. For topics that do not fit anywhere else.
Post Reply
bodom
Former Developer
Posts: 140
Joined: Sat Feb 21, 2015 7:52 pm

0x0B Packet

Post by bodom »

Hi there,

I've managed to use the 0x0B packet to display damages (later in this post there is the code, just in case this could be helpful to anyone).

I would like to display healing amount too, but I can't find the right packet. Does anyone knows which packet I need to use?

Thank you

Code: Select all

/**
* Sends damage notification to a client
* 20.8.15 Bodom
*
* @param above_who MobileRef: Reference to who the damage will be seen above
* @param damage int: The damage amount
* @param character MobileRef: reference to who is seeing the damage
* @return The SendPacket() result
*/
function SendDamage( above_who, damage, character )

	damage := CInt(damage);
	if( damage <= 0 )
		return;
	endif

	var serial := above_who.serial;
	if( ! serial )
		return;
	endif

	var pkt := CreatePacket(0x0B, 7);
	if( ! pkt )
		SysLog("ERROR creating packet: " + pkt.errortext);
		return;
	endif

	pkt.setInt32(1, serial);
	pkt.setInt16(5, damage);

	return pkt.sendPacket(character);

endfunction
bodom
Former Developer
Posts: 140
Joined: Sat Feb 21, 2015 7:52 pm

Re: 0x0B Packet

Post by bodom »

After some testing I've found an answer myself: there is no corresponding packet for displaying the healed amount, it is displayed as sysmessage.

:)
Post Reply