Is there any easy way to do this yet? I found Zarqon had written a little script about a year ago that would do it to some degree:
But this doesn't work all the time. For example if I give it uffda it returns the playerID of someone named bigpuffdaddy007 (which contains uffda, and is the first search result)
Code:
int to_id(string player) {
string page = visit_url("searchplayer.php?searching=Yep.&searchstring="+url_encode(player)+"&searchlevel=&searchranking=&hardcoreonly=0");
if (contains_text(page,"No players found.")) {
print("Sorry "+my_name()+", but '"+player+"' is in a different kingdom!","red");
return 0;
}
page = substring(page,index_of(page,"showplayer.php?who=")+18);
return to_int(substring(page,0,index_of(page,"\"")));
}
But this doesn't work all the time. For example if I give it uffda it returns the playerID of someone named bigpuffdaddy007 (which contains uffda, and is the first search result)