uses SysUtils;
var
buff: TL2Buff;
Rand: integer;
procedure nobuff;
begin
if (not User.Target.Dead) and (User.target <> nil) then
begin
Engine.Attack;
delay(1000);
print('Добиваем');
end;
if not User.Buffs.ByID(15649,Buff) or (Buff.EndTime<180000) then
if (User.Target.Dead) and (User.target <> nil) then
begin
Engine.FaceControl(0,false);
Engine.UseItem(736);
Delay(10000);
Engine.FaceControl(0, false);
if User.InRange(-13939, 123374,User.Z,1000,50) then begin
end;
FarmTp;
end;
end;
procedure FarmTp;
begin
nobuff;
if User.InRange(11288, 15736,User.Z,10000,10) then begin
Engine.MoveTo(11207, 15864, -4611);
engine.settarget(30134);
Delay(3000);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (1);
Engine.canceltarget;
Delay(10000);
Engine.FaceControl(0, false);
if User.InRange(-13939, 123374,User.Z,10000,10) then begin
Engine.MoveTo(-14353, 123820, -3147);
Engine.MoveTo(-14217, 123704, -3137);
Engine.MoveTo(-13988, 123461, -3151);
Engine.MoveTo(-13952, 123419, -3143);
engine.settarget(32327);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (2);
Engine.canceltarget;
if User.Buffs.Byid(15649, buff) or (buff.EndTime > 300000) then begin
Engine.MoveTo(-14420, 123977, -3155);
if User.InRange(-14515, 124009,User.Z,500,10) then begin
Delay(1000);
engine.settarget(30256);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (12);
Engine.canceltarget;
end;
Delay(10000);
Engine.MoveTo(11183, 15988, -4611);
if User.InRange(11183, 15988,User.Z,500,10) then begin
Delay(1000);
engine.settarget(30134);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (8);
Engine.canceltarget;
Delay(10000);
end;
end;
if User.InRange(-15826, 30477,User.Z,500,50) then begin
Farm;
end;
end;
end;
end;
procedure Farm;
begin
if User.InRange(-15826, 30477,User.Z,500,50) then begin
Engine.MoveTo(-17135, 32325, -3749);
Engine.MoveTo(-15843, 30783, -3624);
Engine.MoveTo(-15940, 31927, -3731);
Engine.MoveTo(-15695, 33619, -3660);
Engine.MoveTo(-15547, 34391, -3637);
Engine.MoveTo(-15481, 34618, -3611);
Engine.MoveTo(-15297, 35579, -3589);
Engine.MoveTo(-15092, 36982, -3568);
Engine.MoveTo(-14815, 38193, -3704);
Engine.MoveTo(-15368, 40878, -3773);
Engine.MoveTo(-16476, 43917, -3778);
Engine.MoveTo(-18018, 46275, -3719);
Engine.MoveTo(-18714, 48037, -3629);
Engine.MoveTo(-18969, 48924, -3682);
while delay(1000) do begin
nobuff;
if User.InRange(-18462, 42061,User.Z,900,10) and not User.Dead then begin
Engine.LoadConfig(E:\бот\Settings\VivviDmag.xml);
Engine.LoadZone(E:\бот\Settings\farmzona.zmap);
Engine.FaceControl(0, True);
Delay(1000);
end;
if (user.level >= 90) then begin
Engine.useitem(736);
Delay(15000);
end;
end;
End;
End;
begin
while 1<>2 do begin
if (User.Level < 91) then Farmtp;
delay(3000);
end;
end.
где я тут сделал ошибку
var
buff: TL2Buff;
Rand: integer;
procedure nobuff;
begin
if (not User.Target.Dead) and (User.target <> nil) then
begin
Engine.Attack;
delay(1000);
print('Добиваем');
end;
if not User.Buffs.ByID(15649,Buff) or (Buff.EndTime<180000) then
if (User.Target.Dead) and (User.target <> nil) then
begin
Engine.FaceControl(0,false);
Engine.UseItem(736);
Delay(10000);
Engine.FaceControl(0, false);
if User.InRange(-13939, 123374,User.Z,1000,50) then begin
end;
FarmTp;
end;
end;
procedure FarmTp;
begin
nobuff;
if User.InRange(11288, 15736,User.Z,10000,10) then begin
Engine.MoveTo(11207, 15864, -4611);
engine.settarget(30134);
Delay(3000);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (1);
Engine.canceltarget;
Delay(10000);
Engine.FaceControl(0, false);
if User.InRange(-13939, 123374,User.Z,10000,10) then begin
Engine.MoveTo(-14353, 123820, -3147);
Engine.MoveTo(-14217, 123704, -3137);
Engine.MoveTo(-13988, 123461, -3151);
Engine.MoveTo(-13952, 123419, -3143);
engine.settarget(32327);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (2);
Engine.canceltarget;
if User.Buffs.Byid(15649, buff) or (buff.EndTime > 300000) then begin
Engine.MoveTo(-14420, 123977, -3155);
if User.InRange(-14515, 124009,User.Z,500,10) then begin
Delay(1000);
engine.settarget(30256);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (12);
Engine.canceltarget;
end;
Delay(10000);
Engine.MoveTo(11183, 15988, -4611);
if User.InRange(11183, 15988,User.Z,500,10) then begin
Delay(1000);
engine.settarget(30134);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel (1);
Delay(1000);
Engine.DlgSel (8);
Engine.canceltarget;
Delay(10000);
end;
end;
if User.InRange(-15826, 30477,User.Z,500,50) then begin
Farm;
end;
end;
end;
end;
procedure Farm;
begin
if User.InRange(-15826, 30477,User.Z,500,50) then begin
Engine.MoveTo(-17135, 32325, -3749);
Engine.MoveTo(-15843, 30783, -3624);
Engine.MoveTo(-15940, 31927, -3731);
Engine.MoveTo(-15695, 33619, -3660);
Engine.MoveTo(-15547, 34391, -3637);
Engine.MoveTo(-15481, 34618, -3611);
Engine.MoveTo(-15297, 35579, -3589);
Engine.MoveTo(-15092, 36982, -3568);
Engine.MoveTo(-14815, 38193, -3704);
Engine.MoveTo(-15368, 40878, -3773);
Engine.MoveTo(-16476, 43917, -3778);
Engine.MoveTo(-18018, 46275, -3719);
Engine.MoveTo(-18714, 48037, -3629);
Engine.MoveTo(-18969, 48924, -3682);
while delay(1000) do begin
nobuff;
if User.InRange(-18462, 42061,User.Z,900,10) and not User.Dead then begin
Engine.LoadConfig(E:\бот\Settings\VivviDmag.xml);
Engine.LoadZone(E:\бот\Settings\farmzona.zmap);
Engine.FaceControl(0, True);
Delay(1000);
end;
if (user.level >= 90) then begin
Engine.useitem(736);
Delay(15000);
end;
end;
End;
End;
begin
while 1<>2 do begin
if (User.Level < 91) then Farmtp;
delay(3000);
end;
end.
где я тут сделал ошибку