Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Cycloonx

Search online players

Recommended Posts

Hi all,

 

I was trying to get the hang of AJAX today and as a simple test I made this page:

 

http://mastersofrelics.com/EL/online_players.php

 

You can search for players very fast by typing there name in the input box. From the moment you type 1 letter it will start searching players who fit that combination. I think this might be handy in PK to check someone's stats by typing only like the 3 first characters of his name. You can make your browser very small so you can just see the input box and put it next to your EL window :P I hope atleast someone will like it.

 

I was also thinking to let people make there own lists of people they want to check to see if they are online (like an online buddy list). But I first want to see if there is enough demand for this feature, and maybe it already exists?

 

I hope to get some feedback :)

 

To radu: The page only downloads the txt file from the main site every 5 minutes if the page was openend at that time, so there is no real extra bandwith usage.

 

Update:

Now player stats are shown if you search and the system only returns 1 player. Since the system is only allowed to get 1 player every 5 minutes, it will not always return the stats (depends on the time the last request was done). Old searches are cached, so in time the amount of found players will become bigger and faster requestable.

 

You can now also search through offline players (red = offline, green = online).

Edited by Cycloonx

Share this post


Link to post
Share on other sites
/gossip about labrat

 

I know about gossip, but if you ask her too much she goes ignoring your request :P

The page can always be used to see if someone is playing when you are offline :)

Share this post


Link to post
Share on other sites

Oh this is sweet!

 

VERY Fast look up... and nice how it narrows down as you type!

 

My one suggestion ... once you get below 5 search results...just print-out all 5 characters!

 

ex:

SEARCH: jim


Jim						Jimbo					  Jimmy						JimP					  JimsPlace			   
Main Attributes			Main Attributes			Main Attributes			  Main Attributes		   Main Attributes		
Physique:	16/16		 Physique:	16/16		 Physique:	16/16		   Physique:	16/16		Physique:	16/16
Coordination:	14/14	 Coordination:	14/14	 Coordination:	14/14	   Coordination:	14/14	Coordination:	14/14
Reasoning:	8/8		  Reasoning:	8/8		  Reasoning:	8/8			Reasoning:	8/8		 Reasoning:	8/8
.
.
.
etc

Share this post


Link to post
Share on other sites

It's a good idea, but this would require each time to load the page from the website. I don't think radu will like this. Although I could ask him, but I guess it will be a no.

Share this post


Link to post
Share on other sites
It's a good idea, but this would require each time to load the page from the website. I don't think radu will like this. Although I could ask him, but I guess it will be a no.

He already said he only gots the website data no faster then 5 minutes.

Share this post


Link to post
Share on other sites
It's a good idea, but this would require each time to load the page from the website. I don't think radu will like this. Although I could ask him, but I guess it will be a no.

He already said he only gots the website data no faster then 5 minutes.

 

Well i'm that guy who posted that. But to show the stats of the players I would also need to get the data from the user pages, right? It's not that I can filter out the stats from a player from the online_players.txt file. Anyway, I already send a pm to radu to ask if it is allowed (not for 5 players, but for 1).

Share this post


Link to post
Share on other sites
It's a good idea, but this would require each time to load the page from the website. I don't think radu will like this. Although I could ask him, but I guess it will be a no.

He already said he only gots the website data no faster then 5 minutes.

 

Well i'm that guy who posted that. But to show the stats of the players I would also need to get the data from the user pages, right? It's not that I can filter out the stats from a player from the online_players.txt file. Anyway, I already send a pm to radu to ask if it is allowed (not for 5 players, but for 1).

To show the stats of the player you just cache the player data as well, but maybe more then a 5 minute interval, maybe if the data is an hour or less old, then use the cached data.

 

Sorry about my earlier post ... half asleep this morning :)

Share this post


Link to post
Share on other sites
It's a good idea, but this would require each time to load the page from the website. I don't think radu will like this. Although I could ask him, but I guess it will be a no.

He already said he only gots the website data no faster then 5 minutes.

 

Well i'm that guy who posted that. But to show the stats of the players I would also need to get the data from the user pages, right? It's not that I can filter out the stats from a player from the online_players.txt file. Anyway, I already send a pm to radu to ask if it is allowed (not for 5 players, but for 1).

To show the stats of the player you just cache the player data as well, but maybe more then a 5 minute interval, maybe if the data is an hour or less old, then use the cached data.

 

Sorry about my earlier post ... half asleep this morning :)

 

Well if this is allowed I would happely implent it :)

Share this post


Link to post
Share on other sites

Oh nice....Ent said yes.... this is now my official page to look up player stats LOL

 

Sometimes its hard to ask gossip a players stats... when they use l33t names...not sure if I type sp0iler or spOiler... this new lookup system you have is VERY user friendly! Thanks for the hard work!

 

 

 

EDIT: Found a small flaw....

 

Try looking up _rei_marcus ... he is online right now... but your search engine isn't allowing "_" (underscore)

 

EDIT EDIT: Ok, now I guess it is working...took a looong time to find _rei.... but it did find it!

Edited by JimP

Share this post


Link to post
Share on other sites
can i repost my solution or will i get slapped then? (i would even try to make it human readable) :medieval:

 

Which solution are you talking about?

 

 

Anyway, now the player stats are shown if there is only 1 player found.

 

Since it is only allowed to get new stats of a player once in 5 minutes (if no one requested another) it might take some time to cache new players. Please be patient with the system.

Share this post


Link to post
Share on other sites

Quick question....

 

Are you allowed to Read in the entire data base every 5 min?

 

Can you save this in an array, and use the array to display 5 players at a time?

 

Would this help take a strain off the EL Server... one person reading the entire database... as opposed to 1,000 people picking at it bit by bit?

Share this post


Link to post
Share on other sites

Now the system also keeps track of offline players. Online players are shown as green, and offline ones as red. I've added this so I can later add the buddy list system, it might be done this weekend :closedeyes:

Share this post


Link to post
Share on other sites

Nice job. :closedeyes:

 

Inspired by it I checked the client code and discovered we already have functions to get files through http...any interest in a "#online xxx" command to be added directly into the client? If so i can start code it right now...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×