Версия скрипта 1.1 без гид базы, но с фиксом вылета при выделении мобов.
PHP код:
// Скрипт PVPHelper v.1.1 (c) broveymimo
// Запуск SendPMessage("PVP","START")
// Останов SendPMessage("PVP","STOP")
var start,stop,name,Charname:string;
PID,le,startl,stopl,namel,CharSID:integer;
flag:boolean;
Procedure MsgInfo(msg : string);
begin
gSys.EnSendC(FormatPck('%hcdacha',***91;$0A02,02,0,'***91;!***93;'+FStr(16),Length(msg) + 2,$203A,msg+#0***93;));
gsys.sleep(15);
end;
procedure OnCreate;
begin
le:=23;
start:='START';
startl:=length(start);
stop:='STOP';
stopl:=length(stop);
name:='PVP';
namel:=length(name);
flag:=false;
end;
BEGIN
if length(_gBuff) < 4 then exit;
PID := GInt(_gBuff,3,2);
if not (_gFromServ) then
case PID of
$0302: begin
if strcmp(copy(_gBuff,5,namel),name) then
begin
if strcmp(copy(_gBuff,le,startl),start) then
begin
flag:=true;
MsgInfo('PVPHelper запущен');
end;
if strcmp(copy(_gBuff,le,stopl),stop) then
begin
flag:=false;
MsgInfo('PVPHelper остановлен');
end;
gBlockPacket;
end;
end;
$1A0D: begin
CharSID:=GInt(_gBuff,7,2);
if (GInt(_gBuff,6,1) = 0) then gSys.SendS(FormatPck('%hhh',***91;$1E03,CharSID,0***93;));
end;
end;
if _gFromServ then
case PID of
$660D: begin
MsgInfo('Welcome to PVPHelper v.1.0');
MsgInfo('(c) broveymimo, 2010');
MsgInfo('');
MsgInfo('/PVP START для запуска скрипта');
MsgInfo('/PVP STOP для остановки скрипта');
MsgInfo('----------');
end;
$1F03: begin
if flag and (GInt(_gBuff,5,2) = CharSID) then
begin
Charname:=(copy(_gBuff,46,17));
gSys.EnSendC(FormatPck('%hcdacha',***91;$0A02,02,0,'***91;!***93;'+FStr(16),19,$203A,Charname+#0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),10,$203A,'куртка +',(GInt(_gBuff,19,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),9,$203A,'штаны +',(GInt(_gBuff,22,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),12,$203A,'перчатки +',(GInt(_gBuff,25,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),11,$203A,'ботинки +',(GInt(_gBuff,28,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),9,$203A,'шапка +',(GInt(_gBuff,31,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),7,$203A,'щит +',(GInt(_gBuff,34,1)+48),0***93;));
gSys.EnSendC(FormatPck('%hcdachacc',***91;$0A02,02,0,'***91;!***93;'+FStr(16),10,$203A,'оружие +',(GInt(_gBuff,37,1)+48),0***93;));
MsgInfo('----------');
end;
end;
end;
END.