quinta-feira, 31 de julho de 2008

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;

0 Comments: