heh, my script for hlapex or l2phx
// 'status.txt' При получении в приват "status" бот отвечает
// (c) dmitry501
VAR
CurrHP, CurrMP, CurrCP: Integer;
UserID, ObjectID, textType : Integer;
CharName, Message : String;
i, j, aCount: Integer;
AttrID, AttrValue : Integer;
procedure Init;
begin
CurrHP := 0;
CurrMP := 0;
CurrCP := 0;
UserID := 0;
end;
BEGIN
if FromClient then exit;
if pck[1]=#$4A then begin //Say2
i:=2;
ObjectID:=ReadD(i);
textType:=ReadD(i);
CharName:=ReadS(i);
Message:=ReadS(i);
if (textType=2) AND (Message = 'status') then begin
buf:=#$38;
WriteS('HP='+IntToStr(CurrHP)+' MP='+IntToStr(CurrMP)+' CP='+IntToStr(CurrCP));
WriteD(2);
WriteS(CharName);
SendToServer;
end;
end;
if pck[1]=#$04 then UserID:=ReadD(18); //UserInfo
if pck[1]=#$0E then begin //StatusUpdate
i:=2;
ObjectID:=ReadD(i);
aCount:=ReadD(i);
if (ObjectID=UserID) AND (aCount>0) then
for j:=1 to aCount do begin
AttrID:=ReadD(i);
AttrValue:=ReadD(i);
if AttrID= 9 then CurrHP := AttrValue;
if AttrID=11 then CurrMP := AttrValue;
if AttrID=33 then CurrCP := AttrValue;
end;
end;
END.