Been a while!
Anywho, tasked with finding a way to trace a players account from email.
This is to find offline players rather than just online, e.g. helping to recover lost accounts where the player has lost access to the email account but still knows the email address that was used to identify etc.
I seem to have hit an issue with what I assume are limits imposed by the internals of Graal, my method of getting a list of all the accounts ever used to check against was looping through the player houses folder:
PHP Code:
function onCreated(){
this.maxlooplimit = 15000;
echo(this.maxlooplimit); //Echos 15000
LookFor("[email protected]", 1);
}
//Params:
// st - string - Either IP or Email.
// sw - integer - 0 for IP, 1 for Email.
function LookFor(st,sw){
temp.p = 0;
temp.f = 0;
temp.list = new[0];
temp.fold = new[15000];
temp.fold.loadfolder("levels/houses/players/*Graal*", false);
echo("Looking for "@st@" in "@fold.size()@" houses");
temp.fold[10123] = "test";
echo(fold[10123]);
for(temp.i : temp.fold){
temp.acc = temp.i.tokenize("_")[1];
//Skip PC accs, since they haven't identified.
if(acc.substring(0, 5) != "Graal") continue;
temp.p = new TServerPlayer(@acc);
if(sw){
//Look for Email
if(st.lower() == p.client.email.lower()){
echo("Found player: "@acc);
temp.f = 1;
break;
}
}else{
//Look for IP
}
}
if(!temp.f) echo("Unable to locate player.");
temp.p.destroy();
}
This is the RC output, any ideas?
The script of NPC Gund_Lookup has been updated by Gund
15000
Looking for
[email protected] in 10000 houses
Unable to locate player.