Page 1 of 1

Suggestion for waitForLoadingScreen function

Posted: Tue Jan 25, 2011 11:01 am
by Giram
I have been farming instance for some time now and have noticed that sometimes my alt might disconnect. So when my char is in instance it can't get out cause it is not in party and mobs will spawn back after certain time and kills me. So my temporary solution was logout if we wait more than 180 seconds while waiting loading screen. It could do something else if someone has better solution.

Code: Select all

	local currentTime = os.time();
	-- wait for loading screen to appear
	if memoryReadBytePtr(getProc(), addresses.loadingScreenPtr, addresses.loadingScreen_offset) == 0 then
		repeat
			yrest(1000)
			
			-- Timeout in seconds
			if( os.difftime(os.time(), currentTime) > 180 ) then
				player:logout(false, false);
			end
		
		until memoryReadBytePtr(getProc(), addresses.loadingScreenPtr, addresses.loadingScreen_offset) == 1
	end

Re: Suggestion for waitForLoadingScreen function

Posted: Tue Jan 25, 2011 7:31 pm
by rock5
So what you are saying is, if your alt hasn't disconnected, you would leave the party which teleports you out of the instance? Couldn't you just check to see if your alt is still part of the party before leaving it? If the alt has gone then you logout instead.