CRASH_OVERRIDE
2012-12-30 21:29:20
Hey guys,
The script i am currently working on is going really well.
I have an issue though, With my WorldSwitch procedure, it works great and all on the first WorldSwitch. But after the first WorldSwitch it keeps doing it. I know this is because i use "GetTimeRunning" to determine the worldswap. Is their something that i can replace this with so that after every 1hour-25mins that goes past it re-world hops.?
I call this procedure in the main loop as part of a walking Begin and End. So after it walks to a certain location if the timerunning is more than a 1hour+random25mins it worldshops every 1.25 hours that go by?
heres the current procedure i made:
Im thinking maybe if i add a result at the top that = the math of the time gone by? Or Maybe add a Inc(WorldHopCount), if timerunning - (worldhopcount). Any ideas?
The script i am currently working on is going really well.
I have an issue though, With my WorldSwitch procedure, it works great and all on the first WorldSwitch. But after the first WorldSwitch it keeps doing it. I know this is because i use "GetTimeRunning" to determine the worldswap. Is their something that i can replace this with so that after every 1hour-25mins that goes past it re-world hops.?
I call this procedure in the main loop as part of a walking Begin and End. So after it walks to a certain location if the timerunning is more than a 1hour+random25mins it worldshops every 1.25 hours that go by?
heres the current procedure i made:
Procedure WorldSwitch;
Var
W, WorldHopCount: Integer;
Begin
If(Players[CurrentPlayer].Booleans[5]) Then
Begin
If(GetTimeRunning > 3600000 + Random(90000)) Then
Begin
StatusReport('Status: Worldhop');
ExitToLobby;
If Not(Players[CurrentPlayer].Booleans[6]) Then
Begin
StatusReport('Status: Forced Antiban');
Wait(60000 + Random(15000));
W := RandomWorld(False, False);
If LoginPlayerToLob Then
ChangeWorld(W);
StatusReport('Status: Swapping to Free World' + IntToStr(W));
End;
If(Players[CurrentPlayer].Booleans[6]) Then
Begin
StatusReport('Status: Forced Antiban');
Wait(60000 + Random(90000));
W := RandomWorld(True, False);
If LoginPlayerToLob Then
ChangeWorld(W);
StatusReport('Status: Swapping to Members World' + IntToStr(W));
End;
End;
End Else
LoginPlayer;
End;
Im thinking maybe if i add a result at the top that = the math of the time gone by? Or Maybe add a Inc(WorldHopCount), if timerunning - (worldhopcount). Any ideas?