Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Getting Player Images (https://forums.graalonline.com/forums/showthread.php?t=73073)

killerogue 03-26-2007 12:11 AM

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! :p

Twinny 03-26-2007 03:35 AM

Could have used a format() for the sendrpgmessage() part but eh: it all works ^^.

cbk1994 04-01-2007 03:18 PM

Is there any difference between sendrpgmessage() and echo() clientside?

Twinny 04-01-2007 03:33 PM

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?

Chandler 04-01-2007 04:03 PM

Quote:

Originally Posted by cbkbud (Post 1295287)
Is there any difference between sendrpgmessage() and echo() clientside?

no

xXziroXx 04-01-2007 07:00 PM

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() -_-


All times are GMT +2. The time now is 11:18 PM.

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