Originally Posted by
john15509
Anyone else having a probelm with it selecting the customize flag on the main menu? When it gets into the flag customization then it never exits out and the bot keeps trying to resume games but ends up wasting however long you were trying to bot for.
I had that, too, yesterday.
Did you use the pictures for your resolution? Did you change your resolution? Did you pause the bot and then resume it? I once paused it, left the game by myself and then resumed. Of course, the script did not know, where it is.
@BlackSack:
I keep having three problems. One is my own, I have a lack of gear and thus Sarkoth does not get killed fast enough end script uses the TP before he is down.
But the other two are:
1. I get killed from time to time while trying to enter the cellar after having stood right in front of it.
I saw that $TryRecover and CheckFor() part in the script, which looks very nice. I will try to figure out what the problem is.
But more important:
2. When the cellar is not found and therefore
Code:
Call("TownPortal")
If Not CheckDead() Then
Call("LeaveGame")
EndIf
is executed (line 341-344), then the town portal is used to early. I figured out, why that happens.
LeaveGame() (declared in line 1004) calls RandSleep(), without any arguments. So the optional arguments are used:
Code:
Func RandSleep($min = 5, $max = 45, $chance = 3)
$randNum = Round(Random(1, 100))
If $Timer == True And $randNum <= $chance Then
$sleepTime = Random($min * 1000, $max * 1000)
GUICtrlSetData($lblStatus, "Status: Random Sleep - " & Round($sleepTime / 1000) & " secs")
For $c = 0 To 10
Sleep($sleepTime / 10)
Next
EndIf
EndFunc
The bold line leads to the problem, that only in 3% of all RandSleep() calls (if not using the optional parameters), it really sleeps.
In my opinion, $chance should be 100, when we know, we're standing right outside the closed cellar and $min should be set to at least the time a town portal need to be used.
What I am wondering about is: Why does not EVERYONE has this problem, that in 97% of all "closed cellar" cases, the log out button is pressed to early?
Later I found out, that $Timer is set to FALSE by default. So all the time, LeaveGame() should be called immediately after TownPortal(), no?
What got it right, like I wanted it to be, was:
I extended the signature of LeaveGame() and changed the RandSleep() into a conditional version:
Code:
Func LeaveGame ($outside_cellar = 0)
If $outside_cellar == 1 Then
RandSleep($tptime/1000, ($tptime+1)/1000, 100)
Else
RandSleep()
EndIf
...
EndFunc
( side note: min and max in Random() can not be the same, otherwise it will return 0 ... did cost me some minutes. )
Now, when I call LeaveGame() in lines 336 and 343 (which are the locations, where the run is aborted), I instead call LeaveGame(1).
What do you think about that?
Plus: When I port back to town, the 6900ms you set to $tptime, seems to be a bit more, than the TP really takes. Does have an impact on other parts of the code, if I decrease it to, let's say, 6500ms or even 6000ms? Is that slightly bigger value needed somewhere else?
Greetings and thanks for reading,
Dodo :-)