Code:
If Not $Dead And Not $Window Then
Sleep(100)
Send("{ESCAPE}") ;menu
Sleep(10)
MouseClick("left", Round(956*$x_ratio),Round(579*$y_ratio)) ;button to leave game
Sleep(10000) <----- Changed this to from 2500 to 10000
I just made this change and my game resumed properly after dying once. The change causes the bot to wait 10 seconds before clicking "Resume Game", after it clicks "Leave Game", but only when there is NOT a cellar. This makes up for the 10 second leave game timer that occurs if you die while casting a TP when the bot does not detect a cellar. Again, I have only died once so far so this might need to be adjusted.