Secret Experience

Secret Experience (https://secretexperience.net/)
-   [Lineage] Java Mods (https://secretexperience.net/lineage-java-mods/)
-   -   [L2JServer] Captcha/Antibot system (https://secretexperience.net/lineage-java-mods/30605-captcha-antibot-system.html)

allanalcantara 03-04-2011 10:36 PM

Captcha/Antibot system
 
bom , eu achei esse sistema em um dos foruns que eu acesso, e etc.
acabei achando isso . e achei legal.
não teste ainda, por que sem tempo pra testar mas vou disponibilizar ae pro pessoal ^^'
PS: [aa] É meu primeiro post em java mods aqui. :D

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

Código:

Index: C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Attackable.java
===================================================================
--- C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Attackable.java    (revision 4278)
+++ C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/L2_GameServer/java/com/l2jserver/gameserver/model/actor/L2Attackable.java    (working copy)
@@ -15,10 +15,13 @@
 package com.l2jserver.gameserver.model.actor;
 
 import java.util.List;
 import java.util.Map;
 import java.util.logging.Level;
 
 import com.l2jserver.Config;
+import com.l2jserver.gameserver.model.L2ItemInstance;
 import com.l2jserver.gameserver.ItemsAutoDestroy;
 import com.l2jserver.gameserver.ThreadPoolManager;
 import com.l2jserver.gameserver.ai.CtrlEvent;
@@ -36,7 +39,6 @@
 import com.l2jserver.gameserver.model.L2CommandChannel;
 import com.l2jserver.gameserver.model.L2DropCategory;
 import com.l2jserver.gameserver.model.L2DropData;
-import com.l2jserver.gameserver.model.L2ItemInstance;
 import com.l2jserver.gameserver.model.L2Manor;
 import com.l2jserver.gameserver.model.L2Party;
 import com.l2jserver.gameserver.model.L2Skill;
@@ -59,7 +61,10 @@
 import com.l2jserver.gameserver.network.clientpackets.Say2;
 import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
 import com.l2jserver.gameserver.network.serverpackets.InventoryUpdate;
+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jserver.gameserver.network.serverpackets.StopMove;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
+import com.l2jserver.gameserver.skills.AbnormalEffect;
 import com.l2jserver.gameserver.skills.Stats;
 import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
 import com.l2jserver.gameserver.templates.item.L2EtcItemType;
@@ -498,13 +503,73 @@
      *
      * @param killer The L2Character that has killed the L2Attackable
      */
+    private static int AntiBotKills = 0;
+    private static int Change = 0;
+    NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage( 0 );
    @Override
    public boolean doDie(L2Character killer)
    {
        // Kill the L2NpcInstance (the corpse disappeared after 7 seconds)
        if (!super.doDie(killer))
            return false;
+        AntiBotKills++;
+        Change = Rnd.get(10);
 
+        if(AntiBotKills >= 50)
+        {           
+        killer.startAbnormalEffect(AbnormalEffect.REAL_TARGET);
+        killer.setIsParalyzed(true);
+        StopMove sm = new StopMove(killer);
+        killer.setIsInvul(true);
+        killer.sendPacket(sm);
+        killer.broadcastPacket(sm);
+        AntiBotKills = 0;
+        switch(Change)
+        {
+            case 1:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12081208\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 536BD\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 2:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12091209\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha A5B8D\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 3:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12101210\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 1BF7F\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 4:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12111211\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha EF94C\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 5:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12121212\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 5103B\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 6:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12131213\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 8A59B\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 7:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12141214\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha DB3A1\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 8:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12151215\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 890B4\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 9:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12161216\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha D0B28\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+                break;
+            case 10:
+                npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System</title><body><center><font color=\"66FF00\">Enter The Captcha Bellow And Click The<br1>Button \"Confirm\" To Continue You Farm.<br1>You Will Be Invulnerable Until You Enter<br1>The Captcha So No One Will Kill You!<br1></font><font color=\"66FF00\"><br><center><img src=\"L2UI_CH3.onscrmsg_pattern01_1\" height=\"32\" width=\"300\"><br><center><img src=\"CAPTCHA.12171217\" height=\"35\" width=\"128\"><br></center><edit var=\"captcha\" width=110><br><br></center><button value=\"Confirm\" action=\"bypass -h voice .CAPTCHA $captcha 5B676\" width=80 height=26 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><img src=\"L2UI_CH3.onscrmsg_pattern01_2\" height=\"32\" width=\"300\"><br>If A GM/Admin Found You Paralized<br1>Like That, You Will Get Banned!<br1>So Enter The Captcha ASAP.</font></center></body></html>");
+                    killer.sendPacket( npcHtmlMessage );
+            default:
+                ;
+        }
+      }
+     
        // Enhance soul crystals of the attacker if this L2Attackable had its soul absorbed
        try
{

Agora Criando o voicecommand CAPTCHA.java
Código:

/*
* the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package handlers.voicedcommandhandlers;

import java.util.StringTokenizer;
import java.util.logging.Level;

import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.skills.AbnormalEffect;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;

/**
 *
 * @author Pipiou21
 *
 */
public class CAPTCHA implements IVoicedCommandHandler
{
    private static final String[] _voicedCommands =
    {
        "CAPTCHA"
    };
 
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    {
                NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage( 0 );
        if (command.equalsIgnoreCase("CAPTCHA") && target != null)
        {
            StringTokenizer st = new StringTokenizer(target);
            try
            {
                String newpass = null, repeatnewpass = null;
                if (st.hasMoreTokens()) newpass = st.nextToken();
                if (st.hasMoreTokens()) repeatnewpass = st.nextToken();
             
                if (!(newpass == null || repeatnewpass == null))
                {
                    if (newpass.equals(repeatnewpass))
                    {
                        activeChar.stopAbnormalEffect(AbnormalEffect.REAL_TARGET);
                        activeChar.setIsInvul(false);
                        activeChar.setIsParalyzed(false);
                        return false;
                    }

                    }
                    if (!newpass.equals(repeatnewpass))
                    {
                        npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System Incorrect</title><body><center><font color=\"FF0000\">Incorrect.<br><br></font><font color=\"66FF00\"><center></font><font color=\"FF0000\">You Will Be Jailed For 1 Min.</font></center></body></html>");
                                activeChar.sendPacket( npcHtmlMessage );
if (activeChar.isFlyingMounted())
    activeChar.untransform();
activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1);
activeChar.stopAbnormalEffect(AbnormalEffect.REAL_TARGET);
activeChar.setIsInvul(false);
activeChar.setIsParalyzed(false);
                        return false;
                    }
                    else
                    {
                        npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System Incorrect</title><body><center><font color=\"FF0000\">Incorrect.<br><br></font><font color=\"66FF00\"><center></font><font color=\"FF0000\">You Will Be Jailed For 1 Min.</font></center></body></html>");
                                activeChar.sendPacket( npcHtmlMessage );
if (activeChar.isFlyingMounted())
    activeChar.untransform();
activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1);
activeChar.stopAbnormalEffect(AbnormalEffect.REAL_TARGET);
activeChar.setIsInvul(false);
activeChar.setIsParalyzed(false);
                        return false;
                    }
                }
            catch (Exception e)
            {
                activeChar.sendMessage("A problem occured while adding captcha!");
                _log.log(Level.WARNING, "", e);
            }
        }
        else
        {
                        npcHtmlMessage.setHtml("<html><title>Servers Name Antibot System Incorrect</title><body><center><font color=\"FF0000\">Incorrect.<br><br></font><font color=\"66FF00\"><center></font><font color=\"FF0000\">You Will Be Jailed For 1 Min.</font></center></body></html>");
                                activeChar.sendPacket( npcHtmlMessage );
if (activeChar.isFlyingMounted())
    activeChar.untransform();
activeChar.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 1);
activeChar.stopAbnormalEffect(AbnormalEffect.REAL_TARGET);
activeChar.setIsInvul(false);
activeChar.setIsParalyzed(false);
                        return false;
        }
        return true;
    }
 
    public String[] getVoicedCommandList()
    {
        return _voicedCommands;
    }
 }

Nest step to import voicedcommandhandler in MasterHandler.java:

Código:

Index: C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/datapack_development/data/scripts/handlers/MasterHandler.java
===================================================================
--- C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/datapack_development/data/scripts/handlers/MasterHandler.java    (revision 7482)
+++ C:/Users/George/Desktop/eclipse-SDK-3.5.2-win32/eclipse/workspace/datapack_development/data/scripts/handlers/MasterHandler.java    (working copy)
@@ -35,7 +35,6 @@
 import com.l2jserver.gameserver.handler.UserCommandHandler;
 import com.l2jserver.gameserver.handler.VoicedCommandHandler;
 
-
 /**
  *
  * @author  nBd
@@ -299,19 +300,23 @@
    private static void loadVoicedHandlers()
    {
        VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats());
        if (Config.L2JMOD_ALLOW_WEDDING)
            VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Wedding());
        if (Config.BANKING_SYSTEM_ENABLED)
            VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Banking());
        if (Config.TVT_ALLOW_VOICED_COMMAND)
            VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new TvTVoicedInfo());
        if (Config.L2JMOD_CHAT_ADMIN)
            VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new ChatAdmin());
        if (Config.L2JMOD_MULTILANG_ENABLE && Config.L2JMOD_MULTILANG_VOICED_ALLOW)
            VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Lang());
+        VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new CAPTCHA());
        _log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers");
    }
   
    /**
      * @param args
      */

 }
\ No newline at end of file

And here systexture for captcha
[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

credits pipiou21

Mazokista 05-04-2011 04:24 PM

de explicacoes sobre o mod

allanalcantara 05-04-2011 04:42 PM

o mod é assim ... como o nome ja diz ... se eu uso um bot ... O servidor detecta!
ELE SERVE TANTO NO PVP QUANTO UPANDO E ETC.
esse mod, apos detectado o bot ele manda uma pagina html pro player digitar ele tem que completar esse html em alguns segundos ... como na imagem se ele não completar esse captcha ele toma jail ...

acho que issso já diz bastante ... eu acho. :wub:

um post super rápido explicativo.

lordslip 04-08-2011 11:17 AM

funciona em quais versão, todas? IL HB GF...

DreadGames 04-08-2011 12:09 PM

Axo que nao finciona do modo que vc falo !!

Se voce configura ele pra 10 , a cada 10 Kill que voce mata vai aparecer essa janela !!! se bota 50 a cada 50 Kill ......

allanalcantara 06-08-2011 08:50 PM

Código:

if(AntiBotKills >= 50)
essa parte já diz, 50 kills a msg aparece
isso depende da configuração.
configurando do jeito que você quiser, dai você bota quantos kills e etc. ^^
entendeu? :D

planetatutorial 06-11-2011 04:26 PM

Ola pode reagrupar o link de download.

OliverSykes 07-11-2011 01:16 AM

Não tem necessidade upa o link amigo a não ser que tu queria baixar por outro caminho pos o link no topico está funcionando normalmente.

WanHelsing 17-04-2012 11:11 AM

Alguem pode reupar este link air? Preciso desse downlad, Até mais.

Critical 26-06-2012 08:19 PM

alguem ageita o link to precisando


Horários baseados na GMT -3. Agora são 06:38 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0