Welcome to MaxCheaters.com

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads


Donator Member
  • Posts

  • Joined

  • Last visited

  • Days Won

  • Feedback


LordPanic last won the day on May 6

LordPanic had the most liked content!

1 Follower

About LordPanic

Contact Methods

  • Skype

Profile Information

  • Current Mood
  • Gender
  • Country

Recent Profile Visitors

1,662 profile views

LordPanic's Achievements


Newbie (1/14)

  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare
  • Posting Machine Rare
  • Week One Done Rare

Recent Badges



  1. Player.java , method ---> onKillUpdatePvPKarma() /* * Basic antidual box check to avoid dual box farming pvp rewards */ Boolean checkIP = getClient().getConnection().getInetAddress().getHostAddress().equals(targetPlayer.getClient().getConnection().getInetAddress().getHostAddress()); if(Config.ENABLE_PVP_FEATURES) { if (isInsideZone(ZoneId.CUSTOMPVP) && targetPlayer.isInsideZone(ZoneId.CUSTOMPVP) && !checkIP) { pvpReward(); }else return; }
  2. @haskovo go to net.sf.l2j.gameserver.model.actor.instance ---> RaidBoss.java add this block of code for (Player players : getKnownTypeInRadius(Player.class, 200)){ players.setPvpFlag(1); players.updatePvPStatus(); } in this method @Override public boolean doDie(Creature killer) { if (!super.doDie(killer)) return false; if (_maintenanceTask != null) { _maintenanceTask.cancel(false); _maintenanceTask = null; } if (killer != null) { final Player player = killer.getActingPlayer(); if (player != null) { /* Here you add the block of the code i gave you */ +for (Player players : getKnownTypeInRadius(Player.class, 200)) { + players.setPvpFlag(1); + players.updatePvPStatus(); +} If you are using older rev replace Player with L2Pcinstance
  3. @hasl I wrote this code for you it's very simple and not too shaby, it's working on 382 rev acis (you have to adapt it for ur project). inorder to deal with the issues for players who get dc or just log out while in the zone i decided to clean the whole pool of ips (line 44) im sure it's not the ideal so u can add ur own solution to that. Code is not the best but hey it's free. https://pastebin.com/YxkW2qSv
  4. It is also a requirement for my other share: Note: Inorder to get a better idea of what is happening check the above share to see how it works. credits: me. RequestBypassToServer.java else if (_command.startsWith("menu_") || _command.startsWith("_menu")) { UsermenuHandler.getInstance().handleCommands(getClient(), _command); } UsermenuHandler.java package net.sf.l2j.gameserver.custom.usermenu.managers; import net.sf.l2j.gameserver.custom.usermenu.menuhandlers.NewsHandler; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.network.L2GameClient; /** * @author LordPanic * */ public class UsermenuHandler { protected UsermenuHandler(){ } public static UsermenuHandler getInstance() { return SingletonHolder._instance; } public void handleCommands(L2GameClient client, String command) { final Player activeChar = client.getActiveChar(); if (activeChar == null) return; if(command.startsWith("_menuNewsPage") || command.startsWith("_menuNewsPost")) { NewsHandler.getInstance().parseCmd(command, activeChar); } else { activeChar.sendMessage("The command: " + command + " isn't implemented."); activeChar.sendMessage("error KAPPA"); } } private static class SingletonHolder { protected static final UsermenuHandler _instance = new UsermenuHandler(); } }
  5. Updated: Added 3 categories [Important,Patch,Event], u can add as many u want it's up to you. Char limit is 255 - (length of command + length of category). I also decided to share custom command menu handlers Queries got fixed thanks to @Nightwolf.
  6. True, menu window is small compared to community board so it's better to keep it with 255 char limit otherwise it would be too much.
  7. 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.
  8. 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
  9. Αν δουλευει για την περιπτωση που ο παιχτης δεν εχει 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; } } και σουλουπωσε λιγο τον κωδικα.
  10. Το θεμα που εχεις ειναι 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 κτλπ.
  11. @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.
  12. For acis 372 rev. Core Datapack It's not too shabby but whatever it's free share right ? :)
  13. 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.
  14. 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
  15. 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".