Jump to content

Attempt to pass code as his own.. Proof included


Recommended Posts

Posted
- If you are not the owner of the share, please add the proper Credits, or else you'll be smitted.

 

http://maxcheaters.com/forum/index.php?topic=254815.0

This system kicks players after #### seconds (adjust the time in the code) when they are on TvT. Works perfectly on Freya (didnt test on High Five).

 

 

You can download it here.

 

Code looks like:

package custom.AntiAfk;

import java.util.ArrayList;
import java.util.logging.Logger;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.entity.TvTEvent;
import com.l2jserver.gameserver.model.entity.TvTEventTeam;

/** 
*
* @author KnipeX
*/

public class AntiAfkTvt
{
    // Debug
    private static boolean debug = false;
    // Delay between location checks , Default 60000 ms (1 minute)
    private final int CheckDelay = 30000;
   
    private static Logger _log = Logger.getLogger(AntiAfkTvt.class.getName());
private static ArrayList<String> TvTPlayerList = new ArrayList<String>();
private static String[] Splitter;
private static int xx,yy,zz,SameLoc;
private static L2PcInstance _player;

   private AntiAfkTvt()
   {
       _log.info("AntiAfkTvt: Auto-Kick AFK in TVT System initiated.");
       ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new AntiAfk(), 60000, CheckDelay);
   }

   private class AntiAfk implements Runnable
   {
       public void run()
       {
     	  if (TvTEvent.isStarted())
     	  {
     		  // Iterate over all teams
     		  for (TvTEventTeam team : TvTEvent._teams)
     		  {
     			  // Iterate over all participated player instances in this team
     			  for (L2PcInstance playerInstance : team.getParticipatedPlayers().values())
     			  {
     				  if (playerInstance != null && playerInstance.isOnline())
     				  {
     					  _player = playerInstance;
     					  AddTvTSpawnInfo(playerInstance.getName(),playerInstance.getX(),playerInstance.getY(),playerInstance.getZ());
     					  if (debug)
     						  System.err.println("TvT Player: " + playerInstance.getName() + " " + playerInstance.getX() + " " +  playerInstance.getY() + " " +  playerInstance.getZ());
     				  }
     			  }
     		  }
     	  }
     	  else
     	  {
     		  TvTPlayerList.clear();
     	  }
       }
   }
   
private static void AddTvTSpawnInfo(String name, int _x, int _y, int _z)
{
	if(!CheckTvTSpawnInfo(name))
	{
		String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1";
		TvTPlayerList.add(temp);
	}
	else
	{
        Object[] elements = TvTPlayerList.toArray();
        for(int i=0; i < elements.length ; i++)
        {
        	Splitter = ((String) elements[i]).split(":");
        	String nameVal = Splitter[0];
		       if (name.equals(nameVal))
		       {
		    	   GetTvTSpawnInfo(name);
		    	   if (_x == xx && _y == yy && _z == zz && _player.isAttackingNow() == false && _player.isCastingNow() == false && _player.isOnline() == true && _player.isParalyzed() == false)
		    	   {
		    		   ++SameLoc;
		    		   if (SameLoc >= 4)//Kick after 4 same x/y/z, location checks
		    		   {
		    			   //kick here
		    			   TvTPlayerList.remove(i);
		    			   _player.logout();
		    			   return;
		    		   }
		    		   else
		    		   {
		    			   TvTPlayerList.remove(i);
		    			   String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":" + SameLoc;
		    			   TvTPlayerList.add(temp);
		    			   return;
		    		   }
		    	   }
		    	   TvTPlayerList.remove(i);
				   String temp = name + ":" + Integer.toString(_x) + ":" + Integer.toString(_y) + ":" + Integer.toString(_z) + ":1";
				   TvTPlayerList.add(temp);
		       }
        }
	}
}

private static boolean CheckTvTSpawnInfo(String name)
{

        Object[] elements = TvTPlayerList.toArray();
        for(int i=0; i < elements.length ; i++)
        {
        	Splitter = ((String) elements[i]).split(":");
        	String nameVal = Splitter[0];
	       if (name.equals(nameVal))
	       {
		       return true;
	       }
        }
        return false;
}

private static void GetTvTSpawnInfo(String name)
{

        Object[] elements = TvTPlayerList.toArray();
        for(int i=0; i < elements.length ; i++)
        {
        	Splitter = ((String) elements[i]).split(":");
        	String nameVal = Splitter[0];
	       if (name.equals(nameVal))
	       {
		       xx = Integer.parseInt(Splitter[1]);
		       yy = Integer.parseInt(Splitter[2]);
		       zz = Integer.parseInt(Splitter[3]);
		       SameLoc = Integer.parseInt(Splitter[4]);
	       }
        }
}

   public static AntiAfkTvt getInstance()
   {
       return SingletonHolder._instance;
   }

   @SuppressWarnings("synthetic-access")
   private static class SingletonHolder
   {
       protected static final AntiAfkTvt _instance = new AntiAfkTvt();
   }

   public static void main(String[] args)
   {
   AntiAfkTvt.getInstance();
   }
}

 

 

 

How to install: Just add on scripts.cfg custom\AntiAfk\AntiAfkTvt.java

 

 

Credits: Me 8)

 

This is NOT his code, all he did was change the credits to him... I am the author of this code. Request to delete it, and smitten him.

 

Proof:

 

http://www.l2jserver.com/forum/viewtopic.php?f=73&t=22166&hilit=tvt+afk

 

Should also have this +1 removed from him:

Really nice share. Tested and work fine. +1 rep for your job my friend. Thank you for share.

Guest
This topic is now closed to further replies.


  • Posts

    • 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
    • yeah ok, if you say what is fuctional 100% i can't say something different 😛  but if someone find hard to compile it or get vs and all that things i have here one more simple way here to put overlay in your own server or to change your window name with few money.
    • I've been using this for 2 years now with no issues from Discord. I don't use ogg.dll either. This one works with any l2.exe too; I don’t see any difference between them.
    • hmm.. ok i just see that, is different code first of all. My sources is totally different based in other way, with else libraries.  I have access to modify everything even to make the clock to stop show how many time users play in server. 1) so maybe keep some personal info more hide. 2) i dont use ogg.dll 3) i create it and give it ready + support to install it. Plus what is mine can working with what ever .exe you want not just l2 with same simple method. And i am sure if you try this source to compile it, after 3 hours discord will like shadowban your API too thats my source
  • Topics

×
×
  • Create New...