So does findplayer(account) work for old accounts and graal12345 accounts as well? If not, it should, as scripters shouldn't need to do constant checks between old accounts and new... and in that case:
findplayer(acc).displayacc or some other sort of short var that will return the name players desire to see(in the case of old accounts... the account, in the case of new accounts, the community name).
So simply: findplayer(account) should work seemlessly between the two account types. After all, new accounts still use a static account name in the form of graal12345, and scriptwise, as far as data concerns, scripters don't need the community name. In that case, findplayer(account).account should return either the old account name or the new graal123546 account(which is what scripters need for behind-the-scene stuff).
Display-wise, just an easy way to display the desired account to the player in the form of old account name or their community name, where graal12345 is undesirable(unless they have no community name, in which graal12345 should be substituted).
I haven't messed with community names much, so I'm not sure if these sort of things are already in place.
So ideally, if I were writing, say... a bank script, the best way I can think of to reflect all those changes would be as such:
PHP Code:
function onActionServerside(cmd) {
if (cmd == "deposit") {
temp.n = findnpc("BankDB");
temp.acc = findplayer(params[1]).account;
n.(@ "stash_" @ acc) += params[2];
acc.chat = "A total of " @ params[2] @ " has been deposited to the account of " @ acc.displayaccount;
}
}
//#CLIENTSIDE
function onPlayerchats() {
if (player.chat.starts("/deposit")) {
triggerserver("gui",name,"deposit",player.account,player.chat.substring(8));
}
}
Which would always save the money to their static account(DustyPorViva or Graal123456, depending on when the account was made), but always display their community name when they deposit. That's how it should work, and would simply things a lot.