Jump to content

[Share] Captcha Antibot System [Updated 17.6.2011, Version 2] [Please LOCK IT .]


Recommended Posts

Posted

still didn't answer my post about dreadnought.

 

http://maxcheaters.com/forum/index.php?topic=207620.msg1779866#msg1779866

 

Dreadnought classes are complaining because the captcha pop up too much, I have it set to every 50 mobs.

 

SIMPLE, add "==" instead of ">=" to make it popup 1 time on exacly 50 kills.

Posted

Pipiou21 I have an error on gameserver pop up all the times and I think is being caused by the Antibot system.

The error is on L2attackable.java and it is about summon, I guess when player use summon to kill mobs is causing some type of error. I have to wait to post the error in here becaujse I close the gameserver by mistake.

 

Failed executing HitTask.
java.lang.ClassCastException: com.l2jserver.gameserver.model.actor.instance.L2Su
mmonInstance cannot be cast to com.l2jserver.gameserver.model.actor.instance.L2P
cInstance
       at com.l2jserver.gameserver.model.actor.L2Attackable.doDie(L2Attackable.
java:643)
       at com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance.doDie
(L2MonsterInstance.java:146)
       at com.l2jserver.gameserver.model.actor.status.CharStatus.reduceHp(CharS
tatus.java:185)
       at com.l2jserver.gameserver.model.actor.status.NpcStatus.reduceHp(NpcSta
tus.java:51)
       at com.l2jserver.gameserver.model.actor.status.AttackableStatus.reduceHp
(AttackableStatus.java:49)
       at com.l2jserver.gameserver.model.actor.L2Character.reduceCurrentHp(L2Ch
aracter.java:6851)
       at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2A
ttackable.java:519)
       at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2A
ttackable.java:461)
       at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Charact
er.java:5175)
       at com.l2jserver.gameserver.model.actor.L2Character$HitTask.run(L2Charac
ter.java:2604)
       at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(Thread
PoolManager.java:86)
       at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
       at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
       at java.util.concurrent.FutureTask.run(Unknown Source)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(Unknown Source)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)

 

Here is  the whole error.

 

It happen when a class like Spectral Master or any other that uses a summon to kill mobs, If the summon kill the mob it will not get the captcha window and the error above will pop up on the gameserver window.

 

 

This is the part of the code giving the error

	public boolean doDie(L2Character killer)
{
	// Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
	if (!super.doDie(killer))
		return false;

	((L2PcInstance) killer).setKills(((L2PcInstance) killer).getKills() + 1);

	if(((L2PcInstance) killer).getKills() == 50 || ((L2PcInstance) killer).getKills() == 0)
	{
	//ANTIBOT
	//Random image file name
	int imgId = IdFactory.getInstance().getNextId();
	//Convertion from .png to .dds, and crest packed send
	try
	{
		File captcha = new File("data/captcha/captcha.png");    
		ImageIO.write(generateCaptcha(), "png", captcha);
		PledgeCrest packet = new PledgeCrest(imgId, DDSConverter.convertToDDS(captcha).array()); //Convertion to DDS where is antybot
		killer.sendPacket(packet);
	}
	catch (Exception e)
	{    
		_log.warning(e.getMessage());
	}
	//Paralyze, abnormal effect, invul, html with captcha output and start of the 1 min counter
    killer.startAbnormalEffect(AbnormalEffect.REAL_TARGET);
	killer.setIsParalyzed(true);
	killer.setIsInvul(true);
	adminReply.setHtml("<html><title>Captcha Antibot System</title><body><center>Enter the 5-digits code below and click Confirm.<br1>You will be invulnerable until you enter<br1>the code so no one will kill you!<br><img src=\"Crest.crest_" + Config.SERVER_ID + "_" + imgId + "\" width=256 height=64><br><font color=\"888888\">(There are only english uppercase letters.)</font><br><edit var=\"antibot\" width=110><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br>You have 60 seconds to answer or you<br1>will get jailed for 6 Hours.<br1>You will also get jailed for 6 Hours.<br1>if you type it wrong.</center></body></html>");
	killer.sendPacket(adminReply);
	((L2PcInstance) killer).setCode(finalString);
	ThreadPoolManager.getInstance().scheduleGeneral(new CaptchaTimer((L2PcInstance)killer), 60000);//60sec
	((L2PcInstance) killer).setCodeRight(false);
	     finalString.replace(0, 5, "");
	//ANTIBOT
	}

	// Notify the Quest Engine of the L2Attackable death if necessary
	try
	{
		L2PcInstance player = killer.getActingPlayer();			
		if (player != null)
		{
			if (getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL) != null)
				for (Quest quest: getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL))
					ThreadPoolManager.getInstance().scheduleEffect(new OnKillNotifyTask(this, quest, player, killer instanceof L2Summon), _onKillDelay);
		}
	}
	catch (Exception e) { _log.log(Level.SEVERE, "", e); }
	return true;
}

 

and in my case line 643 is this one

		((L2PcInstance) killer).setKills(((L2PcInstance) killer).getKills() + 1);

 

 

Edited on 06/13/11

 

I also find another bug on fortress siege that I think is caused by the changes in L2Attackacle.java, here is the error:

 

Error unspawning siege guards for fort Hive:com.l2jserver.gameserver.model.actor
.instance.L2DefenderInstance cannot be cast to com.l2jserver.gameserver.model.ac
tor.instance.L2PcInstance
java.lang.ClassCastException: com.l2jserver.gameserver.model.actor.instance.L2De
fenderInstance cannot be cast to com.l2jserver.gameserver.model.actor.instance.L
2PcInstance
        at com.l2jserver.gameserver.model.actor.L2Attackable.doDie(L2Attackable.
java:643)
        at com.l2jserver.gameserver.instancemanager.FortSiegeGuardManager.unspaw
nSiegeGuard(FortSiegeGuardManager.java:88)
        at com.l2jserver.gameserver.model.entity.FortSiege.endSiege(FortSiege.ja
va:252)
        at com.l2jserver.gameserver.model.entity.Fort.setOwner(Fort.java:464)
        at com.l2jserver.gameserver.model.entity.Fort.engrave(Fort.java:316)
        at com.l2jserver.gameserver.model.entity.Fort$endFortressSiege.run(Fort.
java:1099)
        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(Thread
PoolManager.java:86)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Siege of Hive fort finished.

 

It is messing the unspawning of siege guards after the siege and they spawn new ones on top of the old ones.

 

Posted

Pipiou21 I have an error on gameserver pop up all the times and I think is being caused by the Antibot system.

The error is on L2attackable.java and it is about summon, I guess when player use summon to kill mobs is causing some type of error. I have to wait to post the error in here becaujse I close the gameserver by mistake.

 

Failed executing HitTask.
java.lang.ClassCastException: com.l2jserver.gameserver.model.actor.instance.L2Su
mmonInstance cannot be cast to com.l2jserver.gameserver.model.actor.instance.L2P
cInstance
        at com.l2jserver.gameserver.model.actor.L2Attackable.doDie(L2Attackable.
java:643)
        at com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance.doDie
(L2MonsterInstance.java:146)
        at com.l2jserver.gameserver.model.actor.status.CharStatus.reduceHp(CharS
tatus.java:185)
        at com.l2jserver.gameserver.model.actor.status.NpcStatus.reduceHp(NpcSta
tus.java:51)
        at com.l2jserver.gameserver.model.actor.status.AttackableStatus.reduceHp
(AttackableStatus.java:49)
        at com.l2jserver.gameserver.model.actor.L2Character.reduceCurrentHp(L2Ch
aracter.java:6851)
        at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2A
ttackable.java:519)
        at com.l2jserver.gameserver.model.actor.L2Attackable.reduceCurrentHp(L2A
ttackable.java:461)
        at com.l2jserver.gameserver.model.actor.L2Character.onHitTimer(L2Charact
er.java:5175)
        at com.l2jserver.gameserver.model.actor.L2Character$HitTask.run(L2Charac
ter.java:2604)
        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(Thread
PoolManager.java:86)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

 

Here is  the whole error.

 

It happen when a class like Spectral Master or any other that uses a summon to kill mobs, If the summon kill the mob it will not get the captcha window and the error above will pop up on the gameserver window.

 

 

This is the part of the code giving the error

	public boolean doDie(L2Character killer)
{
	// Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
	if (!super.doDie(killer))
		return false;

	((L2PcInstance) killer).setKills(((L2PcInstance) killer).getKills() + 1);

	if(((L2PcInstance) killer).getKills() == 50 || ((L2PcInstance) killer).getKills() == 0)
	{
	//ANTIBOT
	//Random image file name
	int imgId = IdFactory.getInstance().getNextId();
	//Convertion from .png to .dds, and crest packed send
	try
	{
		File captcha = new File("data/captcha/captcha.png");    
		ImageIO.write(generateCaptcha(), "png", captcha);
		PledgeCrest packet = new PledgeCrest(imgId, DDSConverter.convertToDDS(captcha).array()); //Convertion to DDS where is antybot
		killer.sendPacket(packet);
	}
	catch (Exception e)
	{    
		_log.warning(e.getMessage());
	}
	//Paralyze, abnormal effect, invul, html with captcha output and start of the 1 min counter
    killer.startAbnormalEffect(AbnormalEffect.REAL_TARGET);
	killer.setIsParalyzed(true);
	killer.setIsInvul(true);
	adminReply.setHtml("<html><title>Captcha Antibot System</title><body><center>Enter the 5-digits code below and click Confirm.<br1>You will be invulnerable until you enter<br1>the code so no one will kill you!<br><img src=\"Crest.crest_" + Config.SERVER_ID + "_" + imgId + "\" width=256 height=64><br><font color=\"888888\">(There are only english uppercase letters.)</font><br><edit var=\"antibot\" width=110><br><button value=\"Confirm\" action=\"bypass -h voice .antibot $antibot\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br>You have 60 seconds to answer or you<br1>will get jailed for 6 Hours.<br1>You will also get jailed for 6 Hours.<br1>if you type it wrong.</center></body></html>");
	killer.sendPacket(adminReply);
	((L2PcInstance) killer).setCode(finalString);
	ThreadPoolManager.getInstance().scheduleGeneral(new CaptchaTimer((L2PcInstance)killer), 60000);//60sec
	((L2PcInstance) killer).setCodeRight(false);
	     finalString.replace(0, 5, "");
	//ANTIBOT
	}

	// Notify the Quest Engine of the L2Attackable death if necessary
	try
	{
		L2PcInstance player = killer.getActingPlayer();			
		if (player != null)
		{
			if (getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL) != null)
				for (Quest quest: getTemplate().getEventQuests(Quest.QuestEventType.ON_KILL))
					ThreadPoolManager.getInstance().scheduleEffect(new OnKillNotifyTask(this, quest, player, killer instanceof L2Summon), _onKillDelay);
		}
	}
	catch (Exception e) { _log.log(Level.SEVERE, "", e); }
	return true;
}

 

and in my case line 643 is this one

		((L2PcInstance) killer).setKills(((L2PcInstance) killer).getKills() + 1);

 

 

Edited on 06/13/11

 

I also find another bug on fortress siege that I think is caused by the changes in L2Attackacle.java, here is the error:

 

Error unspawning siege guards for fort Hive:com.l2jserver.gameserver.model.actor
.instance.L2DefenderInstance cannot be cast to com.l2jserver.gameserver.model.ac
tor.instance.L2PcInstance
java.lang.ClassCastException: com.l2jserver.gameserver.model.actor.instance.L2De
fenderInstance cannot be cast to com.l2jserver.gameserver.model.actor.instance.L
2PcInstance
        at com.l2jserver.gameserver.model.actor.L2Attackable.doDie(L2Attackable.
java:643)
        at com.l2jserver.gameserver.instancemanager.FortSiegeGuardManager.unspaw
nSiegeGuard(FortSiegeGuardManager.java:88)
        at com.l2jserver.gameserver.model.entity.FortSiege.endSiege(FortSiege.ja
va:252)
        at com.l2jserver.gameserver.model.entity.Fort.setOwner(Fort.java:464)
        at com.l2jserver.gameserver.model.entity.Fort.engrave(Fort.java:316)
        at com.l2jserver.gameserver.model.entity.Fort$endFortressSiege.run(Fort.
java:1099)
        at com.l2jserver.gameserver.ThreadPoolManager$RunnableWrapper.run(Thread
PoolManager.java:86)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
access$301(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.
run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Siege of Hive fort finished.

 

It is messing the unspawning of siege guards after the siege and they spawn new ones on top of the old ones.

 

 

I like the way to have explained it... by the way.... This is going to help if im right

 

Before the "event" of antibot, i mean bellow "//ANTIBOT" lane add -->

		if (killer instanceof L2PcInstance)
	{

and close it with -->

 } 

under the second "//ANTIBOT" lane...

 

PS: This is going to enable antibot only on Players, and not on guards and shits, if you want to enable it also on summons, you will have to add "else if (killer instanceof L2SummonInstance)" and make it sending all this //ANTIBOT to the owner of the pet using a method like it uses the beast spiritshot when it sends the message that the spiritshot is enabled to the owner of the pet and not to the pet X)! Good luck, if you dont find the way, i'll do it, by the way, im going to do it someday coz its smthing like bug that they are going to make the bot farming with the pet as last hit instead of hitting with the character  :)

Posted

thank you so much.

It will be nice if you do the code to enable the antibot to the summons also.

I will try the fix you post and will test it. Will let you know if it worked.

Thanks again.

 

 

 

EDIT: Didn't work still have the same problem.

Posted

thank you so much.

It will be nice if you do the code to enable the antibot to the summons also.

I will try the fix you post and will test it. Will let you know if it worked.

Thanks again.

 

 

 

EDIT: Didn't work still have the same problem.

 

Let me try check to find a possible fix.

 

Added the "Version 2" that i was using, please use it instead of that old, and tell me if there are still problems.... (I can't say that are not going to still exists, anyway, good luck.)

Posted

look on first page all files where is v2 ^^

 

Antibot.java change the old  package

 

to this package handlers.voicedcommandhandlers;

 

and hope it works

 

Ok, thanks :), well, you can read what is updated and whats not Legend.

Posted

ok also for me it dont pop up i changed the 50 to Config.CaptchaCheck

 

and did it in config to 5 so donno what happend

 

errormq.png

 

this error i get everytime if i install in l2attackable or l2npc.java

Guest
This topic is now closed to further replies.



  • Posts

    • cheap discord account full access (that's mean you have access to email and discord to change everything) those account are good for everything best prices on the market price start at : 0.55$ bulk= discount link store :  afgstore.mysellauth.com   telegram to contact me or buy : t.me/AFGDiscord discord : revo_gg
    • ⭐⭐⭐⭐⭐L2Lusty 50x [Essence - High Five] Start 08 February⭐⭐⭐⭐⭐  L2Lusty Essence - High Five 50x Website: https://l2lusty.online/ Starts on 08/02/2025 16:00 London Time Rates: XP 50X, Adena 20X, Spoil 20X, Drop 20X, Max enchant +16 with 50% normal and 60% blessed, Chaos Event whit 3x Lcoins Drop 24h Website:  https://l2lusty.online/
    • Hi, I inviting you to join L2Einhovant server, lets give them chanse. It's x1 Classic with some bonus futures, no duals box, no wipes, buffs stores and etc. Grow up by litle steps together with the server population.   🔥 Why L2Einhovant? ✅ Authentic Classic Gameplay – No dual box, all classes inportant, no auto farm. ✅ Hardcore x1 Rates – A true test of your gameplay skill, level up stages. ✅ Active Community & Fair Administration – A server built for passionate players. ✅ Long-Term Stability – Grow your character in a world that lasts.   Gather your allies, sharpen your weapons, and prepare for an unforgettable journey. Join to our comunity now and prepare for start.   Open beta: 1th February. Grand opening: 7th February, 20:00 UTC+2.   🔗 Discord: https://discord.gg/zfKd4tU9N2
    • ElmoreLab Harbor - Eternal C1 x1: ✅ https://harbor.elmorelab.com ElmoreLab Harbor - Eternal C1 x1 - is an exclusive server of the Eternal C1 chronicles from the top project ElmoreLab Harbor.   A unique server of its kind, on which everyone will have maximum pleasure, such as oldschool players who dream of nostalgia and to feel the warmest and classic C1 chronicles, as well as experienced players who are tired of thousands unbalanced servers of late chronicles. Due to the professional corrections of the balance system and the HONEST gameplay system - on this server, EVERY player will feel like in their own, warm and cozy Harbor C1. Let's return to the origins of L2 - back to 2004 in C1! ❤️   ⭐ Server characteristics:   STRICTLY 1 window, NO BOXES Bans for RMT and bots/cheats No donations with benefits Unique and high-quality PTS-build from Master Toma Professional corrections and full class-balance Reworked economy and closed all abuses Improved animations and all aspects of the game Exclusive HD-client with high-quality textures Experienced administration and management Fixed all bugs, geodata, exploits and holes Maximum sociality due to the 1-box system Discovering, exploring and researching Big online International server Nostalgia and oldschool-feelings   Rates: x1 Server start: 14.02.2025   The server is at the final stages of development and preparation for release. Information on the server will be updated, soon the patchnotes and changes/edits will be posted. Don't miss the legendary and epic experience on the best server in the last 20 years! ❤️ Join our C1-forum with a lot of information about server and active discussions.   ⭐ Website: https://harbor.elmorelab.com   ✅ Forum: https://forum-harbor.elmorelab.com   💥 Telegram: https://t.me/l2harbor https://t.me/l2harbor_chat   ⚡ Discord: https://discord.gg/harborelmorelab
  • Topics

×
×
  • Create New...