Logout if player on screen and login some minutes later
Const
  Minutes = 5
  Seconds = 30
  Char_Name = 'Mateusz Dragon Wielki'
  World = 'Harmonia'
  Password = 'tibia'
  Acc_Number = 111111

while not terminated do
begin
  UpdateWorld;
  for i := 0 to Creatures.Count -1 do
  begin
    if i >= Creatures.Count then break;
    if not Creatures.Creature[i].NPC then
    if Creatures.Creature[i].Name <> Self.Name then
    if Creatures.Creature[i].Z = Self.Z then 
    begin
      Sleep(1000);
      Self.Logout(false);
      Sleep(Minutes*60000 + Seconds*1000);
      UpdateWorld;
      Self.Login(Acc_Number,Password,Char_Name,World);
    end;
    sleep(10);
  end;
  Sleep(100);
end;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License