UO Stats Bar
Posted: Wed May 13, 2009 1:48 pm
I would like to know if it's possible to get the old nasty statut bar from older version ex.: 2.0.3 with newer client AND if it's possible to disable the toolbar from newer client.
https://www.forums.polserver.com/
I normally didn't use razor but for me that option worked exept the newest client. Perhaps this needs a razor update. But i admit i just did a quick test with 3 clients:Tomi wrote:Razor with or without "use PreAOS Status" activated did always show the new status bar. ( seems like this only worked at the time there was the big GRAY status bar, not the latest compact one )
Well in this case it's quite simple. You just need to alter the length of the packet*Edwards wrote:Well I'm not yet really familiar about how to establish packet informations for GetInt's method.
Code: Select all
use uo;
use polsys;
program StatusbarHook()
Print("INSTALLING: Status bar Hook...");
return 1;
endprogram
exported function Statbar(who, byref packet)
/*
var playerserial := packet.GetInt32(3);
var playername := packet.GetString(7,30);
var hitpoints := packet.GetInt16(37);
var maxhitpoints := packet.GetInt16(39);
var namechangeflag := packet.GetInt8(41);
var stattypeflag := packet.GetInt8(42);
var sex := packet.GetInt8(43);
var str := packet.GetInt16(44);
var dex := packet.GetInt16(46);
var int := packet.GetInt16(48);
var stam := packet.GetInt16(50);
var maxstam := packet.GetInt16(52);
var mana := packet.GetInt16(54);
var maxmana := packet.GetInt16(56);
var gold := packet.GetInt32(58);
var ar := packet.GetInt16(62);
var weight := packet.GetInt16(64);
*/
packet.SetInt16(1, 66);
packet.SetInt8(42, 1);
return 0;
endfunction
Code: Select all
Packet 0x11
{
Length variable
SendFunction Statusbar:Statbar
}
Code: Select all
var playerserial := packet.GetInt32(3);Code: Select all
11005b00242ad3456477617264730000000000000000000000000000000000000000000000
003c003c000500003c000a000a0009000a000a000a000000000001001200fa0000e1000000
0000000000000000000003000f00000000You don't need to define the command/identifier byte in this case 0x11 for the status info packet. Pol does that already. You just intercept that packet in this case.I barely understand the theory.. The things I do not understand correctly is how you separate each bytes ( you did define byte 1: 0x11 .. how? ) the packet info only tells what each byte does.
Yes these are all hex numbers. You read it like:HUm... maybe I got the answer it's a kind of binary code so I guess a byte represent 2 characters...
Byte[2] just means that the length value of that packet is 2 bytes long (size) 0x005b. So the 2 in brackets is just the length reserved. This is to avoid more complex descriptions like word and dwordBYTE[2] Length -- 005b --- it doesn't means THE second byte but 2 bytes after 1 ( I did just catch it now... )
1 byte is 8 bits. This command is perhaps confusing here. It reads the next 4 bytes on the given position. Could be easier named as GetInt4 if you talk about bytes. But its called GetInt32Then the hard part... GetInt32(3); : after 3 bytes you take 32 bits. What is a bits?