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;
BEGIN
if length(_gBuff) < 4 then exit;
PID:= GInt(_gBuff,3,2);
if flag and debuff then
begin
nowtime:= Time;
if nowtime > oldtime then
begin
oldtime:= (nowtime + (delay / 86400));
gSys.SendS(FormatPck('%hchdchc',***91;$0707,0,CharSID,CharID,0,itemID,1***93;));
end;
end;
if _gFromServ then
case PID of
$660D: begin
MsgInfo('AutoDebuffRemover v.1.0.');
MsgInfo('(c) broveymimo, 2010');
end;
$0A11: if flag then debuff:= true;
$1111: if (GInt(_gBuff,6,4) = CharID) and (GInt(_gBuff,10,2) = $FFFF) then debuff:= false;
$0807: if (GInt(_gBuff,5,1) = 0) and (GInt(_gBuff,14,1) < 10) then
begin
rest:= GInt(_gBuff,14,1);
case rest of
1: msg:= ' зеленка!';
2,3,4: msg:= ' зеленки!';
else msg:= ' зеленок!';
end;
gSys.EnSendC(FormatPck('%hccdacacac',***91;$0B02,18,2,0,'***91;!***93;'+FStr(16),Length(msg) + 15,'У вас осталось ',rest+48,msg,0***93;));
end;
end;
if not (_gFromServ) then
case PID of
$0302: begin
if strcmp(copy(_gBuff,5,namel),name) then
begin
gBlockPacket;
if strcmp(copy(_gBuff,le,startl),start) then
begin
flag:=true;
MsgInfo('Используйте зеленку для инициализации');
end;
if strcmp(copy(_gBuff,le,stopl),stop) then flag:=false;
end;
end;
$0707: if flag then
begin
gBlockPacket;
CharSID:= GInt(_gBuff,6,2);
CharID:= GInt(_gBuff,8,4);
itemID:= GInt(_gBuff,13,2);
MsgInfo('Зеленка инициализирована');
end;
end;
END.
Последний раз редактировалось broveymimo; 15.02.2011 в 14:08.
Причина: Добавлено сообщение
запуск /ADR START
дальше юзаете зеленку, чтобы ее инициализировать. Недоработка заключается в том, что если на вас кинут баф, зеленка тоже будет юзаться.