Austin, you was right!
I have use this great packet and see what I've got!
With iostats.ecl
Packets Sent
Mesage Type Count Bytes
...
174 (0xAE) 372 25184
175 (0xAF) 15 195
176 (0xB0) 76 89540
185 (0xB9) 50 236
188 (0xBC) 50 150
191 (0xBF) 1428 19514
214 (0xD6) 23347 25433563
220 (0xDC) 18021 162189
...
This one is megacliloc packet by Agata, and improoved by me with new feathers.
There are a lot of dumps about this packet.
Main file, after which server shutdowned with dumps is tooltips.src
Like I sad, I don't know packets & I wrote by instinct and likeness of the script.
I'm very need your help to fix errors & improve it.
With best regards!
tooltips.src
Code: Select all
/* $Id: toolTips.src 104 2006-05-25 22:14:15Z montuz $
* Description: AOS Tooltips. Starter script.
* This packet takes awhile to get used to.
* HEAVILY modified by Agata
*/
use uo;
use cfgfile;
use polsys;
use os;
//include "include/skills";
//include "include/math";
//include "include/itemtypes";
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 )
if (who)
endif
var xObject := SystemFindObjectBySerial(packet.GetInt32(OFFSET_OBJECT_SERIAL));
if ( xObject.IsA(POLCLASS_ITEM) )
packet.SetSize(15);
var Object_Name := xObject.desc;
Object_Name := CAscZ(Object_Name);
packet.SetInt32(OFFSET_CLILOC_ID, 1042971);
packet.SetUnicodeString(OFFSET_UNICODE_TEXT, Object_Name, 1);
// I've noticed that this packet is only sent if this value has changed
// from the last time it was checked. And using html to change the size doesn't work
// for some reason. Maybe a core/client issue?
packet.SetInt16(OFFSET_LENGTH_ID, Object_Name.Size() * 2);
var xDesc := run_script_to_completion ( ":megacliloc:itemdata", xObject);
if ( xDesc.Size() > 0 )
foreach prop in xDesc
var str := "";
if (prop.values.size() > 0)
str := CStr(prop.values[1]);
var i;
for (i:=2; i<=prop.values.size(); i:=i+1)
str += CChr(0x09) + CStr(prop.values[i]);
endfor
endif
str := CAscZ (str);
packet.SetInt32(packet.GetSize() - 1, prop.clilocid);
var Length_ID := packet.GetSize();
packet.SetUnicodeString(packet.GetSize() + 1, str, 1);
// SetUnicodeString adds 00 BYTE[1] at the start of the Unicode offset, which messes with the length offset.
// Setting the length of the unicode text below will fix that issue. Same deal as above.
packet.SetInt16(Length_ID, str.Size() * 2);
endforeach
endif
// End of loop.
packet.SetInt32(packet.GetSize(), 0);
elseif (xObject.IsA (POLCLASS_MOBILE) )
if ( xObject.npctemplate )
// to be added later
//var xDesc := run_script_to_completion ( ":megacliloc:chardata", xObject);
packet.SetSize(15);
var Object_Name := xObject.name;
Object_Name := CAscZ(Object_Name);
packet.SetInt32(OFFSET_CLILOC_ID, 1042971);
packet.SetUnicodeString(OFFSET_UNICODE_TEXT, Object_Name, 1);
// I've noticed that this packet is only sent if this value has changed
// from the last time it was checked. And using html to change the size doesn't work
// for some reason. Maybe a core/client issue?
packet.SetInt16(OFFSET_LENGTH_ID, Object_Name.Size() * 2);
var xDesc := run_script_to_completion ( ":megacliloc:chardata", xObject);
if ( xDesc.Size() > 0 )
foreach prop in xDesc
var str := "";
if (prop.values.size() > 0)
str := CStr(prop.values[1]);
var i;
for (i:=2; i<=prop.values.size(); i:=i+1)
str += CChr(0x09) + CStr(prop.values[i]);
endfor
endif
str := CAscZ (str);
packet.SetInt32(packet.GetSize() - 1, prop.clilocid);
var Length_ID := packet.GetSize();
packet.SetUnicodeString(packet.GetSize() + 1, str, 1);
// SetUnicodeString adds 00 BYTE[1] at the start of the Unicode offset, which messes with the length offset.
// Setting the length of the unicode text below will fix that issue. Same deal as above.
packet.SetInt16(Length_ID, str.Size() * 2);
endforeach
endif
// End of loop.
packet.SetInt32(packet.GetSize(), 0);
endif
/*
var values := array {};
var str := xObject.title_prefix;
values.append (str);
str := xObject.name;
values.append (str);
str := xObject.title_suffix;
values.append (str);
packet.SetInt32(OFFSET_CLILOC_ID, 1050045);
str := CStr(values[1]);
var i;
for (i:=2; i<=values.size(); i:=i+1)
str += CChr(0x09) + CStr(values[i]);
endfor
str := CAscZ (str);
var Length_ID := packet.GetSize();
packet.SetUnicodeString(packet.GetSize() + 1, str, 1);
packet.SetInt16(Length_ID, str.Size() * 2);
*/
endif
return 0;
endfunction