Jump to content

Recommended Posts

Posted

I still think, especially from testing, that if people use this correctly they will be able to balance their servers better.

 

This has a lot of testing potential.

For example you know how many full geared full buffed players it takes to kill a specific boss in a certain amount of time.

It also allows you to test 1v1 pvps.

 

It comes down to how greedy admins will get.

Posted (edited)

The way you feed FakePlayerTaskManager (AITask and AITaskRunner schedule individual AI, so...) seems overcomplicated for nothing.

 

You don't even need FakePlayerTaskManager, each fake player got an AI and is normally deleted (if correctly coded) on fake player deletion. So you only need to keep references of fake players, iterate them and delete them. AI stop+deletion will follow.

 

There are 47k Attackable/Npc spawns, with 1sec interval individual task (it's even worst than that, since follow task is an additional 500ms task, so atm regular creatures got 2 running tasks), and there isn't any problem. I don't see why 2k (or even 250 in your case) fake spawns with 2sec interval would break anything.

 

ThreadPool already splits the charge between threads.

Edited by Tryskell
Posted

10:44:45 AM net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket run
SEVERE: Client: [Character: 1 - Account: 1 - IP: 127.0.0.1] - Failed reading: [C] SendBypassBuildCmd ; java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:190)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:81)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:57)
    at net.sf.l2j.gameserver.network.clientpackets.SendBypassBuildCmd.runImpl(SendBypassBuildCmd.java:57)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:755)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Posted (edited)
2 hours ago, Tryskell said:

The way you feed FakePlayerTaskManager (AITask and AITaskRunner schedule individual AI, so...) seems overcomplicated for nothing.

 

You don't even need FakePlayerTaskManager, each fake player got an AI and is normally deleted (if correctly coded) on fake player deletion. So you only need to keep references of fake players, iterate them and delete them. AI stop+deletion will follow.

 

There are 47k Attackable/Npc spawns, with 1sec interval individual task (it's even worst than that, since follow task is an additional 500ms task, so atm regular creatures got 2 running tasks), and there isn't any problem. I don't see why 2k (or even 250 in your case) fake spawns with 2sec interval would break anything.

 

ThreadPool already splits the charge between threads.

Well i definitely need to have 1 sec intervals for the players. The problem is that unless i optimize the code from the beginning, the one thread thing will cause performance issues in my case. I'm kinda overloading the methods with logic so he math just doesn't add up to calculate everything for everyone in a second. I wanna finish all the classes first, and then add some social interactions. After that i will look into optimizing it as much as possible. The monster system is getting away with it with the intention system. I wanna implement a similar decision queue system. Once that is done the task manager will be dropped.

 

29 minutes ago, djdiablo said:

10:44:45 AM net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket run
SEVERE: Client: [Character: 1 - Account: 1 - IP: 127.0.0.1] - Failed reading: [C] SendBypassBuildCmd ; java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:190)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:81)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:57)
    at net.sf.l2j.gameserver.network.clientpackets.SendBypassBuildCmd.runImpl(SendBypassBuildCmd.java:57)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:755)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Something is null. Check those lines

   at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:190)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:81)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:57)

Read the code.

Also this is not a support thread. If you have any issues go to the github page https://github.com/Elfocrash/L2jRoboto

Edited by .Elfocrash
Posted (edited)
SEVERE: Client: [Character: 1 - Account: 1 - IP: 127.0.0.1] - Failed reading: [C] SendBypassBuildCmd ; java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:201)
PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());

    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:88)
  FakePlayer activeChar = createRandomFakePlayer();

    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:57)
FakePlayerManager.INSTANCE.spawnPlayer(activeChar.getX(),activeChar.getY(),activeChar.getZ());

    at net.sf.l2j.gameserver.network.clientpackets.SendBypassBuildCmd.runImpl(SendBypassBuildCmd.java:57)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:755)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

Edited by djdiablo
Posted

aCis 372 not work
FakePlayerManager line 174
PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());
 

Spoiler

 

WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

дек 02, 2017 2:54:26 PM net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer runImpl
WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

the problem here is player.getAccessLevel (). getLevel (). But what's wrong here, I can not understand.

 

 

Not answered

Posted
7 minutes ago, djdiablo said:

aCis 372 not work
FakePlayerManager line 174
PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());
 

  Reveal hidden contents

 

WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

дек 02, 2017 2:54:26 PM net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer runImpl
WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

the problem here is player.getAccessLevel (). getLevel (). But what's wrong here, I can not understand.

 

 

Not answered

Well 372 is not pulbic so you're alone.

Posted
49 minutes ago, djdiablo said:

aCis 372 not work
FakePlayerManager line 174
PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());
 

  Reveal hidden contents

 

WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

дек 02, 2017 2:54:26 PM net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer runImpl
WARNING: Bad RequestBypassToServer: java.lang.NullPointerException
java.lang.NullPointerException
    at com.elfocrash.roboto.FakePlayerManager.createRandomFakePlayer(FakePlayerManager.java:174)
    at com.elfocrash.roboto.FakePlayerManager.spawnPlayer(FakePlayerManager.java:73)
    at com.elfocrash.roboto.admincommands.AdminFakePlayers.useAdminCommand(AdminFakePlayers.java:49)
    at net.sf.l2j.gameserver.network.clientpackets.RequestBypassToServer.runImpl(RequestBypassToServer.java:81)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:774)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

the problem here is player.getAccessLevel (). getLevel (). But what's wrong here, I can not understand.

 

 

Not answered

 

 

Try it, i have acis 372 and work all fine...

 

FakePlayerManager.java

 

		player.setName(playerName);
		
	+	player.setAccessLevel(Config.DEFAULT_ACCESS_LEVEL);
		
		PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());
		player.setBaseClass(player.getClassId());		
		setLevel(player, 81);		

 

Posted (edited)
5 minutes ago, flajok said:

 

 

Try it, i have acis 372 and work all fine...

 

FakePlayerManager.java

 


		player.setName(playerName);
		
	+	player.setAccessLevel(Config.DEFAULT_ACCESS_LEVEL);
		
		PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());
		player.setBaseClass(player.getClassId());		
		setLevel(player, 81);		

 

thanx, its works!

Edited by djdiablo
Posted

SEVERE: Client: [Character: 1 - Account: 1 - IP: 127.0.0.1] - Failed reading: [C] Action ; java.lang.NullPointerException
java.lang.NullPointerException
    at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar.gatherCharacterInfo(AdminEditChar.java:696)
    at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar.showCharacterInfo(AdminEditChar.java:685)
    at net.sf.l2j.gameserver.model.actor.instance.Player.onActionShift(Player.java:2869)
    at net.sf.l2j.gameserver.network.clientpackets.Action.runImpl(Action.java:54)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:755)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Posted (edited)
1 hour ago, djdiablo said:

SEVERE: Client: [Character: 1 - Account: 1 - IP: 127.0.0.1] - Failed reading: [C] Action ; java.lang.NullPointerException
java.lang.NullPointerException
    at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar.gatherCharacterInfo(AdminEditChar.java:696)
    at net.sf.l2j.gameserver.handler.admincommandhandlers.AdminEditChar.showCharacterInfo(AdminEditChar.java:685)
    at net.sf.l2j.gameserver.model.actor.instance.Player.onActionShift(Player.java:2869)
    at net.sf.l2j.gameserver.network.clientpackets.Action.runImpl(Action.java:54)
    at net.sf.l2j.gameserver.network.clientpackets.L2GameClientPacket.run(L2GameClientPacket.java:50)
    at net.sf.l2j.gameserver.network.L2GameClient.run(L2GameClient.java:755)
    at net.sf.l2j.commons.concurrent.ThreadPool$TaskWrapper.run(ThreadPool.java:248)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Comments that involve bugs will be ignored. Use github instead. This is not a troubleshooting thread

Edited by .Elfocrash
Posted
31 minutes ago, valentin said:

does it work on other platforms? or  only one acis?

Is that an actual question? it works everywhere but obviously you have to adapt the code.

Posted (edited)

excused the question , I saw from those videos, hit or skill is delay a 1 second,this is a problem?

 

 

Edited by valentin

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

    • Migrating a legacy Interlude server to PostgreSQL while adding real observability is basically forcing 2006 MMO engineering to attend a 2026 infrastructure conference at gunpoint. PS: which revision of aCis? PS: 🧻what was broken during this whatever you call it.    AAC Guard beign asked to adapt to this be like: - Creating bugs since early 2018
    • OH MY LORDDDDDDDDDDDDDDDDDDDDD   FINALLY
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • I came out of my cave as I do once every 5 years. By now, I know nobody really cares about L2, but I still find it fun to experiment. Everything you see here will be free and open source. I have no interest in selling anything.   Long story short, I like to revisit Interlude and apply what I've learned to see how far I can push it. Here's Outerlude, a public fork of aCis for the modern age.   Video demo:   Work that has been done:   Redone the netcode from scratch to be async The NPC AI was completely redone based on Finite State Machines Moved to PostgreSQL and using some of its cool features Lots of config that should be hot reloadable has moved to the database OpenTelemetry instrumentation, where it makes sense, and a Grafana dashboard A built-in REST API for server management A built-in MCP Server for LLMs Nidrah AI, an AI Agent to make managing the server easier Real-time server map view Chat auditing and live snooping A new Fake Players Engine with a Node logic system and a new LLM planner for any behavior Just watch the video   If there is interest in this and I'm happy with it, or I get bored (which I always do), I will open-source it. Let me know what you think and if there is some feature you'd like me to implement.
  • 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..