Недостатки: если вы нажмете на другова нпц после активации скрипта ХП регенить не будет
также если вы сделаете обычное ТП от ГК тоже не будет
Для телепорта нужно использовать скрипт на "тп"
//Для активации окна введите в парти чат '.window'
//Перед включением скрипта нужно стоять рядом с бафером!
//Для регенерации хп нужно просто посылать '.heal' в парти чат
//Работает на сервер где есть у бафера регенерация хп мп цп
//Версия 6.0 Final
//Автор Crazy$
var
// переменная
ValidatePosition:string; c:integer; e:integer; n:integer; r:boolean;
a:integer; b:boolean; d:integer; f:integer; v:integer;
procedure Init; //Вызывается при включении скрипта
begin
SendMsc('Возьми в таргет бафера и сделай шаг!');
b:=false;
end;
procedure SendMsc(msc:string);
begin
buf:=#$4A;
WriteD(0);
WriteD(10);
WriteS('');
WriteS(msc);
SendToClient;
end;
//защитная часть
begin
begin
if FromClient and (pck[1]=#$04)and (not b) then
begin
a:=ReadD(2); c:=ReadD(6);
d:=ReadD(10); e:=ReadD(14);
f:=ReadC(18);
SendMsc('Запомнен ObjectID = '+inttostr(a));
b:=true;
end;
end;
begin
if FromClient and (pck[1]=#$48) then
begin
v:=ReadD(14); n:=ReadD(18);
end;
end;
//запоминание пакета ValidatePosition
if FromClient and (pck[1]=#$48) then ValidatePosition:=pck;
if pck='' then exit;
if fromclient and (pck=#$38#$2E#$00#$77#$00#$69#$00#$6E#$00#$64#$00#$6F#$00#$77#$00#$00#$00#$03#$00#$00#$00) then
begin
buf:=#$04;
WriteD(a);
WriteD(c);
WriteD(d);
WriteD(e);
WriteC(f);
SendToServer;
buf:=#$48;
WriteD(c);
WriteD(d);
WriteD(e);
WriteD(v);
WriteD(n);
SendToServer;
buf:=#$21;
Writes('npc_'+inttostr(a)+'_restore hp 1');
SendToServer;
buf:=#$21;
WriteS('npc_'+inttostr(a)+'_restore mp 1');
SendToServer;
buf:=#$21;
WriteS('npc_'+inttostr(a)+'_restore cp 1');
SendToServer;
buf:=hstr('37 01 00');
SendToServer;
//отсылка пакета ValidatePosition, запомненого ранее
buf:=ValidatePosition; SendToServer;
end;
begin
if FromClient and (pck[1]=#$48) then ValidatePosition:=pck;
if pck='' then exit;
if FromClient and (pck=#$38#$2E#$00#$68#$00#$65#$00#$61#$00#$6C#$00#$00#$00#$03#$00#$00#$00) then
begin
buf:=#$48;
WriteD(c);
WriteD(d);
WriteD(e);
WriteD(v);
WriteD(n);
SendToServer;
buf:=#$21;
Writes('npc_'+inttostr(a)+'_restore hp 1');
SendToServer;
buf:=#$21;
WriteS('npc_'+inttostr(a)+'_restore mp 1');
SendToServer;
buf:=#$21;
WriteS('npc_'+inttostr(a)+'_restore cp 1');
SendToServer;
//отсылка пакета ValidatePosition, запомненого ранее
buf:=ValidatePosition; SendToServer;
end;
end;
end.