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
    • Buy Advertising Link #1
    • Private Servers
    • Buy Advertising Link #2
    • [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 367 results

  1. 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]
  2. 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)
  3. 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]
  4. 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
  5. 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]
  6. 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
  7. 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
  8. 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:
  9. 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
  10. 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]
  11. 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
  12. 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]
  13. 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 ;)
  14. 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.
  15. 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
  16. 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]
  17. 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 !
  18. ### 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,
  19. 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.
  20. Hello guys, nothing special but it's not shared here this code for IL and a lot of people don't know how to do it since i added it on my project yesterday i decided to share it here with you. Here is preview images: Go to net.sf.l2j.gameserver.model.actor.L2Npc.java find: @Override public void onActionShift(L2PcInstance player) { // Check if the L2PcInstance is a GM if (player.isGM()) { final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/admin/npcinfo.htm"); html.replace("%class%", getClass().getSimpleName()); html.replace("%id%", getTemplate().getNpcId()); html.replace("%lvl%", getTemplate().getLevel()); html.replace("%name%", getTemplate().getName()); html.replace("%race%", getTemplate().getRace().toString()); html.replace("%tmplid%", getTemplate().getIdTemplate()); html.replace("%aggro%", (this instanceof L2Attackable) ? ((L2Attackable) this).getAggroRange() : 0); html.replace("%corpse%", getTemplate().getCorpseTime()); html.replace("%enchant%", getTemplate().getEnchantEffect()); html.replace("%hp%", (int) getCurrentHp()); html.replace("%hpmax%", getMaxHp()); html.replace("%mp%", (int) getCurrentMp()); html.replace("%mpmax%", getMaxMp()); html.replace("%patk%", getPAtk(null)); html.replace("%matk%", getMAtk(null, null)); html.replace("%pdef%", getPDef(null)); html.replace("%mdef%", getMDef(null, null)); html.replace("%accu%", getAccuracy()); html.replace("%evas%", getEvasionRate(null)); html.replace("%crit%", getCriticalHit(null, null)); html.replace("%rspd%", getRunSpeed()); html.replace("%aspd%", getPAtkSpd()); html.replace("%cspd%", getMAtkSpd()); html.replace("%str%", getSTR()); html.replace("%dex%", getDEX()); html.replace("%con%", getCON()); html.replace("%int%", getINT()); html.replace("%wit%", getWIT()); html.replace("%men%", getMEN()); html.replace("%loc%", getX() + " " + getY() + " " + getZ()); html.replace("%dist%", (int) Math.sqrt(player.getDistanceSq(this))); html.replace("%ele_fire%", getDefenseElementValue((byte) 2)); html.replace("%ele_water%", getDefenseElementValue((byte) 3)); html.replace("%ele_wind%", getDefenseElementValue((byte) 1)); html.replace("%ele_earth%", getDefenseElementValue((byte) 4)); html.replace("%ele_holy%", getDefenseElementValue((byte) 5)); html.replace("%ele_dark%", getDefenseElementValue((byte) 6)); if (getSpawn() != null) { html.replace("%spawn%", getSpawn().getLocx() + " " + getSpawn().getLocy() + " " + getSpawn().getLocz()); html.replace("%loc2d%", (int) Math.sqrt(getPlanDistanceSq(getSpawn().getLocx(), getSpawn().getLocy()))); html.replace("%loc3d%", (int) Math.sqrt(getDistanceSq(getSpawn().getLocx(), getSpawn().getLocy(), getSpawn().getLocz()))); html.replace("%resp%", getSpawn().getRespawnDelay() / 1000); html.replace("%rand_resp%", getSpawn().getRandomRespawnDelay()); } else { html.replace("%spawn%", "<font color=FF0000>null</font>"); html.replace("%loc2d%", "<font color=FF0000>--</font>"); html.replace("%loc3d%", "<font color=FF0000>--</font>"); html.replace("%resp%", "<font color=FF0000>--</font>"); html.replace("%rand_resp%", "<font color=FF0000>--</font>"); } if (hasAI()) { html.replace("%ai_intention%", "<font color=\"LEVEL\">Intention</font><table width=\"100%\"><tr><td><font color=\"LEVEL\">Intention:</font></td><td>" + getAI().getIntention().name() + "</td></tr>"); html.replace("%ai%", "<tr><td><font color=\"LEVEL\">AI:</font></td><td>" + getAI().getClass().getSimpleName() + "</td></tr></table><br>"); } else { html.replace("%ai_intention%", ""); html.replace("%ai%", ""); } html.replace("%ai_type%", getAiType().name()); html.replace("%ai_clan%", (getClans() != null) ? "<tr><td width=100><font color=\"LEVEL\">Clan:</font></td><td align=right width=170>" + Arrays.toString(getClans()) + " " + getClanRange() + "</td></tr>" + ((getIgnoredIds() != null) ? "<tr><td width=100><font color=\"LEVEL\">Ignored ids:</font></td><td align=right width=170>" + Arrays.toString(getIgnoredIds()) + "</td></tr>" : "") : ""); html.replace("%ai_move%", String.valueOf(canMove())); html.replace("%ai_seed%", String.valueOf(isSeedable())); html.replace("%ai_ssinfo%", _currentSsCount + "[" + getSsCount() + "] - " + getSsRate() + "%"); html.replace("%ai_spsinfo%", _currentSpsCount + "[" + getSpsCount() + "] - " + getSpsRate() + "%"); html.replace("%butt%", ((this instanceof L2MerchantInstance) ? "<button value=\"Shop\" action=\"bypass -h admin_show_shop " + getNpcId() + "\" width=65 height=19 back=\"L2UI_ch3.smallbutton2_over\" fore=\"L2UI_ch3.smallbutton2\">" : "")); player.sendPacket(html); player.sendPacket(ActionFailed.STATIC_PACKET); } Below add: else if (Config.ENABLE_SHIFT_CLICK_TO_NPCS) { final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile("data/html/mods/npcinfo.htm"); html.replace("%class%", getClass().getSimpleName()); html.replace("%id%", getTemplate().getNpcId()); html.replace("%lvl%", getTemplate().getLevel()); html.replace("%name%", getTemplate().getName()); html.replace("%race%", getTemplate().getRace().toString()); html.replace("%tmplid%", getTemplate().getIdTemplate()); html.replace("%aggro%", getTemplate().getAggroRange()); html.replace("%corpse%", StringUtil.getTimeStamp(getTemplate().getCorpseTime())); html.replace("%enchant%", getTemplate().getEnchantEffect()); html.replace("%hp%", (int) getCurrentHp()); html.replace("%hpmax%", getMaxHp()); html.replace("%mp%", (int) getCurrentMp()); html.replace("%mpmax%", getMaxMp()); html.replace("%patk%", getPAtk(null)); html.replace("%matk%", getMAtk(null, null)); html.replace("%pdef%", getPDef(null)); html.replace("%mdef%", getMDef(null, null)); html.replace("%accu%", getAccuracy()); html.replace("%evas%", getEvasionRate(null)); html.replace("%crit%", getCriticalHit(null, null)); html.replace("%rspd%", getWalkSpeed()); html.replace("%aspd%", getPAtkSpd()); html.replace("%cspd%", getMAtkSpd()); player.sendPacket(html); } Now the Configs public static boolean ENABLE_SHIFT_CLICK_TO_NPCS; ENABLE_SHIFT_CLICK_TO_NPCS = npcs.getProperty("EnableShiftClickToNpcs", false); # ============================================= # Shift + Click to NPC(s) # ============================================= # Enable showing NPC(s) info by Shift + Click # on NPC(s)? # Default: False EnableShiftClickToNpcs = True The voicedcommand Create new class called ShiftClickToNpc inside paste /* * 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 java.util.StringTokenizer; import net.sf.l2j.commons.lang.StringUtil; import net.sf.l2j.gameserver.datatables.ItemTable; import net.sf.l2j.gameserver.datatables.NpcTable; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.gameserver.model.item.DropCategory; import net.sf.l2j.gameserver.model.item.DropData; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; /** * @author Designatix * */ public class ShiftClickToNpc implements IVoicedCommandHandler { private static final int PAGE_LIMIT = 20; private static String[] _voicedCommands = { "show_droplist" }; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { final StringTokenizer st = new StringTokenizer(command, " "); st.nextToken(); if (command.startsWith("show_droplist")) { try { int npcId = Integer.parseInt(st.nextToken()); int page = (st.hasMoreTokens()) ? Integer.parseInt(st.nextToken()) : 1; showNpcDropList(activeChar, npcId, page); } catch (Exception e) { activeChar.sendMessage("Usage: .show_droplist <npc_id> [<page>]"); } } return true; } private static void showNpcDropList(L2PcInstance activeChar, int npcId, int page) { final NpcTemplate npcData = NpcTable.getInstance().getTemplate(npcId); if (npcData == null) { activeChar.sendMessage("Npc template is unknown for id: " + npcId + "."); return; } final StringBuilder sb = new StringBuilder(2000); StringUtil.append(sb, "<html><title>Show droplist page ", page, "</title><body><center><font color=\"LEVEL\">", npcData.getName(), " (", npcId, ")</font></center><br>"); if (!npcData.getDropData().isEmpty()) { sb.append("Drop type legend: <font color=\"3BB9FF\">Drop</font> | <font color=\"00ff00\">Sweep</font><br><table><tr><td width=25>cat.</td><td width=45>item</td><td width=45>drop count</td></tr>"); int myPage = 1; int i = 0; int shown = 0; boolean hasMore = false; for (DropCategory cat : npcData.getDropData()) { if (shown == PAGE_LIMIT) { hasMore = true; break; } for (DropData drop : cat.getAllDrops()) { if (myPage != page) { i++; if (i == PAGE_LIMIT) { myPage++; i = 0; } continue; } if (shown == PAGE_LIMIT) { hasMore = true; break; } StringUtil.append(sb, "<tr><td><font color=\"", ((cat.isSweep()) ? "00FF00" : "3BB9FF"), "\">", cat.getCategoryType(), "</td><td>", ItemTable.getInstance().getTemplate(drop.getItemId()).getName(), " (", drop.getMinDrop(), ", ", drop.getMaxDrop(), ")</td></tr>"); shown++; } } sb.append("</table><table width=\"100%\" bgcolor=666666><tr>"); if (page > 1) { StringUtil.append(sb, "<td width=120><a action=\"bypass -h voiced_show_droplist ", npcId, " ", page - 1, "\">Prev Page</a></td>"); if (!hasMore) StringUtil.append(sb, "<td width=100>Page ", page, "</td><td width=70></td></tr>"); } if (hasMore) { if (page <= 1) sb.append("<td width=120></td>"); StringUtil.append(sb, "<td width=100>Page ", page, "</td><td width=70><a action=\"bypass -h voiced_show_droplist ", npcId, " ", page + 1, "\">Next Page</a></td></tr>"); } sb.append("</table>"); } else sb.append("This NPC has no drops."); sb.append("</body></html>"); final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setHtml(sb.toString()); activeChar.sendPacket(html); } @Override public String[] getVoicedCommandList() { return _voicedCommands; } } Import the voicedcommand on net.sf.l2j.gameserver.handler.VoicedCommandHandler.java import net.sf.l2j.gameserver.handler.voicedcommandhandlers.ShiftClickToNpc; if (Config.ENABLE_SHIFT_CLICK_TO_NPCS) { registerHandler(new ShiftClickToNpc()); } And now go to your dp > data/html/mods and create new file called npcinfo.htm and inside paste <html><title>NPC Info</title><body> <center> <table width="100%"> <tr> <td align=center> <button value="Show Droplist" action="bypass -h voiced_show_droplist %id%" width=134 height=21 back="L2UI_ch3.BigButton3_over" fore="L2UI_ch3.BigButton3"> </td> </tr> </table> <br><img src="L2UI.SquareWhite" width=260 height=1><br> <font color="LEVEL">General Informations</font> <table width="100%"> <tr><td><font color="LEVEL">Name:</font></td><td>%name%</td></tr> <tr><td><font color="LEVEL">Level:</font></td><td>%lvl%</td></tr> <tr><td><font color="LEVEL">Type:</font></td><td>%class%</td></tr> <tr><td><font color="LEVEL">Race:</font></td><td>%race%</td></tr> </table><br> <font color="LEVEL">Aggro Informations</font> <table width="100%"> <tr><td width=100><font color="LEVEL">Aggro:</font></td><td align=right width=170>%aggro%</td></tr> </table><br> <font color="LEVEL">Combat Informations</font> <table width="100%"> <tr><td><font color="LEVEL">HP:</font></td><td><font color=FF4040>%hp%/%hpmax%</font></td><td><font color="LEVEL">MP:</font></td><td><font color=6161FF>%mp%/%mpmax%</font></td></tr> <tr><td>P.Atk.</td><td>%patk%</td><td>M.Atk.</td><td>%matk%</td></tr> <tr><td>P.Def.</td><td>%pdef%</td><td>M.Def.</td><td>%mdef%</td></tr> <tr><td>Accuracy</td><td>%accu%</td><td>Evasion</td><td>%evas%</td></tr> <tr><td>Critical</td><td>%crit%</td><td>Speed</td><td>%rspd%</td></tr> <tr><td>Atk.Spd</td><td>%aspd%</td><td>Cast.Spd</td><td>%cspd%</td></tr> </table><br> <br><img src="L2UI.SquareWhite" width=260 height=1><br> </center> </body></html> Have Fun!
  21. Hello young people, Here is a simple protection. in -> l2jserver/gameserver/network/clientpackets/RequestMagicSkillUse.java method -> runImpl() search for: // Check the validity of the skill if (skill != null) { Add: + if (activeChar.isInSiege()) + { + //Proibe Ress em Sieges + if (skill.getId() == 1016 || skill.getId() == 1254) + { + activeChar.sendMessage("Não é possivel utilizar " + skill.getName() + " durante a Siege!"); + activeChar.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + }
  22. Hello, its my first share i made for my server, maybe some one need it. Its function when you delete something , after you can recovery it and take back at itemrecovery.ini you can find settings how much days item will save for you sorry my english :D code and install guide can find on git my https://bitbucket.org/vagan2005/lineage2-works/src/master/itemRecovery-mobius/ its for last version mobius photos
  23. Make a zone required party with minimum members for lucera. package zones; import java.util.Collection; import java.util.Iterator; import l2.gameserver.instancemanager.ReflectionManager; import l2.gameserver.listener.zone.OnZoneEnterLeaveListener; import l2.gameserver.model.Creature; import l2.gameserver.model.Party; import l2.gameserver.model.Player; import l2.gameserver.model.Zone; import l2.gameserver.network.l2.components.CustomMessage; import l2.gameserver.network.l2.s2c.ExShowScreenMessage; import l2.gameserver.scripts.ScriptFile; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class PartyZone implements OnZoneEnterLeaveListener, ScriptFile { private static final Logger bEb = LoggerFactory.getLogger(PartyZone.class); private static final PartyZone bHe = new PartyZone(); private static final String bHf = "PartyZone"; private Object PartyInfo; public PartyZone() { } public void onLoad() { byte var1 = 0; Collection var2 = ReflectionManager.DEFAULT.getZones(); Iterator var3 = var2.iterator(); while(var3.hasNext()) { Zone var4 = (Zone)var3.next(); if (var4.getParams().getBool("PartyZone", false)) { var4.addListener(bHe); } } if (var1 > 0) { bEb.info("PartyZone: added {} party zone(s).", Integer.valueOf(var1)); } } public void onReload() { this.onShutdown(); this.onLoad(); } public void onShutdown() { Collection var1 = ReflectionManager.DEFAULT.getZones(); Iterator var2 = var1.iterator(); while(var2.hasNext()) { Zone var3 = (Zone)var2.next(); if (var3.getParams().getBool("PartyZone", false)) { var3.removeListener(bHe); } } } public void onZoneEnter(Zone var1, Creature var2) { if (var2.isPlayer()) { Player var3 = var2.getPlayer(); Party var4 = var3.getParty(); if (var4 == null) { String var10 = (new CustomMessage("zone.services.PartyZone", var3, new Object[0])).toString(); var3.sendPacket(new ExShowScreenMessage(var10, 10000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, false)); var3.teleToClosestTown(); } if (var3.getParty().getMemberCount() <= 4) { String var10 = (new CustomMessage("zone.services.PartyZone", var3, new Object[0])).toString(); var3.sendPacket(new ExShowScreenMessage(var10, 10000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, false)); var3.teleToClosestTown(); } } } public void onZoneLeave(Zone var1, Creature var2) { } } Next you have to add this parameter in zone: <set name="PartyZone" val="true" /> For example: <zone name="[primeval_peace1]" type="fun" > <coords loc="10408 -27395 -4290 -1290" /> <coords loc="12065 -25334 -4290 -1290" /> <coords loc="12223 -23159 -4290 -1290" /> <coords loc="10424 -22340 -4290 -1290" /> <coords loc="9566 -23131 -4290 -1290" /> <coords loc="9290 -24261 -4290 -1290" /> </polygon> </zone> Make it like this: <zone name="[primeval_peace1]" type="fun" > <set name="PartyZone" val="true" /> <coords loc="10408 -27395 -4290 -1290" /> <coords loc="12065 -25334 -4290 -1290" /> <coords loc="12223 -23159 -4290 -1290" /> <coords loc="10424 -22340 -4290 -1290" /> <coords loc="9566 -23131 -4290 -1290" /> <coords loc="9290 -24261 -4290 -1290" /> </polygon> </zone> Then go to en string gameserver\data\string and add this line: zone.services.PartyZone=You Are Not Currently In A Party With Minimum 5 Party Members So You Cannot Enter. And this line to ru string gameserver\data\string: zone.services.PartyZone=Вы не находитесь в партии с минимум 5 членами партии Так что вы не можете войти. If you want to change the value of minimum players then you have to change the number 4 in this line in ext: if (var3.getParty().getMemberCount() <= 4) { DOWNLOAD EXT This is a simple code i make it for my needs you can remake it as you want don't spam this topic.
  24. Hello. This is an auction shop I made some time ago for aCis. How it works: Players can add items for sale at the auction shop at the price they want. Then, even if they are offline other players can buy the items and they will get the rewards(the price they put). Enchant of items stays, augmented items are not sellable. There is a searching system(case sensitive) and a paging system. I have NOT tested this code on a live server (only local testing), but I remember adding a shittone of checks to avoid any exploits. I recommend you test it out well before using it. You need to make an npc with id 65529 and type L2AuctionManager. Code: http://pastebin.com/QqY6LGWV Update - Replace AuctionTable and L2AuctionManagerInstance with these: AuctionTable (update: the bug mentioned in the replies fixed): http://pastebin.com/vVPhiXKY L2AuctionManagerInstance: http://pastebin.com/h8LFuesV Some pictures: (Please excuse my html designs..)
  25. we all know the clasic hidde & seek event... 1)Auto select a random player from giran(with protection: sitting ,selling,craft,olympiad,party mode,pvp mode chars are out) 2)The player got 3 minutes to hidde somewhere(Making the player invisible for 3 minutes),after that the player becomes visible and he can't move with a title "Hidden" Now is the good part :) :P 3)A auto checker is checking every time if someone is close enought to the Hidden player so if you will find him you must go verry close to him and you will win.... you don't need to press any command or something like this .... the player that will go first to the hidden player wins! 4)The winner wins 3 gold bars if no one won't find the hidden and the event finish hidden player will take 3 gold bars. Here is the Event: http://pastebin.com/A1J9XReZ if you will find any bug report here and i will fix it! Ps:i forgot it... if someone don't know how to make it work just got to GameServer.java and add: HiddeSeek.getInstance(); add the imports too. Credits Me.