Check quest stage by ID

This check will be very usefull for scripts where bot should make quests

function QuestStage(quest_id: integer): integer;   // returns current quest stage by id
var i: byte;
begin
  result:= 0;
  for i:= 1 to 32 do if Engine.QuestStatus(quest_id, i) then result:= i;
end;

begin
  Print(QuestStage(622));  // print quest stage
end.