Page 1 of 2

Offline Shops ip

Posted: Sat Oct 22, 2016 2:38 pm
by Attila
Hi
How can i make it that offline shops not be counted
I have Maximum number of players per IP 5
but if i put 2 offline shops to server i can put only 3 online charts.
how can i make it i can log 5 charts to game and still got ofline shops at the server.
thanks

Re: Offline Shops ip

Posted: Mon Oct 24, 2016 9:34 am
by Attila
Some Help here please :eh:

Re: Offline Shops ip

Posted: Mon Oct 24, 2016 10:25 am
by LasTravel
Dont count detached clients from the same ip.

Re: Offline Shops ip

Posted: Mon Oct 24, 2016 4:30 pm
by Attila
LasTravel wrote:Dont count detached clients from the same ip.
can you tell me how do I do that :eh:

Re: Offline Shops ip

Posted: Tue Oct 25, 2016 1:12 am
by LasTravel
Show me your code and I'll tell you how to change it.

Re: Offline Shops ip

Posted: Tue Oct 25, 2016 10:39 am
by Attila
LasTravel wrote:Show me your code and I'll tell you how to change it.
thanks
But If you can tell me what code you want to see from me?

Re: Offline Shops ip

Posted: Sat Oct 29, 2016 10:11 am
by Attila
Attila wrote:
LasTravel wrote:Show me your code and I'll tell you how to change it.
thanks
But If you can tell me what code you want to see from me?
Someone tell me wat to need to change this

Re: Offline Shops ip

Posted: Wed Nov 09, 2016 10:50 am
by HorridoJoho
LasTravel means you have to do this in java. Instead of counting all players which are returned by L2World#getAllPlayers(), you need to loop through the array returned by L2World#getAllPlayers() and only count the players with a network connection. Something like

Code: Select all

L2PcInstance[] worldPlayers = L2World.getInstance().getAllPlayers();
int actualOnlinePlayers = 0;
for (L2PcInstance worldPlayer : worldPlayers)
{
	if (!worldPlayer.getConnection().isDetached())
	{
	    ++actualOnlinePlayers;
	}
}

Re: Offline Shops ip

Posted: Thu Nov 10, 2016 6:41 pm
by Attila
HorridoJoho wrote:LasTravel means you have to do this in java. Instead of counting all players which are returned by L2World#getAllPlayers(), you need to loop through the array returned by L2World#getAllPlayers() and only count the players with a network connection. Something like

Code: Select all

L2PcInstance[] worldPlayers = L2World.getInstance().getAllPlayers();
int actualOnlinePlayers = 0;
for (L2PcInstance worldPlayer : worldPlayers)
{
	if (!worldPlayer.getConnection().isDetached())
	{
	    ++actualOnlinePlayers;
	}
}
Sorry but were do i need to change this ?

Re: Offline Shops ip

Posted: Thu Nov 17, 2016 4:15 pm
by Attila
HorridoJoho wrote:LasTravel means you have to do this in java. Instead of counting all players which are returned by L2World#getAllPlayers(), you need to loop through the array returned by L2World#getAllPlayers() and only count the players with a network connection. Something like

Code: Select all

L2PcInstance[] worldPlayers = L2World.getInstance().getAllPlayers();
int actualOnlinePlayers = 0;
for (L2PcInstance worldPlayer : worldPlayers)
{
	if (!worldPlayer.getConnection().isDetached())
	{
	    ++actualOnlinePlayers;
	}
}
Someone can explain what i need to do please :eh:

Re: Offline Shops ip

Posted: Sun Nov 27, 2016 11:18 am
by Attila
help how do i make this work :eh:

Re: Offline Shops ip

Posted: Thu Dec 29, 2016 1:58 pm
by Attila
can someone tell me how i can do this
I really don't not how I how I do this

Please help

thanks

Re: Offline Shops ip

Posted: Fri Dec 30, 2016 2:41 pm
by LasTravel
You have an example at this post, no one will do it for you.

Re: Offline Shops ip

Posted: Fri Dec 30, 2016 8:17 pm
by Attila
LasTravel wrote:You have an example at this post, no one will do it for you.

i don't no were do i made to change it
where do need to look to what file
What is the file name ?

Re: Offline Shops ip

Posted: Sun Jan 01, 2017 1:06 pm
by Attila
LasTravel wrote:You have an example at this post, no one will do it for you.
In what java file i need to look can you tell me were please :eh: