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

Drazeal

Members
  • Posts

    26
  • Joined

  • Last visited

  • Feedback

    0%

About Drazeal

Profile Information

  • Gender
    Male

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Drazeal's Achievements

  1. skills xml-> find skill-> edit success rate-> edit power. reduce power from skills that u dont want to generate that much hate f.e. healers if it doent work try adding code part if gettarget RB --- skills (bla bla) setsuccessrate to 100% or w/e you want. but as far as i know aggro skills are rarerly resisted on npcs/mobs/rb. it must be messed up in your pack.
  2. there is a trinity pack shared with this CB. and i wouldnt advise you to add IP on cb unless its only for admin.
  3. protected void onEnter(Creature creature) { creature.setInsideZone(ZoneId.PVP_FLAG, true); creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); if (creature instanceof PlayerInstance) { ((PlayerInstance) creature).sendMessage("You have entered a flag zone."); ((PlayerInstance) creature).leaveParty(); ((PlayerInstance) creature).setPvpFlag(1); ((PlayerInstance) creature).broadcastUserInfo(); } } @Override protected void onExit(Creature creature) { creature.setInsideZone(ZoneId.PVP_FLAG, false); creature.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); if (creature instanceof PlayerInstance) { ((PlayerInstance) creature).sendMessage("You have left a flag zone."); ((PlayerInstance) creature).setPvpFlag(0); ((PlayerInstance) creature).broadcastUserInfo(); } } this is a part from multifunction zone shared here in MxC. adapted to L2jmobius. works 100%. this part alone tho is not enough for everything to work. u need some some additions and some changes in your files. like "PVP_FLAG"(zone name for me) you need to add to zonetypes etc. after this You need to change your desired zone like PI from "town" "arena" or w/e it is to PVP_FLAG(my case) just code is not enough you can ignore ".leaveParty();" mine is a no party - no res zone. P.S. dont judge my code. i learn alone and since it works 100% of the time im ok with it. i try to improve.
  4. if that happens only while u run l2 on specific server try using clean client not just reinstalling the same thing. if that happens outside l2 as well check for hardware proplems/outdated drivers etc.
  5. just like GsL said use same skill. also u can add class restrictions/limiters/conditions inside the skills .xml so no java needed at all dont ask how just search for skills with these types of things. f.i. frenzy uses HP conditions. pof/pow requires items. dwarf buffs give bonuses depending on weapon/armor equiped.
  6. /* * This file is part of the L2J Mobius project. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.l2jmobius.gameserver.model.actor.instance; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.StringTokenizer; import org.l2jmobius.commons.concurrent.ThreadPool; import org.l2jmobius.commons.database.DatabaseFactory; import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.enums.InstanceType; import org.l2jmobius.gameserver.model.actor.templates.NpcTemplate; import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author Drazeal */ public class StatusInstance extends NpcInstance { private class PlayerInfo { public PlayerInfo(int pos, String n, int pvps, int pks, int ontime, Boolean iso) { position = pos; Nick = n; pvpCount = pvps; pkCount = pks; onlineTime = ontime; isOnline = iso; } public int position; public String Nick; public int pvpCount; public int pkCount; public int onlineTime; public Boolean isOnline; } // delay interval (in minutes): private final int delayForCheck = 5; // number of players to be listed private final int pvpListCount = 10; private final int pkListCount = 10; private final int onlineListCount = 10; private final PlayerInfo[] topPvPList = new PlayerInfo[pvpListCount]; private final PlayerInfo[] topPkList = new PlayerInfo[pkListCount]; private final PlayerInfo[] topOnlineList = new PlayerInfo[onlineListCount]; public StatusInstance(NpcTemplate template) { super(template); setInstanceType(InstanceType.StatusInstance); ThreadPool.scheduleAtFixedRate(new RefreshAllLists(), 10000, delayForCheck * 60000); } private class RefreshAllLists implements Runnable { @Override public void run() { ReloadData(); } } private void ReloadData() { try (Connection con = DatabaseFactory.getConnection()) { PreparedStatement statement = con.prepareStatement("SELECT char_name, pvpkills, online FROM characters ORDER BY pvpkills DESC, char_name ASC LIMIT 10"); ResultSet result = statement.executeQuery(); // refreshing top pvp list int i = 0; // index of array while (result.next()) { topPvPList[i] = new PlayerInfo(i + 1, result.getString("char_name"), result.getInt("pvpkills"), 0, 0, result.getBoolean("online")); i++; } // refreshing top pk list statement = con.prepareStatement("SELECT char_name, pkkills, online FROM characters ORDER BY pkkills DESC, char_name ASC LIMIT 10"); result = statement.executeQuery(); i = 0; // index of array while (result.next()) { topPkList[i] = new PlayerInfo(i + 1, result.getString("char_name"), 0, result.getInt("pkkills"), 0, result.getBoolean("online")); i++; } // refreshing top online list statement = con.prepareStatement("SELECT char_name, onlinetime, online FROM characters ORDER BY onlinetime DESC, char_name ASC LIMIT 10"); result = statement.executeQuery(); i = 0; // index of array while (result.next()) { topOnlineList[i] = new PlayerInfo(i + 1, result.getString("char_name"), 0, 0, result.getInt("onlinetime"), result.getBoolean("online")); i++; } result.close(); statement.close(); } catch (SQLException e) { LOGGER.warning("ranking (status): could not load statistics informations" + e.getMessage()); } } @Override public void onSpawn() { ReloadData(); } @Override public void showChatWindow(PlayerInstance player) { GeneratePvPList(player); } @Override public void onBypassFeedback(PlayerInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String currentCommand = st.nextToken(); if (currentCommand.startsWith("pvplist")) { GeneratePvPList(player); } else if (currentCommand.startsWith("pklist")) { GeneratePKList(player); } else if (currentCommand.startsWith("onlinelist")) { GenerateOnlineList(player); } super.onBypassFeedback(player, command); } private void GeneratePvPList(PlayerInstance p) { StringBuilder _PVPranking = new StringBuilder(); for (PlayerInfo player : topPvPList) { if (player == null) { break; } _PVPranking.append("<table width=\"290\"><tr>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("<td FIXWIDTH=\"17\" align=\"center\">" + player.position + "</td>"); _PVPranking.append("<td FIXWIDTH=\"158\" align=\"center\">" + player.Nick + "</td>"); _PVPranking.append("<td FIXWIDTH=\"90\" align=\"center\">" + player.pvpCount + "</td>"); _PVPranking.append("<td FIXWIDTH=\"50\" align=\"center\">" + ((player.isOnline) ? "<font color=\"00FF00\">online</font>" : "<font color=\"CC0000\">offline</font>") + "</td>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("</tr></table>"); _PVPranking.append("<img src=\"L2UI.Squaregray\" width=\"300\" height=\"1\">"); } final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(p, getHtmlPath(getId(), 0, p)); html.replace("%objectId%", getObjectId()); html.replace("%pvplist%", _PVPranking.toString()); /* html.replace("%online%", String.valueOf(p.getUptime())); */ p.sendPacket(html); } private void GeneratePKList(PlayerInstance p) { StringBuilder _PVPranking = new StringBuilder(); for (PlayerInfo player : topPkList) { if (player == null) { break; } _PVPranking.append("<table width=\"290\"><tr>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("<td FIXWIDTH=\"17\" align=\"center\">" + player.position + "</td>"); _PVPranking.append("<td FIXWIDTH=\"158\" align=\"center\">" + player.Nick + "</td>"); _PVPranking.append("<td FIXWIDTH=\"90\" align=\"center\">" + player.pkCount + "</td>"); _PVPranking.append("<td FIXWIDTH=\"50\" align=\"center\">" + ((player.isOnline) ? "<font color=\"00FF00\">online</font>" : "<font color=\"CC0000\">offline</font>") + "</td>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("</tr></table>"); _PVPranking.append("<img src=\"L2UI.Squaregray\" width=\"300\" height=\"1\">"); } final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(p, getHtmlPath(getId(), 2, p)); html.replace("%objectId%", getObjectId()); html.replace("%pklist%", _PVPranking.toString()); p.sendPacket(html); } private void GenerateOnlineList(PlayerInstance p) { StringBuilder _PVPranking = new StringBuilder(); for (PlayerInfo player : topOnlineList) { if (player == null) { break; } _PVPranking.append("<table width=\"290\"><tr>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("<td FIXWIDTH=\"17\" align=\"center\">" + player.position + "</td>"); _PVPranking.append("<td FIXWIDTH=\"158\" align=\"center\">" + player.Nick + "</td>"); _PVPranking.append("<td FIXWIDTH=\"90\" align=\"center\">" + ConverTime(player.onlineTime) + "</td>"); _PVPranking.append("<td FIXWIDTH=\"50\" align=\"center\">" + ((player.isOnline) ? "<font color=\"00FF00\">online</font>" : "<font color=\"CC0000\">offline</font>") + "</td>"); _PVPranking.append("<td FIXWIDTH=\"2\" align=\"center\"></td>"); _PVPranking.append("</tr></table>"); _PVPranking.append("<img src=\"L2UI.Squaregray\" width=\"300\" height=\"1\">"); } final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(p, getHtmlPath(getId(), 3, p)); html.replace("%objectId%", getObjectId()); html.replace("%onlinelist%", _PVPranking.toString()); p.sendPacket(html); } private String ConverTime(long seconds) { long remainder = seconds; int days = (int) remainder / (24 * 3600); remainder = remainder - (days * 3600 * 24); int hours = (int) (remainder / 3600); remainder = remainder - (hours * 3600); int minutes = (int) (remainder / 60); remainder = remainder - (hours * 60); seconds = remainder; String timeInText = ""; if (days > 0) { timeInText = days + "<font color=\"LEVEL\">D</font> "; } if (hours > 0) { timeInText = timeInText + hours + "<font color=\"LEVEL\">H</font> "; } if (minutes > 0) { timeInText = timeInText + minutes + "<font color=\"LEVEL\">M</font>"; } if (timeInText == "") { if (seconds > 0) { timeInText = seconds + "<font color=\"LEVEL\">S</font>"; } else { timeInText = "N/A"; } } return timeInText; } @Override public String getHtmlPath(int npcId, int val, PlayerInstance player) { String filename; if (val == 0) { filename = "data/html/Status/" + npcId + ".htm"; } else { filename = "data/html/Status/" + npcId + "-" + val + ".htm"; } if (HtmCache.getInstance().isLoadable(filename)) { return filename; } return "data/html/Status/" + npcId + ".htm"; } } found this somewhere in here so credits to that giy. i just modified it to work on Mobius. create the Htmls, not hard. my knowledge on coding is shit so plz dont judge. at least it works fine with no errors. this is for Classic IL. you dont need to change a lot of things to make it work for IL.
  7. if its system htm open ur admin "Showwindowname" and then use xdateditor to open interface.u and search for it. in there it will also say where it is located
  8. you can use voiced commands in htmls. i use it for "changepassword". Moved it on CB (using Mobius too) bypass -h voice .premium (copy/move the required htmls)
  9. player.disableAllSkills(); player.sendPacket(new ShowBoard()); player.destroyItemByItemId("CB_Teleport", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_TELEPORT_PRICE, player, true); player.setInstanceById(0); player.sendMessage("You will be teleported in 20 seconds"); ThreadPool.schedule(() -> player.teleToLocation(Config.COMMUNITY_AVAILABLE_TELEPORTS.get(teleBuypass), 0), 20000); ThreadPool.schedule(player::enableAllSkills, 20000); this is what i use on L2j Mobius using CB teleport. You can get an idea and there is no need to edit anything. no animations though, u just stand still and tp after 20 sec. im sure there a re better ways to write this my java knowledge is bellow beginner but i hope it helps.. change: player.disableAllSkills();--- to--- player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE); + player.doCast(SkillData.getInstance().getSkill(2013, 1)); << add this to add SoE effect. but if you Esc cancel it it will just cancel the skill animation and the tp will occur after 20sec. cant figure out how to cancel tp as well.
  10. tried it. still no [X]... tried everything i can think of...
  11. Some packs have that implemented, like mobius. Check configs or custom configs. If u don't ur pack doesn't have it then do what ppl before me said. Also if it's not in ur pack you can do Mobius pack na d ask someone to adapt it for ur project. Or like Tryskel said create a passive skill can't get simpler than that. You can just add the skill on mobs you want and not on every mob.
  12. I managed to fix the error but i cant make the [X] to appear so that i can execute the command and delete the selected item.
  13. Im using this code (https://pastebin.com/MvUQ6NNv) to show player inventory and delete selected item. it should have an [X] icon next to the item and when clicked it would delete but it doesnt appear. also it lists all the items in 1 page and not in defferent pages. when i click on the page No. it just refreshes the command.. getting this error when i mannually try the delete command : Exception during execution of admin_delete_item java.lang.StringIndexOutOfBoundsException: begin 18, end 17, length 17 it should be like this:
  14. This project is based on Mobius. go to his site and download the same pack then install the java version thats included in the project folder. Also id suggest that u to DL mobius latest release. if u got that for free then its outdated. then copy the things u like from that project to yours
  15. so the easiest way is to make a custom message ID like u said above. thanks