Thread: New accounts
View Single Post
  #3  
Old 05-28-2008, 03:53 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Crow View Post
Thanks for the offer Robin, but I have done enough and I might also say too much testing on this already. It just sucks. Think about commands like /itemtrade on Era. It's asking for the account to trade to (or did so in the past). Nobody wants to use Graalxxxxxx accounts for that, but if people don't have a community name I also have to code something that allows people to put both account and community name. That's just ****in complicated.
I always use something like this or something :o
PHP Code:
  a pl.communityname;
  if (
== 0pl.account;
  else if (
== "guest"pl.account
so..

PHP Code:
function checkPlayer(plyr) {
  
temp.findplayer(plyr);
  if (
== 0findplayerbycommunityname(plyr);
  if (
== 0) return 0;
  return 
1;

something like that would do it, but I haven't tested it though..

Quote:
Originally Posted by Robin View Post
1. findplayerbycommunityname(str) returns object
2. What about new accounts?
1. You stated that we could just use communityname where we used accounts, not true as I stated that you can't use findplayer() and that has been used since gs2 came out. findplayerbycommunityname() was added some weeks after the communitynames came out because of complaints in the scripting forum..

2. New accounts can choose their own communityname once logged on graalonline.com and then by editing their profile from there if I recall.

I would like findplayer() to work with both findplayerbycommunityname() is too long.. and I don't like to make something like

PHP Code:
public function findcommunityplayer(a) {
  return 
findplayerbycommunityname(a);

or something like that..
__________________