Olympiad question

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Olympiad question

Post by Probe »

Is it possible to limit one char entry per IP to olympiad?
to prevent self-feeding
Mage
Posts: 277
Joined: Fri Apr 17, 2009 2:29 pm

Re: Olympiad question

Post 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 :)
Forum rules: Please do not use or alter the official L2J Avatars/Signatures/Names for your personal use.
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Olympiad question

Post 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
Probe
Posts: 915
Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:

Re: Olympiad question

Post by Probe »

errr bump :\
_Shaolin_
Posts: 15
Joined: Sat Aug 08, 2009 5:20 pm
Location: Brazil

Re: Olympiad question

Post 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
Post Reply