Jump to content

Recommended Posts

Posted

lineage_banner.jpg

 

Lineage II is a unique and complex fantasy game. It belongs to the category of mmo (massively multiplayer online) rpg (role-playing game) and can be both enchanting and addictive. The graphics, the sceneries and the landscapes are sheer poetry and the way the game developes is thrilling and exciting. It is not easy to get bored of this game unless you really see and experience everything it has to offer. If you play it intensively (more than 5 hours daily) you might experience the feeling of conquering it after a year or more. It is interesting and challenging in its complexity, its own rules, cosmology and systems. This game consists of a tremendous amount of details, which could fill dozens of pages. I will limit myself here to the most important ones, which are essential for the game. The rest of them you are going to have to explore and discover on your own!

 

Being Born

 

In the beginning of the game you are asked to create your character. The character is very important and will define the future of your gameplay. In a sense, you virtually become your character. Generally characters can be categorized into mages (mystics) and fighters. They also belong to a certain race which gives them special appearance and abilities. Races include Kamael, Elves, Dark Elves, Orcs, Dwarfs and Humans. Note that Dwarfs have no mystic classes. After choosing your race and class, you can choose the sex of your character and name it. Think carefully before choosing a name, for it will accompany you for a very long time.

 

The Chat System

 

Once you enter the lineage world it is very important that you can communicate with other players. You can learn a lot from others or join forces to defeat a common enemy. For this purpose different channels are available.

 

[table]

          [tr]

            [td]Channel[/td]

            [td]Code[/td]

          [/tr]

          [tr]

            [td]All[/td]

          [/tr]

          [tr]

            [td]Trade[/td]

            [td]+[/td]

          [/tr]

          [tr]

            [td]Shout[/td]

            [td]![/td]

          [/tr]

          [tr]

            [td]Party[/td]

 

            [td]#[/td]

 

          [/tr]

        [tr]

            [td]Clan[/td]

            [td]@[/td]

        [/tr]

          [tr]

            [td]Ally[/td]

 

            [td]$[/td]

 

          [/tr]

          [tr]

            [td]Hero[/td]

            [td]%[/td]

          [/tr]

[/table]

 

It is easy to use the All Channel by just choosing the All Tab and typing in your message. These messages however can be seen only to players who are nearby. If you want to reach players that are in close proximity and yet not in visual range, you can use the Trade Channel. To talk in the Trade one you either choose the Trade chat tab or you type +and your message. The actual purpose of the Trade Channel is to .. trade, and that is valid especially in big towns like Giran or Aden. In different server though, people use the Shout Channel (!and your message) mostly for trades.

 

Players can "xp" (which means gather experience) together in parties. If you end up in a party you can chat to other party members by typing #and your message. If you are a member of a clan you can chat to other clan members through @and your message. Provided your clan has an alliance, chat on the alliance takes place through $and your message. Finally, heros can use the "hero voice" and be heard all over the known world. Their symbol is %. Some servers allow shouting through the usage of !.

 

 

 

It is also possible to exchange private messages with one player at a time. The code to that is "playersname and your message.

 

The XP System

 

A character is born in a starting village at level 1. Killing monsters gives drops (items or materials), adena (money) and sp/xp. XP is essential for leveling, while SP is essential for learning new skills. As a character grows in levels, its abilities and powers can be expanded by learning new skills, or simply perfectioning the skills they already know. Right now the final level is 85, though it used to be 80 and maybe it will change in future updates of the game. Remember that if a monster is more than 9 levels smaller than you, the XP aquired is far too little to be considerable. Also there are no drops from these monsters. In the official servers there is no way to tell the level of monsters. There is another way however to determine their level. Upon targeting a monster its name appears within the targeting box in a certain color above its HP line. This color denotes:

 

  • Red: The monster is at least 8 levels greater than you
  • Pink: The monster is between 6 and 7 levels greater than you
  • Yellow: The monster is between 3 and 5 levels greater than you
  • White: The monster is any level between 2 levels lesser and greater than you
  • Green: The monster is between 3 and 5 levels lesser than you
  • Blue: The monster is at least 8 levels lesser than you

 

There are two very important times at a character's life. Upon reaching lvl 20 you can start certain quests that will give you the right to change your occupation. For example if you are born as an Elf Mystic, at lvl 20 you can choose among an elven wizard or an oracle. If you choose to become a wizard, at level 40 you can change your occupation for the second time and become a spellsinger or an elemental summoner. There is a third occupational change at lvl 76, which is not so important because the character is almost complete by that time.

 

 

 

Items, armors and weapons can be categorized into different "grades". Unfortunately, a characters has to meet certain level requirements to use equipment of a certain grade. Thus, no grade can be worn regardless level. The available grades are:

 

  • no grade :: can be equiped at all levels
  • D grade:: can be equiped at level 20 or higher
  • C grade:: can be equiped at level 40 or higher
  • B grade :: can be equiped at level 52 or higher
  • A grade:: can be equiped at level 61 or higher
  • S grade:: can be equiped at level 76 or higher
  • S-80 grade:: can be equiped at level 80 or higher

 

Death and XP Loss

 

XP can not only be aquired but it can also be lost if you die. If your HP (Health Points) drop to 0 by an attack of a monster or player, you die. If you get poisoned your HP will continue to drop but cannot drop to less than 1 HP. The arcane skills also stop functioning when your HP reaches 1. A normal death costs you about 4% of a level. A death by a member of a clan with which you are at war, results in 1% xp loss. When you die you have the option of "Go To Village" which sends you to the nearest village. If your clan has a castle or a clan hall you may also choose to go to any of these places. Another alternative is to wait for someone to ressurect you. A normal ressurect (through a scroll of ressurection) can be used by any players. There are some classes though, which have ressurection as a skill and can give you back a percentage of the xp lost. For example Cardinals can give back more than 70% of the lost xp.

 

Mages vs Fighters

pvp_combat.jpg

 

Mages are also divided into attacking mages and supportive mages. Depending on your personality, likes and dislikes you choose to be a mage or a fighter. Fighters are generally more aggressive and brutal. On the other hand, mages attack without touching the target but by sending magical spells from a distance. This makes them a bit more subtle. Supportive mages do not attack. Their job is to assist other players in battle through healing them, recharging them and casting spells of protection and power on them.

 

Another big difference between mages and fighters is the equipment mastery. Mystics usually have Robe Mastery while Fighters have Light or Heavy Armor Mastery. Some classes combine more than one kind of mastery. This means that if your character is a mage, he will have to wear a Robe to play. Otherwise he is nearly useless. If you are a fighter you cannot simply wear a robe, because it looks better ;). You will have to wear the suitable armors of your mastery. If you are concerned with the image of your character, you might want to take these facts into consideration too, before choosing your character.

 

Quests

 

Quests are missions given to you by NPCs. NPCs are non-playing characters (controlled by the program) that are standing on fixed spots, usually in towns. Some quests are obligatory to progress in the game, while others are optional. Quests are fun to do, some of them are very difficult to accomplish and might have interesting rewards. XP is not one of the rewards though. Experience can be gained almost only through killing monsters. Quests are meant to disclose hints and bits of the game's history and mythology. Still, I never found that they succeeded in creating a magical mood. Sadly, some of the texts not only lack artistic inspiration but are badly written from a grammatical point of view. Fortunately the graphics make up for the quests. It is not always essential to know where you came from, when you know where you are. ;)

 

Another point that makes quests unimportant is the fact that the game has no real goal and never ends. An online game fails in trasmitting the atmosphere of having a mission because no "Game Over" can ever appear on screen. One can go on and play for ever. After becoming strong in the world of lineage it is the people that give the game a meaning. Organizing clans, attacking alliances and their castles, making wars or killing extremely powerfull monsters, commerce and craft become the goals of the game.

 

The World

 

The world of lineage II is like a big continent with a few islands around, surrounded by water. Usually neighboring areas are occupied by monsters of similar levels. The farther you go from the starting villages the stronger the monsters become. The sceneries in the starting points are friendly and the land is green and fertile. In more advanced areas the sceneries and the monsters appear hostile and barren. There are a few exceptions but this is the general tendency of the game.

 

Along the way you will find some major cities and discover the Gatekeepers that can teleport you to other areas. The basic areas of the cities are the warehouses, where you can store items in your private warehouse, grocery shops, armor and weapon shops and a temple. Greater cities offer more kinds of shops and services like blacksmiths, pet managers, guilds, accessory shops and other NPCs. The temples are important to most characters for the priests are able to teach skills. Dwarves need to visit a warehouse manager or a blacksmith for skills and other races will have to look for the suitable guild. It is a good idea to talk to every npc that comes to your way and take all available quests. This way it is easier to learn the game and you can benefit more quickly from the quests.

 

Another important part of the world are the underground catacombs and necropolises. These are part of the 7-signs Quest. Entering them is part of this quest, which is not very suitable for newbies. The monsters in there have x4 HP (4 times more life than normal monsters) and it is easy to die in there, unless you have a good party.

 

Giran is a "cosmopolitan" center and seems to be the capital of the l2 world. Most players gather there to chat, commerce or trade items. Other significant cities are Gludio (as a passage to the starting villages), Aden (which is near the Tower of Insolence and the Blazing Swamp), Goddard (as a city where advanced places pass through to reach very challenging areas).

 

When it comes to the scenery and graphics there are some places that are worth visiting. The Elven Village and the city of Heine are considered by many the most beautiful cities of lineage2. The background music heard in the Hunters Village is one of a kind and the labyrinth of the Devils Isle is a pleasant riddle for advanced players. The castle of Rune is considered the most difficult castle to siege but also the greatest in beauty and glory. Those being just a few of the many surprises hidden in these realms of fantasy.

 

 

Continue...

Posted

Clans and Alliances

clan-1.jpg

 

Every player has the right to found a Clan (clan leader) and invite others to join him. If you want to join a clan make sure that you like the way things are organised in there and that the philosophy of the people in it suit you.Unlike clan leaders, who are leaders for life (unless they decide to dissolve the clan), members can leave a clan without important consequences. Clan leaders have more responsibilities than normal players, especially if the clan is a strong one and belongs to an alliance. They have to organise sieges, discuss politics with other clan leaders and form alliances carefully. An Alliance consists of 3 or less clans and can be friendly or hostile towards other alliances. A clan starts at level 1 and as it evolves through quests and numbers or people joining, it can reach level 8. Clan skills can be aquired and give the members of a clan slight benefits. Unfortunately, most of the benefits are addressed only to the clan leader and the leaders of the orders of a clan. Still it has advantages belonging to a clan, such as the communication through the clan chat with other players, theclan halls, taking part in castle sieges and killing Raid Bosses.

In order to recognize other clan members instantly, clans above level 3 can have a crest as a symbol of their clan. The crest is visible next to each players name. Alliances also have crests which are visible next to the clan's crest.

 

The purpose of Alliances is for clans to help one another at war. Clan leaders and co-leaders are able to call for help in the ally-chat. Usually, all members obey the orders of the leaders like in a military society. This ensures that the clan functions as a team. This presumes that the members have a capable leader whom they respect and do not question his decisions. It is important not to attack or ks or pk members of the same clan and of friendly alliances. If you do that you are considered an enemy of the alliance and will be dismissed from the clan.

One of the most difficult things in Lineage II is to be a clan leader. It takes a lot of time, patience and dedication to build a strong clan. It also takes social skills to be able to keep people together and help them function as a team. Leaders have to make every member feel needed in the clan and organize xp parties or give assignments. It is really very important to avoid having small groups of people in a clan, who do things on their own and secretly. The rest of the players will feel alone, pushed aside and not necessary or unwanted in the clan. Although the leaders are the ones who finally decide, it is the member that make up a clan, and unhappy members make an unhappy and non-functional clan. Treating everyone as equals is a fundamental principle in succeeding as a clan leader. Trying to please everyone is the shortest way to failure. It might be difficult to find time to respond to the questions of the members of a big clan. Still, somehow the leader has to authorize co-leaders to perform the rest of the work. Maybe one of the most unsatisfying thing about being a leader is the lack of recognition. Because very few really know what it takes to build a clan from stratch.

A leader that dissolves a clan has a clan penalty for 15 days. A member that leaves a clan has a clan penalty for 1 day.

 

 

Raid Bosses and Special Bosses

antharas_gustin.jpg

 

Scattered through the lineage world are some very powerful monsters. They are called raid bosses and can be recognized by the color of their name which is orange. There are bosses for all levels but the most important ones are always the greater ones because they might drop valuable weapons and armors. A raid boss cannot be killed by a single player. It takes many players organized in raid parties to try to kill a boss. It is not particularly difficult to kill it, it just takes enough people and coordination. A raid party needs a "tank" to draw the boss to him, a healer to heal him, a number of mages and archers to attack the boss from a distance, while the tank runs in circles chased by the boss. It is not allowed to attack a boss that is more than 9 or less than 9 levels from you. If you do that you get petrified and immobilized for more than a minute.

Special Bosses are great monsters that cannot be killed by a dozen of people. It often takes whole clans and alliances to constantly attack it for a couple of hours until it falls. The drops of such Special Bosses are extremely many and very rare. Antharas, Baium and Valakas are few of the most known Special Bosses.

Sieges

 

 

Subclasses

subclass_npc.jpg

 

A character is able to add more than one occupations to his main one by completing 2 quests (Fate's Wisper and Mimirs Elixir). Not all classes are available for everyone, for example elves cannot take a subclass that is usually the main class of a dark elf. Note that you can have only one class active at a time and to change subclass you have to go to the main Priest in the temple of a big city. Your subclass starts at level 40 and you have to XP it again until level 75 when you can add a new subclass. Subclasses are limited to 3 and along with the main class this means you can have 4 different classes.

For Example: Main Class: Mystic Muse, Subclasses: Necromancer, Swordsinger, Bishop

 

Becoming a Noblesse

human_noblesse_001.jpg

 

Becoming a Noblesse is probably the greatest goal of the game. Once a character gets the title of Noblesse he is considered complete and powerful. There are many subsequent difficult quests that lead one to becoming a Noblesse.

 

The benefits of being a Noblesse are:

 

    * Cheaper Teleports

    * Special Teleports to places that are not accessible through normal teleports

    * The right to enter the Olympiad Games

    * Noblesse Skills

    * The ability to fight while riding a dragon (strider)

 

Being a Noblesse usually means that the character has many subclasses and has spent a considerable amount of time playing and mastering the game.

 

Olympiad and Heros

glad_hero_001.jpg

 

Noblesse characters can enter the olympiad games daily at a specific time. They can choose to fight with people of the same class or with other classes. Each win is translated into winning 1/3 of the points of the opponent while each loss means loosing 1/3 of your own points. When one registers for the Olympiad, the starting points are 18. At the end of the month the char that collected most points in each class becomes a Hero.

 

The benefits of being a Hero are:

 

    * Glory : the char shines for a month with a yellow-white glow so that everyone can see he is a hero

    * Hero Weapons which are very powerful

    * Hero Skills that can be used on players such as silence, fear, empower, ultimate defence etc

    * Clan skills available only for heros

    * Hero Voice: a hero chat channel that is displayed to all players in all l2 areas. This way heros can reach the population of a whole server with a single message. This can be useful for trades or getting important information instantly.

 

Heros are valuable in sieges and wars due to their powerful skills.

 

Font : www.lineage2.com

Credits for posting here : Me (A-Style)

 

;D Bye ;D

Posted

wow excellent guide eko. Should help alot of noobs get better at the game, its really not that hard but this should make learning lineage 2 easier then it already is.

 

Thanks again,

Th3On3

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.




  • Posts

    • [Release] Solo PvP Zone System 🔹 Compatible with: aCis 401+ 📜 Features: ✅ Automatic Exit on Restart: Players are removed from the zone if a restart occurs or logout. ✅ Custom Exit Command: Players can exit the Solo Zone with the voice command .exit. ✅ Teleport NPC Command: new bypass solopvp for gatekeeper. ✅ Random Name Generator: Generates random names. ✅ PvP Flag: The players are flagged within this zone.   xml preview & java code backup code -> https://pastebin.com/974V2p2p   SoloZone.xml <?xml version="1.0" encoding="UTF-8"?> <list> <zone shape="NPoly" minZ="-5200" maxZ="-4680"><!-- Frintezza Solo Zone --> <stat name="name" val="Solo PvP Zone" /> <stat name="locs" val="174244,-89089,-5112;174260,-86881,-5112;173184,-88090,-5112;175309,-88018,-5112;174231,-88019,-5112;175136,-88828,-5104;174962,-87025,-5104;173149,-87142,-5104;173470,-88908,-5112" /> <stat name="restrictedClasses" val="15,16,97" /> <node x="172031" y="-90127"/> <node x="176428" y="-90089"/> <node x="176428" y="-74051"/> <node x="172057" y="-74108"/> </zone> </list> SoloZone Code: diff --git a/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java b/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/taskmanager/SoloZoneTaskManager.java @@ -0,0 +1,98 @@ +package net.sf.l2j.gameserver.taskmanager; + +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.logging.Logger; + +import net.sf.l2j.commons.random.Rnd; + +import net.sf.l2j.gameserver.data.manager.ZoneManager; +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.voicecommandhandlers.VoiceExitSoloZone; +import net.sf.l2j.gameserver.model.World; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.model.zone.type.SoloZone; + + +/** + * @author MarGaZeaS + */ +public class SoloZoneTaskManager implements Runnable { + + private static final Location EXIT_LOCATION = VoiceExitSoloZone.getExitLocation(); // Λαμβάνουμε την έξοδο από το VoiceExitSoloZone + + @Override + public void run() + { + // Διασχίζουμε όλους τους παίκτες του κόσμου + for (Player player : World.getInstance().getPlayers()) + { + // Ελέγχουμε αν ο παίκτης είναι στο SoloZone + if (player.isInsideZone(ZoneId.SOLO)) + { + // Μεταφέρουμε τον παίκτη στην έξοδο + player.teleportTo(EXIT_LOCATION.getX(), EXIT_LOCATION.getY(), EXIT_LOCATION.getZ(), 0); + player.sendMessage("The server is restarting, you have been moved out of the Solo Zone."); + } + } + } + + private int _id; + + private static final Logger _log = Logger.getLogger(SoloZoneTaskManager.class.getName()); + private static final ArrayList<String> _rndNames = new ArrayList<>(); + private static final int RANDOM_NAMES = 500; + private static final String CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + private int _playersInSoloZone = 0; + + public int getPlayersInside() { + return _playersInSoloZone; + } + + public void setPlayersInside(int val) { + _playersInSoloZone = val; + } + + public SoloZoneTaskManager() { + _log.info("Solo Zone System: Loading..."); + for (int i = 0; i < RANDOM_NAMES; i++) { + String name = generateName(); + _rndNames.add(name); + _log.info("Generated name: " + name); + } + _log.info("Solo Zone System: Loaded " + _rndNames.size() + " names."); + } + + public String getAName() { + if (_rndNames.isEmpty()) { + _log.warning("SoloZoneManager: No random names available."); + return "Unknown"; + } + return _rndNames.get(Rnd.get(5, RANDOM_NAMES - 5)); + } + + private static String generateName() { + SecureRandom rnd = new SecureRandom(); + StringBuilder sb = new StringBuilder(15); + for (int i = 0; i < 15; i++) { + sb.append(CHARS.charAt(rnd.nextInt(CHARS.length()))); + } + return sb.toString(); + } + + public int getZoneId() + { + return _id; + } + + public final static SoloZone getCurrentZone() { + return ZoneManager.getInstance().getAllZones(SoloZone.class) + .stream() + .findFirst() // Επιστρέφει την πρώτη SoloZone (αν υπάρχει μόνο μία) + .orElse(null); + } + + public static SoloZoneTaskManager getInstance() { + return SingletonHolder._instance; + } + + private static class SingletonHolder { + private static final SoloZoneTaskManager _instance = new SoloZoneTaskManager(); + } +} diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java b/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java index a707ce5..d247e2e 100644 --- a/aCis_gameserver/java/net/sf/l2j/gameserver/taskmanager/PvpFlagTaskManager.java final Player player = entry.getKey(); final long timeLeft = entry.getValue(); + if(player.isInsideZone(ZoneId.SOLO)) + continue; if(player.isInsideZone(ZoneId.BOSS)) continue; // Time is running out, clear PvP flag and remove from list. if (currentTime > timeLeft) diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java index a707ce5..d247e2e 100644 +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestCharacterCreate.java if (Config.ALLOW_FISH_CHAMPIONSHIP) FishingChampionshipManager.getInstance(); + if (Config.ENABLE_STARTUP) + StartupManager.getInstance(); diff --git a/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java b/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminMaintenance.java if (!st.hasMoreTokens()) { sendHtmlForm(player); return; } try { switch (st.nextToken()) { case "shutdown": + SoloZoneTaskManager exitTask = new SoloZoneTaskManager(); + ThreadPool.schedule(exitTask, 0); Shutdown.getInstance().startShutdown(player, null, Integer.parseInt(st.nextToken()), false); break; case "restart": + exitTask = new SoloZoneTaskManager(); + ThreadPool.schedule(exitTask, 0); Shutdown.getInstance().startShutdown(player, null, Integer.parseInt(st.nextToken()), true); break; case "abort": Shutdown.getInstance().abort(player); break; diff --git a/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java b/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/voicecommandhandlers/VoiceExitSoloZone.java +package net.sf.l2j.gameserver.handler.voicecommandhandlers; + +import net.sf.l2j.commons.pool.ThreadPool; + +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.IVoiceCommandHandler; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; + +/** + * Handles the voice command for exiting the Solo Zone with delay and effects. + * + * @author MarGaZeaS + */ +public class VoiceExitSoloZone implements IVoiceCommandHandler +{ + private static final String[] VOICE_COMMANDS = + { + "exit" + }; + + // Default location to teleport players when exiting the Solo Zone + private static final Location EXIT_LOCATION = new Location(81318, 148064, -3464); // Replace with your desired coordinates + + // Προσθήκη της μεθόδου για να πάρουμε την τοποθεσία εξόδου + public static Location getExitLocation() { + return EXIT_LOCATION; + } + + @Override + public void useVoiceCommand(Player player, String command) + { + if (command.equalsIgnoreCase("exit")) + { + if (!player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You are not inside the Solo Zone."); + return; + } + + // Notify the player about the delay + player.sendMessage("You will be teleported out of the Solo Zone in 2 seconds."); + + // Cast skill effect (Skill ID: 2100, Level: 1) + player.broadcastPacket(new MagicSkillUse(player, player, 2100, 1, 2000, 0)); + + // Schedule the teleportation after a 2-second delay + ThreadPool.schedule(() -> { + // Teleport the player to the designated exit location + player.teleportTo(EXIT_LOCATION.getX(), EXIT_LOCATION.getY(), EXIT_LOCATION.getZ(), 0); + + // Inform the player + player.sendMessage("You have exited the Solo Zone."); + }, 2000); // Delay in milliseconds (2000ms = 2 seconds) + } + } + + @Override + public String[] getVoiceCommandList() + { + return VOICE_COMMANDS; + } +} diff --git a/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java b/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/handler/VoiceCommandHandler.java public class VoiceCommandHandler { private final Map<String, IVoiceCommandHandler> _entries = new HashMap<>(); protected VoiceCommandHandler() { ............ ............ + registerHandler(new VoiceExitSoloZone()); } public void registerHandler(IVoiceCommandHandler handler) { for (String command : handler.getVoiceCommandList()) _entries.put(command, handler); } diff --git a/java/net/sf/l2j/gameserver/model/actor/Npc.java b/java/net/sf/l2j/gameserver/model/actor/Npc.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/actor/Npc.java else if (command.startsWith("Chat")) { int val = 0; try { val = Integer.parseInt(command.substring(5)); } catch (final IndexOutOfBoundsException ioobe) { } catch (final NumberFormatException nfe) { } showChatWindow(player, val); + ) + else if (command.startsWith("solopvp")) + { + SoloZoneTaskManager.getInstance(); + player.teleportTo(SoloZoneTaskManager.getCurrentZone().getLoc(), 25); + } else if (command.startsWith("Link")) { final String path = command.substring(5).trim(); if (path.indexOf("..") != -1) return; final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/" + path); html.replace("%objectId%", getObjectId()); player.sendPacket(html); } diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestartPoint.java // Fixed. - else if (_requestType == 4) - { - if (!player.isGM() && !player.isFestivalParticipant()) - return; - - loc = player.getPosition(); - } + if (_requestType == 4) + { + // Έλεγχος αν ο παίκτης δεν είναι GM, δεν είναι μέρος του φεστιβάλ και δεν είναι στην Solo Zone + if (!player.isGM() && !player.isFestivalParticipant() && !player.isInsideZone(ZoneId.SOLO)) + { + return; + } + + SoloZoneTaskManager.getInstance(); + SoloZone currentZone = SoloZoneTaskManager.getCurrentZone(); + if (currentZone != null && currentZone.getLoc() != null) + { + // Αν υπάρχει ζώνη και οι τοποθεσίες δεν είναι κενές, χρησιμοποιούμε τυχαία τοποθεσία από την ζώνη + loc = currentZone.getLoc(); + } else + { + // Διαφορετικά, κάνουμε respawn στην τρέχουσα θέση του παίκτη + loc = player.getPosition(); + } + } diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java b/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java if (player.isFestivalParticipant() && FestivalOfDarknessManager.getInstance().isFestivalInitialized()) { player.sendPacket(SystemMessageId.NO_RESTART_HERE); sendPacket(RestartResponse.valueOf(false)); return; } + if (player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You cannot restart your character while in Solo Zone. Use .exit to leave"); + player.setFakeName(null); + sendPacket(RestartResponse.valueOf(false)); + return; + } player.removeFromBossZone(); diff --git a/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java b/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/Logout.java player.removeFromBossZone(); player.logout(true); } } + + if (player.isInsideZone(ZoneId.SOLO)) + { + player.sendMessage("You cannot logout or restart your character while in Solo Zone. Use .exit to leave"); + player.setFakeName(null); + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + player.removeFromBossZone(); player.logout(true); } } diff --git a/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java b/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/zone/type/SoloZone.java +package net.sf.l2j.gameserver.model.zone.type; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +import net.sf.l2j.commons.random.Rnd; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.enums.MessageType; +import net.sf.l2j.gameserver.enums.ZoneId; +import net.sf.l2j.gameserver.handler.voicecommandhandlers.VoiceExitSoloZone; +import net.sf.l2j.gameserver.model.World; +import net.sf.l2j.gameserver.model.actor.Creature; +import net.sf.l2j.gameserver.model.actor.Player; +import net.sf.l2j.gameserver.model.location.Location; +import net.sf.l2j.gameserver.model.zone.type.subtype.ZoneType; +import net.sf.l2j.gameserver.network.SystemMessageId; +import net.sf.l2j.gameserver.network.serverpackets.EtcStatusUpdate; +import net.sf.l2j.gameserver.taskmanager.PvpFlagTaskManager; +import net.sf.l2j.gameserver.taskmanager.SoloZoneTaskManager; + +/** + * @author MarGaZeaS + * + */ +public class SoloZone extends ZoneType +{ + private String _name; + private List<Location> _locations = new ArrayList<>(); + + public SoloZone(int id) + { + super(id); + } + + @Override + public void setParameter(String name, String value) + { + if (name.equals("name")) + _name = value; + else if (name.equals("locs")) + { + for (String locs : value.split(";")) + { + String[] coordinates = locs.split(","); + if (coordinates.length == 3) + { + int x = Integer.parseInt(coordinates[0]); + int y = Integer.parseInt(coordinates[1]); + int z = Integer.parseInt(coordinates[2]); + _locations.add(new Location(x, y, z)); + } + else + { + LOGGER.warn("Invalid location format: " + locs); + } + } + } + } + + + @Override + protected void onEnter(Creature character) + { + if (character instanceof Player) + { + final Player player = (Player) character; + + if ((player.getClassId().getId() == 15 || player.getClassId().getId() == 16 || player.getClassId().getId() == 97)) + { + Location respawnLocation = VoiceExitSoloZone.getExitLocation(); + player.instantTeleportTo(respawnLocation, 20); + player.sendMessage("Your class is not allowed in this zone."); + return; + } + + String randomName = SoloZoneTaskManager.getInstance().getAName(); + if (randomName == null || randomName.isEmpty() || !isValidName(randomName)) + { + randomName = generateRandomName(); + } + if (isNameAlreadyTaken(randomName)) + { + randomName = generateRandomName(); + } + player.setFakeName(randomName); + player.sendMessage("Welcome to the Solo Zone, your random name is: " + randomName); + player.sendPacket(SystemMessageId.ENTERED_COMBAT_ZONE); + character.setInsideZone(ZoneId.SOLO, true); + character.setInsideZone(ZoneId.NO_STORE, true); + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); + + if (player.getParty() != null) + { + player.getParty().removePartyMember(player, MessageType.DISCONNECTED); + } + + if (player.getPvpFlag() > 0) + PvpFlagTaskManager.getInstance().remove(player, true); + + player.updatePvPStatus(); + player.broadcastUserInfo(); + } + } + + private static boolean isValidName(String name) { + return name.matches("[a-zA-Z0-9_]+"); + } + + private static String generateRandomName() { + Random rand = new Random(); + int nameLength = rand.nextInt(12) + 4; + StringBuilder nameBuilder = new StringBuilder(); + + for (int i = 0; i < nameLength; i++) { + char randomChar = (char) (rand.nextInt(26) + 'a'); + nameBuilder.append(randomChar); + } + + return nameBuilder.toString(); + } + + private static boolean isNameAlreadyTaken(String name) { + return World.getInstance().getPlayers().stream().anyMatch(player -> player.getFakeName().equals(name)); + } + + @Override + protected void onExit(Creature character) + { + character.setInsideZone(ZoneId.SOLO, false); // Solo zone + character.setInsideZone(ZoneId.NO_STORE, false); // Allow making a store + character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); // Allow summon + + if (character instanceof Player) + { + final Player player = (Player) character; + + if (player.getFakeName() != null) + { + player.setFakeName(null); + } + + player.sendPacket(SystemMessageId.LEFT_COMBAT_ZONE); + { + if(!player.isInObserverMode() && player.getPvpFlag() > 0) + PvpFlagTaskManager.getInstance().add(player, Config.PVP_NORMAL_TIME); + + player.sendPacket(new EtcStatusUpdate(player)); + player.broadcastUserInfo(); + } + } + } + + public String getName() + { + return _name; + } + + public Location getLoc() + { + if (_locations.isEmpty()) + { + return null; // Αν η λίστα είναι κενή, επιστρέφουμε null + } + return _locations.get(Rnd.get(0, _locations.size() - 1)); // Επιλέγουμε τυχαία τοποθεσία + } +} diff --git a/java/net/sf/l2j/gameserver/GameServer.java b/java/net/sf/l2j/gameserver/GameServer.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/GameServer.java if (Config.ALLOW_FISH_CHAMPIONSHIP) FishingChampionshipManager.getInstance(); + StringUtil.printSection("Custom Features"); + SoloZoneTaskManager.getInstance(); StringUtil.printSection("Handlers"); LOGGER.info("Loaded {} admin command handlers.", AdminCommandHandler.getInstance().size()); diff --git a/java/net/sf/l2j/gameserver/GameServer.java b/java/net/sf/l2j/gameserver/Shutdown.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/Shutdown.java // disconnect players try { disconnectAllPlayers(); LOGGER.info("All players have been disconnected."); } catch (Exception e) { // Silent catch. } + // Restore real names for players in SoloZone + restoreRealNamesInSoloZone(); // stop all threadpolls ThreadPool.shutdown(); try { LoginServerThread.getInstance().interrupt(); } catch (Exception e) { // Silent catch. } // avoids new players from logging in if (_secondsShut <= 60 && LoginServerThread.getInstance().getServerType() != ServerType.DOWN) LoginServerThread.getInstance().setServerType(ServerType.DOWN); _secondsShut--; Thread.sleep(1000); } } catch (InterruptedException e) { } } + // This method restores the real names of players in SoloZone + private static void restoreRealNamesInSoloZone() + { + for (Player player : World.getInstance().getPlayers()) + { + // Check if player is inside the SoloZone + if (player.isInsideZone(ZoneId.SOLO)) + { + // Restore the real name by removing the fake name + if (player.getFakeName() != null) + { + player.setFakeName(null); // Restore the real name + LOGGER.info("Player {}'s fake name has been removed and real name restored.", player.getName()); + } + } + } + } private static void sendServerQuit(int seconds) { World.toAllOnlinePlayers(SystemMessage.getSystemMessage(SystemMessageId.THE_SERVER_WILL_BE_COMING_DOWN_IN_S1_SECONDS).addNumber(seconds)); } diff --git a/java/net/sf/l2j/gameserver/enums/ZoneId.java b/java/net/sf/l2j/gameserver/enums/ZoneId.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/enums/ZoneId.java public enum ZoneId { PVP(0), PEACE(1), SIEGE(2), MOTHER_TREE(3), CLAN_HALL(4), NO_LANDING(5), WATER(6), JAIL(7), MONSTER_TRACK(8), CASTLE(9), SWAMP(10), NO_SUMMON_FRIEND(11), NO_STORE(12), TOWN(13), HQ(14), DANGER_AREA(15), CAST_ON_ARTIFACT(16), NO_RESTART(17), SCRIPT(18), - BOSS(19), + BOSS(19), + SOLO(20); private final int _id; private ZoneId(int id) { _id = id; } diff --git a/java/net/sf/l2j/gameserver/network/serverpackets/Die.java b/java/net/sf/l2j/gameserver/network/serverpackets/Die.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/serverpackets/Die.java if (creature instanceof Player) { Player player = (Player) creature; - _allowFixedRes = player.getAccessLevel().allowFixedRes(); + _allowFixedRes = player.getAccessLevel().allowFixedRes() || player.isInsideZone(ZoneId.SOLO); _clan = player.getClan(); } diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver//model/actor/Player.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java // Attacker or spectator logging into a siege zone will be ported at town. if (player.isInsideZone(ZoneId.SIEGE) && player.getSiegeState() < 2) player.teleportTo(TeleportType.TOWN); + if (player.isInsideZone(ZoneId.SOLO)) + { + ThreadPool.schedule(() -> { + Location exitLocation = VoiceExitSoloZone.getExitLocation(); + + if (exitLocation != null) + { + player.teleportTo(exitLocation.getX(), exitLocation.getY(), exitLocation.getZ(), 0); + player.sendMessage("You have been moved to the exit of the SoloZone."); + } + }, 5000); // 5000 milliseconds (5sec) + } diff --git a/java/net/sf/l2j/gameserver/model/actor/Player.java b/java/net/sf/l2j/gameserver/model/actor/Player.java new file mode 100644 index 0000000..6b7ef6f --- /dev/null +++ a/java/net/sf/l2j/gameserver/model/actor/Player.java @Override public void doRevive() { super.doRevive(); stopEffects(EffectType.CHARM_OF_COURAGE); sendPacket(new EtcStatusUpdate(this)); getStatus().setCpHpMp(getStatus().getMaxCp(), getStatus().getMaxHp(), getStatus().getMaxMp()); _reviveRequested = 0; _revivePower = 0; if (isMounted()) startFeed(_mountNpcId); + if (isInsideZone(ZoneId.SOLO)) + { + // Give Nobless (1323 ID) + L2Skill no = SkillTable.getInstance().getInfo(1323, 1); + no.getEffects(this, this); + sendMessage("You have received the Nobless status in the Solo Zone."); + } + }   If anyone thinks the code is wrong, please make an update and upload it here so I can update the post. A part was edited with chatgpt
    • Always remember, when you buy files, just compare with my files that I publish for free. and you will know that you are being ripped off. Greetings to all community!!! 🙂
    • Thank you for sharing. You are a capable and skilled person. Thank you again for your selfless dedication, Guytis🫡
    • he kept his promise! i think it's a good idea to unban his old account. he shares files with the community and could help both new and veteran l2off users! good job, Guytis!
  • Topics

×
×
  • Create New...