Jump to content

Recommended Posts

Posted

Found and fixed the following errors:

 

The following errors are fouling up your forum:
Message #2347096 is in non-existent topic #0.
Message #2349653 is in non-existent topic #0.
Message #2354755 is in non-existent topic #0.
Message #2355422 is in non-existent topic #0.
Message #2356679 is in non-existent topic #0.
Message #2360170 is in non-existent topic #0.
Message #2360829 is in non-existent topic #0.
Message #2370864 is in non-existent topic #0.
Message #2374373 is in non-existent topic #0.
Message #2379456 is in non-existent topic #0.
Message #2379830 is in non-existent topic #0.
Message #2386431 is in non-existent topic #0.
Message #2387792 is in non-existent topic #0.
Message #2390800 is in non-existent topic #0.
Message #2391112 is in non-existent topic #0.
Message #2392142 is in non-existent topic #0.
Message #2392153 is in non-existent topic #0.
Message #2392656 is in non-existent topic #0.
Message #2397037 is in non-existent topic #0.
Message #2398515 is in non-existent topic #0.
Message #2402612 is in non-existent topic #0.
Message #2406447 is in non-existent topic #0.
Message #2410343 is in non-existent topic #0.
Message #2411175 is in non-existent topic #0.
Message #2412499 is in non-existent topic #0.
Message #2413861 is in non-existent topic #0.
Message #2413973 is in non-existent topic #0.
Message #2416130 is in non-existent topic #0.
Message #2419321 is in non-existent topic #0.
Message #2420007 is in non-existent topic #0.
Message #2439475 is in non-existent topic #0.
Message #2442707 is in non-existent topic #0.
Message #2444991 is in non-existent topic #0.
Message #2445270 is in non-existent topic #0.
Message #2445358 is in non-existent topic #0.
Message #2450161 is in non-existent topic #0.
Message #2451172 is in non-existent topic #0.
Message #2451572 is in non-existent topic #0.
Message #2451671 is in non-existent topic #0.
Message #2451726 is in non-existent topic #0.
Message #2453966 is in non-existent topic #0.
Message #2454660 is in non-existent topic #0.
Message #2455337 is in non-existent topic #0.
Message #2456977 is in non-existent topic #0.
Message #2457474 is in non-existent topic #0.
Message #2457913 is in non-existent topic #0.
Message #2457971 is in non-existent topic #0.
Message #2459439 is in non-existent topic #0.
Message #2460419 is in non-existent topic #0.
Message #2460529 is in non-existent topic #0.
Message #2461638 is in non-existent topic #0.
Message #2462496 is in non-existent topic #0.
Message #2463755 is in non-existent topic #0.
Message #2467648 is in non-existent topic #0.
Message #2468409 is in non-existent topic #0.
Message #2469588 is in non-existent topic #0.
Message #2471119 is in non-existent topic #0.
Message #2474483 is in non-existent topic #0.
Message #2477585 is in non-existent topic #0.
Message #2480066 is in non-existent topic #0.
Message #2484266 is in non-existent topic #0.
Message #2485420 is in non-existent topic #0.
Message #2486582 is in non-existent topic #0.
Message #2487008 is in non-existent topic #0.
Message #2487037 is in non-existent topic #0.
Message #2490274 is in non-existent topic #0.
Topic #253468 contains no (actual) messages.
Topic #253965 contains no (actual) messages.
Topic #254029 contains no (actual) messages.
Topic #254171 contains no (actual) messages.
Topic #254560 contains no (actual) messages.
Topic #255532 contains no (actual) messages.
Topic #255858 contains no (actual) messages.
Topic #256282 contains no (actual) messages.
Topic #256312 contains no (actual) messages.
Topic #256982 contains no (actual) messages.
Topic #257629 contains no (actual) messages.
Topic #257701 contains no (actual) messages.
Topic #257872 contains no (actual) messages.
Topic #257939 contains no (actual) messages.
Topic #258344 contains no (actual) messages.
Topic #258480 contains no (actual) messages.
Topic #258956 contains no (actual) messages.
Topic #259345 contains no (actual) messages.
Topic #259775 contains no (actual) messages.
Topic #259847 contains no (actual) messages.
Topic #260084 contains no (actual) messages.
Topic #260289 contains no (actual) messages.
Topic #260322 contains no (actual) messages.
Topic #260561 contains no (actual) messages.
Topic #260904 contains no (actual) messages.
Topic #260996 contains no (actual) messages.
Topic #262559 contains no (actual) messages.
Topic #262864 contains no (actual) messages.
Topic #263643 contains no (actual) messages.
Topic #263671 contains no (actual) messages.
Topic #263681 contains no (actual) messages.
Topic #263846 contains no (actual) messages.
Topic #263909 contains no (actual) messages.
Topic #263964 contains no (actual) messages.
Topic #264105 contains no (actual) messages.
Topic #264148 contains no (actual) messages.
Topic #264175 contains no (actual) messages.
Topic #264184 contains no (actual) messages.
Topic #264353 contains no (actual) messages.
Topic #264405 contains no (actual) messages.
Topic #264416 contains no (actual) messages.
Topic #264612 contains no (actual) messages.
Topic #264735 contains no (actual) messages.
Topic #265141 contains no (actual) messages.
Topic #265211 contains no (actual) messages.
Topic #265714 contains no (actual) messages.
Topic #266105 contains no (actual) messages.
Topic #267030 contains no (actual) messages.
Topic #267330 contains no (actual) messages.
Topic #267381 contains no (actual) messages.
Topic #267382 contains no (actual) messages.
Topic #267710 contains no (actual) messages.
Topic #246300 has the wrong number of replies, 3192.
Topic #247426 has the wrong number of replies, 2.
Topic #259088 has the wrong number of replies, 20.
Topic #263951 has the wrong number of replies, 117.
Topic #264519 has the wrong number of replies, 1.
Topic #264526 has the wrong number of replies, 3.
Topic #264781 has the wrong number of replies, 25.
Topic #265314 has the wrong number of replies, 1.
Topic #265359 has the wrong number of replies, 9.
Topic #265517 has the wrong number of replies, 7.
Topic #265831 has the wrong number of replies, 1.
Topic #265990 has the wrong number of replies, 2.
Topic #266021 has the wrong number of replies, 17.
Topic #267108 has the wrong number of replies, 25.
Topic #267579 has the wrong number of replies, 56.
Topic #267691 has the wrong number of replies, 24.
The subject of topic #219726 is currently not stored in the subject cache.
The subject of topic #237782 is currently not stored in the subject cache.
The subject of topic #241461 is currently not stored in the subject cache.
The subject of topic #252341 is currently not stored in the subject cache.
The subject of topic #253468 is currently not stored in the subject cache.
The subject of topic #253965 is currently not stored in the subject cache.
The subject of topic #254029 is currently not stored in the subject cache.
The subject of topic #254171 is currently not stored in the subject cache.
The subject of topic #254560 is currently not stored in the subject cache.
The subject of topic #254952 is currently not stored in the subject cache.
The subject of topic #255532 is currently not stored in the subject cache.
The subject of topic #255858 is currently not stored in the subject cache.
The subject of topic #255968 is currently not stored in the subject cache.
The subject of topic #256282 is currently not stored in the subject cache.
The subject of topic #256312 is currently not stored in the subject cache.
The subject of topic #256982 is currently not stored in the subject cache.
The subject of topic #257629 is currently not stored in the subject cache.
The subject of topic #257701 is currently not stored in the subject cache.
The subject of topic #257872 is currently not stored in the subject cache.
The subject of topic #257939 is currently not stored in the subject cache.
The subject of topic #258344 is currently not stored in the subject cache.
The subject of topic #258480 is currently not stored in the subject cache.
The subject of topic #258618 is currently not stored in the subject cache.
The subject of topic #258721 is currently not stored in the subject cache.
The subject of topic #258956 is currently not stored in the subject cache.
The subject of topic #259010 is currently not stored in the subject cache.
The subject of topic #259345 is currently not stored in the subject cache.
The subject of topic #259450 is currently not stored in the subject cache.
The subject of topic #259775 is currently not stored in the subject cache.
The subject of topic #259847 is currently not stored in the subject cache.
The subject of topic #260067 is currently not stored in the subject cache.
The subject of topic #260084 is currently not stored in the subject cache.
The subject of topic #260289 is currently not stored in the subject cache.
The subject of topic #260322 is currently not stored in the subject cache.
The subject of topic #260423 is currently not stored in the subject cache.
The subject of topic #260561 is currently not stored in the subject cache.
The subject of topic #260792 is currently not stored in the subject cache.
The subject of topic #260904 is currently not stored in the subject cache.
The subject of topic #260906 is currently not stored in the subject cache.
The subject of topic #260996 is currently not stored in the subject cache.
The subject of topic #261411 is currently not stored in the subject cache.
The subject of topic #261983 is currently not stored in the subject cache.
The subject of topic #262207 is currently not stored in the subject cache.
The subject of topic #262559 is currently not stored in the subject cache.
The subject of topic #262645 is currently not stored in the subject cache.
The subject of topic #262864 is currently not stored in the subject cache.
The subject of topic #262924 is currently not stored in the subject cache.
The subject of topic #263073 is currently not stored in the subject cache.
The subject of topic #263096 is currently not stored in the subject cache.
The subject of topic #263105 is currently not stored in the subject cache.
The subject of topic #263576 is currently not stored in the subject cache.
The subject of topic #263643 is currently not stored in the subject cache.
The subject of topic #263671 is currently not stored in the subject cache.
The subject of topic #263681 is currently not stored in the subject cache.
The subject of topic #263741 is currently not stored in the subject cache.
The subject of topic #263846 is currently not stored in the subject cache.
The subject of topic #263909 is currently not stored in the subject cache.
The subject of topic #263955 is currently not stored in the subject cache.
The subject of topic #263964 is currently not stored in the subject cache.
The subject of topic #264105 is currently not stored in the subject cache.
The subject of topic #264148 is currently not stored in the subject cache.
The subject of topic #264175 is currently not stored in the subject cache.
The subject of topic #264184 is currently not stored in the subject cache.
The subject of topic #264353 is currently not stored in the subject cache.
The subject of topic #264383 is currently not stored in the subject cache.
The subject of topic #264405 is currently not stored in the subject cache.
The subject of topic #264416 is currently not stored in the subject cache.
The subject of topic #264519 is currently not stored in the subject cache.
The subject of topic #264612 is currently not stored in the subject cache.
The subject of topic #264735 is currently not stored in the subject cache.
The subject of topic #264813 is currently not stored in the subject cache.
The subject of topic #264993 is currently not stored in the subject cache.
The subject of topic #265141 is currently not stored in the subject cache.
The subject of topic #265142 is currently not stored in the subject cache.
The subject of topic #265211 is currently not stored in the subject cache.
The subject of topic #265314 is currently not stored in the subject cache.
The subject of topic #265714 is currently not stored in the subject cache.
The subject of topic #265795 is currently not stored in the subject cache.
The subject of topic #265819 is currently not stored in the subject cache.
The subject of topic #265920 is currently not stored in the subject cache.
The subject of topic #266105 is currently not stored in the subject cache.
The subject of topic #267030 is currently not stored in the subject cache.
The subject of topic #267244 is currently not stored in the subject cache.
The subject of topic #267330 is currently not stored in the subject cache.
The subject of topic #267381 is currently not stored in the subject cache.
The subject of topic #267382 is currently not stored in the subject cache.
The subject of topic #267612 is currently not stored in the subject cache.
The subject of topic #267710 is currently not stored in the subject cache.

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