If client crashes then usually bot has some sort of error, I figure we could add into the error function some checks.
so in the start of the error do a
Code: Select all
if player.Name == <UNKNOW> then -- game crashed
yrest(5000) -- rest just to make sure it isn't just in loading screen
if player.Name == <UNKNOW> then
(findWindow("Crash Report"), getWindowClassName("#32770"))
rest(3000)
--some code to start up client
-- some more code to attach MM to that client and contue with WP
end
end
The check for player.Name would probably be better as a check for something in memory, not sure if the memory changes when crashed.
Obviously lots of things to determine.