Jump to content

Recommended Posts

Posted
Hello everyone, I'm sharing the version I was working on recently.

And a more original server-focused package following the missions of the original game.
The entire calling package was restructured, making it lighter and easier to execute.
It is good for people who want to start a package, without customizing equipment and skills.

* I put together 4 bases: "RusaCis3.5" "Lucera" "aCis" "Dev"

It has a Modern UI template.

 

JDK 14: https://mega.nz/file/rg5QwDJA#FwHrPbt8bw8prD3WLJz7dFOv1HAoYakNLTbVhLdgQTY
Client: https://www.mediafire.com/file/rg6twikao7zugd2/L2_CLIENT_INTERLUDE.zip
MariaDB: https://mega.nz/file/YBIXXSgY#9xqdkVMXAXY3VPNkBs6R05rnzJ9bH6aU47y2WNLfri4
L2FileEdit: https://mega.nz/file/xdQTTaKJ#poqzJDE-gItyQo0EOEWCHsC_r4HPXaCmLAZ_InUmOjE
Soucer: https://mega.nz/file/cv1BnCpY#F6UDroejOid2i4F9ipMZTt8d0u_ww10o9e0zAjlHMSA
Compilado: https://mega.nz/file/M3FxCaaR#FW6k4SFZJhajRygJSxDJwDfWc04kaC6HVUc5rktT2SE

 

 

Quote

# Extra
* Dualbox
*AntiFeed
* Premium
* Bots prevention Bots prevention
* Premium Buffs Category
* DropList info Shift + Click
* Skill Duration
* Olympiad Custom Period
* InfinitySS
* InfinityArrows
* AutoFarm

 * EVENTS
 capturetheflag, deathmatch, lastman, soloboss, teamvsteam

 * Commands Custom voiced
.menu
.offline
.online
.premium
.
ctfinfo
.ctfjoin
.ctfleave
.dminfo
.dmjoin
.dmleave
.lminfo
.lmjoin
.lmleave
.tvtinfo
.tvtjoin
.tvtleave

 

Author post: IFox

Posted

how to config gameserver/loginserver java path ? any explain?

 

' Get Java path.
Dim path
Set shell = WScript.CreateObject("WScript.Shell")
path = shell.Environment.Item("JAVA_HOME")
If path = "" Then
    MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server"
Else
    If InStr(path, "\bin") = 0 Then
        path = path + "\bin\"
    Else
        path = path + "\"
    End If
    path = Replace(path, "\\", "\")
    path = Replace(path, "Program Files", "Progra~1")
End If



' Generate command.
Dim command
command = path & "java -Xmx2280m -cp ../libs/*; l2j.luceraV3.gameserver.GameServer"

' Run the server.
Dim exitcode
exitcode = 0
Do
    ' Run the command and keep the console open.
    exitcode = shell.Run("cmd /c " & command & " & exit", 0, True)

    ' Handle the exit code
    If exitcode = 2 Then
        ' Restart
        exitcode = 2
    ElseIf exitcode <> 0 Then
        ' Error
       exitcode = 0
        Exit Do
    End If
Loop While exitcode = 2

 

Posted
2 hours ago, kHa said:

how to config gameserver/loginserver java path ? any explain?

 

' Get Java path.
Dim path
Set shell = WScript.CreateObject("WScript.Shell")
path = shell.Environment.Item("JAVA_HOME")
If path = "" Then
    MsgBox "Could not find JAVA_HOME environment variable!", vbOKOnly, "Game Server"
Else
    If InStr(path, "\bin") = 0 Then
        path = path + "\bin\"
    Else
        path = path + "\"
    End If
    path = Replace(path, "\\", "\")
    path = Replace(path, "Program Files", "Progra~1")
End If



' Generate command.
Dim command
command = path & "java -Xmx2280m -cp ../libs/*; l2j.luceraV3.gameserver.GameServer"

' Run the server.
Dim exitcode
exitcode = 0
Do
    ' Run the command and keep the console open.
    exitcode = shell.Run("cmd /c " & command & " & exit", 0, True)

    ' Handle the exit code
    If exitcode = 2 Then
        ' Restart
        exitcode = 2
    ElseIf exitcode <> 0 Then
        ' Error
       exitcode = 0
        Exit Do
    End If
Loop While exitcode = 2

 

You don't have to tuche nothing on that section mate just install your java jdk14. Setup in your every moments area the home_java path if you dont know how use Google to guide you...

Posted
2 hours ago, optimousprime said:

You don't have to tuche nothing on that section mate just install your java jdk14. Setup in your every moments area the home_java path if you dont know how use Google to guide you...

thanks, its work

  • 2 weeks later...
Posted
1 hour ago, antada said:

.farm

The config file is missing and cannot be executed.

In order to have the auto farm system install the interface in the system that  bean provided 

Posted

You can apply a code for auto farm system . 
 

Quote
======================================================	
Index: net/sf/l2j/gameserver/model/L2AutoFarmTask.java
======================================================	
+package net.sf.l2j.gameserver.model;
+
+import java.util.concurrent.ScheduledFuture;
+
+import net.sf.l2j.commons.concurrent.ThreadPool;
+import net.sf.l2j.gameserver.geoengine.GeoEngine;
+import net.sf.l2j.gameserver.handler.usercommandhandlers.Escape;
+import net.sf.l2j.gameserver.model.actor.instance.Chest;
+import net.sf.l2j.gameserver.model.actor.instance.GrandBoss;
+import net.sf.l2j.gameserver.model.actor.instance.Monster;
+import net.sf.l2j.gameserver.model.actor.instance.Player;
+import net.sf.l2j.gameserver.model.actor.instance.RaidBoss;
+
+public class L2AutoFarmTask
+{
+	private final Player _actor;
+	private ScheduledFuture<?> _task;
+	
+	public L2AutoFarmTask(Player actor)
+	{
+		_actor = actor;
+	}
+	
+	public final Player getActor()
+	{
+		
+		return _actor;
+	}
+	
+	public void start()
+	{
+		if (_task == null)
+		{
+			_task = ThreadPool.scheduleAtFixedRate(() -> thinking(), 500, 500);
+		}
+	}
+	
+	private void thinking()
+	{
+		if (!_actor.isDead())
+		{
+			if (_actor.isMoving() || _actor.isCastingNow() || _actor.isAttackingNow() || _actor.isMovementDisabled() || _actor.isOutOfControl() || forceStopBuffer())
+				return;
+			
+			playerTarget(_actor);
+		}
+	}
+	
+	private void playerTarget(Player player)
+	{
+		Monster monster = player.getTarget() instanceof Monster ? (Monster) player.getTarget() : null;
+		if (monster != null && !GeoEngine.getInstance().canSeeTarget(player, monster))
+			monster = null;
+		
+		monster = findCreature();
+		
+		_actor.setTarget(monster);
+	}
+	
+	public Monster findCreature()
+	{
+		Monster closestMonster = null;
+		
+		double closestDistance = Double.MAX_VALUE;
+		
+		for (Monster toTest : _actor.getKnownTypeInRadius(Monster.class, 3500))
+		{
+			if (toTest == null || toTest.isDead() || !GeoEngine.getInstance().canSeeTarget(_actor, toTest))
+				continue;
+			
+			if (!_actor.isCastingNow() && !_actor.isAttackingNow())
+			{
+				if (!GeoEngine.getInstance().canMoveToTarget(_actor.getX(), _actor.getY(), _actor.getZ(), toTest.getX(), toTest.getY(), toTest.getZ()))
+					continue;
+			}
+			
+			if (toTest instanceof RaidBoss || toTest instanceof GrandBoss || toTest instanceof Chest || toTest.isRaid())
+				continue;
+			
+			double distance = calculateDistance(toTest, false);
+			
+			if (distance < closestDistance)
+			{
+				if (_actor.isFacing(toTest, 120) || _actor.isInFrontOf(toTest))
+				{
+					closestDistance = distance;
+					closestMonster = toTest;
+				}
+			}
+			
+		}
+		
+		return closestMonster;
+	}
+	
+	public double calculateDistance(WorldObject target, boolean includeZ)
+	{
+		if (target == null)
+			return Double.MAX_VALUE;
+		
+		final int x1 = _actor.getX();
+		final int y1 = _actor.getY();
+		final int z1 = _actor.getZ();
+		
+		final int x2 = target.getX();
+		final int y2 = target.getY();
+		final int z2 = target.getZ();
+		
+		double distanceSquared = Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2);
+		
+		if (includeZ)
+		{
+			distanceSquared += Math.pow(z2 - z1, 2);
+		}
+		
+		return Math.sqrt(distanceSquared);
+	}
+	
+	private boolean forceStopBuffer()
+	{
+		final boolean force = running() && _actor.getAllEffects().length <= 8;
+		
+		if (force)
+		{
+			Escape unstuck = new Escape();
+			
+			unstuck.useUserCommand(52, _actor);
+			stop();
+		}
+		return force;
+	}
+	
+	public void stop()
+	{
+		if (_task != null)
+		{
+			_task.cancel(false);
+			_task = null;
+			_actor.setTarget(null);
+		}
+		
+	}
+	
+	public boolean running()
+	{
+		return _task != null;
+	}
+}

======================================================
Index: net/sf/l2j/gameserver/model/actor/Player.java
======================================================	
+	import net.sf.l2j.gameserver.model.L2AutoFarmTask;


	@Override
	public boolean doDie(Creature killer)
	{
		// Kill the Player
		if (!super.doDie(killer))
			return false;
		
		if (isMounted())
			stopFeed();
		
		_tvtkills = 0;
		_killCount = 0;
		
		synchronized (this)
		{
			if (isFakeDeath())
				stopFakeDeath(true);
			
+			if (getFarm().running())
+				getFarm().stop();
		}
		
		
		
		
		
		
		
+	private final L2AutoFarmTask _farm = new L2AutoFarmTask(this);
+	
+	public L2AutoFarmTask getFarm()
+	{
+		return _farm;
+	}


}do not copy
================================================================================
Index: net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
================================================================================
+	import net.sf.l2j.commons.lang.Tokenizer;
+	import net.sf.l2j.gameserver.model.L2AutoFarmTask;

do not copy
			ach.useAdminCommand(_command, activeChar);
			}
			
+			else if (_command.startsWith("farm"))
+			{
+				L2AutoFarmTask bot = activeChar.getFarm();
+				final Tokenizer tokenizer = new Tokenizer(_command);
+				final String param = tokenizer.getToken(1);
+				
+				switch (param.toLowerCase())
+				{
+					case "on":
+						if (!bot.running())
+						{
+							bot.start();
+						}
+						break;
+					
+					case "off":
+						if (bot.running())
+						{
+							bot.stop();
+						}
+						break;
+				}
+			}

do not copy
	else if (_command.startsWith("npc_"))
			{
			
======================================================			
Index: net/sf/l2j/commons/lang/Tokenizer.java
======================================================
+package net.sf.l2j.commons.lang;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Tokenizer
+{
+	private final Map<Integer, String> _tokens = new HashMap<>();
+	
+	public Tokenizer(String str)
+	{
+		this(str, " ");
+	}
+	
+	public Tokenizer(String str, String separator)
+	{
+		if (str == null || separator == null || str.isEmpty() || separator.isEmpty())
+		{
+			return;
+		}
+		
+		for (final String s : str.split(separator))
+		{
+			_tokens.put(_tokens.size(), s);
+		}
+	}
+	
+	public final String getToken(int index)
+	{
+		return _tokens.get(index);
+	}
+	
+	public final String getFirstToken()
+	{
+		return getToken(0);
+	}
+	
+	public final String getLastToken()
+	{
+		return _tokens.isEmpty() ? null : _tokens.get(_tokens.size() - 1);
+	}
+	
+	public final byte getAsByte(int index, byte defaultValue)
+	{
+		final String token = getToken(index);
+		if (token == null || !token.matches("-?\\d+"))
+		{
+			return defaultValue;
+		}
+		
+		return Byte.parseByte(token);
+	}
+	
+	public final int getAsInteger(int index, int defaultValue)
+	{
+		final String token = getToken(index);
+		if (token == null || !token.matches("-?\\d+"))
+		{
+			return defaultValue;
+		}
+		
+		return Integer.parseInt(token);
+	}
+	
+	public final float getAsFloat(int index, float defaultValue)
+	{
+		final String token = getToken(index);
+		if (token == null || !token.matches("-?\\d+(\\.\\d+)?"))
+		{
+			return defaultValue;
+		}
+		
+		return Float.parseFloat(token);
+	}
+	
+	public final double getAsDouble(int index, double defaultValue)
+	{
+		final String token = getToken(index);
+		if (token == null || !token.matches("-?\\d+(\\.\\d+)?"))
+		{
+			return defaultValue;
+		}
+		
+		return Double.parseDouble(token);
+	}
+	
+	public final long getAsLong(int index, long defaultValue)
+	{
+		final String token = getToken(index);
+		if (token == null || !token.matches("-?\\d+"))
+		{
+			return defaultValue;
+		}
+		
+		return Long.parseLong(token);
+	}
+	
+	public final boolean getAsBoolean(int index)
+	{
+		final String token = getToken(index);
+		return Boolean.parseBoolean(token);
+	}
+	
+	public <E extends Enum<E>> E getAsEnum(int index, final Class<E> enumClass, final E defaultValue)
+	{
+		final String val = getToken(index);
+		if (val != null)
+		{
+			try
+			{
+				return Enum.valueOf(enumClass, val);
+			}
+			catch (IllegalArgumentException e)
+			{
+				// Ignored
+			}
+		}
+		return defaultValue;
+	}
+	
+	public final int size()
+	{
+		return _tokens.size();
+	}
+	
+	public final boolean isEmpty()
+	{
+		return _tokens.isEmpty();
+	}
+	
+	public final String getAsString(int index)
+	{
+		return getToken(index);
+	}
+	
+	public final String getRemainingTokensFromIndex(int startIndex)
+	{
+		StringBuilder sb = new StringBuilder();
+		for (int i = startIndex; i < _tokens.size(); i++)
+		{
+			String token = getToken(i);
+			if (sb.length() > 0)
+			{
+				sb.append(" ");
+			}
+			sb.append(token);
+		}
+		return sb.toString();
+	}
+	
+	public final int countTokens()
+	{
+		return _tokens.size();
+	}
+	
+	public <E extends Enum<E>> E nextEnum(final Class<E> enumClass)
+	{
+		return getAsEnum(1, enumClass, null);
+	}
+	
+}


Download: https://mega.nz/file/RnE32I7a#U7iBDbVawz7YfPm_Q5Vcxb2ZH-SPn31PjI-cRoWIQDQ
 

 

Posted
On 2024. 12. 28. at 오후 7시 25분, optimousprime said:

자동 팜 시스템에 코드를 적용 할 수 있습니다. 
 


다운로드: https://mega.nz/file/RnE32I7a#U7iBDbVawz7YfPm_Q5Vcxb2ZH-SPn31PjI-cRoWIQDQ
 

 

Thank you for providing the data.The farm command did not work, but the problem was the same even after installing the interface. The character is ".Shout out "farm".. Bro, I want to bring it to HTML without an interface.. Is there any data on the voice command? Oh, and happy new year!! 🙂

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

    • That’s just part of buying and selling; if your service didn't appeal to me at the time, there's no reason for me to force myself to buy it. After all, I regularly buy other interfaces and clients from other users mostly Russians using USDT. But *I'm* the child here, even though *you're* the incredibly arrogant one.   The payment method or the amounts were never the problem you were. But life goes on; you’d rather stay caught up in your delusions, thinking you’re the protagonist of some anime. Princess Alice 😂   I have all the interfaces for the 474/506/509/520/542/563/557. and olds too.  Some were created by me, including the ARENA P140 interface, which will soon be released for free. This includes everything you make available. It will no longer be a monopoly held by just a few people.   Including your clients with system. like  
    • NEW: Ryzen 9 9950X VPS now Available! Our most Powerful VPS plans now available with dedicated Zen 5 cores clocked up to 5.7 GHz, DDR5 ECC, blazing NVMe Gen4 storage (~7 GB/s), 10 Gbit/s uplink with up to 50 TB traffic, and premium Anti-DDoS included on every plan. No KYC, crypto payments accepted, deployed in minutes. ⭐ RYZEN 9 9950X VPS: [ 9.99 ] 2vCore | 6GB DDR5 | 30GB NVMe - DEPLOY [ 19.99 ] 4vCore | 12GB DDR5 | 50GB NVMe - DEPLOY [ 39.99 ] 8vCore | 24GB DDR5 | 80GB NVMe - DEPLOY [ 69.99 ] 12vCore | 48GB DDR5 | 120GB NVMe - DEPLOY - 10 Gbit/s Port included in ALL Plans - Premium Anti-DDoS included in ALL Plans - No-KYC signup, crypto payments accepted ✅ Ryzen 9 9950X VPS ( vpslab.cloud )
    • I thiunk RU Federation having issues now with paypal?
    • 👑 [FOR SALE] Lineage 2 Premium UCP – Modern Web Panel with Progression & Reward Systems. Looking for the ultimate edge to make your server boom and boost revenue? Introducing the L2 Premium UCP—the most comprehensive and modern User Control Panel on the market. Developed with a total focus on player experience (UX) and administrative automation. Say goodbye to outdated, buggy panels. Give your server the look and feel of an official game!  
  • 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..