Page 1 of 1

safe logout

Posted: Mon Apr 07, 2008 5:18 am
by westrupp
how detect when character make logoff and logoff/disconect char in exact moment? i think make area for this...


any idea?

Thanks,

Posted: Mon Apr 07, 2008 2:06 pm
by *Edwards
If I understand well you will find your answer with scripts/misc/logoff.src where is situated all the necessary code to your questions.

- You could use scripts/misc/logoff to notify mobiles online that playername is logging out
- Or you could use a command that use mobile.connected and it will return boolean ( 1= true, 0 = nope.. )

Posted: Mon Apr 07, 2008 5:13 pm
by ncrsn
I understood you wanted to make logout instant (in various cases) without character staying in the world after player has left the game.

IF that's the case, this is the script you are looking for: http://docs.polserver.com/pol097/script ... fftest.ecl. It has exists since POL087C I think, so you can likely use it.

IF that's not what you wanted, you can stop reading now.

Posted: Tue Apr 08, 2008 5:17 am
by westrupp
ncrsn wrote:I understood you wanted to make logout instant (in various cases) without character staying in the world after player has left the game.

IF that's the case, this is the script you are looking for: http://docs.polserver.com/pol097/script ... fftest.ecl. It has exists since POL087C I think, so you can likely use it.

IF that's not what you wanted, you can stop reading now.

Code: Select all

use uo;
include "include/findcity";
program logofftest( character )
	
    	if (character.cmdlevel) > 0
        		return 0;
                elseif(findcity(character) == "Cove")
		return 0;
    	else
        		return 300;
    	endif
endprogram
Thanks, here is for example character instant logoff in Cove....

Thanks again,