SphereCommunity
Force Logout? - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Force Logout? (/Thread-Force-Logout)

Pages: 1 2


Force Logout? - x77x - 10-02-2016 07:15 AM

can you force a logout via script?


RE: Force Logout? - Ben - 10-02-2016 07:50 AM

DISCONNECT is the command you need


RE: Force Logout? - x77x - 10-02-2016 01:45 PM

been down that road in a previous post and it still creates more problems thats its worth...
a proper logout, just like hitting the logout button would be nice


RE: Force Logout? - Ben - 10-02-2016 11:42 PM

And people womder why we get frustrated...
You: "I want a chocolate bar!"
Me: "here is a chocolate bar"
You: "No! I said I want a chocolate bar!"

Figure it out yourself


RE: Force Logout? - x77x - 10-03-2016 01:30 AM

i want a LOGOUT, not a chocolate bar... and especially not a dirty chocolate bar


Code:
[FUNCTION f_disconnectx]
SRC.SENDPACKET 0D1 01

SRC.SYSMESSAGE @0033 Saving your information...
SRC.SYSMESSAGE @0033 You will be disconnected in 10 seconds, Please log back in!
SRC.TIMERF 5, f_disconnectx

a logout and a disconnect crash are not the same =)

SRC.DISCONNECT doesnt work via script
why isnt there a SRC.LOGOUT ?

https://forum.spherecommunity.net/Thread-force-disconnect


RE: Force Logout? - pointhz - 10-03-2016 02:14 AM

Disconnect is the logout.

If you get disconnect you are logged off. I dont understand what else do you want lol.


RE: Force Logout? - x77x - 10-03-2016 02:23 AM

this does NOT work with a disconnect...

Code:
[EVENTS e_players]
ON=@LOGIN
IF (<SRC.LEVEL>>0)
SRC.NAME=<FINDLAYER(29).NAME> [<eval <SRC.LEVEL>>]
GUILD.ALLMEMBERS -1,SYSMESSAGE @003f <SRC.NAME> - <SRC.TITLE> is online
DIALOGCLOSE 1
RETURN 0
ENDIF

ON=@LOGOUT
IF (<SRC.LEVEL>>0)
SRC.NAME=<FINDLAYER(29).NAME>
RETURN 0
ENDIF

so its not the same


RE: Force Logout? - Kanibal - 10-03-2016 03:12 AM

(10-03-2016 01:30 AM)x77x Wrote:  i want a LOGOUT, not a chocolate bar... and especially not a dirty chocolate bar

Omg... Delete Sphere and go play Lego.


RE: Force Logout? - Ben - 10-03-2016 03:24 AM

Then create your own logout command.

[function logout]
Trigger @logout
Disconnect


RE: Force Logout? - n1ghtwish - 10-03-2016 03:49 AM

Code:
[FUNCTION goodbye]
sysmessage DISCONNECTING... GOODBYE!
timerf 3,fGoodbye

[FUNCTION fgoodbye]
trigger @logout
disconnect

This works for me, AND even fires the LOGOUT trigger!