function Buff(value:string):boolean;
var
s:string;
bypass:string;
i:integer;
b:boolean;
mass:array [1..100] of string;
Obj: TL2Buff;
begin
Engine.Settarget('Buffer');
Engine.DlgOpen();
s:=Engine.DlgText;
b:=true;
i:=1;
while b do
begin
Delete(s,1,Pos('<button',s)-1);
mass[i]:=Copy(s,1,Pos('>',s));
Delete(s,1,Length(mass[i]));
inc(i);
if Pos('<button',s) = 0 then
b:=false;
end;
for i:=1 to 100 do
if mass[i] <> '' then
if Pos(value,mass[i]) <> 0 then
begin
bypass := mass[i];
delete(bypass,1,pos('action="',bypass)+17);
bypass:=Copy(bypass,1,pos('"',bypass)-1);
break;
end;
Engine.ByPassToServer(bypass);
end;
begin
buff('Баффы мага');
end.