here u have test it:
item: TL2Item;
procedure checkDeath;
begin
if (User.Dead) then
begin
Print('Dead. Pressing to clanhall.');
Delay(1000);
Engine.FaceControl(0,false);
Engine.GoHome(rtClanHall);
Delay(10000);
end;
end;
procedure tunatun;
begin
Engine.SetTarget('Tunatun');
Delay(1000);
Engine.DlgOpen;
Delay(1000);
Engine.DlgSel('Quest');
Delay(1000);
Engine.DlgSel('Home Security');
Delay(1000);
Engine.DlgSel('Listen to his concern');
Delay(1000);
Engine.DlgSel('Offer to help');
Delay(1000);
if (not Engine.QuestStatus(278, 1)) then
tunatun;
end;
procedure moveToSpot;
begin
Engine.MoveTo(53131,-84124,-2720);
Delay(500);
Engine.MoveTo(53736,-87114,-2456);
Delay(500);
end;
procedure itemSelMahumManeQuest;
begin
Engine.LoadConfig(script.path+'BeastFarm');
Engine.CancelTarget;
Engine.FaceControl(0, true);
repeat
Delay(100);
checkDeath;
until ((Inventory.Quest.ById(15531, item)) and (item.Count >= 300));
if (not Engine.QuestStatus(278, 1)) then
itemSelMahumManeQuest;
Engine.FaceControl(0, false);
Delay(1000);
end;
procedure moveToReward;
begin
Engine.MoveTo(53736,-87114,-2456);
Delay(500);
Engine.MoveTo(53131,-84124,-2720);
Delay(500);
Engine.MoveTo(53658, -83826, -2720);
Delay(500);
Engine.SetTarget('Tunatun');
Delay(500);
Engine.DlgOpen;
Delay(500);
Engine.DlgSel('Quest');
Delay(500);
Engine.DlgSel('Home Security');
Delay(500);
Engine.dlgSel('Accept Reward');
Delay(1000);
end;
begin
while true do
begin
Delay(100);
tunatun;
moveToSpot;
itemSelMahumManeQuest;
moveToReward;
end;
end.