Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Subject: [PATCH] AIO Cubic
- ---
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/Player.java (date 1687416470796)
- @@ -7407,4 +7407,15 @@
- return gms;
- }
- +
- + private boolean _isCubicBypass;
- + public boolean isCubicBypass()
- + {
- + return _isCubicBypass;
- + }
- + public void setIsCubicBypass(boolean isCubicBypass)
- + {
- + _isCubicBypass = isCubicBypass;
- + }
- +
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (date 1686989017105)
- @@ -1,8 +1,5 @@
- package net.sf.l2j.gameserver.network.clientpackets;
- -import java.util.StringTokenizer;
- -import java.util.logging.Logger;
- -
- import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.communitybbs.CommunityBoard;
- import net.sf.l2j.gameserver.data.manager.HeroManager;
- @@ -10,6 +7,7 @@
- import net.sf.l2j.gameserver.enums.FloodProtector;
- import net.sf.l2j.gameserver.handler.AdminCommandHandler;
- import net.sf.l2j.gameserver.handler.IAdminCommandHandler;
- +import net.sf.l2j.gameserver.handler.itemhandlers.Cubic;
- import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.WorldObject;
- import net.sf.l2j.gameserver.model.actor.Npc;
- @@ -21,6 +19,9 @@
- import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;
- import net.sf.l2j.gameserver.scripting.QuestState;
- +import java.util.StringTokenizer;
- +import java.util.logging.Logger;
- +
- public final class RequestBypassToServer extends L2GameClientPacket
- {
- private static final Logger GMAUDIT_LOG = Logger.getLogger("gmaudit");
- @@ -45,7 +46,7 @@
- final Player player = getClient().getPlayer();
- if (player == null)
- return;
- -
- +
- if (_command.startsWith("admin_"))
- {
- String command = _command.split(" ")[0];
- @@ -72,6 +73,17 @@
- ach.useAdminCommand(_command, player);
- }
- + if (_command.startsWith("cubic_"))
- + {
- + String command = _command.substring(6);
- + try
- + {
- + Cubic.onBypass(player, command);
- + }
- + catch (NumberFormatException nfe)
- + {
- + }
- + }
- else if (_command.startsWith("player_help "))
- {
- final String path = _command.substring(12);
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/ItemHandler.java (date 1686988305138)
- @@ -3,32 +3,7 @@
- import java.util.HashMap;
- import java.util.Map;
- -import net.sf.l2j.gameserver.handler.itemhandlers.BeastSoulShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.BeastSpices;
- -import net.sf.l2j.gameserver.handler.itemhandlers.BeastSpiritShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.BlessedSpiritShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Books;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Calculators;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Elixirs;
- -import net.sf.l2j.gameserver.handler.itemhandlers.EnchantScrolls;
- -import net.sf.l2j.gameserver.handler.itemhandlers.FishShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Harvesters;
- -import net.sf.l2j.gameserver.handler.itemhandlers.ItemSkills;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Keys;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Maps;
- -import net.sf.l2j.gameserver.handler.itemhandlers.MercenaryTickets;
- -import net.sf.l2j.gameserver.handler.itemhandlers.PaganKeys;
- -import net.sf.l2j.gameserver.handler.itemhandlers.PetFoods;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Recipes;
- -import net.sf.l2j.gameserver.handler.itemhandlers.RollingDices;
- -import net.sf.l2j.gameserver.handler.itemhandlers.ScrollsOfResurrection;
- -import net.sf.l2j.gameserver.handler.itemhandlers.Seeds;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SevenSignsRecords;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SoulCrystals;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SoulShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SpecialXMas;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SpiritShots;
- -import net.sf.l2j.gameserver.handler.itemhandlers.SummonItems;
- +import net.sf.l2j.gameserver.handler.itemhandlers.*;
- import net.sf.l2j.gameserver.model.item.kind.EtcItem;
- public class ItemHandler
- @@ -63,6 +38,7 @@
- registerHandler(new SoulCrystals());
- registerHandler(new SpiritShots());
- registerHandler(new SummonItems());
- + registerHandler(new Cubic());
- }
- private void registerHandler(IItemHandler handler)
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/Cubic.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/Cubic.java b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/Cubic.java
- new file mode 100644
- --- /dev/null (date 1687430218863)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/handler/itemhandlers/Cubic.java (date 1687430218863)
- @@ -0,0 +1,340 @@
- +/*
- + * 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 net.sf.l2j.gameserver.handler.itemhandlers;
- +
- +import net.sf.l2j.gameserver.data.cache.HtmCache;
- +import net.sf.l2j.gameserver.data.xml.MultisellData;
- +import net.sf.l2j.gameserver.data.xml.PlayerData;
- +import net.sf.l2j.gameserver.data.xml.SkillTreeData;
- +import net.sf.l2j.gameserver.enums.actors.ClassId;
- +import net.sf.l2j.gameserver.enums.skills.Stats;
- +import net.sf.l2j.gameserver.handler.IItemHandler;
- +import net.sf.l2j.gameserver.model.actor.Playable;
- +import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.holder.skillnode.EnchantSkillNode;
- +import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.model.olympiad.OlympiadManager;
- +import net.sf.l2j.gameserver.network.SystemMessageId;
- +import net.sf.l2j.gameserver.network.serverpackets.*;
- +
- +import java.text.DecimalFormat;
- +import java.util.List;
- +
- +/**
- + * @author Acacia aka Kishin
- + *
- + */
- +public class Cubic implements IItemHandler
- +{
- + @Override
- + public void useItem(Playable playable, ItemInstance item,boolean forceUse)
- + {
- + if (!(playable instanceof Player))
- + return;
- + Player player = (Player)playable;
- +
- + if( player.isInJail() || player.isInDuel() || player.isInCombat() ||
- + player.isInOlympiadMode() || player.isInObserverMode() ||
- + OlympiadManager.getInstance().isRegistered(player))
- + {
- + player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;
- + }
- +
- + int itemId = item.getItemId();
- +
- + if (itemId == 5588) // Tutorial Guide
- + {
- + String htmFile = "data/html/Custom/PortableCubic/Cubic.htm";
- + String htmContent = HtmCache.getInstance().getHtm(htmFile);
- +
- + NpcHtmlMessage infoHtml = new NpcHtmlMessage(1);
- + infoHtml.setHtml(htmContent);
- + player.sendPacket(infoHtml);
- + }
- + }
- +
- + public static void onBypass(Player player, String command)
- + {
- + if(player.isInJail() || player.isInDuel() || player.isInCombat() ||
- + player.isInOlympiadMode() || player.isInObserverMode() ||
- + OlympiadManager.getInstance().isRegistered(player))
- + {
- + player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;
- + }
- + //Augment Command
- + if(command.equalsIgnoreCase("aug"))
- + {
- + player.sendPacket(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED);
- + player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
- + }
- + //Cancel Augment Command
- + if(command.equalsIgnoreCase("cancelaug"))
- + {
- + player.sendPacket(SystemMessageId.SELECT_THE_ITEM_TO_BE_AUGMENTED);
- + player.sendPacket(ExShowVariationCancelWindow.STATIC_PACKET);
- + }
- + //enchant skills
- + if(command.equalsIgnoreCase("enchantskill"))
- + {
- + if(player.getClassId().getLevel() < 3)
- + {
- + player.sendMessage("You must have completed the 3rd class transfer.");
- + return;
- + }
- +
- + final List<EnchantSkillNode> skills = SkillTreeData.getInstance().getEnchantSkillsFor(player);
- + if (skills.isEmpty())
- + {
- + player.sendPacket(SystemMessageId.THERE_IS_NO_SKILL_THAT_ENABLES_ENCHANT);
- +
- + if (player.getStatus().getLevel() < 76)
- + player.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.DO_NOT_HAVE_FURTHER_SKILLS_TO_LEARN_S1).addNumber(91));
- + else
- + player.sendPacket(SystemMessageId.NO_MORE_SKILLS_TO_LEARN);
- + }
- + else
- + player.setIsCubicBypass(true);
- + player.sendPacket(new ExEnchantSkillList(skills));
- + }
- +
- + // Player's Statistics
- + if (command.equalsIgnoreCase("stats"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- +
- + NpcHtmlMessage html = new NpcHtmlMessage(1);
- + StringBuilder html1 = new StringBuilder("<html><body>");
- +
- + html1.append("<br><center><font color=\"LEVEL\">[Additional Player Stats]</font></center>");
- + html1.append("<table border=0 width=\"100%\">");
- + html1.append("<tr><td>Critical Damage Multi</td><td>" + new DecimalFormat("0.##").format(player.getStatus().calcStat(Stats.CRITICAL_DAMAGE, 1.00, null, null)) + "x +"
- + + player.getStatus().calcStat(Stats.CRITICAL_DAMAGE_ADD, 0, null, null) + "</td></tr>");
- + html1.append("<tr><td>Magic Critical Rate</td><td>" + Math.round((float) player.getStatus().getMCriticalHit(null, null) / 10) + "%" + "</td></tr>");
- + html1.append("<tr><td>Healed Boost (received)</td><td>" + (int) (player.getStatus().calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>Healing Power (given)</td><td>" + (int) (player.getStatus().calcStat(Stats.HEAL_PROFICIENCY, 100, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>PVP Attack Hits Damage</td><td>" + new DecimalFormat("0.##").format(player.getStatus().calcStat(Stats.PVP_PHYSICAL_DMG, 1, null, null)) + "x" + "</td></tr>");
- + html1.append("<tr><td>PVP Physical Skill Damage</td><td>" + new DecimalFormat("0.##").format(player.getStatus().calcStat(Stats.PVP_PHYS_SKILL_DMG, 1, null, null)) + "x" + "</td></tr>");
- + html1.append("<tr><td>PVP Physical Skill Defence</td><td>" + new DecimalFormat("0.##").format(player.getStatus().calcStat(Stats.PVP_PHYS_SKILL_DEF, 1, null, null)) + "x" + "</td></tr>");
- + html1.append("<tr><td>PVP Magical Damage</td><td>" + new DecimalFormat("0.##").format(player.getStatus().calcStat(Stats.PVP_MAGICAL_DMG, 1, null, null)) + "x" + "</td></tr>");
- + html1.append("<tr><td>Physical Skill Dodge</td><td>" + (int) (player.getStatus().calcStat(Stats.P_SKILL_EVASION, 0, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>Attack Range</td><td>" + player.getStatus().getPhysicalAttackRange() + "</td></tr>");
- + html1.append("<tr><td>Damage Reflect</td><td>" + (int) (player.getStatus().calcStat(Stats.REFLECT_DAMAGE_PERCENT, 0, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>Skill Reflect</td><td>" + (int) (player.getStatus().calcStat(Stats.REFLECT_SKILL_PHYSIC, 0, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>Magic Reflect</td><td>" + (int) (player.getStatus().calcStat(Stats.REFLECT_SKILL_MAGIC, 0, null, null)) + "%" + "</td></tr>");
- + html1.append("<tr><td>Mp Consume Rate %</td><td>" + (int) (player.getStatus().calcStat(Stats.MAGICAL_MP_CONSUME_RATE, 100, null, null)) + "%" + "</td></tr><br><br>");
- + html1.append("<tr><td>Vamp. Absorb %</td><td>" + (int) (player.getStatus().calcStat(Stats.ABSORB_DAMAGE_PERCENT, 0, null, null)) + "%" + "</td></tr><br><br>");
- + html1.append("<tr><td>Critical Damage Resist</td><td>" + (int) (1 - player.getStatus().calcStat(Stats.CRIT_VULN, 1, null, null)) * 100 + "%" + "</td></tr><br><br>");
- + final int atkCount = (int) (player.getStatus().calcStat(Stats.ATTACK_COUNT_MAX, 1, null, null));
- + html1.append("<tr><td>Attack Count</td><td>" + atkCount + "</td></tr><br><br>");
- + html1.append("<tr><td>Attack AOE Angle</td><td>" + (atkCount > 1 ? (int) (player.getStatus().calcStat(Stats.POWER_ATTACK_ANGLE, 120, null, null)) : "N/A") + "</td></tr><br><br>");
- + html1.append("</table>");
- + html1.append("<center><button value=\"Refresh\" action=\"bypass -h cubic_stats\" width=64 height=14 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
- + html1.append("<center><button value=\"Back\" action=\"bypass -h cubic_chat cubic.htm\" width=64 height=14 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
- + html1.append("</body></html>");
- +
- + html.setHtml(html1.toString());
- + player.sendPacket(html);
- + }
- + //class change
- + if (command.equalsIgnoreCase("upgradeclass"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- +
- + Cubic.sendClassChangeHTML(player);
- + }
- + //class change choose
- + if (command.startsWith("upgradeclasschoose"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- +
- + if (player.isInCombat())
- + {
- + player.sendMessage("Cannot use while in combat");
- + return;
- + }
- + final int val = Integer.parseInt(command.substring(19));
- +
- + final ClassId classId = player.getClassId();
- + final ClassId newClassId = ClassId.values()[val];
- +
- + final int level = player.getStatus().getLevel();
- + final int jobLevel = classId.getLevel();
- + final int newJobLevel = newClassId.getLevel();
- +
- + // Prevents changing to class not in same class tree
- + if (!newClassId.isChildOf(classId))
- + return;
- +
- + // Prevents changing between same level jobs
- + if (newJobLevel != jobLevel + 1)
- + return;
- +
- + // Check for player level
- + if (level < 20 && newJobLevel > 1)
- + return;
- + if (level < 40 && newJobLevel > 2)
- + return;
- + if (level < 76 && newJobLevel > 3)
- + return;
- + // -- Prevention ends
- +
- + changeClass(player, val);
- + player.broadcastCharInfo();
- + player.broadcastUserInfo();
- +
- + if (newJobLevel == 3)
- + player.sendPacket(SystemMessageId.THIRD_CLASS_TRANSFER);
- + else
- + player.sendPacket(SystemMessageId.CLASS_TRANSFER);
- +
- + NpcHtmlMessage html = new NpcHtmlMessage(31228);
- + StringBuilder sb = new StringBuilder();
- + sb.append("<html><body>");
- + sb.append("Class Upgrader:<br>");
- + sb.append("<br>");
- + sb.append("You have become a <font color=\"LEVEL\">" + PlayerData.getInstance().getClassNameById(player.getClassId().getId()) + "</font>.");
- +
- + if ((level >= 76 && newJobLevel < 3) || (level >= 40 && newJobLevel < 2))
- + {
- + sb.append("<br><button value=\"Next Class\" action=\"bypass -h cubic_upgradeclass\" width=94 height=20 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
- + }
- + else
- + sb.append("<br><button value=\"Welcome Page\" action=\"bypass -h cubic_chat cubic.htm\" width=94 height=20 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
- +
- + sb.append("</body></html>");
- + html.setHtml(sb.toString());
- + player.sendPacket(html);
- + }
- + if(command.startsWith("chat"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- + NpcHtmlMessage html = new NpcHtmlMessage(0);
- + html.setFile((new StringBuilder()).append("data/html/custom/PortableCubic/").append(command.substring(5)).toString());
- + player.sendPacket(html);
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + }
- +
- + //sell inventory items
- + if(command.equalsIgnoreCase("sell"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- +
- + final List<ItemInstance> items = player.getInventory().getSellableItems();
- + player.setIsCubicBypass(true);
- + player.sendPacket(new SellList(player.getAdena(), items));
- + }
- + //Execute Multisell Store:
- + if(command.startsWith("multi"))
- + {
- + if(player.isDead() || player.isAlikeDead())
- + {player.sendMessage("Invalid action");
- + player.sendPacket(ActionFailed.STATIC_PACKET);
- + return;}
- +
- + player.setIsCubicBypass(true);
- + String name = command.substring(6);
- + MultisellData.getInstance().separateAndSend(name, player, null, false);
- + }
- +
- + if(command.startsWith("teleport"))
- + {
- + /**
- + * ADD YOUR TELEPORTER CUBIC CODE HERE
- + */
- + }
- + }
- +
- +
- + private static void changeClass(Player player, int val)
- + {
- + player.setClassId(val);
- +
- + if (player.isSubClassActive())
- + player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass());
- + else
- + player.setBaseClass(player.getActiveClass());
- + }
- +
- + public static void sendClassChangeHTML(Player player)
- + {
- + NpcHtmlMessage html = new NpcHtmlMessage(1); //roy the cat default class master
- + StringBuilder sb = new StringBuilder();
- + sb.append("<html><body>");
- + sb.append("Class Upgrader:<br>");
- + sb.append("<br>");
- +
- + final ClassId classId = player.getClassId();
- + final int level = player.getStatus().getLevel();
- + final int jobLevel = classId.getLevel();
- + final int newJobLevel = jobLevel + 1;
- +
- + if ((level >= 20 && jobLevel == 0) || (level >= 40 && jobLevel == 1) || (level >= 76 && jobLevel == 2))
- + {
- + sb.append("You can change your class to following:<br>");
- +
- + for (ClassId child : ClassId.values())
- + if (child.isChildOf(classId) && child.getLevel() == newJobLevel)
- + sb.append("<br><a action=\"bypass -h cubic_upgradeclasschoose " + (child.getId()) + "\"> " + PlayerData.getInstance().getClassNameById(child.getId()) + "</a>");
- +
- + sb.append("<br>");
- + }
- + else
- + {
- + switch (jobLevel)
- + {
- + case 0:
- + sb.append("You must reach lvl 20 to begin class change.<br>");
- + break;
- + case 1:
- + sb.append("You must reach lvl 40 to begin 2nd class change.<br>");
- + break;
- + case 2:
- + sb.append("You must reach lvl 76 to begin 3rd class change.<br>");
- + break;
- + case 3:
- + sb.append("There is no class change available for you anymore.");
- + break;
- + }
- +
- + sb.append("<br>");
- + }
- +
- + sb.append("<br><br>You can access this page from the Class Upgrade option of the Wondrous Cubic (F12)<br>");
- + sb.append("<br><button value=\"Welcome Page\" action=\"bypass -h cubic_chat cubic.htm\" width=94 height=20 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\">");
- +
- + sb.append("</body></html>");
- + html.setHtml(sb.toString());
- + player.sendPacket(html);
- + }
- +}
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (date 1686987823780)
- @@ -56,9 +56,17 @@
- if (player == null)
- return;
- - final Npc merchant = (player.getTarget() instanceof Merchant || player.getTarget() instanceof MercenaryManagerNpc) ? (Npc) player.getTarget() : null;
- + /*final Npc merchant = (player.getTarget() instanceof Merchant || player.getTarget() instanceof MercenaryManagerNpc) ? (Npc) player.getTarget() : null;
- if (merchant == null || !player.getAI().canDoInteract(merchant))
- - return;
- + return;*/
- +
- + Npc merchant = null;
- + if(!player.isCubicBypass())
- + {
- + merchant = !(player.getTarget() instanceof Merchant) && !(player.getTarget() instanceof MercenaryManagerNpc) ? null : (Npc)player.getTarget();
- + if(merchant == null || !player.getAI().canDoInteract(merchant))
- + return;
- + }
- if (_listId > 1000000 && merchant.getTemplate().getNpcId() != _listId - 1000000)
- return;
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (date 1687428231559)
- @@ -68,13 +68,25 @@
- player.setMultiSell(null);
- return;
- }
- -
- - final Folk folk = player.getCurrentFolk();
- +
- + Folk folk = null ;
- + if(!player.isCubicBypass()) {
- +
- + folk = player.getCurrentFolk();
- +
- + if ((folk != null && !list.isNpcAllowed(folk.getNpcId())) || (folk == null && list.isNpcOnly()))
- + {
- + player.setMultiSell(null);
- + return;
- + }
- + }
- +
- + /*final Folk folk = player.getCurrentFolk();
- if ((folk != null && !list.isNpcAllowed(folk.getNpcId())) || (folk == null && list.isNpcOnly()))
- {
- player.setMultiSell(null);
- return;
- - }
- + }*/
- if (folk != null && !player.getAI().canDoInteract(folk))
- {
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkillInfo.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkillInfo.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkillInfo.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkillInfo.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkillInfo.java (date 1687426261191)
- @@ -13,49 +13,61 @@
- {
- private int _skillId;
- private int _skillLevel;
- -
- +
- @Override
- - protected void readImpl()
- - {
- + protected void readImpl() {
- _skillId = readD();
- _skillLevel = readD();
- }
- -
- +
- @Override
- - protected void runImpl()
- - {
- + protected void runImpl() {
- if (_skillId <= 0 || _skillLevel <= 0)
- return;
- -
- +
- final Player player = getClient().getPlayer();
- if (player == null)
- return;
- -
- +
- if (player.getClassId().getLevel() < 3 || player.getStatus().getLevel() < 76)
- return;
- -
- - final Folk folk = player.getCurrentFolk();
- +
- + /*final Folk folk = player.getCurrentFolk();
- if (folk == null || !player.getAI().canDoInteract(folk))
- - return;
- -
- + return;*/
- +
- + Folk folk = null;
- + if(!player.isCubicBypass()) {
- + folk = player.getCurrentFolk();
- + if(folk == null || !player.getAI().canDoInteract(folk))
- + return;
- + }
- +
- if (player.getSkillLevel(_skillId) >= _skillLevel)
- return;
- -
- +
- final L2Skill skill = SkillTable.getInstance().getInfo(_skillId, _skillLevel);
- if (skill == null)
- return;
- -
- - if (!folk.getTemplate().canTeach(player.getClassId()))
- - return;
- -
- - final EnchantSkillNode esn = SkillTreeData.getInstance().getEnchantSkillFor(player, _skillId, _skillLevel);
- +
- + /*if (!folk.getTemplate().canTeach(player.getClassId()))
- + return;*/
- +
- + if(!player.isCubicBypass())
- + {
- + folk = player.getCurrentFolk();
- + if(folk == null || !folk.getTemplate().canTeach(player.getClassId()))
- + return;
- + }
- +
- + final EnchantSkillNode esn = SkillTreeData.getInstance().getEnchantSkillFor(player, _skillId, _skillLevel);
- if (esn == null)
- return;
- -
- +
- final ExEnchantSkillInfo esi = new ExEnchantSkillInfo(_skillId, _skillLevel, esn.getSp(), esn.getExp(), esn.getEnchantRate(player.getStatus().getLevel()));
- if (Config.ES_SP_BOOK_NEEDED && esn.getItem() != null)
- esi.addRequirement(4, esn.getItem().getId(), esn.getItem().getValue(), 0);
- -
- +
- sendPacket(esi);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestExEnchantSkill.java (date 1686989297778)
- @@ -38,9 +38,17 @@
- if (player.getClassId().getLevel() < 3 || player.getStatus().getLevel() < 76)
- return;
- - final Folk folk = player.getCurrentFolk();
- + /*final Folk folk = player.getCurrentFolk();
- if (folk == null || !player.getAI().canDoInteract(folk))
- - return;
- + return;*/
- +
- + Folk folk = null;
- + if(!player.isCubicBypass())
- + {
- + folk = player.getCurrentFolk();
- + if(folk == null || !player.getAI().canDoInteract(folk))
- + return;
- + }
- if (player.getSkillLevel(_skillId) >= _skillLevel)
- return;
- @@ -92,6 +100,7 @@
- player.sendPacket(new UserInfo(player));
- // Show enchant skill list.
- + assert folk != null;
- folk.showEnchantSkillList(player);
- }
- }
- \ No newline at end of file
- Index: aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java
- IDEA additional info:
- Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
- <+>UTF-8
- ===================================================================
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java (revision 6537f1023595a270a0b4d8785ee362d1122a674c)
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/data/xml/MultisellData.java (date 1687426978082)
- @@ -10,6 +10,7 @@
- import net.sf.l2j.gameserver.model.actor.Npc;
- import net.sf.l2j.gameserver.model.actor.Player;
- +import net.sf.l2j.gameserver.model.actor.instance.Folk;
- import net.sf.l2j.gameserver.model.multisell.Entry;
- import net.sf.l2j.gameserver.model.multisell.Ingredient;
- import net.sf.l2j.gameserver.model.multisell.ListContainer;
- @@ -92,8 +93,16 @@
- if (template == null)
- return;
- - if ((npc != null && !template.isNpcAllowed(npc.getNpcId())) || (npc == null && template.isNpcOnly()))
- - return;
- + /*if ((npc != null && !template.isNpcAllowed(npc.getNpcId())) || (npc == null && template.isNpcOnly()))
- + return;*/
- +
- + Folk folk = null ;
- + if(!player.isCubicBypass())
- + {
- + folk = player.getCurrentFolk();
- + if((folk == null || !template.isNpcAllowed(npc.getNpcId())) || (npc == null && template.isNpcOnly()))
- + return;
- + }
- final PreparedListContainer list = new PreparedListContainer(template, inventoryOnly, player, npc);
Add Comment
Please, Sign In to add comment