I hooked the 0xD6 packet in order to do custom tooltips, like so:
Code: Select all
Packet 0xD6
{
Length variable
SendFunction toolTips:MegaCliloc
}
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).<BASEFONT COLOR=#FFFFFF><C>Kite Shield
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;
endprogram
exported function MegaCliloc( who, byref packet )
var xObject := SystemFindObjectBySerial(packet.GetInt32(OFFSET_OBJECT_SERIAL));
if ( xObject )
packet.SetSize(15);
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);
endif
return 0;
endfunction