-
Posts
691 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Xanderॐ
-
GR Συνελήφθησαν Ο Νίκος Μιχαλολιάκος Και Ο Ηλίας Κασιδιάρης
Xanderॐ replied to Frank's topic in Tech/World News
Τουλάχιστον έχω το θάρρος ( και το θράσος :P ) να το λέω ... δεν κρύβομαι, ούτε το παίζω ψευτοαριστερός 20χρονος που εκλογικά είναι παρθένος :P -
GR Συνελήφθησαν Ο Νίκος Μιχαλολιάκος Και Ο Ηλίας Κασιδιάρης
Xanderॐ replied to Frank's topic in Tech/World News
Εσύ νικολούδος τι ακριβώς ψηφίζεις ? ( Εγώ ήμουν με ΝΔ τις προηγούμενες εκλογές. ). -
Discussion L2Jcannabis [Question-Discussion]
Xanderॐ replied to Nosti21's topic in Server Development Discussion [L2J]
I'd definitelly "do" acis if Tryskell would give me timeline access :P -
Discussion L2Jcannabis [Question-Discussion]
Xanderॐ replied to Nosti21's topic in Server Development Discussion [L2J]
True, same way as langoliers take up all that's left to the past -
HTTP is indeed overhead. It could be done with sockets too. But it's how about time I learn something new ( hmm maybe netty too :P ). As for Inversion of control and dependency injection, I don't see why it's a big deal to do runtime injection compared to compile time. I mean yea, there's some extra resource ugage, but so minimal.
-
e-wars is what most ppl in L2 live for ;) Imagine this getting cross-server ... I don't know about you, but I really enjoy boasting about how great my clan is compared to clans from other servers. Maybe it's just me.
-
Hey, I'm not gonna share the awesome staff we have in L2JPrim, I keep them for me :P Besides that having a more "active" chat gives the feeling of a warm and active server in an l2j world of 100ppl max per server.
-
Theres a concept called server alliance. Sometimes one authority has multiple servers. Take for example rpg-club. Obviously sharing a public key with another server means you "trust" it and the contents it sends. So it usually is a server hosted by the same staff.
-
I wouldn't go as far as syncing two servers over this for multiple reasons. One , its HTTP, slower than raw sockets. Second, the reason you mentioned on objectids. Generally syncing two servers is a hell of a job. So lets stay on syncing server chats for now. Much easier to do :P
-
Hello, this is a system I created that allows multiple servers to use a global chat. In other words players from different servers can talk to each others. You can add servers to your server's allow list and broadcast/receive messages only to/from them. How to get it: Compiled version: I compiled a version using Java 7 which you can download here https://mega.co.nz/#!RRklGTDB!e-E0z2pt4FNtnjJekaeXC2DXvI80pO_YAv0kFfvrd40. Compile it from source: This is a maven project hosted on github and can work in any Java server. You will need Git to download it and Maven 2 to build it. Install git and Maven on your system (Those that are familiar with eclipse egit and m2eclipse) you could easily integrate this process to your Eclipse platform ). After installing those two utilities run the following command: 1)git clone https://github.com/Issle/crossl2jserver.git This will download the project on your computer. Enter in the project folder. You will know you are there if there's a file called pom.xml. If so run the following command: 2)mvn assembly:assembly If the command executes sucessfully in the target folder you will find a file called : crossL2JServer-0.0.1-SNAPSHOT-jar-with-dependencies.jar. This is the library file you will use in your L2JServer pack. Now download a patch that is suitable for your own project to activate the system. How to implement in your project. In your gameserver add the following code: Injector injector = Guice.createInjector(new AssemblyModule()); ServerManager manager = injector.getInstance(ServerManager.class); manager.setPrivateKeyPath("C:/myserver/private.key"); //SET YOUR PATH HREE manager.setPublicKeyPath("C:/myserver/public/key"); //SET YOUR PATH HERE manager.setServerKeylistPath("C:/myserver/keys/"); //SET YOUR PATH HERE manager.initialize(); TransportService service = injector.getInstance(TransportService.class); service.setHost("localhost"); //SET YOUR SERVER IP HERE service.setMessageHandler(new IMessageHandler(){ @Override public void handleMessage(Message m) { //TODO: Add here your code that prints the message into chat ( global / trade whatever ). }}); service.initialize(); In a chathandler of your choice ( TellAll, Trade etc ) add a variable: @Inject TransportService service; and in the code that handles the chat message (handleChat()) write service.sendMessage(new Message("", Config.SERVER_NAME, activeChar.getName(), text)); If you are not familiar with Java wait for a patch for your type of pack. I'm going to create patches when I find some volunteers that want to test with me ( since it needs more than one server on different ips ) to check good. So it goes without saying, that I need some volunteers that will add it to their testserver pack and test it together with me. Be sure you know how to add a patch and have basic understanding on how to code in java.
-
Tool Pn Gen V1.6B - Pathnode Generator
Xanderॐ replied to Akumu's topic in Server Shares & Files [L2J]
Source code ? Where is the source code ? -
[L2J]Retrolude World - Coming On Christmas Holiday
Xanderॐ replied to Xanderॐ's topic in Private Servers
When you kill someone that is red ( PK ) , you get 50% of his heroic points. .locate <playername> - Allows a player to locate another player. By performing this action, you will get a message saying the location of your target name relatively to you and his distance. A good skill to use to hunt down pks or find players that are stealthed. Plus karma won't clean with only 1 mob kill, PKs drop gear. With those four in mind, I think it takes some REAL BALLS to be PK. -
If everything goes good and according to plan, I'm planning to have a server ready by christmas. Here's in short the main features you are going to see in it. Basic features It is going to be a highrate interlude server based on L2J with an extra option to join the GVE side of the server. Cool PvP and team PvP is our main goal for this server. Farming difficulty will be medium. Not too easy, not too hard. Max enchant will be 18 and items can already drop enchanted up to +9 from monsters. Enchant chance will be 90% but scrolls will be rare to get. There won't be gear donations, but premium account services donation system. You can farm gear and money from monsters ( solo ) and raid bosses ( party ). There will be a central town and a central farming zone. Events featured We are running on Nexus Event Engine modified heavily by me ( We will purchase a license from you hnoke dont worry ). We are going to use most of the Nexus Engine events. Some of the events will be removed cause they aren't that great. Dressme Yes we have the original dressme. Only same - gear type dressme configurations. Robe on Robe, Light on Light, Sword on Sword etc. Monster items will be given out for dressme configurations from GM made events. Hero System There won't be an olympiad. Enough with the unfair feeding. Our hero system is custom and unique. More information will be placed on a port reply cause it's too big. Soon. Wild System It is for those that like the GVE aspect of the game It is for those that are bored with the casual farming zone pvp You will be able to conquer territories in the whole L2 World. You will be able to create your own Town/City/Village/Fortress as a Clan or Ally. Certain benefits will be given to those that will venture into the wild. Some items are only obtainable through the Wild ( GVE ) system. For more information see a post reply that will follow soon Misc Info We are using a pack that combines features from my private source colleciton, L2jPrim and aCis My personal previous projects have been L2Relapse and L2Retro Most features have been coded but since I want things to actually work without bugs, ETA is christmas holidays. -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Hero system - DETAILED The ancient heroes of Lineage 2, Barz, Lionna and Erica decided to give all the brave fighters a chance to become heroes, just like them. Regularly they bestow Heroic Points in the game. Players strive to get those Heroic Points to become Heroes. How does it work ? Every heroic period lasts two weeks. During that period, players accumulate Heroic Points. At any point in time, the person that has the most heroic points in his class, becomes the hero. When the heroic period ends, all the heroic points get a reset to zero. Your heroic points are visible in your title, as a number. How do heroic points enter the game ? Bartz,Lionna and Erica enchant our world with heroic points in different occasions. Bartz gives 30000 points to any clan that wins a castle siege. Lionna gives 60 heroic points to anyone that wins a game event ( TvT, DM, etc ). Lionna gives 60 heroic points randomly without warning to people that are randomly online every couple of hours. Erica gives 200 heroic points to anyone that is online during the start of the heroic period. How do heroic points change hands ? When you kill someone in pvp, you get 5% of his heroic points. When you kill someone and get a PK point, you get 10% of his heroic points. When you kill someone that is red ( PK ) , you get 50% of his heroic points. If you are in a party, the heroic points you take from others, get divided equally among party members. How do heroic points leave the game ? Any player that has heroic points, can spend them in heroic actions. Each heroic action consumes part of your heroic points. You can still do heroic actions if you run out of heroic points. If your points reach at zero, they simply won't go lower when you perform heroic actions. ! What are the heroic actions ? Heroic actions are voiced commands a player can use to perform special abilities. Those are the following. .stealth - Allows a player to become invisible. If you move, or perform actions you lose the invisibility. A good skill to prepare ambushes or set traps for outlaws and PKs. Consumes 1% of your hero points. .locate <playername> - Allows a player to locate another player. By performing this action, you will get a message saying the location of your target name relatively to you and his distance. A good skill to use to hunt down pks or find players that are stealthed. .partyRecall - Allows a player to recall his party to his location. Good skill to use when doing fast paced team pvp. Consumes 1% heroic points. .clanRecall - Allows a player to recall his clan to his location. Good skill to use when doing fast paced clan pvp. It can be performed only by clan leaders. Consumes 2% heroic points. .allyRecall - Allows a player to recall his ally to his location. Good skill to use during sieges to organize your alliance. It can be performed only by clan leaders belonging to the alliance. Consumes 3% heroic points. What are some advance tactics to get lots of heroic points ? In the most basic forms, stay online for long, or leave your character online too and participate in events/sieges. That way you will gain hero points from Bartz, Erica and Lionna. If you want to take heroic points from other people you will have to engage in combat. A good tactic would be to go pvp with a team or a healer cause dying means others will get your hero points. One other good option is to stay stealthed and wait for the appropriate moment to engage in pvp and get the upper hand. Finally for those that want to go to the extreme, you can participate in PK sprees and get massive heroic points from the people that you kill. You have to remember thouh, that as a PK , you will lose half of your heroic points if players kill you. When you PK and atract heat on you players will try to .locate you and come get your heroic points, so use the PK method with precaution. Wild System - DETAILED People that like the faction type of servers like GVE and KvN can form factions and conquere the rest of the map not used for farming/town. By planting your own Headquarters you can conquer land and expand your kingdom. Expanding your kingdom and conquering other kingdoms grants you benefits and special rewards. What are the Wild areas ? Wild areas are considered everything that is not a Lineage 2 Castle/Fortress/City/Farming zone. Pretty much 99% of the map is unused in all highrate servers and in our case it is considered wild area ? What dangers are there in the Wild area ? Inside the wild areas, all monsters, wolves, orcs, skeletons, etc are level 80 and qute strong. It takes about 2-3 strong people to take one out. The wild areas are pvp zones. People can kill you without getting karma. How do I create and join a faction ? You create a faction by creating a clan. Each clan is considered a different faction. You can join a faction by joining a clan. Clans that belong in the same alliance are considered allied factions and can walk into each others territory. How do I create a Fortress ? You can create your own headquarters ( Fortress, City , Village, Town ) inside the wild areas from the .fortress panel. Only the clan leader can create a fortress. You can place your fortress anywhere inside the wild areas. Pick a place that can be defended easily. Does it cost to create a Fortress ? Yes. Like the Clan Halls, a fortress needs constant funds of your custom coin. If a fortress does not have enough funds it will disband. The weekly cost of a fortress is determined by its size and the number of guards you have placed in it to protect it. Protect it ? Each fortress comes with a default Token NPC. The Token NPC is the heart of your Fortress. If it's killed you lose 50% of the fortress funds. It respawns 24 hours later to prevent spawn killing abuse from players. How to protect it ? You can create guards inside your fortress. Those gaurds are very strong and come in a variety of classes ( archers, fighters etc ). Guards are aggresive to clans that do not belong in your ally and to any clan-less person. Anyone that gets close will not reach your Token without a tough fight. You can also conquer territory around your fortress but for that see later on the guide. What other npcs can I place in my fortress ? Classmaster, grand master, buffer, gatekeeper,gmshop. Can I teleport to my fortress ? Absolutelly yes. How to conquer territory ? Initially territory is occupied by clanless Monsters that are aggresive towards everyone. When you kill a monster, it becomes an ally to your clan. This means that it will not attack you ( unless attacked ) and it will attack any clanless or enemy clan person. Conquering territory around your fortress is a good way of protecting it. What happens if my fortress runs out of funds ? Your fortress is disbanded and all territory you conquered returns to neutral. Do I get any benefit from joining the Wild Areas ? Yes, those benefits will be decided though later in the development progress.
-
Guide Proper Java Programming Tips - Wizards Of The Code
Xanderॐ replied to Xanderॐ's topic in Server Development Discussion [L2J]
Tip #3: Writting testable code, means avoiding static calls, singletons and the new operator inside method calls. Difficulty : Medium ------------------------------------------------------------------------------------------------------------ Bad Example: public boolean myMethod() { // Injecting MyTestObject here for testing needs code editing. Factory is prefered. MyObjectInterface object = new MyObject(); //Database can't be replaced with dummy database for testing. Also this code violates the Law of Demeter DatabaseManager.getInstance().persist(object); //Static call can't be replaced with dummy for testing; return Geodata.evaluate(object); } Good example: private MyObjectFactoryInterface factory; private DatabaseServiceInterface databaseService; private GeodataInterface geodata; public boolean myMethod() { //The factory implementation can define what type of object is returned. Production or testing object etc. MyObjectInterface object = factory.getNewObject(); //Database service can now be either production object or just a dummy in-ram container. databaseService.persist(object); //Geodata can now be an empty object that implements the corresponding interface. return geodata.evaluate(object); } ------------------------------------------------------------------------------------------------------------ -
Guide Proper Java Programming Tips - Wizards Of The Code
Xanderॐ replied to Xanderॐ's topic in Server Development Discussion [L2J]
Bump second tip added. -
Guide Proper Java Programming Tips - Wizards Of The Code
Xanderॐ replied to Xanderॐ's topic in Server Development Discussion [L2J]
True I can update the first post and just bump for reminder. @TheOldOne What's different between _dimensionalRift and dimenisonalRift ? If you need to have two variable with different meaning you can name them different. Cause when someone else reads your code, he can't know what you mean with _. If for example you wanted one rift to be temporary you could write tempDimensionalRift. That makes more sense to others reading your code cause temp is a widelly accepted term for something that is temporary than "_" is. Generally this is called variable encoding. People in the past were using different types of encoding ( postfix, prefix, Hungarian Notation ) because the compilers of the older languages could not do type checking. So they had for example to write m_dimensionalRift, username_String to remind themselves that this is a member of a class etc. But nowadays compilers do type checking so this _ thing is just an artifact of the past. The reason most people are using it, is because they saw it in some code written by oldschool people who are used to write code the old way. We don't live in the 1990's anymore. -
Guide Proper Java Programming Tips - Wizards Of The Code
Xanderॐ replied to Xanderॐ's topic in Server Development Discussion [L2J]
Edit: Will put all tips in the first post. -
Hello, I had a talk with Elfocrash over in Skype some hours ago regarding good programming practices in java. This brought up a book I had read a year ago regarding that subject. It's called Clean Code, - A Handbook of Agile Software Craftsmansmith written by Robert C. Martin and I believe it's one of the most amazing books I've read so far. Since not everyone has the patience and free time to read 300 pages I feel the obligation to sum the key points of it up and post them in the form of tips in here for those that want to do an extra step to better coding. I'll post very small , summarized portions of the book the same order as they are written in there starting from very simple things like naming and ending up to complex things like concurrency. Based on my mood i'll post from one to five/six tips per day each on a different post. None of them will be huge, it will only take about a minute to read them or even less. Tip #1: Use Intention revealing names. Your variables, constances, methods, should reveal decent information about their role in the code. Difficulty : Very easy ------------------------------------------------------------------------------------------------------------ Bad example: int i =7; //This is the days in a week Good example: int daysInWeek = 7; There's no need for comenting when you can place this info in the variable while maintaining its size relatively small. ------------------------------------------------------------------------------------------------------------ Bad example: private DimensionalRift _dr; //The Dimensional Rift Good example; private DimensionalRift dimensionalRift; It's not clear what _dr is when you read it later in the code. And the underscore _ is not even needed, it provides no information. ------------------------------------------------------------------------------------------------------------ Tip #2: The Law of Demeter: A method f of a class C should only call methods that fullfill one of the following conditions: 1)Belong in C 2)Are methods of argument objects of f 3)Are methods of objects created by f 4)Are methods of objects referenced by C Difficulty : Medium ------------------------------------------------------------------------------------------------------------ Bad example: public void calculateEarnings() { resultObject = EarningsManager.getInstance().calculate(); //Bad practice EarningsManager does not fullfill any of the conditions. String result = resultObject.getResult().getOutcome().getStringValue(); //Trainwrech, resultObject calls nested methods that belong to other objects. } Good example: public void calculateEarnings(EarningsManager manager) { result = manager.calculate(); handleResult(result); } public void calculateEarnings() { result = manager.calculate(); //Now manager is a referenced instance inside our class. handleResult(result); } In this second example, we pass the manager as argument or reference it inside C class for the method to use it. http://en.wikipedia.org/wiki/Law_of_Demeter ------------------------------------------------------------------------------------------------------------
-
Ten signs you are a terrible L2J Developer
Xanderॐ replied to Xanderॐ's topic in General Discussion [English]
Well it's not a guide, since it doesn't teach anything. Just makes some remarks on bad practices. Point 5th is the most annoying though. I've seen people "refractoring mmocore" and all they do is remove the l2jdevs names from Author and putting theirs there. -
1)You write code but the last time you launched your gameserver was months ago. Don't bring up the excuse, I write JUnit tests, cause you don't. 2)Your variables look like they are immigrants from all over the programming world ( players_ , _players , __players__, Players, PLAYERS_ ). 3)Your classes look as if they are also immigrants from all over the programming world ( myclassmightbeanobject, myclass_mightbeanobject ). 4)Each time you need to hook the core events, you place a shitty line of code in L2PcInstance that looks like if(Config.MYFEATURE) MyFeature.blabla(); 5)You spend more time signing your pack with your name, than you spend coding. Nobody cares if your name shows up when they launch your pack's gameserver. And that's mainly it's not your pack, but a combined effort by hundreds of developers over the years, a group that you are a small part of it. 6)It's 2013 and you still manage your dependencies and your assembly with ant. 7)Everything in your pack follows the Singleton antipattern or the static method access. 8)You spend more time benchmarking Javolution than using it to write code. 9)Your Singleton constructor, depends on static fields, that depend on your constructor ... 10)You will read this post, disagree and still think you are right.
-
Nice one. http://erdani.com/index.php/books/modern-c-design/ <-- This is for those that wanna be wizards of the code. Add this to your advanced section ;) And the Boost library if you haven't already.
-
spam error causing lag
Xanderॐ replied to InTheEndॐ's question in Request Server Development Help [L2J]
Alright, could you post the L2GameClient.java code ? and the Log.java too ? -
spam error causing lag
Xanderॐ replied to InTheEndॐ's question in Request Server Development Help [L2J]
InTheEnd, clearly the first thing you have to do is post info. Couple of minutes ago, I didn't even know you had DDoS Protection ... We can't magically guess what's causing that issue. Read the exception stack and post the code that participates in that stack call and we could examine it. -
spam error causing lag
Xanderॐ replied to InTheEndॐ's question in Request Server Development Help [L2J]
Could you please tell us some things about your server machine ? What OS ? How many files in the log directory ? How uch free space in your disk ? Is your disk defragged ? How big is the log file ? It's obviously a file system problem on your OS. Nothing related to protection or mmocore. For some reason java can't get the rights to perform a write operation using the OS file system. -
Code Dressme Command + Vch In Bypass
Xanderॐ replied to Erlandys's topic in Server Shares & Files [L2J]
Exactly. When you guys try to rip someone else's share, at least make it better than the older version. I've seen like ... 3 dressme implementations so far and they are all cheap rip-offs. Spend some time add the proper ruling, restrictions and accessability. Instead of all these else if else if to check the weapon, make a NxN boolean table that evaluates restrictions. ( true/false ). And if you ask me, you dont really need to add three different commands. It's already confusing for most players with one command. Making three different dressing options, makes it overly complex. Example: public static void callRules() { //Example: a Virtual sword can mount an Equipped blunt. weaponMapping[L2WeaponType.SWORD.ordinal()][L2WeaponType.BLUNT.ordinal()] = true; //Example: a Virtual blunt can mount an Equipped sword. weaponMapping[L2WeaponType.BLUNT.ordinal()][L2WeaponType.SWORD.ordinal()] = true; weaponMapping[L2WeaponType.BIGSWORD.ordinal()][L2WeaponType.BIGBLUNT.ordinal()] = true; weaponMapping[L2WeaponType.BIGBLUNT.ordinal()][L2WeaponType.BIGSWORD.ordinal()] = true; //armorMapping[L2ArmorType.SIGIL.ordinal()][L2ArmorType.SHIELD.ordinal()] = true; //armorMapping[L2ArmorType.SHIELD.ordinal()][L2ArmorType.SIGIL.ordinal()] = true; //armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.LIGHT.ordinal()] = true; //armorMapping[L2ArmorType.HEAVY.ordinal()][L2ArmorType.MAGIC.ordinal()] = true; //armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.HEAVY.ordinal()] = true; //armorMapping[L2ArmorType.LIGHT.ordinal()][L2ArmorType.MAGIC.ordinal()] = true; //armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.LIGHT.ordinal()] = true; //armorMapping[L2ArmorType.MAGIC.ordinal()][L2ArmorType.HEAVY.ordinal()] = true; } /** * Checks if the weapon is the same type. If that is true then return * the matching virtual id. Else check the mapping tables if any * rule states that the two different weapon types should be matched. * @param virtual * @param equiped * @param matchId * @param noMatchId * @return */ public static int weaponMatching(L2WeaponType virtual, L2WeaponType equiped, int matchId, int noMatchId) { if(virtual.ordinal() == equiped.ordinal()) return matchId; if(weaponMapping[virtual.ordinal()][equiped.ordinal()] == true) { return matchId; } return noMatchId; } /** * Checks if the armor is the same type. If that is true then return * the matching virtual id. Else check the mapping tables if any * rule states that the two different armor types should be matched. * @param virtual * @param equiped * @param matchId * @param noMatchId * @return */ public static int armorMatching(L2ArmorType virtual, L2ArmorType equiped, int matchId , int noMatchId) { if(virtual.ordinal() == equiped.ordinal()) return matchId; if(armorMapping[virtual.ordinal()][equiped.ordinal()] == true) return matchId; return noMatchId; }