Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   Community name help (https://forums.graalonline.com/forums/showthread.php?t=80100)

Admins 06-16-2008 03:04 PM

Community name help
 
I still get complains from people that on some servers it's displaying account names instead of community names (e.g. for trading systems) although that is not really good and often quite easy to fix. If you know of such things please report them here, so we can help fixing them.

Skyld 06-16-2008 03:17 PM

For scripter reference, the following things are available for working with community names:
  • player.communityname - gets the community name of the player
  • findPlayerByCommunityName() - works almost identically findPlayer() except it takes a community name as a parameter instead of account name
For instance, to address a player by their community name, you may use the following:
PHP Code:

function onPlayerTouchsMe()
{
  
this.chat "Hello, " player.communityname;


Notes:
  • Players with original account names have community names set to the same as their account. For instance, account "Skyld" has the community name "Skyld".
  • Guest players (those who have not logged in with an account for the 4-hour trial) have a community name of "guest".

cbk1994 06-16-2008 04:07 PM

Quote:

Originally Posted by Stefan (Post 1397416)
I still get complains from people that on some servers it's displaying account names instead of community names (e.g. for trading systems) although that is not really good and often quite easy to fix. If you know of such things please report them here, so we can help fixing them.

The problem with this is simply the nature of changing things; people don't want to have to go back and change what is already working.

What if you have multiple guests on the server, would be my question? findPlayerByCommunityName( "guest" ) wouldn't be very effective ...

Chompy 06-16-2008 04:13 PM

Quote:

Originally Posted by Stefan (Post 1369760)
findplayerbycommunityname() is actually first checking for the account (because that is faster), and then trying to find a player with the community name matching the parameter. So it should work in any case - finds players by account name exactly like findplayer(), but also works if you provide a community name. May be findplayer() could be changed to do that as well, might only need to optimize it a little bit.

Thought this could help aswell
(plus, Stefan, could you make findplayer() work with both? Like, make findplayer() work as findplayerbycommunityname()?)

cbk1994 06-16-2008 04:17 PM

Quote:

Originally Posted by Chompy (Post 1397435)
Thought this could help aswell
(plus, Stefan, could you make findplayer() work with both? Like, make findplayer() work as findplayerbycommunityname()?)

Or even findPlayer2(), findPlayerByCommunityName() is much too long.

Admins 06-16-2008 05:02 PM

Normally the communityname for guests is empty, so do

temp.displayname = (player.communityname!=""? player.communityname : player.account)

although it's recommended to display the nick name instead, and use the account name for identification. Only for stuff that needs strong identification (e.g. trading of items) accept community name (the name displayed on playerlist / in the game) as input, with findplayerbycommunityname(). So most of the time you don't need to a lot of changes, just:

- accept community name as input for stuff like trading: replace findplayer() by findplayerbycommunityname()
- when talking to the player or displaying the player name then use the nickname: player.nick
- for stuff like ladders or rankings eventually display nick name + account: player.nick @ " (" @ (player.communityname!=""? player.communityname : player.account) @ ")"

cbk1994 06-16-2008 05:07 PM

Quote:

Originally Posted by Stefan (Post 1397444)
post

Surely you can make it easier to do than this:

"temp.displayName = ( player.communityname != "" ? player.communityname : player.account );"

Perhaps guest community name could equal their account of pcid?

Crow 06-16-2008 05:08 PM

Maybe player.communityName is empty for guests, but findPlayerByCommunityName() still finds somebody when you input "guest". So could you please add something in the next version that prevents exactly that and just returns nil when you do findPlayerByCommunityName("guest")?
Thanks.

Admins 06-16-2008 05:47 PM

We have updated the gserver and npcserver for hosted and under construction playerworlds, it's now displaying the community name for RC actions (login, logout, changing scripts etc.). Strange that no one ever complained. Still waiting for reports on which server stuff is not working, and what.

cbk1994 06-16-2008 05:48 PM

Quote:

Originally Posted by Stefan (Post 1397450)
We have updated the gserver and npcserver for hosted and under construction playerworlds, it's now displaying the community name for RC actions (login, logout, changing scripts etc.)

What about putting players in staff under server options?

Apparently you have to put community name AND account name.

At least, that's what I was told.

Admins 06-16-2008 07:20 PM

You put the community name if someone has one, otherwise the account name. Only for editing the rights you need to use the account name right now, although you can also wait until the staff logins (ip-range will automatically be set on first login).

Switch 06-16-2008 07:25 PM

How about all guests have their PCID as their account name?
Or have like player.pcid or player.ip string for someone's PCID or IP which you can then set temp.displayName?

Tigairius 06-16-2008 07:30 PM

How about 'warpto community name' instead of 'warpto account name'

Quote:

Originally Posted by Switch (Post 1397487)
How about all guests have their PCID as their account name?
Or have like player.pcid or player.ip string for someone's PCID or IP which you can then set temp.displayName?

I'd like player.pcid

Door 06-16-2008 07:53 PM

I think it would be easier if we just forced players to put in their telephone numbers while registering (Cell phones work too), and then have it as player.number. That way we can also call them if they are lonely or we need to make sure it's the right person. And imagine, if we know their birthday too we call all be calling all day long to wish them a happy birthday! This would make it much easier I think and much more personal.

IN FACT I HAVE AN EVEN BETTER IDEA!! Make it so the account names are "Graal5555555555" Where the numbers following are a full telephone number! We can all talk to each other it will be so much fun!!

cbk1994 06-16-2008 10:24 PM

Quote:

Originally Posted by Switch (Post 1397487)
How about all guests have their PCID as their account name?
Or have like player.pcid or player.ip string for someone's PCID or IP which you can then set temp.displayName?

Won't happen, at least the IP. Apparently IPs are private.
Quote:

Originally Posted by Door (Post 1397493)
I think it would be easier if we just forced players to put in their telephone numbers while registering (Cell phones work too), and then have it as player.number. That way we can also call them if they are lonely or we need to make sure it's the right person. And imagine, if we know their birthday too we call all be calling all day long to wish them a happy birthday! This would make it much easier I think and much more personal.

IN FACT I HAVE AN EVEN BETTER IDEA!! Make it so the account names are "Graal5555555555" Where the numbers following are a full telephone number! We can all talk to each other it will be so much fun!!

That'd be awesome.

Quote:

Hello?

Uhh ... who is this?

THIS IS GRAAL424124 LOL

CALLER ID BLOCKED, FOOL

LOLWAT


All times are GMT +2. The time now is 06:14 PM.

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