Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   getPlayerProfile("string", var) (https://forums.graalonline.com/forums/showthread.php?t=68979)

Bl0nkt 09-26-2006 11:18 PM

getPlayerProfile("string", var)
 
It'd be nice to get a function to display a specific player's profile. Nothing complicated.

Small example:

NPC Code:
function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}




There could also be ways to get certain information about it.

0 = display full profile
1 = return the name
2 = return the age
3 = return the email address

etc.

Skyld 09-26-2006 11:32 PM

PHP Code:

findPlayer("Foo").showProfile(); 

... already exists for opening the profile itself although I don't think you can get info from it.

In terms of actually collecting profile information, this might be possible using the serverlister, I will try it sometime.

KuJi 09-27-2006 12:10 AM

Quote:

Originally Posted by Bl0nkt (Post 1222635)
Hachi's Post =o

I posted an example in the Code Gallery of show profile.

Quote:

Originally Posted by Skyld (Post 1222643)
PHP Code:

findPlayer("Foo").showProfile(); 

... already exists for opening the profile itself although I don't think you can get info from it.

In terms of actually collecting profile information, this might be possible using the serverlister, I will try it sometime.

Hmm... findPlayer("ACCOUNT") works clientside?

Anyway, heres something:
showProfile(); on it's own just shows a blank profile, to show your own profile you need to do one of the following:

PHP Code:

player.showProfile();

players[0].showProfile(); 


xAndrewx 09-27-2006 08:53 AM

NPC Code:
function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}


Learn to stylise

HTML Code:

function onPlayerChats()
{
  if (player.chat.starts("find"))
  {
    player.chat.tokenize()[1].showProfile();
  }
}


Yen 09-27-2006 02:00 PM

Quote:

Originally Posted by xAndrewx (Post 1222796)
NPC Code:
function onPlayerChats() {
if (player.chat.starts("find")) {
temp.toks = player.chat.tokenize();
getPlayerProfile(temp.toks[1], 0);
}
}


Learn to stylise

NPC Code:
function onPlayerChats() 
{
if (player.chat.starts("find"))
{
player.chat.tokenize()[1].showProfile();
}
}


...
You've failed me.

xAndrewx 09-27-2006 08:48 PM

Haha, my stylise wasn't any better, for some reason it added random returns where it shouldn't!

Crono 09-27-2006 09:41 PM

Quote:

Originally Posted by xAndrewx (Post 1222944)
Haha, my stylise wasn't any better, for some reason it added random returns where it shouldn't!

Don't worry, it still confuses noobs like me. :p

Admins 09-28-2006 12:16 AM

requesttext("lister","getprofile",accountname)

KuJi 09-28-2006 02:11 AM

Quote:

Originally Posted by Stefan (Post 1223028)
requesttext("lister","getprofile",accountname)

Really... now =o.


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

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