View Single Post
  #1  
Old 09-18-2007, 06:17 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
function findName()

Use: Find and return a player prioritized by:

1.) Account Name
2.) Display Name

this is used due to the fact that new Graal Online accounts display as
Graal######.


Not a difficult script, but one of conveinence. Please enjoy, if you do copy and paste verbatim, I do not need acknowledgement.

Enjoy!


NPC Code:
function findName(playername)
{
for(i = 0; i < players.size(); i++)
{
if(players[i].account.starts(playername))
{
temp = players[i];
break;
}
if(players[i].nick.starts(playername))
{
temp = players[i];
break;
}
}
return temp;
}

Reply With Quote