How to check quest stage with Adrenaline

This is an example of you can check the quest stage. Comments has been added in the code.

uses SysUtils;

const
  THE_FINEST_FOOD_ID=623;
  QUEST_NOT_FOUND=0;
  QUEST_STARTED=1;
  QUEST_COMPLETED=2;
  
function GetQuestStage(quest_id: integer): integer;
var i: byte;
begin
  result:= 0;
  for i:= 1 to 32 do if Engine.QuestStatus(quest_id, i) then result:= i;
end;


procedure TheFinestFoodChecker;
begin
   case GetQuestStage(623) of

   QUEST_NOT_FOUND:  // Quest is not started.
   begin
      Engine.Say('Talk to Jeremy and get the quest!', 3, '');
      delay(10*60);
   end;

   QUEST_STARTED:
   begin
       // Collecting the items in thi scase
       // You can add some logic like move to location or 'To village' for dead case
   end;

   QUEST_COMPLETED:  // All quest items are completed (100,100,100)
   begin
      Engine.Say('(Completed). Go to Jeremy!', 3, '');
      delay(10*60);
   end;

   end;
end;
  
begin
  Script.NewThread(@TheFinestFoodChecker);
  delay(-1);
end.

In the premium version, you can automate the whole quest by using the GPS and tell the bot to move in the X point. It can be done with the free too, but without gps.That means, a lot of Engine.MoveTo commands

Author: Velmsun