Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Searching through players. (https://forums.graalonline.com/forums/showthread.php?t=84008)

Ronnie 02-03-2009 07:31 PM

Searching through players.
 
So guys, I have a script and for my script it has a client string of theres set, and I checked and they do have the client string in there atts.
But it doesn't read it correctly and adds them to my gui anyway.


PHP Code:

   for(temp.aallplayers) {
    if(!
temp.a.isexternal) {
     
temp.b=findplayer(temp.a);
     
with(temp.b){
      if(
temp.b.client.guildmode == 3){
       return;
       }
       
i++;
       
addrow(i,temp.a.account ":" temp.a.nick);
       }    
      }
     } 

If you need the rest of the script it can be listed, but I tried multiple ways to go through the players client strings and they don't work.

thanks in advance!

[email protected] 02-03-2009 08:10 PM

You can't read another players client. flags from the clientside.
PHP Code:

for (temp.pallplayers) {
  if (
p.isexternal) continue;
  
//Make another check for the string
  
temp.count++;
  
addRow(countp.account ":" p.nick);



Ronnie 02-03-2009 08:52 PM

Since when, I thought client strings were view able, but clientr. were not ?

DustyPorViva 02-03-2009 08:56 PM

It's not a matter of client vs clientr, but when you're reading data about other players, I don't think Graal stores client vars in the player objects. Could you imagine how much data would be sent if you were in a room with 20 other players who had a ****load of client vars?

Ronnie 02-03-2009 08:59 PM

Meh, I see you point, well what would be the best way for checking something like this, storing it in a txt file, or using a db npc , or a server.flag?

xXziroXx 02-03-2009 09:01 PM

Store it in an attribute, those are readable from other objects.

Ronnie 02-03-2009 09:02 PM

What do you mean?

Tigairius 02-03-2009 09:09 PM

PHP Code:

player.attr[20] = 3

instead of
PHP Code:

client.guildmode 

Make sure you set the attribute serverside.

Ronnie 02-03-2009 09:11 PM

Ah , okay, thanks tig, and that is readable clientside? or no?

Tigairius 02-03-2009 09:20 PM

Yes


All times are GMT +2. The time now is 06:54 AM.

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