Jump to content

Recommended Posts

Posted
14 hours ago, Celestine said:

@guytis  si no cambia su actitud y continúa votando a esa persona sin ninguna razón, terminará castigado.

Hello, if I don't like what this person brings, why can't I vote?
If I can't vote, what's the option to vote for?

Posted
On 7/23/2019 at 11:59 AM, guytis said:

Hello, if I don't like what this person brings, why can't I vote?
If I can't vote, what's the option to vote for?

 

everyone is free on this community to share what ever they want plus if you dont like his share you can simply ignore him thats the fact.

  • Downvote 1
Posted
On 7/24/2019 at 9:29 AM, Celestine said:

 

everyone is free on this community to share what ever they want plus if you dont like his share you can simply ignore him thats the fact.

What is the DownVote option for?
if you are not going to allow me to use it...
for that eliminate the option and already...

I don't think I'm doing anything against the rules.

If you give the option to use DownVote, I don't understand what the problem is...

or did you fall in love with MasterToma?

with all due respect...

  • 6 months later...
Posted
On 1/29/2019 at 11:02 AM, MasterToma said:

Do you think I should comment every new message here? :) I'm still working on L2Server, have done skilldata parser/lexer (about 120 skill classes, 20 conditions, all parameters are parsed). Now I'm preparing testing environment in C#, to test whole stack (L2Server, L2AuthD, CacheD and L2NPC). It is needed, since I already have first messages from my L2Server. So, heads-up, work is in progress ;)

Sources look... kind a strange. Everything is built on winsocks and other legacy stuff. Modern C++ has threads and file system support "from the box". Also, build system... is based on M$VC IDE. Better to use Makefiles. In this case it will be possible to re-compile and run server, on same working machine, without breaking ABI. At least, good to use modern C++ for the testing env. This will save the time - especially on upgrade to C4 .. C6.

Posted

oh no not winsocks

 

btw since when is winsocks considered legacy? all those fancy hipster libs everyone uses for networking still built on winsocks lol

  • Haha 1
Posted (edited)
On 2/24/2020 at 10:26 AM, MasterToma said:

@T1g3r7th This is ORIGINAL restored code, not a NEW one, written by me. NCSoft uses WinSocks everywhere, without any libraries and it uses Visual Studio 2003 for it :)

 

 

I want to ask Toma, do you have interest in writing some skeleton of MMO RPG, and then attaching real pieces of L2 to it? Main idea here, to save the time of development for more creative tasks - like statistic simulation of classes, in PvP, PvE. I had worked on dozen of Java-built servers of L2, beginning from C6 and to CT 2.4. And even there, it was needed restart of all the server, after changing the sources. On debugging quests (like 4 Sepulchers), it was a long way to do it. And L2 has tons of quests. Castle sieges are very interesting to simulate, Fort sieges are interesting. I want to use total Linux-based, fully automated kernel of server, which will be easy to extend/maintain. If something special will be needed to debug, I suppose to visualize data output to external OpenGL window (which can be opened from the client's PC, just as separate program).

Shot00332.jpg

Edited by T1g3r7th
Posted
On 2/24/2020 at 2:26 PM, Anarchy said:

oh no not winsocks

 

btw since when is winsocks considered legacy? all those fancy hipster libs everyone uses for networking still built on winsocks lol

I have C++ code using sockets, which runs well both on Linux/Windows. Give me a reason to replace it by a legacy winsock, which will run well just on one platform?

Same with the build system: I can use Makefiles in any IDE, including MSVC, but cannot run *.sln on Eclipse or Emacs on Linux. Makefiles allows every dev in team to use his favorite IDE tool, to write the code faster. You can re-compile project, install and run in one click. Even from remote PC.

Posted (edited)

I will not recommend to work with Toma, because he is rubbish and arrogant person. When I asked about RTT of TCP packet from client to server in real situation, got strange answer that it is 10 ms [which is total bs]. Same with 'understanding' of the software development process in general.

 

There is no problems with sources, main question - is knowledge, how the things work, ways to improve. Its not here. Don't waste your time.

Edited by T1g3r7th
  • Downvote 1
Posted (edited)

@T1g3r7th, I'm doing this 4 years, posting many shares and manuals, and helping in private and so on. And you are second person, complain so far about me (first was just a troll). 

I blocked you in skype, because you have very "strange" ideas, like  re-writting network layer from TCP to UDP and so on. I was trying to explain you, that NETWORK is not a problem in L2 at all... But hey, I really don't have time to teach you or explain again and again, why PTS uses stream-based protocol.

 

You have sources, I told you that there are CMake files (you was not right when assumend that it's MSVC-based), please, say tnx and go on, do re-write what ever you want :) 

Edited by MasterToma
  • Upvote 5
  • 2 weeks later...
Posted (edited)

Generally I don't like when someone named himself as 'master'. There is so much hype on this topic, and with very little practical output. What I can notice about Toma:

 

1.When I had worked mostly on hi-level part of c6 and newer, implementing sieges on c6, functionality of clan halls, quests and so on - knowledge of key timeouts was important to build reliable server. As from 'master', I expected to hear from him some real numbers - for network connections, server timeouts, database requests, etc. With respect to C++ implementation. Not just outlandish numbers. Every person who cheated with server, will say that 10 ms - is not RTT of the tcp packet, but minimal tick time of the server.

 

2.Also, he failed to explain the principal difference, between tcp/udp implementations.
Same about understanding of testing on single machine vs testing on real networks. Anyone who hold his own l2 server for more than year, surely know the difference.

 

3.About published version of sources..

A).That archives just lack - basic data stats, content of db tables - to operate the C++ build normally. Without that data, that dis-asmed piece of old garbage have no practical usage. From that point, more valuable to have java-compiled build of the server, with complete data pack - to be able to operate easily, from the single Linux machine.

B).On quality of the code: Toma still can use any of old C++ standard, even which is 20 years old, still use malloc/free in cpp code and other bad practices. This will not help you to make good server, but rather turn away from making it. My advice: look in other places, ask people who have real knowledge.

Edited by T1g3r7th
  • Downvote 2
Posted
40 minutes ago, T1g3r7th said:

Generally I don't like when someone named himself as 'master'. There is so much hype on this topic, and with very little practical output. What I can notice about Toma:

 

1.When I had worked mostly on hi-level part of c6 and newer, implementing sieges on c6, functionality of clan halls, quests and so on - knowledge of key timeouts was important to build reliable server. As from 'master', I expected to hear from him some real numbers - for network connections, server timeouts, database requests, etc. With respect to C++ implementation. Not just outlandish numbers. Every person who cheated with server, will say that 10 ms - is not RTT of the tcp packet, but minimal tick time of the server.

 

2.Also, he failed to explain the principal difference, between tcp/udp implementations.
Same about understanding of testing on single machine vs testing on real networks. Anyone who hold his own l2 server for more than year, surely know the difference.

 

3.About published version of sources..

A).That archives just lack - basic data stats, content of db tables - to operate the C++ build normally. Without that data, that dis-asmed piece of old garbage have no practical usage. From that point, more valuable to have java-compiled build of the server, with complete data pack - to be able to operate easily, from the single Linux machine.

B).On quality of the code: Toma still can use any of old C++ standard, even which is 20 years old, still use malloc/free in cpp code and other bad practices. This will not help you to make good server, but rather turn away from making it. My advice: look in other places, ask people who have real knowledge.

Hey man, we get it, you are a real pro, and I genuinely envy your skills in this matter.

So here's a suggestion - why not just do the work you've complained MasterToma is doing wrong and stfu? You'll show the world who's the boss and we won't need to ignore your whining. Win-win.

  • Like 1
  • Haha 1
  • Upvote 1
Guest
This topic is now closed to further replies.



  • Posts

    • hello, i want to wtt my charracter in l2elmorelab 1x harbor for 1.5kkk adena in l2reborn 10x new. Or if you interested tell me your offer. :)) Clean Mail 30 lvl Cleric Naked   Updated.
    • package ai.npc.NFWalker; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import l2r.gameserver.enums.CtrlIntention; import l2r.gameserver.model.Location; import l2r.gameserver.model.actor.L2Npc; import l2r.gameserver.model.quest.Quest; import l2r.gameserver.network.clientpackets.Say2; import l2r.gameserver.network.serverpackets.NpcSay; public class NFWalkerAI extends Quest { private static final int WALKER_NPC_ID = 20116; private final Map<String, Route> routes = new HashMap<>(); private final Map<Integer, Integer> npcIndexes = new HashMap<>(); private final Map<Integer, Boolean> npcReverse = new HashMap<>(); private final Map<Integer, String> npcCurrentRoute = new HashMap<>(); public NFWalkerAI() { super(-1, NFWalkerAI.class.getSimpleName(), "ai/npc/NFWalker"); loadRoutes(); addSpawnId(WALKER_NPC_ID); } private void loadRoutes() { // Route 1 Data Route route1 = new Route("route1"); route1.addPoint(new RoutePoint(0, 149363, 172341, -941, 0, false, "")); route1.addPoint(new RoutePoint(1, 148568, 172328, -980, 5, true, "Puff")); route1.addPoint(new RoutePoint(2, 148536, 172792, -980, 0, false, "")); // Route 2 Data Route route2 = new Route("route2"); route2.addPoint(new RoutePoint(0, 149363, 172341, -941, 0, false, "")); route2.addPoint(new RoutePoint(1, 150248, 172328, -980, 5, true, "Rise my children! Bring me the servants of the god! Let them be offered to our god Bifrons!")); route2.addPoint(new RoutePoint(2, 150248, 172776, -980, 0, false, "")); // Add routes to the map routes.put("route1", route1); routes.put("route2", route2); } @Override public String onSpawn(L2Npc npc) { if (npc.getId() == WALKER_NPC_ID) { selectInitialRouteForNpc(npc); } return super.onSpawn(npc); } @Override public String onAdvEvent(String event, L2Npc npc, l2r.gameserver.model.actor.instance.L2PcInstance player) { if (event.equalsIgnoreCase("move")) { moveNpc(npc); } else if (event.equalsIgnoreCase("check_reached")) { checkIfReached(npc); } return null; } private void moveNpc(L2Npc npc) { String routeName = npcCurrentRoute.get(npc.getObjectId()); Route route = routes.get(routeName); Integer pointIndex = npcIndexes.get(npc.getObjectId()); if (route != null && pointIndex != null) { RoutePoint point = route.getPoints().get(pointIndex); if (point.isRun()) { npc.setRunning(); } else { npc.setWalking(); } if (!point.getChat().isEmpty()) { npc.broadcastPacket(new NpcSay(npc.getObjectId(), Say2.NPC_ALL, npc.getId(), point.getChat())); } npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(point.getX(), point.getY(), point.getZ())); // Log movement intention System.out.println("NPC " + npc.getObjectId() + " moving to " + point.getX() + ", " + point.getY() + ", " + point.getZ()); // Schedule a check to see if the NPC has reached its destination startQuestTimer("check_reached", 1000, npc, null); } } private void checkIfReached(L2Npc npc) { String routeName = npcCurrentRoute.get(npc.getObjectId()); Route route = routes.get(routeName); Integer pointIndex = npcIndexes.get(npc.getObjectId()); if (route != null && pointIndex != null) { RoutePoint point = route.getPoints().get(pointIndex); Location currentLocation = npc.getLocation(); Location targetLocation = new Location(point.getX(), point.getY(), point.getZ()); // Check if the NPC has reached the target location if (currentLocation.equals(targetLocation)) { // Log that the NPC has reached the target System.out.println("NPC " + npc.getObjectId() + " reached target " + targetLocation); // Schedule the next movement startQuestTimer("move", point.getDelay() * 1000, npc, null); if (!npcReverse.get(npc.getObjectId())) { pointIndex++; if (pointIndex >= route.getPoints().size()) { npcReverse.put(npc.getObjectId(), true); pointIndex = route.getPoints().size() - 1; } } else { pointIndex--; if (pointIndex < 0) { npcReverse.put(npc.getObjectId(), false); pointIndex = 0; // Choose a new route after completing the current one in both directions switchRouteForNpc(npc); return; } } npcIndexes.put(npc.getObjectId(), pointIndex); } else { // Check again after 1 second startQuestTimer("check_reached", 1000, npc, null); } } } private void selectInitialRouteForNpc(L2Npc npc) { // Randomly select either route1 or route2 String selectedRouteName = "route" + (new Random().nextInt(2) + 1); npcCurrentRoute.put(npc.getObjectId(), selectedRouteName); npcIndexes.put(npc.getObjectId(), 0); npcReverse.put(npc.getObjectId(), false); startQuestTimer("move", 5000, npc, null); // Log initial route selection System.out.println("NPC " + npc.getObjectId() + " selected initial route " + selectedRouteName); } private void switchRouteForNpc(L2Npc npc) { String currentRoute = npcCurrentRoute.get(npc.getObjectId()); String newRoute = currentRoute.equals("route1") ? "route2" : "route1"; npcCurrentRoute.put(npc.getObjectId(), newRoute); npcIndexes.put(npc.getObjectId(), 0); npcReverse.put(npc.getObjectId(), false); startQuestTimer("move", 5000, npc, null); // Log route switching System.out.println("NPC " + npc.getObjectId() + " switched to route " + newRoute); } private static class Route { private List<RoutePoint> points = new ArrayList<>(); public Route(String name) { } public void addPoint(RoutePoint point) { points.add(point); } public List<RoutePoint> getPoints() { return points; } } private static class RoutePoint { private int id; private int x, y, z, delay; private boolean run; private String chat; public RoutePoint(int id, int x, int y, int z, int delay, boolean run, String chat) { this.id = id; this.x = x; this.y = y; this.z = z; this.delay = delay; this.run = run; this.chat = chat; } public int getId() { return id; } public int getX() { return x; } public int getY() { return y; } public int getZ() { return z; } public int getDelay() { return delay; } public boolean isRun() { return run; } public String getChat() { return chat; } } } I looking for help, with this, the npc not start to move. Im trying to create, an NPC wich have multiple walk routes basic logic is  random pick a route complite the route  like Route 1 start form zero (0 -> 1 -> 2(or more) -> 1 -> 0) When the npc return to 0, the script should pic the other route and start again.  And if there is a message like point 1 here     "route1.addPoint(new RoutePoint(1, 148568, 172328, -980, 5, true, "Puff"));" The npc should display the chat message. Currently my problem is the npc not moving, but if I manage it to start moving its randomly move between the route 1 and 2 set of coordinates. Currently for me its  a nightmare. I hope anyone can help somhow.
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
    • qual e o valor pra atualizar o java da soucer ?
  • Topics

×
×
  • Create New...