Jump to content

L2jRoboto - A Fake Player Engine


Elfo

Recommended Posts

Something else , while adding items and equiping them , these items are stored in database items table right? Isn't that a big waste of memory in long term since fake players aren't even stored on characters table? Also skills,etc. NO idea if I am right.

Edited by Lioy
Link to comment
Share on other sites

22 minutes ago, Lioy said:

Something else , while adding items and equiping them , these items are stored in database items table right? Isn't that a big waste of memory in long term since fake players aren't even stored on characters table? Also skills,etc. NO idea if I am right.

No it is not a big waste of memory. Databases, especially with those simple schema, don't affect performance unless you reach million marks and even then the queries are very simple.

I could have a cleanup task when the engine starts to delete any items in the db that don't belong in players.

However the long term plan is that the admin should be able to save some bots if he wants in the database and load them on demand or even log in them with and admin password.

Edited by .Elfocrash
Link to comment
Share on other sites

4 minutes ago, .Elfocrash said:

No it is not a big waste of memory. Databases, especially with those simple schema, don't affect performance unless you reach million marks.

I could have a cleanup task when the engine starts to delete any items in the db that don't belong in players.

However the long term plan is that the admin should be able to save some bots if he wants in the database and load them on demand or even log in them with and admin password.

 

Yea , I just thought that  : Say that reading bot names is from xml or from a database or smth like that , if all are dynamic and not saved bots , some  common problems would occur xD .  For example bot named Elfocrash human fighter , after server restart , bot generator finds this name again , but this time.. Elfocrash dark elf fighter. People will be like " WTF " haha

Edited by Lioy
Link to comment
Share on other sites

Just now, Lioy said:

 

Yea , I just thought that  : Say that reading bot names is from xml or from a database or smth like that , if all are dynamic and not saved bots , some  common problems would occur xD .  For example bot named Elfocrash human fighter , after server restart , bot generator finds this name again , but this time.. Elfocrash dark elf fighter. People will be like " WTF " xD

As I said numerous times, this is not ready for production. It is shared at this point to get anyone interesting in helping to get their hands dirty.

I have thought of all those things.

 

  • Names will be coming from wordlist.
  • There will be some fact checking on how players are named.
  • Buffs will be configurable
  • Skills with probability will be configurable
  • Names will have duplication check
  • Bots will have IQ levels

I would appreciate if rather than pointing out the obvious you did some coding. :) 

Link to comment
Share on other sites

2 minutes ago, .Elfocrash said:

As I said numerous times, this is not ready for production. It is shared at this point to get anyone interesting in helping to get their hands dirty.

I have thought of all those things.

 

  • Names will be coming from wordlist.
  • There will be some fact checking on how players are named.
  • Buffs will be configurable
  • Skills with probability will be configurable
  • Names will have duplication check
  • Bots will have IQ levels

I would appreciate if rather than pointing out the obvious you did some coding. :) 

 

Sure but engine isn't even organized in a way that people could help coding. Even different acis versions are problem.

Link to comment
Share on other sites

Just now, Lioy said:

 

Sure but engine isn't even organized in a way that people could help coding. Even different acis versions are problem.

The engine is insanely organised in a way to help people with coding. You can literally copy parse the whole packet in an acis project, adapt it and share diffs.

I can do the rest. In fact the fact that you were able to run it so easily proves that everyone can do it easily.

Link to comment
Share on other sites

Update

  • Added Titan and Dominator
  • Added self support spells
  • Added spell conditions for self support spells
  • Changed the way consumables work
Link to comment
Share on other sites

The way you handle skills is weird. You shouldn't have to do any hardcoded map there. From learnt based on their attribute you should able to get the skill you want and validate their conditions without using anything else. That would reduce per class AI to generic.

Link to comment
Share on other sites

1 hour ago, Sdw said:

The way you handle skills is weird. You shouldn't have to do any hardcoded map there. From learnt based on their attribute you should able to get the skill you want and validate their conditions without using anything else. That would reduce per class AI to generic.

I know now it looks weird because it is hard coded and everything has an equal chance of being picked but the plan it that the user can have different skill sets and different probabilities per bot ai and it will also be configurable on a file and not hardcoded. I want them to be per class because I also need some class specific mannerisms (ie archers will move a bit every other shot to give a sense of realist etc).

but yeah I thought about making them generic as well

Edited by .Elfocrash
Link to comment
Share on other sites

2 hours ago, .Elfocrash said:

I know now it looks weird because it is hard coded and everything has an equal chance of being picked but the plan it that the user can have different skill sets and different probabilities per bot ai and it will also be configurable on a file and not hardcoded. I want them to be per class because I also need some class specific mannerisms (ie archers will move a bit every other shot to give a sense of realist etc).

but yeah I thought about making them generic as well

aCis 372 not work

FakePlayerManager line 174

PlayerInfoTable.getInstance().addPlayer(objectId, accountName, playerName, player.getAccessLevel().getLevel());

 

 

 


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)
 

 

Edited by katowice
Link to comment
Share on other sites

3 minutes ago, katowice 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)
 

 

Well you have the stacktrace, check that is null in the lines indicated

Link to comment
Share on other sites

7 minutes ago, .Elfocrash said:

Ну, у вас есть stacktrace, проверьте, что это нулевое значение в указанных строках


 
with java at me it is bad, could not help or assist me.
Link to comment
Share on other sites

18 minutes ago, katowice said:


 

with java at me it is bad, could not help or assist me.

 

There are two options:

 

1. Hire a developer to do the work for you

2. Sit 2-4 months and learn java from the free source called INTERNET which provided to you by other people who work 24/24h daily for you to have free movies and free videos or tutorials

 

You don't live in the place that others do the work for you anymore. Free things year is over. This guy waste X hour of his life to share something and you people want also literally others to add them in your projects also. 

Edited by GamePsychology
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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...