Jump to content

An4rchy

Legendary Member
  • Posts

    2,656
  • Credits

  • Joined

  • Last visited

  • Days Won

    26
  • Feedback

    100%

Everything posted by An4rchy

  1. https://ddos-guard.net/en Best protection out there, tested with big (and multiple) attacks on live server with more than 1000 online players. Quite expensive though.
  2. First thing I noticed, you can avoid all this: private static class TeleToBase implements Runnable { L2PcInstance _player = null; public TeleToBase(L2PcInstance player) { _player = player; } @Override public void run() { if (_player !=null) { Faction.getInstance().teleToBase(_player); _player.sendMessage("Have a nice gameplay!"); } } } using a lambda expression: ThreadPoolManager.getInstance().scheduleGeneral(() -> player.teleToLocation(x, y, z), 5000); Since you use a singleton on Faction, you should load the factions in a constructor, that's the whole point. Plus, in loadFaction() method, if (result.next()) should be while (result.next()). But you should use xml for the factions' data. + public void teleToBase(L2PcInstance player) + { + int factionId = player.getFactionId(); + + for (FactionHolder faction : factions.values()) + { + if (faction.getFactionId() == factionId) + { + Location loc = faction.getFactionLoc(); + player.teleToLocation(loc, 0); + } + } + } Can be done: + public void teleToBase(L2PcInstance player) + { + if (factions.containsKey(player.getFactionId()) + player.teleToLocation(factions.get(player.getFactionId()).getFactionLoc(), 0); + } Same thing for onPlayerEnter() and getFactionLocation() (here again you can avoid 2 methods to get the faction's location by making a getFaction() method that can be used in many instances) method. On L2FactionInstance, after calling player.setFactionId(), you should store the player in database because in some cases (critical error, dc) the faction he chose isn't going to be saved and he will have to choose again. Use player.store().
  3. In my opinion dev help/requests topics that are solved shouldnt be locked, since someone might have the same problem or something else occurs and they need further explanation. Like in stack overflow, you can reply on solved problems.
  4. So this is a copy paste of goto command without checks (?)
  5. 1) chathandlers/ChatTrade.java There will be something like that: && region == MapRegionTable.getMapRegion(player.getX(), player.getY()) Delete it. (you should delete final int region = MapRegionTable.getMapRegion(activeChar.getX(), activeChar.getY()); too since it's not used after you delete the first line) 2) I didn't understand, do you want players to change directly to the 3rd class or? 3) communitybbs/Manager/RegionBBSManager.java (note that this is aCis, i don't know what project/pack you are using) Go to method showRegion() and add below all the content = content.replace this: content = content.replace("%onlineplayers%", ""+L2World.getInstance().getPlayers().size()); Then go to your region html (should be data/html/CommunityBoard/region/castle.htm) and add where you want: Online players: %onlineplayers% Edit: I just noticed you use l2j high five, however i can't be arsed changing paths etc, figure it out it's easy.
  6. You can either create a new eclipse project and configure it yourself, or c/p manually eclipse project files from another project and change build paths, project name and refresh.
  7. Try to remove the su = null; line and check again.
  8. hack n slash as lineage 3, ncsoft kys
  9. Bad way to introduce yourself saying you are new to servers. If you want players from maxcheaters to join better say 10.000+ players expected on opening, it works.
  10. You forgot to warn that the code may cause blindness..
  11. This project is most likely the one Matim worked on like 5 years ago lol. Same description as they had plus same community board(exactly the same) and olympiad images. Edit: http://www.maxcheaters.com/topic/104524-wts-advanced-community-board-plenty-of-features-interlude-h5/ lmao
  12. Since hopzone has an API to get the total votes you should use that. I used the old way in this vote system by reading the votes from the server information page.
  13. A good choice, if you ask me. However, as i said, don't expect to like every part of the course, there will be modules you love and others you hate. Good luck :)
  14. Anywhere in this red box you have in the picture will do.
  15. Actually i think the one i shared works better since you can set everything in configs not htmls plus you get more functions like get targets appearance or single parts. Idk though gl.
  16. I am currently on the 2nd year doing Computer Science and I will give you my opinion. First of all, you should only follow programming/game engineering if you are absolutely sure you like coding and game development, because trust me, not everything works as l2j. You can become a l2j developer without even studying java, but studying on l2j code itself (see Tryskell, as he said he didn't have java knowledge when he begun and now he can code pretty much anything **in l2j**). Another thing, don't expect your university to teach you everything you need, they will give you the basics and introduce you to programming but then you have to work your way up by reading online and practising a lot. Sure, there will be guidance on how to do that because of the projects you will be doing in your degree (for example this year I have to make an android application as a team project), but if you aim specifically for something you need to study on your own. Finally, keep in mind that not everything in the course you will choose will be interesting and nice, there will be boring modules that you HAVE to attend and do coursework on them, as well as exams. I know this is quite obvious, but i'm telling you so that you can search more about each module before you choose the course, so that you don't end up enjoying only 1 or 2 out of 4 or 5 modules (happened to me last year). If I were you, I would choose Software Engineering since it's a more generic degree and you can follow many different paths from it, so even if you change your opinion about game engineering, you can find a different job. Good luck.
  17. Huh, they finally accepted vote reward systems on hopzone and made an api. I remember 1-2 years ago they tried blocking vote reward systems from reading the votes lol
  18. This is legit, I tried adrenaline on mora-network and it didnt work. When i asked the developers of adrenaline for solution they admitted it didn't work and they would only look into it if many players asked for it.
×
×
  • Create New...