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.

  • Upvote 2
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
  • Like 1
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...