Jump to content

Recommended Posts

Posted

Just requested by sexomaniakos.

Coded very fast , in 5 minutes, didn't tested.

 

For ex:

I see a player that I think he is farming with bot , i press .report targeting him.

A window appears to him with a random code ( 4 - 9 characters ) and he must add it in a field. He has 20 seconds , or else he gets jail for 15 minutes as a BOT.For sure it needs some limits , but i didn't have time now. If you want to edit it pm me.

 

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java	(revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java	(revision 0)
@@ -0,0 +1,115 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.util.random.Rnd;
+
+/**
+ * 
+ * 
+ * @author Rizlaaa
+ */
+public class ReportPlayer implements IVoicedCommandHandler
+{
+
+	private final String[] REPORT_COMMAND = {"report"};
+	
+	class BotCheck implements Runnable
+	{
+		L2PcInstance player;
+		
+		private BotCheck(L2PcInstance character)
+		{
+			player = character;
+		}
+		
+		@Override
+		public void run()
+		{
+			if(player.isBot())
+			{
+				player.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 15);
+				player.sendMessage("You are in jail now.");
+			}
+		}
+		
+	}
+
+	@Override
+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+	{
+		if(command.equalsIgnoreCase("report"))
+		{
+			if(activeChar==null) return false;
+			
+			L2PcInstance playerTarget = (L2PcInstance) activeChar.getTarget();
+			
+			if(playerTarget == null)
+			{
+				activeChar.sendMessage("Your target is incorrect.");
+				return false;
+			}
+			
+			if(playerTarget.isBot())
+			{
+				activeChar.sendMessage("This player has been already requested for botting");
+				return false;
+			}
+			
+			String password = getPass(Rnd.get(4, 9));
+			
+			NpcHtmlMessage html = new NpcHtmlMessage(0);
+			html.setFile("data/html/report.htm");
+			html.replace("%code", password);
+			playerTarget.sendPacket(html);
+			playerTarget.setBot(true);
+			playerTarget.code = password;
+			
+			//schedule the check after 20 seconds
+			ThreadPoolManager.getInstance().scheduleGeneral(new BotCheck(playerTarget), 2000);
+			
+		}
+		
+		return true;
+	}
+	
+	private String getPass(int size)
+	{
+		String abc = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
+		
+		StringBuilder stringBuilder = new StringBuilder(size);
+		
+		for(int j=0;j<size;j++)
+		  stringBuilder.append(abc.charAt(Rnd.get(abc.length())));
+		
+		return stringBuilder.toString();
+	}
+
+	
+	@Override
+	public String[] getVoicedCommandList()
+	{
+		return REPORT_COMMAND;
+	}
+
+}

Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java	(revision 18)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java	(working copy)
@@ -143,6 +143,25 @@
				activeChar.teleToLocation(82904, 148620, -3469);
				return;
			}
+			else if(_command.startsWith("report"))
+			{
+				String sub = _command.substring(6);
+				StringTokenizer st = new StringTokenizer(sub);
+				String code = "";
+				if(st.hasMoreTokens())
+					code = st.nextToken();
+				
+				if(code == activeChar.code)
+				{
+					activeChar.sendMessage("You are now safe.");
+					activeChar.setBot(false);
+				}
+				else
+				{
+					activeChar.sendMessage("Incorrect password");
+				}
+				
+			}
			else if (_command.startsWith("teleport_aden"))
			{
				activeChar.teleToLocation(147457, 27152, -225);
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(revision 24)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -1037,6 +1037,8 @@
	/** The _noble. */
	private boolean _noble = false;

+	private boolean botCheck = false;
+	
	private boolean _daytop = false;
	private int _daykills = 0;

@@ -1045,6 +1047,8 @@

	/** The _donator. */
	private boolean _donator = false;
+	
+	public String code = "";

	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2FolkInstance _lastFolkNpc = null;
@@ -12895,6 +12899,16 @@
	{
		return _inventoryDisable;
	}
+	
+	public boolean isBot()
+	{
+		return botCheck;
+	}
+	
+	public void setBot(boolean bot)
+	{
+		botCheck = bot;
+	}

	/**
	 * The Class InventoryEnable.

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_DataPack
Index: data/html/report.htm
===================================================================
--- data/html/report.htm	(revision 0)
+++ data/html/report.htm	(revision 0)
@@ -0,0 +1,15 @@
+<html>
+<body>
+
+Player %p reports you for botting.
+
+<br>
+
+Enter the code:  %code to avoid jail<br>
+
+<edit var="code" height=20 width=20>
+
+<button value="Save me" action="bypass -h report $code height=20 width=15>
+
+</body>
+</html>
\ No newline at end of file

Posted

i am going to Test it now

 

Ty alot i will feedback Tomorow  Becaouse i use Epilogue and i have some errors on adupt so i will do it tomorow

 

Edited: Feedback tomorow

Posted

Just requested by sexomaniakos.

Coded very fast , in 5 minutes, didn't tested.

 

For ex:

I see a player that I think he is farming with bot , i press .report targeting him.

A window appears to him with a random code ( 4 - 9 characters ) and he must add it in a field. He has 20 seconds , or else he gets jail for 15 minutes as a BOT.For sure it needs some limits , but i didn't have time now. If you want to edit it pm me.

 

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_GameServer
Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java	(revision 0)
+++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/ReportPlayer.java	(revision 0)
@@ -0,0 +1,115 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * http://www.gnu.org/copyleft/gpl.html
+ */
+package com.l2jfrozen.gameserver.handler.voicedcommandhandlers;
+
+import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler;
+import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jfrozen.gameserver.thread.ThreadPoolManager;
+import com.l2jfrozen.util.random.Rnd;
+
+/**
+ * 
+ * 
+ * @author Rizlaaa
+ */
+public class ReportPlayer implements IVoicedCommandHandler
+{
+
+	private final String[] REPORT_COMMAND = {"report"};
+	
+	class BotCheck implements Runnable
+	{
+		L2PcInstance player;
+		
+		private BotCheck(L2PcInstance character)
+		{
+			player = character;
+		}
+		
+		@Override
+		public void run()
+		{
+			if(player.isBot())
+			{
+				player.setPunishLevel(L2PcInstance.PunishLevel.JAIL, 15);
+				player.sendMessage("You are in jail now.");
+			}
+		}
+		
+	}
+
+	@Override
+	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
+	{
+		if(command.equalsIgnoreCase("report"))
+		{
+			if(activeChar==null) return false;
+			
+			L2PcInstance playerTarget = (L2PcInstance) activeChar.getTarget();
+			
+			if(playerTarget == null)
+			{
+				activeChar.sendMessage("Your target is incorrect.");
+				return false;
+			}
+			
+			if(playerTarget.isBot())
+			{
+				activeChar.sendMessage("This player has been already requested for botting");
+				return false;
+			}
+			
+			String password = getPass(Rnd.get(4, 9));
+			
+			NpcHtmlMessage html = new NpcHtmlMessage(0);
+			html.setFile("data/html/report.htm");
+			html.replace("%code", password);
+			playerTarget.sendPacket(html);
+			playerTarget.setBot(true);
+			playerTarget.code = password;
+			
+			//schedule the check after 20 seconds
+			ThreadPoolManager.getInstance().scheduleGeneral(new BotCheck(playerTarget), 2000);
+			
+		}
+		
+		return true;
+	}
+	
+	private String getPass(int size)
+	{
+		String abc = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
+		
+		StringBuilder stringBuilder = new StringBuilder(size);
+		
+		for(int j=0;j<size;j++)
+		  stringBuilder.append(abc.charAt(Rnd.get(abc.length())));
+		
+		return stringBuilder.toString();
+	}
+
+	
+	@Override
+	public String[] getVoicedCommandList()
+	{
+		return REPORT_COMMAND;
+	}
+
+}

Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java	(revision 18)
+++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java	(working copy)
@@ -143,6 +143,25 @@
				activeChar.teleToLocation(82904, 148620, -3469);
				return;
			}
+			else if(_command.startsWith("report"))
+			{
+				String sub = _command.substring(6);
+				StringTokenizer st = new StringTokenizer(sub);
+				String code = "";
+				if(st.hasMoreTokens())
+					code = st.nextToken();
+				
+				if(code == activeChar.code)
+				{
+					activeChar.sendMessage("You are now safe.");
+					activeChar.setBot(false);
+				}
+				else
+				{
+					activeChar.sendMessage("Incorrect password");
+				}
+				
+			}
			else if (_command.startsWith("teleport_aden"))
			{
				activeChar.teleToLocation(147457, 27152, -225);
Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(revision 24)
+++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java	(working copy)
@@ -1037,6 +1037,8 @@
	/** The _noble. */
	private boolean _noble = false;

+	private boolean botCheck = false;
+	
	private boolean _daytop = false;
	private int _daykills = 0;

@@ -1045,6 +1047,8 @@

	/** The _donator. */
	private boolean _donator = false;
+	
+	public String code = "";

	/** The L2FolkInstance corresponding to the last Folk wich one the player talked. */
	private L2FolkInstance _lastFolkNpc = null;
@@ -12895,6 +12899,16 @@
	{
		return _inventoryDisable;
	}
+	
+	public boolean isBot()
+	{
+		return botCheck;
+	}
+	
+	public void setBot(boolean bot)
+	{
+		botCheck = bot;
+	}

	/**
	 * The Class InventoryEnable.

 

### Eclipse Workspace Patch 1.0
#P L2jFrozen_DataPack
Index: data/html/report.htm
===================================================================
--- data/html/report.htm	(revision 0)
+++ data/html/report.htm	(revision 0)
@@ -0,0 +1,15 @@
+<html>
+<body>
+
+Player %p reports you for botting.
+
+<br>
+
+Enter the code:  %code to avoid jail<br>
+
+<edit var="code" height=20 width=20>
+
+<button value="Save me" action="bypass -h report $code height=20 width=15>
+
+</body>
+</html>
\ No newline at end of file

add the limits because the code sux hard with out limits...  make a list and if the player asnwer right add him for "x" minutes and then remove him to avoid the spam target. imagine that if any noob will spam ".report" every "x" mins on a player... :)

 

ps:i am not talking about flood protectors...

Posted

add the limits because the code sux hard with out limits...  make a list and if the player asnwer right add him for "x" minutes and then remove him to avoid the spam target. imagine that if any noob will spam ".report" every "x" mins on a player... :)

 

ps:i am not talking about flood protectors...

I said it , who ever wants add limits. I just created it for sexomaniakos as he requested it.

Posted

i have a problem here html.setFile("data/html/report.htm");

html.setFile is diferent ton Epilgoue Client but i dont know how any help?

 

Edit: i tryed this now html.setFile(target,"data/html/report.htm"); i will tell you if works in 3 minutes

sry i am New on Coding and i lern to adapt atm :)

Posted

Sry for Double i can t modify the previews.

 

So i have problem it dont apears me the window for the Code .

When i pres .report i get Jailed 15 minits

i cant adupt this tine for Epilgoue html.setFile("data/html/report.htm");

Posted
i have a problem here html.setFile("data/html/report.htm");

html.setFile is diferent ton Epilgoue Client but i dont know how any help?

 

Edit: i tryed this now html.setFile(target,"data/html/report.htm"); i will tell you if works in 3 minutes

sry i am New on Coding and i lern to adapt atm

 

replace this:

html.setFile("data/html/report.htm");

 

with this:

html.setFile(activeChar.getHtmlPrefix(), "data/html/report.htm");

Posted

So everything went Good Just 1 problem

Every time that i config the password it says its wrong  and i get Jailed.

Every time and u use the right password any help?

Posted

Usefull code , I will test it when i will have some time.

Nice share keep sharing :).

Tell us when you test it. Becaouse i have error. When i report every password i use it says that its incorect

When you test it pls Chek

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Website: https://l2elixir.org/ Discord: https://discord.gg/5ydPHvhbxs    
    • L2-LORENA x100 MID RATE   Interlude Nostalgia Meets Modern Gameplay   OFFICIAL OPENING:  April 4 (Saturday)  19:00 UTC+1 ⸻  MAIN INFORMATION  Adena: x5  Drop: x10  Spoil: x10  Raid Boss: x10  Seal Stones: x2  Quests: x10 ⸻  FEATURES  GM Shop up to B-Grade  Full Buffer  Premium System (x2 bonuses)  AutoFarm – FREE for everyone ⸻  SERVER CONCEPT  Classic Interlude nostalgia  Enhanced with modern interface & mechanics  Balanced PvP & PvE gameplay  Active development & custom features ⸻  WHY JOIN L2-LORENA?  No Pay-to-Win  Smooth gameplay & stable server  Competitive PvP environment  Friendly & active community ⸻  JOIN US NOW L2-LORENA 100X <<< LINK Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr   L2-LORENA Link << Discord: https://discord.gg/TYZ88Tgx4b  Facebook: https://www.facebook.com/share/18kwbkaYZY/?mibextid=wwXIfr
    • https://web.archive.org/web/20260306183214/https://maxcheaters.com/topic/241828-l2j-l2damage/page/3/ https://l2topzone.com/forum/l2-server-support-problems/9/l2damage-stopped/30514 Also we will try to push longer seasons ever ! (1135-100)/9 = 115 online
    • ONE SIDE – AND EVERYTHING BREAKS ▪ Looks like a simple case: Florida DL, back side, barcode – “clean and minimal”. ▪ In reality, these are exactly the tasks that fail most often. – data provided as plain text – request only for the back side – focus on the barcode (PDF417) ▪ And here’s the key point: ▪ A barcode is not just a “picture on the back”. It’s compressed logic of the entire document. ▪ If it doesn’t match the front, format, and data structure – the system flags it instantly. ▪ Many create a “similar-looking” code. But systems don’t read “similar” – they read by specification. ▪ In cases like this, it’s not about design. It’s about correct data assembly and how it behaves inside the format. ▪ Today only – 15% off for verification cases. ▪ Want it to pass, not just look right? Describe your case – we’ll show where even clean files break. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #editing #photoshop #documents #verification #case
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..