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

  • Like 4
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

    • Rosyk or rusik or whatever u blaim me that my mouth stinks but I assume you the one who stinks and your perfect pack will be now shared and you can suck a DICK )  https://eu2.contabostorage.com/d4b39866f6bb4084b6c969ec8fe20063:kita/Lucera_Classic_Remaster/Lucera Classic Remaster Server and Datapack files.rar  https://eu2.contabostorage.com/d4b39866f6bb4084b6c969ec8fe20063:kita/Lucera_Classic_Remaster/Lucera Classic Remaster Eng Client.rar Drama link    For this crap u need Lucera 2 classic license ) people paying 300 euros for this shit  lol Some Shit will come out soon mxc website need shake it a bit coz getting boring here )    Whats happen rosyk lost speach  xD Your pack was downloded  29 times bussines  not going as plan xD?
    • @Huggo Thank you for asking! When you join our Discord, on the Nexus Marketing section there is a #work-showcase channel. There you can see a little bit of what we are able to produce as a final ready-to-post product.  There is also this link in my new personal montage YouTube channel, in which I will be uploading every recent work: https://youtube.com/playlist?list=PLkzBKexKw8Wj8dC2diYndd5yOWOXUQCJW&si=-HGxlovqzvD4qqy2 Two more videos are coming up this week, and a #reviews channel has opened for our clients to let other people know about their experience working with us. Feel free to join our Hub in Discord, and for any inquries you might have don't hesitate to contact me or post your suggestion at #suggestions channel.  
    • Следи за своим вонючим языком, мудак.   Your mouth stinks, go wash your mouth, it's a dump) I don't know who you are or what you are, and I don't recommend buying anything from people outside of my network, as they may sell garbage under the guise of my work. There have been cases where my sales have been compromised. Additionally, reselling below the purchase price has been prohibited. I wish you all the best and peace. I kindly request that the moderators close this topic, as it is no longer relevant and the contact information is outdated.    
  • 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