Page 1 of 1

Olympiad question

Posted: Sat Sep 19, 2009 10:04 pm
by Probe
Is it possible to limit one char entry per IP to olympiad?
to prevent self-feeding

Re: Olympiad question

Posted: Sat Sep 19, 2009 10:12 pm
by Mage
Hi Probe,

I think that it's possibile.

1) I use this code in Anti Farm PvP with same Ip, Maybe you can use this to block the registration of double char with same Ip.

Code: Select all

  //Anti FARM same Ip           String ip1 = this.getClient().getConnection().getSocket().getInetAddress().getHostAddress();          String ip2 = target.getClient().getConnection().getSocket().getInetAddress().getHostAddress();            if (ip1.equals(ip2))          { //          return;          }
2) The second possiblity is to use the patch of the restrinction of ip in TvT:

This: http://www.l2jserver.com/old-forum/thre ... ght=ip+tvt.

Bye :)

Re: Olympiad question

Posted: Sat Sep 19, 2009 11:16 pm
by Probe
sooo
does anyone know if this will work?

Code: Select all

/** Begin Olympiad Restrictions */		String ip1 = noble.getClient().getConnection().getSocket().getInetAddress().getHostAddress();		String ip2 = "";		for (L2PcInstance registeredChar : _nonClassBasedRegisters)		{			ip2 = registeredChar.getClient().getConnection().getSocket().getInetAddress().getHostAddress();			if (ip1.equals(ip2)			{				sm = new SystemMessage(SystemMessageId.GAME_REQUEST_CANNOT_BE_MADE);				sm.addPcName(noble);				noble.sendPacket(sm);				break;			}		}			for (L2PcInstance registeredChar : _ClassBasedRegisters)		{			ip2 = registeredChar.getClient().getConnection().getSocket().getInetAddress().getHostAddress();			if (ip1.equals(ip2)			{				sm = new SystemMessage(SystemMessageId.GAME_REQUEST_CANNOT_BE_MADE);				sm.addPcName(noble);				noble.sendPacket(sm);				break;			}		}	

btw I'm pretty sure retail has this restriction

Re: Olympiad question

Posted: Sun Sep 20, 2009 5:36 pm
by Probe
errr bump :\

Re: Olympiad question

Posted: Mon Sep 21, 2009 2:06 pm
by _Shaolin_
Maybe...just do i simple test...
but i see this function ".getSocket()"

i'm sure that function has beens deleted..

I'm using something like that function for the Bot Report Button on my server...and the String that gets the IP is using like that function :D

try to delete this function on this code and try :D