;Player log-out script
CreateEffect(30,1000,0,#DIR_RIGHT,GetUserMap(#USERID),GetUserX(#USERID),GetUserY(#USERID),0,#USERID,0)

;SendMessageToAll("Player logged out. UserID: "+#USERID+" UserName: "+GetUserName(#USERID),#MSG_SERVER)

;Backstab: Can be negative
If GetUserSkill(#USERID,27) < 0
	SetUserSkill(#USERID,27,1)
EndIf
If GetUserSkill(#USERID,27) > 0
	SetUserSkill(#USERID,27,1)
EndIf

If GetUserStrengthExp(#USERID) < 0
	GiveUserStrengthExp(#USERID, 0 - GetUserStrengthExp(#USERID))
EndIf
If GetUserEnduranceExp(#USERID) < 0
	GiveUserEnduranceExp(#USERID, 0 - GetUserEnduranceExp(#USERID))
EndIf
If GetUserAgilityExp(#USERID) < 0
	GiveUserAgilityExp(#USERID, 0 - GetUserAgilityExp(#USERID))
EndIf
If GetUserWisdomExp(#USERID) < 0
	GiveUserWisdomExp(#USERID, 0 - GetUserWisdomExp(#USERID))
EndIf

Continue = 1