Jump to content

LordPanic

Members
  • Posts

    638
  • Joined

  • Last visited

  • Days Won

    19
  • Feedback

    100%

Everything posted by LordPanic

  1. Hey guys i was fooling arround with this one and decided to share it with you , i didnt test it on live server. It might have some issues feel free to point them out so i can fix them. It shows the 5 latest news posts, on every restart it clears the oldests and it keeps the 5 recent. Requirements : Your own .menu + custom menu command handlers <-- i made a share for that. If you don't have custom menu command handlers you can either trigger it with another custom command handler like .news or use the on enter server show news html that is included on acis (i dont know about other projects). credits : me AdminNews.java package net.sf.l2j.gameserver.handler.admincommandhandlers; import net.sf.l2j.gameserver.custom.usermenu.menuhandlers.NewsHandler; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.Player; /** * @author LordPanic * */ public class AdminNews implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_news" }; @Override public boolean useAdminCommand(String command, Player activeChar) { if (command.equals("admin_news")) { NewsHandler.adminNewsWindow(activeChar); } return false; } @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } AdminCommandHandler.java +registerAdminCommandHandler(new AdminNews()); NewsHandler.java package net.sf.l2j.gameserver.custom.usermenu.menuhandlers; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.StringTokenizer; import java.util.logging.Logger; import net.sf.l2j.L2DatabaseFactory; import net.sf.l2j.gameserver.model.WorldObject; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.network.clientpackets.Say2; import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.util.Broadcast; /** * @author LordPanic * */ public class NewsHandler { private final List<NewsInfo> _list = new ArrayList<>(); String clcDB = "DELETE FROM news_server WHERE char_id NOT IN ( SELECT char_id FROM ( SELECT char_id FROM news_server ORDER BY char_id DESC LIMIT 5 ) foo )"; String loadDt = "SELECT charname,content,content_date,categ FROM news_server ORDER BY content_date DESC LIMIT 5"; static String insertDt = "INSERT INTO news_server (charname,content,content_date,categ) VALUES (?,?,?,?)"; private static final Logger _log = Logger.getLogger(WorldObject.class.getName()); public static NewsHandler getInstance() { return SingletonHolder._instance; } public class NewsInfo{ public String name; public String content; public Long date; public String category; } public void parseCmd(String command, Player activeChar) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); if(activeChar.isGM()) activeChar.sendMessage("[CMD]: "+command); if(actualCommand.startsWith("_menuNewsPage")) { showNews(activeChar); }else if(actualCommand.startsWith("_menuNewsPost")) { String cntpost = ""; String nameOFchar = activeChar.getName(); Long currentTime = Calendar.getInstance().getTimeInMillis(); String catgPost = ""; if (st.hasMoreTokens()) catgPost = st.nextToken(); int cmdPst = actualCommand.length(); int lnPst = catgPost.length(); int ttlSb = cmdPst + lnPst; cntpost = command.substring(ttlSb); adminWriteToDB(nameOFchar,cntpost.substring(2),currentTime,catgPost); Broadcast.toAllOnlinePlayers(new CreatureSay(0, Say2.CRITICAL_ANNOUNCE, "", "["+nameOFchar+"] made a new post. Check your .menu -> News")); _list.clear(); reloadData(); } } public void reloadData() { try (Connection con = L2DatabaseFactory.getInstance().getConnection();Statement statement = con.createStatement(); ResultSet rset = statement.executeQuery(loadDt);) { while (rset.next()) { NewsInfo nf = new NewsInfo(); nf.name = rset.getString("charname"); nf.content = rset.getString("content"); nf.date = rset.getLong("content_date"); nf.category = rset.getString("categ"); _list.add(nf); } _log.info("NewsHandler: Loaded : ["+_list.size()+"] posts"); } catch (SQLException e) { _log.info("NewsHandler: Couldn't load NewsList."); } } public void cleanNewsdb() { try (Connection con = L2DatabaseFactory.getInstance().getConnection();Statement statement = con.createStatement();) { statement.execute(clcDB); _log.info("NewsHandler: Older posts got deleted."); }catch (SQLException e) { _log.info("NewsHandler: Error while deleting excess data."); } } public void showNews(Player player) { final StringBuilder sb = new StringBuilder(); for(NewsInfo tempInfo : _list) { if(tempInfo == null) break; String cnvHolder = ctgConv(tempInfo.name,tempInfo.date,tempInfo.category); sb.append(cnvHolder); sb.append("<img src=L2UI.SquareGray width=260 height=1>"); sb.append("<table width=260 bgcolor=\"000000\">"); sb.append("<tr><td><font color=b09979>"+tempInfo.content.replaceAll("\\s+"," ")+"</font></td></tr>"); sb.append("</table>"); sb.append("<img src=L2UI.SquareGray width=260 height=1><br>"); } NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html/mods/user/news_menu.htm"); html.replace("%newslist%", sb.toString()); player.sendPacket(html); } public static void adminNewsWindow(Player player) { final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile("data/html/mods/user/adminnews_menu.htm"); player.sendPacket(html); } private static void adminWriteToDB(String charName,String cont,long dateposted,String catg) { try (Connection con = L2DatabaseFactory.getInstance().getConnection();PreparedStatement statement = con.prepareStatement(insertDt);) { statement.setString(1, charName); statement.setString(2, cont); statement.setLong(3, dateposted); statement.setString(4, catg); statement.execute(); } catch (SQLException e) { _log.info("NewsHandler: couldn't insert data to DB."); } } private static String ctgConv(String nm,long dt,String ctgr) { String otpVl = ""; switch(ctgr) { case "Important": otpVl = "<br><font color=F33B3B>"+ctgr+"</font>&nbsp;&nbsp;&nbsp;"+"<font color=b09979>By</font>&nbsp;&nbsp;<font color=F2F5A9>"+nm+"</font>&nbsp;&nbsp;&nbsp;&nbsp;"+"<font color=AB40A0>"+new SimpleDateFormat("dd MMMM HH:mm").format(dt)+"</font><br1>"; return otpVl; case "Patch": otpVl = "<br><font color=6CDA4B>"+ctgr+"</font>&nbsp;&nbsp;&nbsp;"+"<font color=b09979>By</font>&nbsp;&nbsp;<font color=F2F5A9>"+nm+"</font>&nbsp;&nbsp;&nbsp;&nbsp;"+"<font color=AB40A0>"+new SimpleDateFormat("dd MMMM HH:mm").format(dt)+"</font><br1>"; return otpVl; case "Event": otpVl = "<br><font color=26BEF5>"+ctgr+"</font>&nbsp;&nbsp;&nbsp;"+"<font color=b09979>By</font>&nbsp;&nbsp;<font color=F2F5A9>"+nm+"</font>&nbsp;&nbsp;&nbsp;&nbsp;"+"<font color=AB40A0>"+new SimpleDateFormat("dd MMMM HH:mm").format(dt)+"</font><br1>"; return otpVl; } return ""; } private static class SingletonHolder { protected static final NewsHandler _instance = new NewsHandler(); } } GameServer.java StringUtil.printSection("News"); NewsHandler.getInstance().cleanNewsdb(); NewsHandler.getInstance().reloadData(); Html loc -> \gameserver\data\html\mods\user adminnews_menu.htm <html><title>Admin - News</title><body><center> <center> <table width=260> <tr> <td><button value="Main" action="bypass -h admin_admin" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="Game" action="bypass -h admin_admin2" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="Effects" action="bypass -h admin_admin3" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="Server" action="bypass -h admin_admin4" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> </tr> </table> <br> <img src=L2UI.SquareGray width=260 height=1> <br><img src="L2UI_CH3.herotower_deco" width=256 height=32><br> <img src=L2UI.SquareGray width=260 height=1> <br>New post:<combobox width=120 height=10 var="cat" list=Important;Patch;Event; <table width=240> <tr><td align=center FIXWIDTH=666><MultiEdit var ="cntpost" width=256 height=100></td></tr> <tr><td align=center><button value="confirm" action="bypass -h _menuNewsPost $cat $cntpost" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td></tr> </table> <br> </center></body></html> news_menu.html <html><title>User Menu - News</title><body><center> <center> <table width=260> <tr> <td><button value="Home" action="bypass -h _menuHomePage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="Premium" action="bypass -h _menuVipPage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="Buffs" action="bypass -h _menuBuffsPage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> <td><button value="News" action="bypass -h _menuNewsPage" width=65 height=19 back="L2UI_ch3.smallbutton2_over" fore="L2UI_ch3.smallbutton2"></td> </tr> </table> <br> <img src=L2UI.SquareGray width=260 height=1> <br><img src="L2UI_CH3.herotower_deco" width=256 height=32><br> <img src=L2UI.SquareGray width=260 height=1> <table width=260 height=27 bgcolor="000000"> <tr> <td align=center width=260><font color=b09979>Latest News</font></td> </tr> </table> <img src=L2UI.SquareGray width=260 height=1> <br><br> </center> %newslist% </body></html> html loc -> \gameserver\data\html\admin main_menu.html <td><button value="Get Buffs" action="bypass -h admin_getbuffs $menu_command" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td> +<td><button value="News" action="bypass -h admin_news" width=55 height=15 back="sek.cbui94" fore="sek.cbui92"></td> adminCommands.xml +<aCar name="admin_news" accessLevel="7"/> SQL CREATE TABLE IF NOT EXISTS `news_server` ( `char_id` int(11) NOT NULL AUTO_INCREMENT, `charname` varchar(20) DEFAULT NULL, `content` text DEFAULT NULL, `content_date` bigint(20) DEFAULT NULL, `categ` varchar(50) DEFAULT NULL, PRIMARY KEY (`char_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; y i know, char_id doesnt make sense post_id would be the ideal name. Too lazy to change it.
  2. public void removePartyMember(final L2PcInstance player) { removePartyMember(player, true); if (player.isInsideZone(L2Character.ZONE_PARTYZONE) && player.isInParty) { if(player.getPartyMembers() < 5){ player.sendMessage("Come back when you have the proper party numbers."); player.teleToLocation(MapRegionTable.TeleportWhereType.Town); return; } }else if(player.isInsideZone(L2Character.ZONE_PARTYZONE) && !player.isInParty){ player.sendMessage("You can't stay inside party zone without party!"); player.teleToLocation(MapRegionTable.TeleportWhereType.Town); return; } } Αντε σου εγραψα την λυση ή τουλαχιστον την λογικη :D
  3. Αν δουλευει για την περιπτωση που ο παιχτης δεν εχει party τοτε δοκιμασε να κανεις disband το party πρωτα στα party που ειναι < 5 και μετα να κανει τα teleport. public void removePartyMember(final L2PcInstance player) { if (player.isInsideZone(L2Character.ZONE_PARTYZONE) && player.getPartyMembers() < 5) { removePartyMember(player, true); player.sendMessage("You can't stay inside party zone without party!"); player.teleToLocation(MapRegionTable.TeleportWhereType.Town); return; } } και σουλουπωσε λιγο τον κωδικα.
  4. Το θεμα που εχεις ειναι client side , εισαι σιγουρος οτι περασες ολα τα αρχεια σωστα ? Στην περιπτωση που τα περασες "σωστα" δοκιμασε να ξανα κανεις install και απλα περνα μονο το l2.ini αρχειο απο το patch του server. Για να παρεις το l2.ini αρχειο απο το patch του server που παιζεις απλα κανε extract τα αρχεια του server καπου μπες στο system φακελο, ψαξε το l2.ini (ειναι μεσα στο system) και πετα το μεσα στο καθαρο system του client που παιζεις. Αν δεις οτι δουλευει με καθαρο client (μονο l2.ini του server) ξεκινα να πετας τα υπολοιπα αρχεια του patch Animations,textures κτλπ.
  5. @Hann1bal Μαλλον εκανες λαθος στο βημα compile and configuration , Σιγουρεψου οτι εκανες και τα 2 build.xml (gameserver,loginserver) run as ant build 1. Αλλιως δες αν εχεις μια πιο παλια εκδοση Java δεν ξερω ποια εκδοση ανεβασε ο δημιουργος του topic. Για να δεις την εκδοση java start menu --> java ---> about java. Αν θυμαμαι καλα μετα το rev 382 καλο θα ηταν να εχεις jdk 11.
  6. For acis 372 rev. Core Datapack It's not too shabby but whatever it's free share right ? :)
  7. When you see red X on ur package it means some files inside this package have errrors. Since this file (PlayerBuffer) is inside instance package it will have red X and obviously the file itself will have the red X on it. So you have 2 options either rework it or find new one (as root pointed out). Since you didnt know about this things i strongly advice you to start checking some guides etc... If you wish i can share with you my rework of this but it's for 372 rev.
  8. Im sure you got a client error request on ur gameserver console :D You have to add the code on core side aswell : https://pastebin.com/n8jaVzuJ
  9. It's like you are a SS nazi member but you are surrounded by black people. Guess what? You will never reveal your identity simply because you will be "killed" by them. Same applies for this example. So i doubt that any admin with common sense will ever give a feedback. Revealing who is using it on "public".
  10. Testers Many Servers beside the bot issues they also have one more thing in common . Almost all use the same formula for balance scaling system leading to two playable end game class's (Archers + Mages). Making the gameplay monotone and not fun for players who seek to play other class's too. What we offer: Individual in game checks of all class's, testing the skills,stats and their actual pvp action. After finishing with this process we give in-depth explanation with things that interfere with the balance and how to fix them. Price: Tester - Packet 20€ GM - Bot Hunter Botting is common issue nowdays, many servers suffer because of that and overall it's bad experience. Especially for players who doesnt use cheats giving the unfair taste in their mouth. Sellers who offer build in anti-bot protection claim that their product is the "solution" for this issue but the problem is still there and rolling. So the most effective way is to provide active protection by a human being instead of some codes making checks here and there. What we offer We take our job seriously since someone is willing to pay for this service, it will be rude (if not trashy) to give something bad in return. So our goal is to give the owner alongside the players in community a good quality - bot-free experience. Documenting all the actions made by the GM - Bot Hunter and giving the history of actions to the owner so he knows what is going on. As for permissions Jail command is enough for our job. Prices: Session: GM - Bot Hunter 8€ (per day) Full time: GM - Bot Hunter 200€ (monthly) Discord: Onizuka#8568 for more infos Site: L2 Police
  11. You really didnt change the passwords what the...? 1) Change database password 2)change ur hosting password
  12. Their new ideas like mastery skill trees, custom quests , or what ever sucks big time too. People who play l2 doesnt even care about such things Lineage 2 had the worst quests from almost all mmorpg games out there. Still people who played this game wasnt because of the "good" (kappa) quest lines. But because of the intense massive pvp action like sieges, rb fights,mass pvp's etc and hardcore griding (before IL era)... Since this game is fight oriented you are obligated as admin to focus on balance, if ur balance sucks. You fk the purpose of the game. LMAO
  13. Many doesnt get it , game as it is might not be (completely) dead but the playable part is definetely dead for years. As already known since the beginning of l2 emulator the donation introduction was the nemesis of the game. But compared to the old days prepared CP's wasnt a thing . Game was still fresh and many didnt know much about it. So game was kinda pure to an extend, now it's tradition for admins to expect money for their server, and ask cp's to join their server for money. Even players got corrupted somehow, asking money ( this is sad). So the result of all this madness is players who look up for the quality decreased significantly most of them already retired and the few who left play occasionally. Now about the 90% of players out there are old hags who doesnt know much about the game, donating to play archer with duel might passive,active this is pretty much the majority of l2 community now and admins milking them non - stop. Anyway thats old news. Story of l2 private servers *Fact. I will tell you why admins have the 70% of the fault here.It's simple because they dont bother to ask the community for improvements. They keep abusing the same formula over and over again, introducing new interfaces even bot allow features (what?) thats it pretty much. They completely ignore the balance system, but im almost sure that they just dont know how to do it. They are that bad. Question for big name admins out there: After all this years milking donates, why u dont create a legit server with many playable class's. It's actually easy to make stop using the same god damn formula. Balance system sucks big time.
  14. Besides that , every single sever out there use the same balance scaling system. Unavoidable end game full of archers + mages. Making the game monotone, ofc it's not entirely admins fault. Since l2 players got older and sick of farming due to work or whatever . Providing them NPC Buffers , vip premium boosts , donate bling blings etc... Everything to make their experience more convinient. Even low rate servers somehow fail that, it's actually amazing. This is due to bad game knowledge. Most servers use the same features (if not identical) with some minor differences. Either you create a server with many playable class's or dont even bother to make one.Because there are already many server using the same formula over and over again so one more with the same features doesnt make any difference. There is definitely a way to achieve that and it's actually easy to make.
  15. I can create a new section with "Ask to be a reviewer" or sth similar to that. So i can create a new custom group with special perms to create topics in Review Section. You are right i might change it Thanks for ur suggestions guys , everyone is welcome to share his opinion.
  16. Never trust ppl who never made trades in the past,,always check the activity of the user. If ppl vouch for him etc.
  17. I get it people are suspicious, i dont blame them. It's hard to prove you wont be like the other. Im just a player, i try to share my knowledge for a good cause. Sharing my experiences with servers that i played-playing. Will help people to avoid bad servers etc. Providing them a clean top list that has been made by players who rly saw the raw side of each server they reviewed. But this project is huge , we have to manually check each server live. It will take time, as we get more help the lists will be filled faster.
  18. It's easy to understand if im corrupted or anything , use your common sense. I didnt make this site to be listed as the corrupted guy who made a new corrupted top list. I like it it's my new hobby, i do it because i feel doing it. My intentions are good, i dont chase the money.It aint much, but it's a honest work. Still feeling like it's all fake with future plans to get money? Feel free to believe it. I cant reply to every person who thinks im suspicious or i will be corrupted in the future. Every person who makes review topics , they get displayed on our discord server. So we can discuss it live if u feel so. I think u confused the preview section of mxc with my review section. Different words , different intentions check it. You are welcome if u want to join us. P.S I plan to add videos of each server i review , showing the features live. P.S2 I might add twitch aswell, not sure about that tho.
  19. Everyone is welcome to write their own reviews. There is a reason why i added poll to each post. If ppl disagree , they can freely share their side of the story. Never claimed that everything i say is 100% correct. But i guess its easier to complain instead of doing actually something. Made 5 reviews still only one is on a category. I dont just make reviews and instantly add them to the list.
  20. Friend of mine worked with them with some reworks on their core. And what u mean by how you know that. In this server shacram (rb close to hunter village) was bugged u could litteraly make him loose half hp from fall damage. You dont see that often in servers where rb's take dmg from fall damage.
  21. Its okay dont worry about it. Its temporary. I will keept it simple for now. I will update everything soon , i have to start from something. Give me a break.
  22. L2 Police (Beta) is up and running, join at L2 Police write your own reviews or make requests. Lets create the best top list site based on players reviews.

  23. Hello there , as i mentioned in topic Why lineage 2 is DEAD. I made up my mind to start a project which will (hopefully) help people to avoid bad servers leading all the traffic to one place and not to 1000 top list sites. If you are listed in our platform forget about the other. Discord : Click here Site : L2 Police What is the objective of this project ? To create a platform where you can find servers listed in categories depending on their quality . But compared to other top-list sites. Me and the community of this platform will ACTIVELY review and decide if this server is considered serious, fun or joke server. Writing with details the in-game features of each server giving the cons - pros. We want to lead all the traffic to a healthy filtered top list that is been made by humans spending time to review servers LIVE. And not by machine deciding if server is good only by votes. How you decide if a server is good or bad ? After playing for so many years this game like most of you, we can tell if server is good with just a glance. If servers has fast pvp, if it's p2w (aka if server is up just for money), if balance is working, if staff cares ,if it's stable, if customs interfere with the in-game balance, if files are a joke...etc you name it. After finishing inspecting the game live. We create a topic with the name of the server including all the in-game features and start analyzing the pros - cons. Each topic will include a vote poll with 3 options Serious Server, Fun Server, Joke Server. *Note: Everyone in the platform is allowed to make reviews. How this benefit admins ? If you are a honest admin or new and always wanted to create your own server but you are afraid to open it because you cant compete the marketing out there worry not. Number of players in game or marketing power doesnt affect your ranking in this platform. Since we log in to your server by ourselves we can see if you and your team look for the quality experience of the player and not for the money. If you are listed in category "Serious Server","Fun Server" you get a stamp "APPROVED by L2 Police" . How to request for a review? Simply by joining our platforms and create a topic with tittle "Request for a review" links of server, and details about your in-game features. *Note: We are not testers. I want to be part of this project how i join ? Since it's player oriented platform the more traffic it gets the better for the community. Everyone is welcome to be part of this project. Lets create the best top list out there, this will benefit all the community. New Feature Added : Services We provide from now on Testers, GM - Bot Hunters For more infos here Credits: @Trance who gave me the idea.
  24. Keeping players in healthy environment will benefit the community for sure. Honest servers will benefit from that, joke servers i dont think so. It is very hard to start reviewing every single server out there it's time consuming but im willing to start it. I wont use any shabby site or anything , a forum with server list in a seperate tab. In the future i might upgrades it but for now since budget is very tight i will keep it simple. Maybe i will ask from mxc community to give some help with the logos etc.. dunno.
×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..