Tooltip packet

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.

Moderator: POL Developer

Post Reply
New User
Posts: 7
Joined: Sun Mar 08, 2009 6:46 am

Tooltip packet

Post by aktor » Thu Mar 12, 2009 2:05 am


I hooked the 0xD6 packet in order to do custom tooltips, like so:

Code: Select all

Packet 0xD6
	Length 		variable
	SendFunction	toolTips:MegaCliloc
I specifically did it to change the colour of the item's name in the tooltip, according to its quality. And this works great in 2D and 3D. However, in 3D, the vendor shopping lists display the items, but with the code used to recolor them. In other words, in 2D the item's display correctly in the shopping list WITH their right colors, but in 3D they look like this:
However, once you buy it, the tooltip is fine in the bag. It's just the shopping list that's stuffed-up. (see reply post for a screenshot).

Here is how I change the colour of the name, at the moment:

Code: Select all

use uo;
use cfgfile;

const OFFSET_OBJECT_SERIAL   := 0x05;
const OFFSET_CLILOC_ID       := 0x0F;
const OFFSET_LENGTH_ID       := 0x13;
const OFFSET_UNICODE_TEXT    := 0x14;

program Install()

	 print("INSTALLING: Outgoing Tooltip PH...");
	 return 1;


exported function MegaCliloc( who, byref packet )

	var xObject := SystemFindObjectBySerial(packet.GetInt32(OFFSET_OBJECT_SERIAL));
	if ( xObject )
		var Text_Color;
		var Object_Name;
		Object_Name := xObject.desc;
		Text_Color := "FFFFFF";
		Object_Name := CAscZ("<BASEFONT COLOR=#" + Text_Color + "><C>" + Object_Name);
		packet.SetInt32(OFFSET_CLILOC_ID, 1042971);
		packet.SetUnicodeString(OFFSET_UNICODE_TEXT, Object_Name, 1);		
		packet.SetInt16(OFFSET_LENGTH_ID, Object_Name.Size() * 2);
		packet.SetInt32(packet.GetSize(), 0);

	return 0;
(Obviously I removed all the specific case statements etc from the above example)

New User
Posts: 7
Joined: Sun Mar 08, 2009 6:46 am

Re: Tooltip packet

Post by aktor » Thu Mar 12, 2009 2:21 am

In 2D: (Tooltips are white, which is good. Dont know why the shopping list names are also white, but I don't really mind):


In 3D: (Tooltips are still white, which is good. But the shopping list names are completely messed up):


Former Developer
Posts: 1090
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: Tooltip packet

Post by MuadDib » Thu Mar 12, 2009 6:38 am

Tooltips are wonderful are they not?

Vendored items must have normal name for the tooltip in buy/sell windows. Client controlled.

New User
Posts: 7
Joined: Sun Mar 08, 2009 6:46 am

Re: Tooltip packet

Post by aktor » Thu Mar 12, 2009 7:20 am

Any way to set it back to normal if it's in a buy/sell window, specifically? Or what now?

What puzzles me is that it works in 2D. I don't mind the white names in the buy/sell window there - in fact, I prefer it. It's just in 3D that it outputs the basefont stuff. No way to stop that, is there? :/

Post Reply