Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-26-2006, 11:18 PM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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.
Reply With Quote
  #2  
Old 09-26-2006, 11:32 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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.
Reply With Quote
  #3  
Old 09-27-2006, 12:10 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Bl0nkt View Post
Hachi's Post =o
I posted an example in the Code Gallery of show profile.

Quote:
Originally Posted by Skyld View Post
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(); 
Reply With Quote
  #4  
Old 09-27-2006, 08:53 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
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();
  }
}
__________________

Last edited by xAndrewx; 09-27-2006 at 08:48 PM..
Reply With Quote
  #5  
Old 09-27-2006, 02:00 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Quote:
Originally Posted by xAndrewx View Post
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.
Reply With Quote
  #6  
Old 09-27-2006, 08:48 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Haha, my stylise wasn't any better, for some reason it added random returns where it shouldn't!
__________________
Reply With Quote
  #7  
Old 09-27-2006, 09:41 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
Quote:
Originally Posted by xAndrewx View Post
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.
__________________
Reply With Quote
  #8  
Old 09-28-2006, 12:16 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
requesttext("lister","getprofile",accountname)
Reply With Quote
  #9  
Old 09-28-2006, 02:11 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Stefan View Post
requesttext("lister","getprofile",accountname)
Really... now =o.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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