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

    • L2 Kings    Stage 1 – The Awakening Dynasty and Moirai Level Cap: 83 Gear: Dynasty -Moirai & Weapons (Shop for Adena + Drop from mobs/instances ) Masterwork System: Available (Neolithics S required with neolithics u can do armor parts foundation aswell) Class Cloaks: Level 1 - Masterwork sets such us moirai/dynasty stats are boosted also vesper(stage 2) Olf T-Shirt: +6 (fails don’t reset) safe is +2 Dolls: Level 1 Belts: Low & Medium Enchant: Safe +3 / Max +8 / Attribution Easy in Moirai-Dynasty . Main Zones: Varka Outpost: Easy farm, Adena, EXP for new players = > 80- 100kk hour Dragon Valley: Main farm zone — , 100–120kk/hour Weapon Weakness System active (all classes can farm efficiently) Archers get vampiric auto-hits vs mobs Dragon Valley Center: Main Party Zone — boosted drops (Blessed enchants, Neolithics chance) => farm like 150-200kk per hour. Dragon Valley North: Spoil Zone (Asofe + crafting materials for MW) Primeval Isle: Safe autofarm zone (low adena for casual players) ==> 50kk per hour Forge of the Gods & Imperial Tomb: Available from Stage 1 (lower Adena reward in compare with Dragon Valley) Hellbound also avaliable from stage 1 In few words all zones opened but MAIN farm zone with boosted adena and drops is Dragon valley also has more mobs Instances: Zaken (24h Reuse) → Instead of Vespers drop Moirai , 100% chance to drop 1 of 9 dolls lvl 1, Zaken 7-Day Jewelry Raid Bosses (7 RBs): Drop Moirai Parts + Neolithic S grade instead of Vespers parts that has 7 Rb Quest give Icarus Weapons Special Feature 7rb bosses level up soul crystals aswell. Closed Areas : Monaster of SIlence, LOA, ( It wont have mobs) / Mahum Quest/Lizardmen off) Grand Epics: Unlocked on Day 4 of Stage 1 → Antharas, Valakas, Baium, AQ, etc ================================================================================= Stage 2 – Rise of Vespers Level Cap: 85 Gear: Moirai Armors (Adena GM SHOP / Craft/ Drop) Weapons: Icarus Cloaks: Level 2 Olf: +8 Dolls: Level 2 Belts: High & Top Enchant: Safe +3 / Max +8 Masterwork can be with Neolithics S84 aswell but higher so craft will be usefull aswell. 7 Raid Boss Quest Updated: Now works retail give vesper weapons 7rb Bosses Drops : Vespers Instances: Zaken : Drops to retail vespers + the dolls and the extra items that we added on stage 1 New Freya Instance: Added — drops vespers and instead of mid s84 weapons will drop vespers . Extra drops Blessed Bottle of Freya - drops 100% chance 1 of 9 dolls. Farm Areas Dragon Valley remains main farm New Zone : Lair of Antharas (mobs nerfed and added drop Noble stone so solo players can farm too) New Party Zone : LOA Circle   ============================================================================   Stage 3 – The Vorpal ERA Gear: Vorpal Unclock Cloaks: Level 3 Olf: +10 (max cap) Dolls: Level 3 Enchant: Safe +3 / Max +12 Farm Zones : Dragon Valley Center Scorpions becomes a normal solo zone (no longer party zone) Drops:   LOA & Knorik → Mid Weapons avaliable in drop New Party Zone Kariks Instances: Easy Freya Drops Mid Weapons Frintezza Release =================================================================================     Stage 4 – Elegia Era (Final Stage) Elegia Unlock Gear: Elegia Weapons: Elegia TOP s84 ( farmed via H-Freya/ Drops ) Cloaks: Level 5 Dolls: Level 3 (final bonuses) Enchant: Safe +6 / Max +16 Instances: Hard Freya → Drops Elegia Weapons + => The Instance will drop 2-3 parts for sure and also will be able to Join with 7 people . Party Zone will have also drop chances for elegia armor parts and weapons but small   Events (Hourly): Win: 50 Event Medals + 3 GCM + morewards Lose: 25 Medals + 1 GCM + more rewards Tie: 30 Medals + 2 GCM + more rewards   ================================================================================ Epic Fragments Currency Participating in Daily Bosses mass rewarding all players Participating in Instances (zaken freya frintezza etc) all players get reward ================================================================================ Adena - Main server currency (all items in gm shop require adena ) Event Medals (Festival Adena) - Event shop currency Donation coins you can buy with them dressme,cosmetics and premium account Epic Fragments you can buy with them fake epic jewels Olympiad Tokens you can buy many items from olympiad shop (Hero Coin even items that are on next stages) Olympiad Win = 1000 Tokens / Lose = 500 Tokens ================================================================================= Offline Autofarm Allows limited Offline farming requires offline autofarm ticket that you get by voting etc ================================================================================= Grand Epics have Specific Custom NPC that can spawn Epics EU/LATIN TIME ZONE ================================================================================= First Olympiad Day 19 December First Heroes 22 December ( 21 December Last day of 1st Period) After that olympiad will be weekly. ================================================================================= Item price and economy Since adena is main coin of server and NOT donation coins we will always add new items in gm shop with adena in order to burn the adena of server and not be inflation . =================================================================================        
    • Hello, I'd like to change a title color for custom npc.  I created custom NPC, cloned existing. I put unique id for it in npcname-e, npcgrp and database. I have "0" to serverSideName in db, so that it would use npcname-e, but instead it has "NoNameNPC"and no title color change.
    • Trusted Guy 100% ,  I asked him for some work and he did it right away.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock