Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-26-2007, 12:11 AM
killerogue killerogue is offline
Registered Omega
killerogue's Avatar
Join Date: Apr 2006
Location: United States
Posts: 1,920
killerogue is on a distinguished road
Send a message via AIM to killerogue Send a message via MSN to killerogue
Getting Player Images

I was bored. So I scripted this. It isn't anything special. Just nets' you the info of the images currently set to the player, and then echoes it to the F2 Window.

Could be used as is or built upon and used for other things, like getting other attributes from the player.

PHP Code:
//#CLIENTSIDE
function onPlayerChats()  
{

this.allowed = {

"irule13",
"Codein",
"Admin-Playerworld145",
"mandangop2p" 
};

  if (
player.account in this.allowed
  {
    if (
player.chat.starts("/openinfo"))  
    {
      
tokens player.chat.tokenize();
      
pl findPlayer(tokens[1]);

      
this.plhd pl.headimg;
      
this.plsh pl.shieldimg;
      
this.plbd pl.bodyimg;
      
this.plsw pl.swordimg;
    
  }
}
sendrpgmessage("These are" SPC pl.account "'s stats:" NL "Head:" SPC this.plhd NL "Shield:" SPC this.plsh NL "Body:" SPC this.plbd NL "Sword:" SPC this.plsw);

Have fun!
__________________


REMEMBER, IF YOU REP ME, LEAVE A NAME!

Quote:
Originally Posted by haunter View Post
Graal admins don't die. They go to hell and regroup.
Quote:
Originally Posted by Inverness View Post
Without scripters, your graphics and levels wouldn't do anything but sit there and look pretty.
Reply With Quote
  #2  
Old 03-26-2007, 03:35 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Could have used a format() for the sendrpgmessage() part but eh: it all works .
Reply With Quote
  #3  
Old 04-01-2007, 03:18 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Is there any difference between sendrpgmessage() and echo() clientside?
__________________
Reply With Quote
  #4  
Old 04-01-2007, 03:33 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Echo() used serverside just echos into RC (NC to be specific) while sendrpgmessage() serverside sends the echo clientside to the player into the F2 menu, much like a clientside echo().

...did that make sense?
Reply With Quote
  #5  
Old 04-01-2007, 04:03 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by cbkbud View Post
Is there any difference between sendrpgmessage() and echo() clientside?
no
Reply With Quote
  #6  
Old 04-01-2007, 07:00 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
echo() on serverside = message sent to NC
sendrpgmessage() on serverside = message sent to F2 log
echo() on clientside = message sent to F2 log
sendrpgmessage() on clientside = uhm.. doesnt even work?


I would rather see player.echo() then sendrpgmessage() -_-
__________________
Follow my work on social media post-Graal:Updated august 2025.
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 12:05 AM.


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