Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-22-2007, 05:52 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
alllplayers

After talking to someone about one of my scripts, it got me to thinking about allplayers.
Why does it return the NPC server, why does it return IRC bots, why does it return players from other servers if they are on your buddylist?
From a scripting perspective, I don't think we really need all that information, who uses allplayers for IRC bots and players from other servers? I think allplayers should be reserved strictly for players on the server, and maybe another variable to get all the other info.
Reply With Quote
  #2  
Old 08-22-2007, 06:43 AM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Atrius uses allplayers.
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #3  
Old 08-22-2007, 07:04 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Ya, but do you use it to get info on IRC bots?
Anytime I use it, I had to add more just to filter out the NPC server, IRC bots and players from other servers. What's the point when you can't even have scripts interact with them?
Reply With Quote
  #4  
Old 08-22-2007, 10:10 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
-Playerlist does.
__________________
Do it with a DON!
Reply With Quote
  #5  
Old 08-22-2007, 11:08 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
-Playerlist does.
And there you have it.

Make a function like getRealPlayers() that filters it for you.
__________________
Reply With Quote
  #6  
Old 08-22-2007, 05:49 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Ya, but I think that's the only script that'd ever have to use it, don't you think? Maybe there should be a variable getplayerlist or something that returns all players shown in the playerlist(as it seems that's exactly what allplayers does), and just leave allplayers reserved for actual players on the server.
Reply With Quote
  #7  
Old 08-23-2007, 07:20 AM
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
PHP Code:
requesttext("pmserverplayers"str servername); 
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 08-23-2007, 01:44 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
why dont you just do

realplayer= find(allplayers);

i am on my psp so i couldnt put the script in php
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #9  
Old 08-23-2007, 02:12 PM
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
allplayers[] always included all players: normal clients and RCs etc. I am not sure where the problem is.
Reply With Quote
  #10  
Old 08-23-2007, 03:02 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Stefan View Post
allplayers[] always included all players: normal clients and RCs etc. I am not sure where the problem is.
Hes just being lazy and wants an array that only contains the actual player clients connected to the server and not the "virtual" players like the npcserver, IRC bots, and players on other servers that are appearing in your buddy list.
__________________
Reply With Quote
  #11  
Old 08-23-2007, 07:57 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I wouldn't consider it being lazy, I just don't see the point. The only thing that really has a use for it is the -playerlist, which we can't really do anything with, so why should we have to filter out all the other stuff? You'd think allplayers would be for just actual players, and there'd be another variable for all clients.
Reply With Quote
  #12  
Old 08-23-2007, 09:35 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
Quote:
Originally Posted by xXziroXx View Post
PHP Code:
requesttext("pmserverplayers"str servername); 
Hello?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #13  
Old 08-24-2007, 03:38 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by xXziroXx View Post
Hello?
#1. Last time I checked, requesttext() and sendtext() were clientside only.
#2. I believe using that triggers a separate function for the information you're receiving, which is not ideal.
#3. I thought requesttext() and sendtext() were disabled for all but the login server.
__________________
Reply With Quote
  #14  
Old 08-24-2007, 07:14 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
#1. Last time I checked, requesttext() and sendtext() were clientside only.
#2. I believe using that triggers a separate function for the information you're receiving, which is not ideal.
#3. I thought requesttext() and sendtext() were disabled for all but the login server.
#1. Don't think so.
#2. Yes.
#3. You forgot IRC bots. Only the client-rc stuff was made exclusive.
__________________
Do it with a DON!
Reply With Quote
  #15  
Old 08-24-2007, 12:12 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
Quote:
Originally Posted by Inverness View Post
#1. Last time I checked, requesttext() and sendtext() were clientside only.
#2. I believe using that triggers a separate function for the information you're receiving, which is not ideal.
#3. I thought requesttext() and sendtext() were disabled for all but the login server.
#1. Nope.
#2. Not everything have to be ideal as long as it works the way its supposed too.
#3. Like Zero said, only the client rc related stuff.


Next time you try smartmouthing me, get your facts straight.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #16  
Old 08-25-2007, 09:28 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by xXziroXx View Post
Next time you try smartmouthing me, get your facts straight.
Quote:
Originally Posted by Inverness
#1. Last time I checked, requesttext() and sendtext() were clientside only.
#2. I believe using that triggers a separate function for the information you're receiving, which is not ideal.
#3. I thought requesttext() and sendtext() were disabled for all but the login server.
I wasn't trying to "smartmouth" you, rather stating my reasons for not wanting to use that method because my knowledge of requesttext() and sendtext() is limited.

Stop being a jackass. You were asking for a response to your statement so I decided to point out why I wouldn't do it that way.

Negative Reputation for that one.

Anyhow, if Stefan wants to add another variable (allrealplayers?) then that would be nice, but I don't think its necessary as I don't really mind adding a line for filtering it. The only difference it would make is that the new variable would filter allplayers on each player login/logout rather than each time you execute the script, and save you a line of typing
__________________

Last edited by Inverness; 08-25-2007 at 09:39 AM..
Reply With Quote
  #17  
Old 08-29-2007, 10:33 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
PHP Code:
function onPlayerLogin(obj)
  if (<
filter conditions>)
    
allrealplayers.add(obj);

function 
onPlayerLogout(obj)
  
allrealplayers.remove(obj); 
__________________
Reply With Quote
  #18  
Old 08-30-2007, 06:36 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Inverness View Post
PHP Code:
function onPlayerLogin(obj)
  if (<
filter conditions>)
    
allrealplayers.add(obj);

function 
onPlayerLogout(obj)
  
allrealplayers.remove(obj); 
I've seen cases where onPlayerLogin and onPlayerLogout failed to execute or the "obj" wasn't the same as the one that logged in (in the case of logout).
__________________
Do it with a DON!
Reply With Quote
  #19  
Old 08-30-2007, 12:22 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by zokemon View Post
I've seen cases where onPlayerLogin and onPlayerLogout failed to execute or the "obj" wasn't the same as the one that logged in (in the case of logout).
Not my problem.

I don't mind using allplayers.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 07:36 PM.


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