Search the Community

Showing results for tags 'code'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Lineage II Development [L2J]
    • Sources
    • Addons & Mods
    • Tools
  • Lineage II Development [L2OFF]
    • Package Files
    • Mods & Extenders
    • Tools
  • Lineage II Client Development
    • Equipments
    • Npcs
    • Maps
    • Tools
    • Skills
  • Lineage II Bots & Tools
    • Bot Systems
    • Bot Scripts
    • Tools
  • Website Templates
  • DenArt Designs's Demo Updater

Forums

  • General Zone
    • Announcements and News
    • Newbies Introduce Urself
    • Maxcheaters Competitions & Events
    • Votes/Polls Area
    • Report Section
    • Downloads Section
  • Lineage II General Section
    • General Discussion [English]
    • Request Support [English]
  • Lineage II Hacks,Cheats and Bots
    • Hacks & Cheats [English]
    • Request Hacks & Cheats [English]
    • Botting [English]
    • Request Botting [English]
  • Lineage II Private Servers
    • L2 Cosmos x15 Interlude - BETA: 26th July - GRAND OPENING: 31st July
    • Private Servers
    • L2 Zeus x7 Interlude - GRAND OPENING: 3rd of July
    • [Previews] L2 Private Servers
    • Clans and Alliances
  • Lineage II Marketplace
    • Marketplace [Items & Chars]
    • Marketplace [L2Packs & Files]
    • Marketplace [Powerlvl & Support]
  • Lineage II OFF Server Development
    • Server Development Discussion [L2OFF]
    • Request Server Development Help [L2OFF]
    • Server Shares & Files [L2OFF]
  • Lineage II Java Server Development
    • Server Development Discussion [L2J]
    • Request Server Development Help [L2J]
    • Server Shares & Files [L2J]
    • Private Projects [L2J]
  • Lineage II Client Development
    • Client Development Discussion
  • MMO Games
    • Fortnite
    • PlayerUnknown's Battlegrounds PUBG
    • League of Legends
    • World Of Warcraft Area
    • Other Multiplayer Games
  • General Section
  • Graphics/GFX Zone
  • VIP/Donators Zone
  • MaxCheaters Corner
  • TEST's Topics
  • L2Classic Club's Just trying this thing out
  • Lineage 2 Revolution Club's Discussions
  • Lineage 2 Revolution Club's Tutorials
  • Lineage 2 Revolution Club's Request Help
  • DenArt Designs's Hello and welcome to my club!
  • DenArt Designs's News
  • `Kara for staff's Topics
  • `Kara for staff's Kara`

Product Groups

  • Advertisements
  • Special Groups

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 370 results

  1. Hello there.. Here is my buffer from my old server.. (Main html made by protoftw) What's inside? Mage | Fighter set [config] Buffs/Dance/Song/Extra etc one by one Special buffs + Malaria Vote buff [If you want it, you can enable it, config] Scheme Buffer Code Preview > [Hidden Content] Code/HTML/XML > [Hidden Content]
  2. https://www.youtube.com/watch?v=wvwudQvQwIE The video was produced using my pack (or so state the server owner/developer), but L2J got the same issue. All non-customized L2J versions using WeaponEquipTask got this issue. Even if you patched other places to avoid to get multiple similar items with same objectId, this is the initial problem and the only fix you should apply. For the goodness of L2J, I decided to post this fix for free. Short version : Upon UseItem use, and if you're currently attacking, WeaponEquipTask is called to delay the time your weapon is wear. Issue : There is no check upon task call. The item is equipped, no matter what happened between the call time, and the wear time (if you deleted, crystallized, dropped, put item elsewhere,...). Fix : check upon task call if the item is still existing on inventory. For L2J (consider to edit the called method - remove item parameter). /** Weapon Equip Task */ private static class WeaponEquipTask implements Runnable { private final L2PcInstance activeChar; protected WeaponEquipTask(L2PcInstance character) { activeChar = character; } @Override public void run() { // Check if the item is still on inventory. final ItemInstance item = activeChar.getInventory().getItemByObjectId(_objectId); if (item == null) return; // Equip or unEquip activeChar.useEquippableItem(item, false); } } If you use aCis, here's the modified task found on UseItem (will be part of rev 380) : if (activeChar.isAttackingNow()) ThreadPool.schedule(() -> { final ItemInstance itemToTest = activeChar.getInventory().getItemByObjectId(_objectId); if(itemToTest == null) return; activeChar.useEquippableItem(itemToTest, false); }, activeChar.getAttackEndTime() - System.currentTimeMillis()); else activeChar.useEquippableItem(item, true); Good luck everyone !
  3. .menu command based on elfo's /menu i still cant get the difference between .command and /command but ppl prefer commands with . ### Eclipse Workspace Patch 1.0 #P L2jFrozen_GameServer Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSoulShot.java (working copy) @@ -156,7 +156,8 @@ // Pet uses the power of spirit. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/); + if (!activeOwner.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, 2033, 1, 0, 0), 360000/*600*/); activeOwner = null; activePet = null; Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/FishShots.java (working copy) @@ -92,7 +92,8 @@ //activeChar.sendPacket(new SystemMessage(SystemMessage.ENABLED_SPIRITSHOT)); MagicSkillUser MSU = new MagicSkillUser(activeChar, SKILL_IDS[grade], 1, 0, 0); - Broadcast.toSelfAndKnownPlayers(activeChar, MSU); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayers(activeChar, MSU); MSU = null; activeChar.setTarget(oldTarget); Index: head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -20222,4 +20222,60 @@ } sendSkillList(); } + + private boolean _cantGainXP = false; + private boolean _isPartyInvProt = false; + private boolean _isInTradeProt = false; + private boolean _isSSDisabled = false; + private boolean _isInRefusal = false; + + public boolean isInTradeProt() + { + return _isInTradeProt; + } + + public void setIsInTradeProt(boolean value) + { + _isInTradeProt = value; + } + + public boolean isSSDisabled() + { + return _isSSDisabled; + } + + public void setIsSSDisabled(boolean value) + { + _isSSDisabled = value; + } + + public boolean isPartyInvProt() + { + return _isPartyInvProt; + } + + public void setIsPartyInvProt(boolean value) + { + _isPartyInvProt = value; + } + + public void cantGainXP(boolean b) + { + _cantGainXP = b; + } + + public boolean cantGainXP() + { + return _cantGainXP; + } + + public void setInRefusalMode(boolean b) + { + _isInRefusal = b; + } + + public boolean isInRefusalMode() + { + return _isInRefusal; + } } \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestJoinParty.java (working copy) @@ -78,6 +78,12 @@ return; } + if (target.isPartyInvProt()) + { + requestor.sendMessage("You can't invite that player because he is in party protection."); + return; + } + if (target.isInParty()) { SystemMessage msg = new SystemMessage(SystemMessageId.S1_IS_ALREADY_IN_PARTY); Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BlessedSpiritShot.java (working copy) @@ -137,7 +137,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; weaponInst = null; Index: head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/VoicedCommandHandler.java (working copy) import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Wedding; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu; +registerVoicedCommandHandler( new Menu()); if (Config.BANKING_SYSTEM_ENABLED) Index: head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0) +++ head-src/com/l2jfrozen/gameserver/handler/voicedcommandhandlers/Menu.java (revision 0) @@ -0,0 +1,173 @@ /* * 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 com.l2jfrozen.gameserver.handler.voicedcommandhandlers; import javolution.text.TextBuilder; import com.l2jfrozen.gameserver.handler.IVoicedCommandHandler; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; public class Menu implements IVoicedCommandHandler { private final String[] _voicedCommands = { "menu" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { mainHtml(activeChar); return true; } public static void mainHtml(L2PcInstance activeChar) { NpcHtmlMessage nhm = new NpcHtmlMessage(5); TextBuilder tb = new TextBuilder(""); tb.append("<html><head><title>Personal Menu</title></head><body>"); tb.append("<center>"); tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>"); tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>"); tb.append("</tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<center>"); tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"52\">ON</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("<tr>"); tb.append("<td width=\"52\">OFF</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("</table><br>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Buff Protection</td>"); if(activeChar.isBuffProtected()) tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isBuffProtected()) tb.append("<td width=\"16\"><button action=\"bypass -h buffprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY buff from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Personal Message Refusal</td>"); if(activeChar.getMessageRefusal()) tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.getMessageRefusal()) tb.append("<td width=\"16\"><button action=\"bypass -h pmref\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY pm from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Trade Request Protection</td>"); if(activeChar.isInTradeProt()) tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isInTradeProt()) tb.append("<td width=\"16\"><button action=\"bypass -h tradeprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY trade request from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Soulshot/Spiritshot Effect</td>"); if(activeChar.isSSDisabled()) tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isSSDisabled()) tb.append("<td width=\"16\"><button action=\"bypass -h ssprot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you will enchance your pc's performance by disabling your ss effects.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page2\" width=16 height=16 back=\"L2UI_CH3.next1\" fore=\"L2UI_CH3.next1\"></td></tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("</body></html>"); nhm.setHtml(tb.toString()); activeChar.sendPacket(nhm); } public static void mainHtml2(L2PcInstance activeChar) { NpcHtmlMessage nhm = new NpcHtmlMessage(5); TextBuilder tb = new TextBuilder(""); tb.append("<html><head><title>Personal Menu</title></head><body>"); tb.append("<center>"); tb.append("<table width=\"250\" cellpadding=\"5\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"45\" valign=\"top\" align=\"center\"><img src=\"L2ui_ch3.menubutton4\" width=\"38\" height=\"38\"></td>"); tb.append("<td valign=\"top\">Players online <font color=\"FF6600\"> "+L2World.getInstance().getAllPlayers().size()+"</font>"); tb.append("<br1><font color=\"00FF00\">"+activeChar.getName()+"</font>, use this menu for everything related to your gameplay.<br1></td>"); tb.append("</tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("<center>"); tb.append("<table border=\"1\" width=\"100\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td width=\"52\">ON</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("<tr>"); tb.append("<td width=\"52\">OFF</td>"); tb.append("<td width=\"16\"><button width=16 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("<td><button width=32 height=12 back=\"L2UI_CH3.tutorial_pointer1\" fore=\"L2UI_CH3.tutorial_pointer1\"></td>"); tb.append("</tr>"); tb.append("</table><br>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Party Invite Protection</td>"); if(activeChar.isPartyInvProt()) tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.isPartyInvProt()) tb.append("<td width=\"16\"><button action=\"bypass -h partyin\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve ANY party invite from another character.</font></td></tr>"); tb.append("</table>"); tb.append("<table border=\"1\" width=\"250\" height=\"12\" bgcolor=\"000000\">"); tb.append("<tr>"); tb.append("<td align=\"center\" width=\"52\">Exp Gain Protection</td>"); if(activeChar.cantGainXP()) tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_hp\" fore=\"L2UI_CH3.br_bar1_hp\"></td>"); if(!activeChar.cantGainXP()) tb.append("<td width=\"16\"><button action=\"bypass -h xpnot\" width=24 height=12 back=\"L2UI_CH3.br_bar1_mp\" fore=\"L2UI_CH3.br_bar1_mp\"></td>"); tb.append("</tr>"); tb.append("<tr><td width=\"250\"><font color=\"00FF00\">By enabling that you won't be able to recieve expirience from killing monsters.</font></td><td align=\"center\" valign=\"middle\"><button action=\"bypass -h page1\" width=16 height=16 back=\"L2UI_CH3.back1\" fore=\"L2UI_CH3.next1\"></td></tr>"); tb.append("</table>"); tb.append("</center>"); tb.append("</body></html>"); nhm.setHtml(tb.toString()); activeChar.sendPacket(nhm); } @Override public String[] getVoicedCommandList() { return _voicedCommands; } } \ No newline at end of file Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SpiritShot.java (working copy) @@ -128,7 +128,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SPIRITSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; } Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/TradeRequest.java (working copy) @@ -202,7 +202,13 @@ player.sendPacket(new SystemMessage(SystemMessageId.TARGET_TOO_FAR)); return; } - + + if (partner.isInTradeProt()) + { + player.sendMessage(partner.getName() + " is in Trade Protection Mode"); + return; + } + // Alt game - Karma punishment if(!Config.ALT_GAME_KARMA_PLAYER_CAN_TRADE && (player.getKarma() > 0 || partner.getKarma() > 0)) { Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/SoulShots.java (working copy) @@ -142,7 +142,8 @@ // Send message to client activeChar.sendPacket(new SystemMessage(SystemMessageId.ENABLED_SOULSHOT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); + if (!activeChar.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeChar, new MagicSkillUser(activeChar, activeChar, SKILL_IDS[weaponGrade], 1, 0, 0), 360000/*600*/); activeChar = null; } Index: head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java =================================================================== --- head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/model/actor/stat/PcStat.java (working copy) @@ -58,6 +58,9 @@ //Player is Gm and access level is below or equal to canGainExp and is in party, don't give Xp if(!getActiveChar().getAccessLevel().canGainExp() && getActiveChar().isInParty()) return false; + + if (activeChar.cantGainXP()) + return false; if(!super.addExp(value)) return false; @@ -111,6 +114,9 @@ L2PcInstance activeChar = getActiveChar(); if(!activeChar.getAccessLevel().canGainExp() && activeChar.isInParty()) return false; + + if (activeChar.cantGainXP()) + return false; // if this player has a pet that takes from the owner's Exp, give the pet Exp now Index: head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java =================================================================== --- head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/network/clientpackets/RequestBypassToServer.java (working copy) @@ -28,6 +28,7 @@ import com.l2jfrozen.gameserver.handler.AdminCommandHandler; import com.l2jfrozen.gameserver.handler.IAdminCommandHandler; import com.l2jfrozen.gameserver.handler.custom.CustomBypassHandler; +import com.l2jfrozen.gameserver.handler.voicedcommandhandlers.Menu; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.L2World; import com.l2jfrozen.gameserver.model.actor.instance.L2ClassMasterInstance; @@ -41,8 +42,10 @@ import com.l2jfrozen.gameserver.model.entity.event.TvT; import com.l2jfrozen.gameserver.model.entity.event.VIP; import com.l2jfrozen.gameserver.model.entity.olympiad.Olympiad; +import com.l2jfrozen.gameserver.network.SystemMessageId; import com.l2jfrozen.gameserver.network.serverpackets.ActionFailed; import com.l2jfrozen.gameserver.network.serverpackets.NpcHtmlMessage; +import com.l2jfrozen.gameserver.network.serverpackets.SystemMessage; import com.l2jfrozen.gameserver.util.GMAudit; public final class RequestBypassToServer extends L2GameClientPacket @@ -308,7 +311,90 @@ player.processQuestEvent(p.substring(0, idx), p.substring(idx).trim()); } } - + else if (_command.startsWith("page1")) + Menu.mainHtml(activeChar); + else if (_command.startsWith("buffprot")) + { + if (activeChar.isBuffProtected()) + { + +activeChar.setIsBuffProtected(false); + +activeChar.sendMessage("Buff protection is disabled."); + +Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsBuffProtected(true); + activeChar.sendMessage("Buff protection is enabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("tradeprot")) + { + if (activeChar.isInTradeProt()) + { + +activeChar.setIsInTradeProt(false); + +activeChar.sendMessage("Trade acceptance mode is enabled."); + +Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsInTradeProt(true); + activeChar.sendMessage("Trade refusal mode is enabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("ssprot")) + { + if (activeChar.isSSDisabled()) + { + activeChar.setIsSSDisabled(false); + activeChar.sendMessage("Soulshots effects are enabled."); + Menu.mainHtml(activeChar); + } + else + { + activeChar.setIsSSDisabled(true); + activeChar.sendMessage("Soulshots effects are disabled."); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("xpnot")) + { + if (activeChar.cantGainXP()) + { + activeChar.cantGainXP(false); + activeChar.sendMessage("Enable Xp"); + Menu.mainHtml2(activeChar); + } + else + { + activeChar.cantGainXP(true); + activeChar.sendMessage("Disable Xp"); + Menu.mainHtml2(activeChar); + } + } + else if (_command.startsWith("pmref")) + { + if (activeChar.getMessageRefusal()) + { + activeChar.setMessageRefusal(false); + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_ACCEPTANCE_MODE)); + Menu.mainHtml(activeChar); + } + else + { + activeChar.setMessageRefusal(true); + activeChar.sendPacket(new SystemMessage(SystemMessageId.MESSAGE_REFUSAL_MODE)); + Menu.mainHtml(activeChar); + } + } + else if (_command.startsWith("partyin")) + { + if (activeChar.isPartyInvProt()) + { + activeChar.setIsPartyInvProt(false); + activeChar.sendMessage("Party acceptance mode is enabled."); + Menu.mainHtml2(activeChar); + } + else + { + activeChar.setIsPartyInvProt(true); + activeChar.sendMessage("Party refusal mode is enabled."); + Menu.mainHtml2(activeChar); + } + } + else if (_command.startsWith("page2")) + Menu.mainHtml2(activeChar); // Jstar's Custom Bypass Caller! else if(_command.startsWith("custom_")) { Index: head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/itemhandlers/BeastSpiritShot.java (working copy) @@ -169,7 +169,8 @@ // Pet uses the power of spirit. activeOwner.sendPacket(new SystemMessage(SystemMessageId.PET_USE_THE_POWER_OF_SPIRIT)); - Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/); + if (!activeOwner.isSSDisabled()) + Broadcast.toSelfAndKnownPlayersInRadius(activeOwner, new MagicSkillUser(activePet, activePet, isBlessed ? 2009 : 2008, 1, 0, 0), 360000/*600*/); activeOwner = null; activePet = null; Index: head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java =================================================================== --- head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (revision 986) +++ head-src/com/l2jfrozen/gameserver/handler/skillhandlers/Continuous.java (working copy) @@ -143,7 +143,16 @@ || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL || skill.getSkillType() == L2Skill.SkillType.REFLECT)) - continue; + continue; + + if (activeChar instanceof L2PcInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill() + && (skill.getSkillType() == L2Skill.SkillType.BUFF + || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT + || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF + || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT + || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL + || skill.getSkillType() == L2Skill.SkillType.REFLECT)) + continue; // Player holding a cursed weapon can't be buffed and can't buff if(skill.getSkillType() == L2Skill.SkillType.BUFF)
  4. Event Demo Procure por commandname-e em seu sistema e adicione no final dele 115 114 register 116 115 unregister /** restrictions for event */ * Cannot Potion in Event. * Cannot Summon in Event. * Cannot Restart in Event. * Cannot Logout in Event. * Cannot attack same team. code v1 : https://pastebin.com/YRaCbU9T code v2 : * added event prize name announcement. Thank you @StinkyMadness * CopyOnWriteArrayList moved to ConcurrentHashMap.newKeySet, for better performance. Thank you @Tryskell * TVT_DOOR_LIST moved to getProperty and removed arrays. Thank you @Tryskell * Removed useless calls * added weather message for next event when coming into play. Thank you @ edusz93 for the idea Código v2 : https://pastebin.com/raw/59jyZa14 Autor do novo evento Williams Autor do código original DnR
  5. ### Eclipse Workspace Patch 1.0 #P L2J_DataPack Index: dist/game/data/scripts/custom/QuizEvent/QuizEvent.java =================================================================== --- dist/game/data/scripts/custom/QuizEvent/QuizEvent.java (revision 0) +++ dist/game/data/scripts/custom/QuizEvent/QuizEvent.java (working copy) package custom.QuizEvent; import java.io.File; import java.util.HashMap; import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import com.l2jserver.Config; import com.l2jserver.gameserver.ThreadPoolManager; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.util.Broadcast; import com.l2jserver.util.Rnd; /** * * @author Bellatrix * */ public class QuizEvent { public static boolean _quizRunning; private static String _question; private static String _answer1; private static String _answer2; private static String _answer3; private static int _rightanswer; private static Map<L2PcInstance,Integer> _players; private static int status; private static int announced; private static ThreadPoolManager tpm; private static AutoEventTask task; private static String[][] _questions; private static int i = 0; private static final int STATUS_NOT_IN_PROGRESS = 0; private static final int STATUS_ASK = 1; private static final int STATUS_ANSWER = 2; private static final int STATUS_END = 3; //---------------------------------------------------------------------------- //------------------------------ CONFIG -------------------------------------- //---------------------------------------------------------------------------- //Number of questions per event private static int _questionNumber = 3; //The Item ID of the reward private static int _rewardID = 57; //The ammount of the reward private static int _rewardCount = 1000; //Wait for the first event after the server start (in seconds) private static int _initWait = 3600; //Time for answer the question (in seconds) private static int _answerTime = 60; //Time between two event (in seconds) private static int _betweenTime = 18000; public QuizEvent() { tpm = ThreadPoolManager.getInstance(); status = STATUS_NOT_IN_PROGRESS; task = new AutoEventTask(); announced = 0; _quizRunning = false; _question = ""; _answer1 = ""; _answer2 = ""; _answer3 = ""; _rightanswer = 0; _players = new HashMap<>(100); _questions = new String[20][]; includeQuestions(); tpm.scheduleGeneral(task, _initWait*1000); } private void includeQuestions() { File questionFile = new File(Config.DATAPACK_ROOT, "data/scripts/custom/QuizEvent/QuizEvent.xml"); Document doc = null; try { DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setIgnoringComments(true); dbf.setValidating(false); DocumentBuilder db = dbf.newDocumentBuilder(); doc = db.parse(questionFile); for (Node root = doc.getFirstChild(); root != null; root = root.getNextSibling()) { if ("list".equalsIgnoreCase(root.getNodeName())) { for (Node child = root.getFirstChild(); child != null; child = child.getNextSibling()) { if ("question".equalsIgnoreCase(child.getNodeName())) { int id, correct; String ask, answer1, answer2, answer3; NamedNodeMap attrs = child.getAttributes(); id = Integer.parseInt(attrs.getNamedItem("id").getNodeValue()); correct = Integer.parseInt(attrs.getNamedItem("correct").getNodeValue()); ask = attrs.getNamedItem("ask").getNodeValue(); answer1 = attrs.getNamedItem("answer1").getNodeValue(); answer2 = attrs.getNamedItem("answer2").getNodeValue(); answer3 = attrs.getNamedItem("answer3").getNodeValue(); _questions[id] = new String[]{ ask, answer1, answer2, answer3, ""+correct }; i++; } } } } } catch (Exception e) { } } private class AutoEventTask implements Runnable { @Override public void run() { switch (status) { case STATUS_NOT_IN_PROGRESS: announceStart(); break; case STATUS_ASK: if (announced < _questionNumber) { announceQuestion(); } else { status = STATUS_END; tpm.scheduleGeneral(task, 3000); } break; case STATUS_ANSWER: announceCorrect(); break; case STATUS_END: endEvent(); break; default: break; } } } //Get a random question from the quiz_event table private static void selectQuestion() { int id = Rnd.get(i)+1; _question = _questions[id][0]; _answer1 = _questions[id][1]; _answer2 = _questions[id][2]; _answer3 = _questions[id][3]; _rightanswer = Integer.parseInt(""+_questions[id][4]); } //Announce the question private static void announceQuestion() { selectQuestion(); Broadcast.toAllOnlinePlayers("-----------------"); Broadcast.toAllOnlinePlayers("Question: "+_question); Broadcast.toAllOnlinePlayers("-----------------"); Broadcast.toAllOnlinePlayers("1: "+_answer1); Broadcast.toAllOnlinePlayers("2: "+_answer2); Broadcast.toAllOnlinePlayers("3: "+_answer3); Broadcast.toAllOnlinePlayers("-----------------"); status = STATUS_ANSWER; tpm.scheduleGeneral(task, _answerTime*1000); } //Announce the correct answer private static void announceCorrect() { Broadcast.toAllOnlinePlayers("-----------------"); Broadcast.toAllOnlinePlayers("The correct answer was: "+_rightanswer); Broadcast.toAllOnlinePlayers("-----------------"); announced++; giveReward(); status = STATUS_ASK; tpm.scheduleGeneral(task, 5000); } private static void announceStart() { _quizRunning = true; _players.clear(); Broadcast.toAllOnlinePlayers("Quiz Event begins! "+_questionNumber+" questions. "+_answerTime+" secs for answer each. "); Broadcast.toAllOnlinePlayers("Type . and the number of the correct answer to the chat. (Like: .1)"); Broadcast.toAllOnlinePlayers("Get Ready!"); status = STATUS_ASK; tpm.scheduleGeneral(task, 5000); } //Add a player and its answer public static void setAnswer(L2PcInstance player, int answer) { if( _players.containsKey(player) ) player.sendMessage("You already choosen an aswer!: "+_players.get(player)); else _players.put(player, answer); } private static void endEvent() { _quizRunning = false; Broadcast.toAllOnlinePlayers("The Quiz Event is over!"); announced = 0; status = STATUS_NOT_IN_PROGRESS; tpm.scheduleGeneral(task, _betweenTime*1000); } private static void giveReward() { for( L2PcInstance p: _players.keySet()) { if(_players.get(p) == _rightanswer) { p.sendMessage("Your answer was correct!"); p.addItem("Quiz", _rewardID, _rewardCount, p, true); } else { p.sendMessage("Your answer was not correct!"); } } _players.clear(); } } \ No newline at end of file Index: dist/game/data/scripts/Custom/QuizEvent/QuizEvent.xml =================================================================== --- dist/game/data/scripts/custom/QuizEvent/QuizEvent.xml (revision 8768) +++ dist/game/data/scripts/custom/QuizEvent/QuizEvent.xml (working copy) <?xml version="1.0" encoding="UTF-8"?> <list> <question id = "1" ask = "Quel type Bijoux Drop Baium" answer1 = "Necklace" answer2 = "Ring" answer3 = "Earring" correct = "2" /> <question id = "2" ask = "Comment s'appel l'admin" answer1 = "Bellatrix" answer2 = "Roberta" answer3 = "Jo" correct = "1" /> <question id = "3" ask = "Quel Recompense donne le tvt" answer1 = "Codex" answer2 = "Coin" answer3 = "EventCoin" correct = "3" /> </list> Index: dist/game/data/scripts/handlers/voicedcommandhandlers/Quiz.java =================================================================== --- dist/game/data/scripts/handlers/voicedcommandhandlers/Quiz.java (revision 0) +++ dist/game/data/scripts/handlers/voicedcommandhandlers/Quiz.java (working copy) package handlers.voicedcommandhandlers; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import custom.QuizEvent.QuizEvent; /** * @author Bellatrix */ public class Quiz implements IVoicedCommandHandler { private static final String[] _voicedCommands = { "quiz", "1", "2", "3" }; /** * @see Bellatrix */ @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params) { if (command.equalsIgnoreCase("1") && QuizEvent._quizRunning) { QuizEvent.setAnswer(activeChar, 1); } if (command.equalsIgnoreCase("2") && QuizEvent._quizRunning) { QuizEvent.setAnswer(activeChar, 2); } if (command.equalsIgnoreCase("3") && QuizEvent._quizRunning) { QuizEvent.setAnswer(activeChar, 3); } return true; } /** * @see Bellatrix */ @Override public String[] getVoicedCommandList() { new QuizEvent(); return _voicedCommands; } } Index: dist/game/data/scripts/handlers/MasterHandlers.java =================================================================== --- dist/game/data/scripts/handlers/MasterHandlerjava (revision 0) +++ dist/game/data/scripts/handlers/Masterhandlers.java (working copy) import handlers.voicedcommandhandlers.Quiz; private static final Class<?>[] VOICED_COMMAND_HANDLERS = { StatsVCmd.class, // TODO: Add configuration options for this voiced commands: // CastleVCmd.class, // SetVCmd.class, (Config.L2JMOD_ALLOW_WEDDING ? Wedding.class : null), (Config.BANKING_SYSTEM_ENABLED ? Banking.class : null), (Config.L2JMOD_CHAT_ADMIN ? ChatAdmin.class : null), (Config.L2JMOD_MULTILANG_ENABLE && Config.L2JMOD_MULTILANG_VOICED_ALLOW ? Lang.class : null), (Config.L2JMOD_ENABLE_ONLINE_STATUS ? OnlineStatus.class : null), (Config.L2JMOD_DEBUG_VOICE_COMMAND ? Debug.class : null), (Config.L2JMOD_ALLOW_CHANGE_PASSWORD ? ChangePassword.class : null), Quiz.class,
  6. Hello I will Share Here My Script for aCis with Barakiel Kill And Set noblesse to No Noblesse party Members.. Here We Go... We Need to Create a new Class Here:net.sf.l2j.gameserver.scripting.scripts.custom With Name:BarakielNobless.Java Then Paste This Inside: +/* + * 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.scripting.scripts.custom; + + +import net.sf.l2j.gameserver.model.actor.L2Npc; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.scripting.Quest; + + +public class BarakielNobless extends Quest +{ +public BarakielNobless() +{ +super(-1, "custom"); + +addKillId(25325); +} + +@Override +public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) +{ +if (player.getParty() != null) +{ +for (L2PcInstance members : player.getParty().getPartyMembers()) +{ +if (!members.isInsideRadius(npc, 2000, false, false)) +{ +members.sendMessage("You Was On Wrong Place"); +continue; +} +if (!members.isNoble()) +{ +members.setNoble(true, true); +members.getInventory().addItem("Noblesse Tiara",7694,1,members,null); +members.sendMessage("You Are Noblesse now."); +} +else +{ +members.sendMessage("You already Noblesse."); +} + +members.broadcastUserInfo(); +} +} + +return null; +} + +public static void main(String args[]) +{ +new BarakielNobless(); +} +} And Dont Forget To Add Your Scripts.xml <script path="scripts.custom.HeroWeapon"/> +<script path="scripts.custom.BarakielNobless"/>
  7. I have created a code to reward for voting on several well-known sites. If someone has difficulty adding this code to their package, they can write to me at my discord https://discord.com/invite/VbnZbWR I will adapt this code for l2jfrozen and l2jserver or for some popular open source package. You can see the code in the following link: aCis: https://pastebin.com/1Wq6GZPs L2JServer H5: https://pastebin.com/KVyPAZ0X L2JFrozen 1.5 Interlude https://pastebin.com/GaAyMMT2 L2JMobius Classic Interlude https://pastebin.com/rJcPsbD4 L2JMobius Interlude https://pastebin.com/1HAX4UbN 05/17/2020 - For people who have integrated the voting system, I have made some arrangements to the voting system, it is currently working correctly and stable, the changes are already applied to the sources. http://www.mediafire.com/file/g6kag6pg5zu342h/patch_with_some_fiexes.txt/file
  8. Deleted all my shares a while ago but wanted to leave this one here because there are people selling this stupidly simple code. It's command based individual vote reward for Hopzone, Topzone and Network. Commands are .votehope, .votetop and .votenet. It is secured on both the account level and the IP level so it's as protected as it gets without adding HWID. It can be easily converted to a NPC based one. Code: https://gist.github.com/Elfocrash/a5ba37666dd9c4d3f9a9ec022301930c Link for gson 2.6.2 https://repo1.maven.org/maven2/com/google/code/gson/gson/2.6.2/gson-2.6.2.jar
  9. Hello From time to time I like to pick one of the things that are being sold but are really easy to code and I like to code them real quick and share them. Today's share is L2Warland's server-side Autofarm feature. How it works You set a few skills on the 10th shortcut skill bar Each section represents a skill type Skill usage is prioritised (Feel free to change the order to whatever works for you) Chance Low life Self skills Attacks You can toggle it or turn it on and of with voice commands .farm, .farmon, .farmoff If HP or MP pots are present they will be used after the configurable thresholds are met They will only target monsters that they can move to in order to attack Players will automatically auto attack if the "Attack" action is on any bar. If not they will only use skills Spoiler classes will spoil and sweeper Self spells will be used if the effect is not present and the cooldown is not reached Self spells will trigger toggle skills I tested just the basics and it looks like it's working fine. If you find any issues please report them. Video preview: Coded for aCis 382 Source code: https://gist.github.com/Elfocrash/2afaa14089dfba2d2199c9d22f06d0d5 Disclaimer: This shares absolutely no code with the Autobots engine Thanks, Elfo
  10. Hello, cheaters. - Nothing really new or unique, an simple panel that create list with pages for the droplist of Monster/Raidboss. - Simple addon : Player can choose to avoid specific item from the droplist. - Code not include part of "item.getIcon()" you can find many shared ways to get icon for each item. Preview : Code : [Hidden Content]
  11. https://pastebin.com/fC763kww many ask none helps so it wasnt shared as i checked here u go
  12. Okay , a simple drop event coded on l2j Sources it multiplies the drops of item only if its100% rate you type //startdrop and it will announce and automaticly start after 15 minutes you can type //stopdrop if you wish to force stop it there is a configuration on the rate default is x1.2 the event will last for 60 minutes , and it will announce back when it ends if event is active and a player logs in he will get a notification by pm :) Create a new class : DropEvent package com.event; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.ThreadPoolManager; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.clientpackets.Say2; import net.sf.l2j.gameserver.network.serverpackets.CreatureSay; /** * @author Kishin */ public class DropEvent { private int startIn = 15; private int stopIn = 60; public void sendDropEventInfo(L2PcInstance player) { player.broadcastPacket(new CreatureSay(player.getObjectId() ,Say2.TELL," "+player.getName()+":","Drop Event is currently running!")); player.sendMessage("Drop event is currently running!"); } public void startEvent() { Announcements.getInstance().announceToAll("Double drop event will start in "+startIn+" minutes"); ThreadPoolManager.getInstance().scheduleGeneral(new startTimer(), (startIn *60 * 1000)); } public void forceStop() { setDoubleDrop(false); } public class startTimer implements Runnable { public void run() { setDoubleDrop(true); Announcements.getInstance().announceToAll("Double drop event has started !"); Announcements.getInstance().announceToAll("Event will end in "+stopIn+" minutes !"); ThreadPoolManager.getInstance().scheduleGeneral(new stopTimer(), (stopIn * 60 * 1000)); } } public class stopTimer implements Runnable { public void run() { if (isDoubleDrop() == true) { setDoubleDrop(false); Announcements.getInstance().announceToAll("Double drop event has ended"); } } } public static DropEvent getInstance() { return DropEvent.SingletonHolder._instance; } private static class SingletonHolder { protected static final DropEvent _instance = new DropEvent(); } private boolean _isDoubleDrop; public void setDoubleDrop(boolean isDoubleDrop) { _isDoubleDrop = isDoubleDrop; } public boolean isDoubleDrop() { return _isDoubleDrop; } } L2Attackable.java search this -> private RewardItem calculateCategorizedRewardItem and under this : dropChance *= Config.L2JMOD_CHAMPION_REWARDS; paste : if (DropEvent.getInstance().isDoubleDrop() == true) { if ( dropChance == 1000000) { dropChance *= Config.DROP_EVENT_RATE; } } EnterWorld.java -> paste somewhere if (DropEvent.getInstance().isDoubleDrop() == true) { DropEvent.getInstance().sendDropEventInfo(activeChar); } in Config.java paste somewhere this : public static float DROP_EVENT_RATE; pick your destination file mine is customSettings paste : DROP_EVENT_RATE = Float.parseFloat(customsSettings.getProperty("dropEventRate", "1.2")); Create a new class in admincommandhandlers AdminDropEvent <- package net.sf.l2j.gameserver.handler.admincommandhandlers; import com.event.DropEvent; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; /** * @author Kishin */ public class AdminDropEvent implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_startdrop", "admin_stopdrop" }; @Override public boolean useAdminCommand(String command, L2PcInstance activeChar) { try { if (command.equals("admin_startdrop")) { if (DropEvent.getInstance().isDoubleDrop() == false) { DropEvent.getInstance().startEvent(); } } else if (command.equals("admin_stopdrop")) { if (DropEvent.getInstance().isDoubleDrop() == true) { DropEvent.getInstance().forceStop(); Announcements.getInstance().announceToAll("Admin has ended the drop event"); } } } catch (Exception e) { e.printStackTrace(); } return false; } @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } Have fun :) register the command handler and good to go :)
  13. Kalhspera. edw pera ine 1 donate manager. apo ton l2sayn to exw vgalei kai to dinw se esas. parakalw mhn krazete. :D Code: http://pastebin.com/tuWcQAXQ EDIT: 3exasa na valw to name sto Instance. valte L2DonateShopInstance (ADAPTED FOR L2JACIS http://pastebin.com/6d9P4wm1 ) by member l2jkain SCREENSHOTS Download: Gia na doulepsi to code prepei na valete auta ta arxia. Click Me Diavaste to ReadMe.txt To sql uparxi sto arxio. To Donate Coin exei id 1704 Ean vgalei kapoio provlima kalo einai na kanete 1 post se auto to topic gia na to checkarw. :) Doulevei sto l2jfrozen last rev. twra gia prohgoumena den 3erw. :D UPDATED** //augment command http://www.maxcheaters.com/topic/207755-l2jfrozen-augment-command/ CREDITS: fofas
  14. Hello again Cheaters, nothing special again. I don't know why peoples asking for this kind of balancing but somebody ask me for it and i make it for him free so i decide to share it with all. (Coded/Tested in 20 minutes) Coded for aCis 385 but its easy to be adapted to any source. XML looks like : <?xml version='1.0' encoding='utf-8'?> <list> <!-- Type List : NORMAL, MAGIC, CRITICAL, M_CRITICAL, BLOW, PHYSICAL_SKILL_DAMAGE, PHYSICAL_SKILL_CRITICAL --> <balance type="NORMAL" class="SHILLIEN_TEMPLAR" target="CARDINAL" value="1.3"/> </list> Result: value="1.0" -> You hit for 875 damage. value="1.3" -> You hit for 1138 damage. Code : [Hidden Content]
  15. Hello guys, Before 4-5 months i created a script for a new raid in order to avoid all classic raids that are really boring... It isn't something special, but i always like different and unusual things... Plagueseeker Raid Starting with some special cameras while all players are paralyzed. When the broadcast end, the following features stands there: action task every 2 seconds: There is 20% chance to 'debuff' a random player if is healer class Debuffs: 20% chance for 15% chance for 10% chance for 50% chance for There is 5% chance to 1) Spawn some minions when the hp of the raid is lower than 40% in order to protect the raid boss (can be happened unlimited times with chance 5%). Minions will suicide after 10 seconds after the spawn time if not get killed. 2) Pick a random target and kill him instant. When the hp of the raid is lower than 50% Broadcast again some special cameras (while players are paralyzed again), an earthquake for 5 seconds and instant kill 10 random players around the raid in 700 radius (can be happened only 1 time). inactivity task If the raid boss not attacked for more than 15 minutes, all players are going back and raid will be deleted. * All the above features are meant to be used in a boss zone ( i used 150000 as a custom one in my pack). Any feature wont work outside of the zone, I wont share any thing like that since its just c/p. * Its your responsibility to use the necessary checks in order to avoid bugs like move the raid out of zone. I coded for me at coliseum with doors closed. Also you have to set by urself how the raid will be spawned (i was about to code the spawn thing but i dont remember why i didnt). I used //spawn just for the video . Code: [Hidden Content] Coded (if i remember well) in acis 370. Note: If you want to expand it or understand how a script can be coded, check this topic (if any other post is related to scripts and have informations post it)
  16. Hello. With this config you can manage what item to delete from droplist. This patch is for aCis packs, as you know aCis have no droplist in sql so it is very hard to open each npc and remove item from it's drop. So put item ids in this config and item will remove from droplist. aCis 357 rev. http://pastebin.com/HWvYX088
  17. Hello there.. Here is my Epic Boss Manager from my old server. Nothing special, but some of you may need it. What's inside? Works only with retail Grandbosses. [No retail zaken id] Inform you about the status of Grandboss. Inform you about respawn time. Date/Time. Enable/Disable it on configs. # Announce Grandboss status. # Ex: If status for Antharas/Valakas/Frintezza change to 2 player get announce: # Grandboss>name is engaged in battle. # If status changed to 3: Grandbossname has been killed. Type .epic for details! # For Baium if status change to 1 - Baium is awake and fighting. # All Grandboses respawned - Grandbossname is spawned in the world! AnnounceGrandBossStatus = True [Hidden Content]
  18. When 2 or more cardinals or other healers in one party the heal gets nerfed net.sf.l2j.gameserver.handler.skillhandlers.heal.java public void useSkill(Creature activeChar, L2Skill skill, WorldObject[] targets) { +int healers = 0; +int minus = 2; + + if (activeChar.getParty() != null) +{ + for (Player player : activeChar.getParty().getMembers()) + { + if (player != null && player.getClassId().getId() == 97) + { + healers++; + + if (minus != 2 && (player.getPvpFlag() != 0 || player.getKarma() > 0)) + minus = 2; + } + } +} //go here hp = power; hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100; } //and paste this too +if (healers >= 2) // 2 or more healers in party +{ + int nerfValue = (2 + (healers - minus)); + hp /= nerfValue; + } // If you have full HP and you get HP buff, u will receive 0HP restored message
  19. Hi there for one more time, i made this npc today because i can see there are lots of npc like this but there is not any like this i made today. It is just an NPC where player can choose what level would like to be. Price is being regulated automatically like that: Number_of_levels_decreased * Configurable_price. E.g: Player is 85 level, he chooses to be 70. His payment would be 15(levels) * code_price. Preview (HTM Dialog): How to install: 1. Create a new java file on data/scripts/custom/DeLevelManager/DeLevelManager.java Paste this code: package custom.DeLevelManager; import com.l2jserver.gameserver.cache.HtmCache; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.model.L2Skill; import com.l2jserver.gameserver.model.actor.L2Npc; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.model.quest.Quest; import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo; import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage; import com.l2jserver.gameserver.network.serverpackets.UserInfo; /** * @author `Heroin * Made For Maxcheaters.com */ public class DeLevelManager extends Quest { private static final int npcid = 36650; // npc id private static final int MinLevel = 10; // Minimum Level, (e.g if you set 10, players wont be able to be level 9). private static final int ItemConsumeId = 57; // Item Consume id private int levels ; // Item Consume id private static final int ItemConsumeNumEveryLevel = 100; // Item ItemConsumeNumEveryLevel private static String htm = "data/scripts/custom/DeLevelManager/1.htm"; //html location private static String ItemName = ItemTable.getInstance().createDummyItem(ItemConsumeId).getItemName(); public DeLevelManager(int questId, String name, String descr) { super(questId, name, descr); addFirstTalkId(npcid); addTalkId(npcid); addStartNpc(npcid); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { if (event.startsWith("dlvl")) { Dlvl(event, npc, player, event); } return ""; } private void Dlvl(String event, L2Npc npc, L2PcInstance player, String command) { try { String val = command.substring(5); int pointer = Integer.parseInt(val); int k = player.getLevel(); levels = k - pointer; if (player.getInventory().getItemByItemId(ItemConsumeId) == null) { player.sendMessage("You don't have enough items!"); return; } if (val == null) { player.sendMessage("Something went wrong!"); return; } if (pointer < 10) { player.sendMessage("Incorrect Level Number!"); return; } if (pointer < MinLevel) { player.sendMessage("Incorrect Level Number!"); return; } if (player.getLevel() <= pointer) { player.sendMessage("Your level is already lower."); return; } if (player.getInventory().getItemByItemId(ItemConsumeId).getCount() < ItemConsumeNumEveryLevel*levels) { player.sendMessage("You don't have enough items!"); return; } if (player.getInventory().getItemByItemId(ItemConsumeId).getCount() >= ItemConsumeNumEveryLevel) { k = player.getLevel(); final byte lvl = Byte.parseByte(pointer + ""); player.getStat().setLevel(lvl); player.sendMessage("Congratulations! You are now "+pointer+" level."); for(L2Skill sk : player.getAllSkills()) { player.removeSkill(sk); } player.broadcastStatusUpdate(); player.broadcastUserInfo(); player.sendPacket(new UserInfo(player)); player.sendPacket(new ExBrExtraUserInfo(player)); player.giveAvailableAutoGetSkills(); player.giveAvailableSkills(true, true); player.sendSkillList(); levels = k - pointer; player.destroyItemByItemId("DlvlManager", ItemConsumeId, ItemConsumeNumEveryLevel*levels, player, true); } } catch (Exception e) { player.sendMessage("Something went wrong try again."); } } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { final int npcId = npc.getNpcId(); if (player.getQuestState(getName()) == null) { newQuestState(player); } if (npcId == npcid) { String html = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htm); html = html.replaceAll("%player%", player.getName()); html = html.replaceAll("%itemname%", ItemName); html = html.replaceAll("%price%", ""+ItemConsumeNumEveryLevel+""); NpcHtmlMessage npcHtml = new NpcHtmlMessage(0); npcHtml.setHtml(html); player.sendPacket(npcHtml); } return ""; } public static void main(final String[] args) { new DeLevelManager(-1, DeLevelManager.class.getSimpleName(), "custom"); System.out.println("De Level Manager by `Heroin has been loaded successfully!"); } } 2.Create a new htm file on data/scripts/custom/HeroManager/1.htm Paste this code on it. <html> <title>%player%</title> <body><center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center><br> Hello there, if you want to low your current level, you came to right place!<br> You have just to choose the <font color=FF0000>number</font> of level you would like to be.<br> In exchange, i am going to take you <font color=LEVEL>%price% %itemname%</font> for <font color=LEVEL>each level </font> you decrease.<br> Remember: You can't choose a number higher than your current level.<br> <table width=270><tr> <td><button value="Change my level to: " action="bypass -h Quest DeLevelManager dlvl $lv" width=180 height=21 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td> <td><edit var="lv" width=50></td> </tr></table> <br><br><br><br> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32></center> </body></html> 3. Add script on scripts.cfg file: custom/DeLevelManager/DeLevelManager.java 4. Run this query on your database or install the NPC by yourself. INSERT INTO `custom_npc` VALUES ('36650', '13173', 'DeLevelManager', '1', 'MaxCheaters.com', '1', 'LineageNPC.clear_npc', '8.00', '19.00', '85', 'male', 'L2Npc', null, null, null, null, null, '40', '43', '30', '21', '20', '20', '0', '0', null, null, null, null, '230', '1', '0', '333', '0', '0', '0', '60.00000', '120.00000', '1', '1', '0', '0'); How to Modify: Check Variables on code: private static final int npcid = 36650; // npc id private static final int MinLevel = 10; // Minimum Level, (e.g if you set 10, players wont be able to be level 9). private static final int ItemConsumeId = 57; // Item Consume id private int levels ; // Item Consume id private static final int ItemConsumeNumEveryLevel = 100; // Item ItemConsumeNumEveryLevel private static String htm = "data/scripts/custom/DeLevelManager/1.htm"; //html location Credits & Idea: `Heroin Adapted to l2jserver high five by Solomun:
  20. Hello guys, Long time ago, i had to create zone using NPoly and due to fact that is pain in the ass, i've decided to make this code. It's not unique, it's just slightly helpful thing which is going to make your life easier and save a bit time. To understand how the zones work take a look @SweeTs topic. You will understand many things. What is it? You have to select the zone type (NPoly,Cuboid,Cylinder) Set the coordinates (//saveLoc will store the current loc) Once you set all the locs you can save it in xml via the button Store or //storeLocs The Z distance can be found zDifference ( i made it 1000 as default but its up to you and the zone). P.S Im so lazy to make the htmls good. (even the first one , its not my job :P) coded for aCis 374 @StinkyMadness *Update* (far better than mine) Using 1 HTML and not 3 HTML Designed like other aCis admin panel code
  21. Hello again cheaters. - An simple limit zone for the raidbosses. (Works as "Anti-Take-Away" the Raidbosses) - You can use the @melron code to create easy that zones (Code Here ). - I know can be done with just the boss spawn location and threadpool but i prefer use zone for it. Code : [Hidden Content]
  22. java/net/sf/l2j/gameserver/model/base/Experience.java public class Experience { public final static long LEVEL[] = { -1L, // level 0 (unreachable) 0L, 68L, 363L, 1168L, 2884L, 6038L, 11287L, 19423L, 31378L, 48229L, // level 10 71201L, 101676L, 141192L, 191452L, 254327L, 331864L, 426284L, 539995L, 675590L, 835854L, // level 20 1023775L, 1242536L, 1495531L, 1786365L, 2118860L, 2497059L, 2925229L, 3407873L, 3949727L, 4555766L, // level 30 5231213L, 5981539L, 6812472L, 7729999L, 8740372L, 9850111L, 11066012L, 12395149L, 13844879L, 15422851L, // level 40 17137002L, 18995573L, 21007103L, 23180442L, 25524751L, 28049509L, 30764519L, 33679907L, 36806133L, 40153995L, // level 50 45524865L, 51262204L, 57383682L, 63907585L, 70852742L, 80700339L, 91162131L, 102265326L, 114038008L, 126509030L, // level 60 146307211L, 167243291L, 189363788L, 212716741L, 237351413L, 271973532L, 308441375L, 346825235L, 387197529L, 429632402L, // level 70 474205751L, 532692055L, 606319094L, 696376867L, 804219972L, 931275828L, 1151275834L, 1511275834L, 2099275834L, 4200000000L, // level 80 6299994999L, 10499905559L, 16800005559L, 27299995559L, 44100005559L, //level 85 71400000000L }; /** * This is the first UNREACHABLE level.<BR> * ex: If you want a max at 85 & 99.99%, you have to put 86.<BR> * <BR> */ public final static byte MAX_LEVEL = 86; public final static byte MIN_NEWBIE_LEVEL = 6; public final static byte MAX_NEWBIE_LEVEL = 25; } com/l2jserver/gameserver/model/base/Experience.java public class Experience { public final static long LEVEL[] = { -1L, // level 0 (unreachable) 0L, 68L, 363L, 1168L, 2884L, 6038L, 11287L, 19423L, 31378L, 48229L, //level 10 71201L, 101676L, 141192L, 191452L, 254327L, 331864L, 426284L, 539995L, 675590L, 835854L, //level 20 1023775L, 1242536L, 1495531L, 1786365L, 2118860L, 2497059L, 2925229L, 3407873L, 3949727L, 4555766L, //level 30 5231213L, 5981539L, 6812472L, 7729999L, 8740372L, 9850111L, 11066012L, 12395149L, 13844879L, 15422851L, //level 40 17137002L, 18995573L, 21007103L, 23180442L, 25524751L, 28049509L, 30764519L, 33679907L, 36806133L, 40153995L, //level 50 45524865L, 51262204L, 57383682L, 63907585L, 70852742L, 80700339L, 91162131L, 102265326L, 114038008L, 126509030L, //level 60 146307211L, 167243291L, 189363788L, 212716741L, 237351413L, 271973532L, 308441375L, 346825235L, 387197529L, 429632402L, //level 70 474205751L, 532692055L, 606319094L, 696376867L, 804219972L, 931275828L, 1151275834L, 1511275834L, 2099275834L, 4200000000L, //level 80 6299994999L, 10499905559L, 16800005559L, 27299995559L, 44100005559L, //level 85 71400000000L }; /** * This is the first UNREACHABLE level.<BR> * ex: If you want a max at 85 & 99.99%, you have to put 86.<BR><BR> */ public final static byte MAX_LEVEL = 86; public final static byte MIN_NEWBIE_LEVEL = 6; public final static byte MAX_NEWBIE_LEVEL = 25; L2JFrozen: data/stats/experience.xml <?xml version="1.0" encoding="UTF-8"?> <table maxLevel="85" maxPetLevel="80" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/experience.xsd"> <experience level="1" tolevel="0" /> <experience level="2" tolevel="68" /> <experience level="3" tolevel="363" /> <experience level="4" tolevel="1168" /> <experience level="5" tolevel="2884" /> <experience level="6" tolevel="6038" /> <experience level="7" tolevel="11287" /> <experience level="8" tolevel="19423" /> <experience level="9" tolevel="31378" /> <experience level="10" tolevel="48229" /> <experience level="11" tolevel="71201" /> <experience level="12" tolevel="101676" /> <experience level="13" tolevel="141192" /> <experience level="14" tolevel="191452" /> <experience level="15" tolevel="254327" /> <experience level="16" tolevel="331864" /> <experience level="17" tolevel="426284" /> <experience level="18" tolevel="539995" /> <experience level="19" tolevel="675590" /> <experience level="20" tolevel="835854" /> <experience level="21" tolevel="1023775" /> <experience level="22" tolevel="1242536" /> <experience level="23" tolevel="1495531" /> <experience level="24" tolevel="1786365" /> <experience level="25" tolevel="2118860" /> <experience level="26" tolevel="2497059" /> <experience level="27" tolevel="2925229" /> <experience level="28" tolevel="3407873" /> <experience level="29" tolevel="3949727" /> <experience level="30" tolevel="4555766" /> <experience level="31" tolevel="5231213" /> <experience level="32" tolevel="5981539" /> <experience level="33" tolevel="6812472" /> <experience level="34" tolevel="7729999" /> <experience level="35" tolevel="8740372" /> <experience level="36" tolevel="9850111" /> <experience level="37" tolevel="11066012" /> <experience level="38" tolevel="12395149" /> <experience level="39" tolevel="13844879" /> <experience level="40" tolevel="15422851" /> <experience level="41" tolevel="17137002" /> <experience level="42" tolevel="18995573" /> <experience level="43" tolevel="21007103" /> <experience level="44" tolevel="23180442" /> <experience level="45" tolevel="25524751" /> <experience level="46" tolevel="28049509" /> <experience level="47" tolevel="30764519" /> <experience level="48" tolevel="33679907" /> <experience level="49" tolevel="36806133" /> <experience level="50" tolevel="40153995" /> <experience level="51" tolevel="45524865" /> <experience level="52" tolevel="51262204" /> <experience level="53" tolevel="57383682" /> <experience level="54" tolevel="63907585" /> <experience level="55" tolevel="70852742" /> <experience level="56" tolevel="80700339" /> <experience level="57" tolevel="91162131" /> <experience level="58" tolevel="102265326" /> <experience level="59" tolevel="114038008" /> <experience level="60" tolevel="126509030" /> <experience level="61" tolevel="146307211" /> <experience level="62" tolevel="167243291" /> <experience level="63" tolevel="189363788" /> <experience level="64" tolevel="212716741" /> <experience level="65" tolevel="237351413" /> <experience level="66" tolevel="271973532" /> <experience level="67" tolevel="308441375" /> <experience level="68" tolevel="346825235" /> <experience level="69" tolevel="387197529" /> <experience level="70" tolevel="429632402" /> <experience level="71" tolevel="474205751" /> <experience level="72" tolevel="532692055" /> <experience level="73" tolevel="606319094" /> <experience level="74" tolevel="696376867" /> <experience level="75" tolevel="804219972" /> <experience level="76" tolevel="931275828" /> <experience level="77" tolevel="1151275834" /> <experience level="78" tolevel="1511275834" /> <experience level="79" tolevel="2099275834" /> <experience level="80" tolevel="4200000000" /> <experience level="81" tolevel="6299994999" /> <experience level="82" tolevel="10499905559" /> <experience level="83" tolevel="16800005559" /> <experience level="84" tolevel="27299995559" /> <experience level="85" tolevel="44100005559" /> </table> L2JFrozen: data/xsd/experience.xsd <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema"> <element name="table"> <complexType> <sequence minOccurs="1" maxOccurs="1"> <element name="experience" minOccurs="1" maxOccurs="80"> <complexType> <attribute name="level" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> <attribute name="tolevel" type="nonNegativeInteger" use="required" /> </complexType> </element> </sequence> <attribute name="maxLevel" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> <attribute name="maxPetLevel" use="required"> <simpleType> <restriction base="positiveInteger"> <minInclusive value="1" /> <maxInclusive value="85" /> </restriction> </simpleType> </attribute> </complexType> </element> </schema> pistevo 8a sas aresi ;)
  23. Hello guys. You have already seen this feature, but i decided to share it since i coded this one from scratch. There many features like: Customize your look by choosing 1 by 1 the items you want. Get the target's look. Get the target's single part. Ability to add items available through configs. You can see the changes too. # DressMe system. AllowDressMeSystem = False # DressMe values. # Note: It works like name,id;name,id # WARNING: No spaces on names, use _ instead of space. DressMeChests = Draconic,6379;Imperial,6373;Arcana,6383 DressMeLegs = Imperial,6374 DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385 DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384 DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608 public static boolean ALLOW_DRESS_ME_SYSTEM; public static Map<String, Integer> DRESS_ME_CHESTS = new HashMap<>(); public static Map<String, Integer> DRESS_ME_LEGS = new HashMap<>(); public static Map<String, Integer> DRESS_ME_BOOTS = new HashMap<>(); public static Map<String, Integer> DRESS_ME_GLOVES = new HashMap<>(); public static Map<String, Integer> DRESS_ME_WEAPONS = new HashMap<>(); ALLOW_DRESS_ME_SYSTEM = c.getProperty("AllowDressMeSystem", false); String temp = c.getProperty("DressMeChests", ""); String[] temp2 = temp.split(";"); for (String s : temp2) { String[] t = s.split(","); DRESS_ME_CHESTS.put(t[0], Integer.parseInt(t[1])); } temp = c.getProperty("DressMeLegs", ""); temp2 = temp.split(";"); for (String s : temp2) { String[] t = s.split(","); DRESS_ME_LEGS.put(t[0], Integer.parseInt(t[1])); } temp = c.getProperty("DressMeBoots", ""); temp2 = temp.split(";"); for (String s : temp2) { String[] t = s.split(","); DRESS_ME_BOOTS.put(t[0], Integer.parseInt(t[1])); } temp = c.getProperty("DressMeGloves", ""); temp2 = temp.split(";"); for (String s : temp2) { String[] t = s.split(","); DRESS_ME_GLOVES.put(t[0], Integer.parseInt(t[1])); } temp = c.getProperty("DressMeWeapons", ""); temp2 = temp.split(";"); for (String s : temp2) { String[] t = s.split(","); DRESS_ME_WEAPONS.put(t[0], Integer.parseInt(t[1])); } /* * 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.voicedcommandhandlers; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author Anarchy * */ public class DressMe implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "dressme" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar) { if (command.equals("dressme")) { sendMainWindow(activeChar); } return true; } public static void sendMainWindow(L2PcInstance activeChar) { NpcHtmlMessage htm = new NpcHtmlMessage(0); htm.setFile("./data/html/custom/dressme/main.htm"); htm.replace("%enabled%", activeChar.isDressMeEnabled() ? "enabled" : "disabled"); if (activeChar.getDressMeData() == null) { htm.replace("%chestinfo%", "You have no custom chest."); htm.replace("%legsinfo%", "You have no custom legs."); htm.replace("%bootsinfo%", "You have no custom boots."); htm.replace("%glovesinfo%", "You have no custom gloves."); htm.replace("%weapinfo%", "You have no custom weapon."); } else { htm.replace("%chestinfo%", activeChar.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getChestId()).getName()); htm.replace("%legsinfo%", activeChar.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getLegsId()).getName()); htm.replace("%bootsinfo%", activeChar.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getBootsId()).getName()); htm.replace("%glovesinfo%", activeChar.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getGlovesId()).getName()); htm.replace("%weapinfo%", activeChar.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(activeChar.getDressMeData().getWeapId()).getName()); } activeChar.sendPacket(htm); } @Override public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } /* * 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.bypasshandlers; import java.util.StringTokenizer; import net.sf.l2j.Config; import net.sf.l2j.gameserver.custom.DressMeData; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.handler.IBypassHandler; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.DressMe; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.itemcontainer.Inventory; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author Anarchy * */ public class DressMeBypasses implements IBypassHandler { private static final String[] BYPASSES = { "bp_changedressmestatus", "bp_editWindow", "bp_setpart", "bp_gettarget", "bp_main" }; @Override public boolean handleBypass(String bypass, L2PcInstance activeChar) { if (bypass.equals("bp_changedressmestatus")) { if (activeChar.isDressMeEnabled()) { activeChar.setDressMeEnabled(false); activeChar.broadcastUserInfo(); } else { activeChar.setDressMeEnabled(true); activeChar.broadcastUserInfo(); } DressMe.sendMainWindow(activeChar); } if (bypass.startsWith("bp_editWindow")) { String bp = bypass.substring(14); StringTokenizer st = new StringTokenizer(bp); sendEditWindow(activeChar, st.nextToken()); } if (bypass.startsWith("bp_setpart")) { String bp = bypass.substring(11); StringTokenizer st = new StringTokenizer(bp); String part = st.nextToken(); String type = st.nextToken(); setPart(activeChar, part, type); } if (bypass.startsWith("bp_gettarget")) { String bp = bypass.substring(13); StringTokenizer st = new StringTokenizer(bp); String part = st.nextToken(); stealTarget(activeChar, part); } if (bypass.equals("bp_main")) { DressMe.sendMainWindow(activeChar); } return true; } public void stealTarget(L2PcInstance p, String part) { if (p.getTarget() == null || !(p.getTarget() instanceof L2PcInstance)) { p.sendMessage("Invalid target."); return; } L2PcInstance t = (L2PcInstance)p.getTarget(); if (p.getDressMeData() == null) { DressMeData dmd = new DressMeData(); p.setDressMeData(dmd); } boolean returnMain = false; switch (part) { case "chest": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null) { p.getDressMeData().setChestId(0); } else { p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId()); } break; } case "legs": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null) { p.getDressMeData().setLegsId(0); } else { p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId()); } break; } case "gloves": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null) { p.getDressMeData().setGlovesId(0); } else { p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId()); } break; } case "boots": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null) { p.getDressMeData().setBootsId(0); } else { p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId()); } break; } case "weap": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { p.getDressMeData().setWeapId(0); } else { p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId()); } break; } case "all": { if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST) == null) { p.getDressMeData().setChestId(0); } else { p.getDressMeData().setChestId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_CHEST).getItemId()); } if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS) == null) { p.getDressMeData().setLegsId(0); } else { p.getDressMeData().setLegsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_LEGS).getItemId()); } if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES) == null) { p.getDressMeData().setGlovesId(0); } else { p.getDressMeData().setGlovesId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_GLOVES).getItemId()); } if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET) == null) { p.getDressMeData().setBootsId(0); } else { p.getDressMeData().setBootsId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_FEET).getItemId()); } if (t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND) == null) { p.getDressMeData().setWeapId(0); } else { p.getDressMeData().setWeapId(t.getInventory().getPaperdollItem(Inventory.PAPERDOLL_RHAND).getItemId()); } returnMain = true; break; } } p.broadcastUserInfo(); if (!returnMain) sendEditWindow(p, part); else DressMe.sendMainWindow(p); } public void setPart(L2PcInstance p, String part, String type) { if (p.getDressMeData() == null) { DressMeData dmd = new DressMeData(); p.setDressMeData(dmd); } switch (part) { case "chest": { if (Config.DRESS_ME_CHESTS.keySet().contains(type)) { p.getDressMeData().setChestId(Config.DRESS_ME_CHESTS.get(type)); } break; } case "legs": { if (Config.DRESS_ME_LEGS.keySet().contains(type)) { p.getDressMeData().setLegsId(Config.DRESS_ME_LEGS.get(type)); } break; } case "gloves": { if (Config.DRESS_ME_GLOVES.keySet().contains(type)) { p.getDressMeData().setGlovesId(Config.DRESS_ME_GLOVES.get(type)); } break; } case "boots": { if (Config.DRESS_ME_BOOTS.keySet().contains(type)) { p.getDressMeData().setBootsId(Config.DRESS_ME_BOOTS.get(type)); } break; } case "weap": { if (Config.DRESS_ME_WEAPONS.keySet().contains(type)) { p.getDressMeData().setWeapId(Config.DRESS_ME_WEAPONS.get(type)); } break; } } p.broadcastUserInfo(); sendEditWindow(p, part); } public void sendEditWindow(L2PcInstance p, String part) { NpcHtmlMessage htm = new NpcHtmlMessage(0); htm.setFile("./data/html/custom/dressme/edit.htm"); htm.replace("%part%", part); switch (part) { case "chest": { if (p.getDressMeData() == null) { htm.replace("%partinfo%", "You have no custom chest."); } else { htm.replace("%partinfo%", p.getDressMeData().getChestId() == 0 ? "You have no custom chest." : ItemTable.getInstance().getTemplate(p.getDressMeData().getChestId()).getName()); } String temp = ""; for (String s : Config.DRESS_ME_CHESTS.keySet()) { temp += s+";"; } htm.replace("%dropboxdata%", temp); break; } case "legs": { if (p.getDressMeData() == null) { htm.replace("%partinfo%", "You have no custom legs."); } else { htm.replace("%partinfo%", p.getDressMeData().getLegsId() == 0 ? "You have no custom legs." : ItemTable.getInstance().getTemplate(p.getDressMeData().getLegsId()).getName()); } String temp = ""; for (String s : Config.DRESS_ME_LEGS.keySet()) { temp += s+";"; } htm.replace("%dropboxdata%", temp); break; } case "gloves": { if (p.getDressMeData() == null) { htm.replace("%partinfo%", "You have no custom gloves."); } else { htm.replace("%partinfo%", p.getDressMeData().getGlovesId() == 0 ? "You have no custom gloves." : ItemTable.getInstance().getTemplate(p.getDressMeData().getGlovesId()).getName()); } String temp = ""; for (String s : Config.DRESS_ME_GLOVES.keySet()) { temp += s+";"; } htm.replace("%dropboxdata%", temp); break; } case "boots": { if (p.getDressMeData() == null) { htm.replace("%partinfo%", "You have no custom boots."); } else { htm.replace("%partinfo%", p.getDressMeData().getBootsId() == 0 ? "You have no custom boots." : ItemTable.getInstance().getTemplate(p.getDressMeData().getBootsId()).getName()); } String temp = ""; for (String s : Config.DRESS_ME_BOOTS.keySet()) { temp += s+";"; } htm.replace("%dropboxdata%", temp); break; } case "weap": { if (p.getDressMeData() == null) { htm.replace("%partinfo%", "You have no custom weapon."); } else { htm.replace("%partinfo%", p.getDressMeData().getWeapId() == 0 ? "You have no custom weapon." : ItemTable.getInstance().getTemplate(p.getDressMeData().getWeapId()).getName()); } String temp = ""; for (String s : Config.DRESS_ME_WEAPONS.keySet()) { temp += s+";"; } htm.replace("%dropboxdata%", temp); break; } } p.sendPacket(htm); } @Override public String[] getBypassHandlersList() { return BYPASSES; } } /* * 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.custom; /** * @author Anarchy * */ public class DressMeData { private int chestId, legsId, glovesId, feetId, weapId; public DressMeData() { chestId = 0; legsId = 0; glovesId = 0; feetId = 0; weapId = 0; } public int getChestId() { return chestId; } public int getLegsId() { return legsId; } public int getGlovesId() { return glovesId; } public int getBootsId() { return feetId; } public int getWeapId() { return weapId; } public void setChestId(int val) { chestId = val; } public void setLegsId(int val) { legsId = val; } public void setGlovesId(int val) { glovesId = val; } public void setBootsId(int val) { feetId = val; } public void setWeapId(int val) { weapId = val; } } CharInfo.java Replace these: writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); with these: if (!_activeChar.isDressMeEnabled()) { writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); } else { writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId())); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_inv.getPaperdollItemId(Inventory.PAPERDOLL_FACE)); } UserInfo.java Replace these: writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE)); with these: if (!_activeChar.isDressMeEnabled()) { writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE)); } else { writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId())); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId())); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId())); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId())); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getDressMeData() == null ?_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_FACE)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIRALL)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_REAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEAR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_NECK)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LFINGER)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HEAD)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LHAND)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : (_activeChar.getDressMeData().getGlovesId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_GLOVES) : _activeChar.getDressMeData().getGlovesId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : (_activeChar.getDressMeData().getChestId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_CHEST) : _activeChar.getDressMeData().getChestId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : (_activeChar.getDressMeData().getLegsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_LEGS) : _activeChar.getDressMeData().getLegsId())); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : (_activeChar.getDressMeData().getBootsId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FEET) : _activeChar.getDressMeData().getBootsId())); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_BACK)); writeD(_activeChar.getDressMeData() == null ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : (_activeChar.getDressMeData().getWeapId() == 0 ? _activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) : _activeChar.getDressMeData().getWeapId())); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_HAIR)); writeD(_activeChar.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_FACE)); } L2PcInstance.java private DressMeData _dressmedata = null; public DressMeData getDressMeData() { return _dressmedata; } public void setDressMeData(DressMeData val) { _dressmedata = val; } private boolean _dressed = false; public boolean isDressMeEnabled() { return _dressed; } public void setDressMeEnabled(boolean val) { _dressed = val; } And the htmls: data/html/custom/dressme/edit.htm <html><body> <center> Current %part%: %partinfo% <br> <combobox width=120 height=17 var=val list=%dropboxdata%> <br1> <a action="bypass -h bp_setpart %part% $val">Set.</a> <br1> <a action="bypass -h bp_gettarget %part%">Get target's.</a> <br> <a action="bypass -h bp_main">Back.</a> </center> </body></html> data/html/custom/dressme/main.htm <html><body> <center> Here you can change your appearance! <br> Dress me status is currently <font color="LEVEL">%enabled%</font>.<br1> <a action="bypass -h bp_changedressmestatus">Change status.</a> <br> Your current custom appearance items: <br> </center> Chest: %chestinfo% <br1> <a action="bypass -h bp_editWindow chest">Edit.</a> <br> Legs: %legsinfo% <br1> <a action="bypass -h bp_editWindow legs">Edit.</a> <br> Gloves: %glovesinfo% <br1> <a action="bypass -h bp_editWindow gloves">Edit.</a> <br> Boots: %bootsinfo% <br1> <a action="bypass -h bp_editWindow boots">Edit.</a> <br> Weapon: %weapinfo% <br1> <a action="bypass -h bp_editWindow weap">Edit.</a> <br> <center><a action="bypass -h bp_gettarget all">Get target's appearance.</a></center> </body></html> Credits to me, coded for aCis.
  24. Hello again Cheaters i rework and redesign an already shared code of my friend @melron (Official code : HERE) - Using multi-word search. - Cleanup parts of the code. - Code not include part of "item.getIcon()" you can find many shared ways to get icon for each item. Updates: - Add idea/part of the code of @Creamy G Colin - Add check of empty seach (was throwing error on GS console) - Add info if its Quest Item Coded for aCis 385 revision Code : [Hidden Content]
  25. This is a control panel originally created by TheEngo, then secured by velhojack. velhojack however also converted his version to portuguese, so I translated it back to english, and fixed some things. I made a seperate thread for it because A. It's in english and B. It's had quite a bit of updates. Just sharing it because I wouldn't even have it if not for a previous share: -converted everything to english -fixed some of the game server queries that were trying to search the login server. -Added an L2JServer(L2J official) config option -fixed an issue where it wouldnt finish the install if you didnt choose a logo (it now uses the default logo if one isnt chosen) -returned all the images back to the original acp images -updated credits at the bottom of the page. It seems like it's a good panel, hopefully someone lets me know otherwise. Download: https://mega.nz/#!Z4tWABBJ!0acr2pcXR9YtX7hU2Od60ekbnGTrCUzKQK7N8yuRebA Special thanks to velhojack for his version found here: http://www.maxcheaters.com/topic/204634-control-panel-acp-35-automated-php/ and the engo's first version here: http://www.maxcheaters.com/topic/189847-acp-305-by-theengo/ Hope someone finds it useful.