Please does anyone know the easiest way to obtain the player id. ie player currently logged in. Wanting to do this programmatically in a greasemonkey script. Is there a predefined variable or function that will return it?
I've written a script and was going to put it onto userscripts.org. however at the moment it's got my userid hardcoded into it so it will only work for me.
How to get player id in a greasemonkey script.
Moderator: Tech Team
Forum rules
Please read the Community Guidelines before posting.
Please read the Community Guidelines before posting.
Re: How to get player id in a greasemonkey script.
Figured this out now.
this is how in case anyone's interested
function getPlayerID()
{
var playerid = document.cookie;
playerid = playerid.split("phpbb3_jer7c_u=")[1]
playerid = playerid.split(";")[0];
return playerid;
}
if playerid is returned as "1" then it means not logged in
this is how in case anyone's interested
function getPlayerID()
{
var playerid = document.cookie;
playerid = playerid.split("phpbb3_jer7c_u=")[1]
playerid = playerid.split(";")[0];
return playerid;
}
if playerid is returned as "1" then it means not logged in