Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Your opinion (https://forums.graalonline.com/forums/forumdisplay.php?f=195)
-   -   New accounts (https://forums.graalonline.com/forums/showthread.php?t=75469)

Chompy 05-28-2008 02:34 PM

Quote:

Originally Posted by Robin (Post 1392962)
player.account > player.communityname
  • new player attribute player.communityname which displays the name the player is using for the forums etc.
    • by default players have now an account name which is basicly just a number (Graal12345) and can later register a communityname which is then used for the fourms, wiki etc.
    • on the playerlist and PMs it will display the community name instead of the account name, scripts are supposed to do the same

1. I haven't done much testing but I'm assuming it's safe to just use community name where you would previously just use account.

2. Unless of course, those with old account names but never had any access to the forum and thus have never registered a community name, makes the community name return null?

If the same goes with new accounts who have not yet registered a community name (which of course does suck) but a simple fix would be to fall back to the account name or even the nickname of the player to assertain identity.

However, nicknames are not as secure as the previous two options.

I'll do some testing later today and post my findings in the scripting forum if you like Crow?

1. You can't use findplayer() on communitynames..
2. Old accounts before the comunitynames will get their community name set to their account so account == communityname in their case

Crow 05-28-2008 02:56 PM

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.

Robin 05-28-2008 03:17 PM

Quote:

Originally Posted by Chompy (Post 1392963)
1. You can't use findplayer() on communitynames..
2. Old accounts before the comunitynames will get their community name set to their account so account == communityname in their case

1. findplayerbycommunityname(str) returns object
2. What about new accounts?

blazeingonix 05-28-2008 03:32 PM

Lot of accounts with Graal1349595 , Graa19394 and i can't remember who they're this suck .

Chompy 05-28-2008 03:53 PM

Quote:

Originally Posted by Crow (Post 1392967)
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 (Post 1392972)
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.. :(

Robin 05-28-2008 04:21 PM

Quote:

Originally Posted by Chompy (Post 1392981)
PHP Code:

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



Jesus chompy what are you doing to me man, you scared the crap out of me.

Before you edited your post I had this in the quick reply box:

PHP Code:

function _getPlayer(pl) {
  
temp.findplayerbycommunityname(pl);
  if (
temp.== 0) {
    
temp.findplayer(pl);
    if (
temp.== 0) {
      return 
0;
    } else {
      return 
temp.p;
    }
  } else {
    return 
temp.p;
  }


[EDIT]
Actually that can probably be optimised:

PHP Code:

function _getPlayer(pl) {
  
temp.findplayerbycommunityname(pl);
  return 
== findplayer(pl) : p;


[/EDIT]

Chompy 05-28-2008 04:30 PM

Quote:

Originally Posted by Robin (Post 1392986)
Jesus chompy what are you doing to me man, you scared the crap out of me.

Before you edited your post I had this in the quick reply box:

PHP Code:

function _getPlayer(pl) {
  
temp.findplayerbycommunityname(pl);
  if (
temp.== 0) {
    
temp.findplayer(pl);
    if (
temp.== 0) {
      return 
0;
    } else {
      return 
temp.p;
    }
  } else {
    return 
temp.p;
  }


[EDIT]
Actually that can probably be optimised:

PHP Code:

function _getPlayer(pl) {
  
temp.findplayerbycommunityname(pl);
  return 
== findplayer(pl) : p;


[/EDIT]

hehe :p


and, about your edit, that's not optimised though, as it does the same amount of checks .. linecount however is smaller :p
^^

Robin 05-28-2008 05:00 PM

two is the smallest amount of checks but if you notice it only does one if statement instead of two, hence optimised (although not by much)

Crow 05-28-2008 05:16 PM

Quote:

Originally Posted by Robin (Post 1392990)
two is the smallest amount of checks but if you notice it only does one if statement instead of two, hence optimised (although not by much)

Still needs Chompsters "guest" check included, thats really important. Chompy, yes, I'm using something similar. Still annoying me thinks.

Chompy 05-28-2008 05:17 PM

Quote:

Originally Posted by Robin (Post 1392990)
two is the smallest amount of checks but if you notice it only does one if statement instead of two, hence optimised (although not by much)

There's an 'else' in there though :p

return p == 0 ? findplayer(pl) : p
if (p == 0) return findplayer(pl) else return p;

Frankie 05-28-2008 06:16 PM

I honestly don't see what potential Stefan/Unix saw in this dumb account system.

Crow 05-28-2008 06:40 PM

Quote:

Originally Posted by Chompy (Post 1392993)
There's an 'else' in there though :p

return p == 0 ? findplayer(pl) : p
if (p == 0) return findplayer(pl) else return p;

Those two lines equal.


Quote:

Originally Posted by Frankie (Post 1393008)
I honestly don't see what potential Stefan/Unix saw in this dumb account system.

Original idea was that trials can't take "good" account names anymore but still keep what they have done while playing without a community name.

Robin 05-28-2008 06:57 PM

Note the nested if in the if statement in my other post. I saved amount of if statements x 2.

ANYWAY, Back to topic, Why don't they remove trials completely, you have a guest account, and then when you sign up properly you can sign up a proper account name?

The graal14289452359234534258234905839024589239045 crap is really awful.

Crow 05-28-2008 07:25 PM

Quote:

Originally Posted by Robin (Post 1393021)
Note the nested if in the if statement in my other post. I saved amount of if statements x 2.

ANYWAY, Back to topic, Why don't they remove trials completely, you have a guest account, and then when you sign up properly you can sign up a proper account name?

The graal14289452359234534258234905839024589239045 crap is really awful.

Eh, trials are removed, when I said trial I meant guests. Actually, yea, doing that wouldn't be a problem at all. I mean, people could register custom account names for years. Why not now? This was never a problem, your account is not your nickname or something.

Elizabeth 05-28-2008 11:31 PM

Quote:

Originally Posted by kia345 (Post 1330255)
That has to be the stupidest update yet. Good job

agreed


All times are GMT +2. The time now is 09:25 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.