Search the Community

Showing results for tags 'acis'.



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
    • Suggestions/Feedback Board
  • 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
    • L2Tales.com "BЯATVA" High Five x15 - Opening 30th of October
    • Private Servers
    • L2Elixir Interlude x3 - Launching 31st October
    • [Previews] L2 Private Servers
    • Clans and Alliances
  • Lineage II Verified Marketplace
    • Marketplace [Items & Chars]
    • Marketplace [L2Packs & Files]
    • Marketplace [Powerlvl & Support]
  • 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
  • FiveM Zone
    • FiveM Guides
    • FiveM Development Help
  • 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 139 results

  1. This is custom bufftime support for latest public acis source - aCis 382 Patch code here: https://pastebin.com/embed_js/HXM03hrN Add skill id's in players.properties: EnableModifySkillDuration = True SkillDurationList = 1204;1048;
  2. Hello , i download this buffer for l2 acis https://maxcheaters.com/topic/223485-npc-player-buffer-acis/?tab=comments#comment-2688248 The only that i did is to make a folder in gameserver/data/html/mods/buffer and i paste the html files there, then i create a new npc in xml. After that i spawn buffer, i can see the Index of buffer ( buffs,heal,fighter set,mage set, etc) but i cant get buffs from this npc. No any message showed up on my screen. Any idea on how can i fix the problem above? ( if yes, be specific at comments ) Thnx in advance
  3. Hi, Im looking for any tutorial or any helpful post with steps(and photos) in order to add a buffer in l2 acis (for example this buffer https://maxcheaters.com/topic/223485-npc-player-buffer-acis/) . Thnx in advance.
  4. 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"/>
  5. Hello ppl of mxc, i never post anything or ask for anything,but this last few days i almost melt my brain trying to get to work Clan quest for acis, i dont care about the rev in this case 370 i've got the code without errors, quest started all ok, but mobs don't drop the items, or when killed Grave Guards, grave keymaster isnt spawning,the same happen with the box when imperal gravekeeper is killed. this is the code im trying to get to work. alsoi i had to add some lines to Quest but those are not improtant, just a few typos i had form the code below. package net.sf.l2j.gameserver.scripting.quests; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.scripting.Quest; import net.sf.l2j.gameserver.scripting.QuestState; public class Q503_PursuitOfClanAmbition extends Quest { private static final int G_LET_MARTIEN = 3866; private static final int TH_WYRM_EGGS = 3842; private static final int DRAKE_EGGS = 3841; private static final int BL_WYRM_EGGS = 3840; private static final int MI_DRAKE_EGGS = 3839; private static final int BROOCH = 3843; private static final int BL_ANVIL_COIN = 3871; private static final int G_LET_BALTHAZAR = 3867; private static final int RECIPE_POWER_STONE = 3838; private static final int POWER_STONE = 3846; private static final int NEBULITE_CRYSTALS = 3844; private static final int BROKE_POWER_STONE = 3845; private static final int G_LET_RODEMAI = 3868; private static final int IMP_KEYS = 3847; private static final int SCEPTER_JUDGEMENT = 3869; private static final int PROOF_ASPIRATION = 3870; private static final int MARTIEN = 30645; private static final int ATHREA = 30758; private static final int KALIS = 30759; private static final int GUSTAF = 30760; private static final int FRITZ = 30761; private static final int LUTZ = 30762; private static final int KURTZ = 30763; private static final int KUSTO = 30512; private static final int BALTHAZAR = 30764; private static final int RODEMAI = 30868; private static final int COFFER = 30765; private static final int CLEO = 30766; private static final int THUNDER_WYRM = 20282; private static final int THUNDER_WYRM_TWO = 20243; private static final int DRAKE = 20137; private static final int DRAKE_TWO = 20285; private static final int BLITZ_WYRM = 27178; private static final int GIANT_SOLDIER = 20654; private static final int GIANT_SCOUT = 20656; private static final int GRAVE_GUARD = 20668; private static final int GRAVE_KEYMASTER = 27179; private static final int IMPERIAL_SLAVE = 27180; private static final int IMPERIAL_GRAVEKEEPER = 27181; private static final int[][] DROPLIST = { // npcId, cond, MaxCount, chance, item1, item2 (giants), item3 (giants) // @formatter:off {THUNDER_WYRM, 2, 10, 200000, TH_WYRM_EGGS, 0, 0}, {THUNDER_WYRM_TWO, 2, 10, 90000, TH_WYRM_EGGS, 0, 0}, {DRAKE, 2, 10, 200000, DRAKE_EGGS, 0, 0}, {DRAKE_TWO, 2, 10, 250000, DRAKE_EGGS, 0, 0}, {BLITZ_WYRM, 2, 10, 1000000, BL_WYRM_EGGS, 0, 0}, {GIANT_SOLDIER, 5, 10, 250000, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE}, {GIANT_SCOUT, 5, 10, 350000, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE}, {GRAVE_GUARD, 10, 0, 150000, 0, 0, 0}, {GRAVE_KEYMASTER, 10, 6, 800000, IMP_KEYS, 0, 0}, {IMPERIAL_GRAVEKEEPER, 10, 0, 0, 0, 0, 0} // @formatter:on }; public Q503_PursuitOfClanAmbition() { super(503, "Pursuit of Clan Ambition!"); setItemsIds(MI_DRAKE_EGGS, BL_WYRM_EGGS, DRAKE_EGGS, TH_WYRM_EGGS, BROOCH, NEBULITE_CRYSTALS, BROKE_POWER_STONE, POWER_STONE, IMP_KEYS, G_LET_MARTIEN, G_LET_BALTHAZAR, G_LET_RODEMAI, SCEPTER_JUDGEMENT); addStartNpc(GUSTAF); addTalkId(MARTIEN, ATHREA, KALIS, GUSTAF, FRITZ, LUTZ, KURTZ, KUSTO, BALTHAZAR, RODEMAI, COFFER, CLEO); addKillId(THUNDER_WYRM_TWO, THUNDER_WYRM, DRAKE, DRAKE_TWO, BLITZ_WYRM, GIANT_SOLDIER, GIANT_SCOUT, GRAVE_GUARD, GRAVE_KEYMASTER, IMPERIAL_GRAVEKEEPER); addAttackId(IMPERIAL_GRAVEKEEPER); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; final QuestState st = player.getQuestState(getName()); if (st == null) { return htmltext; } // Gustaf if (event.equalsIgnoreCase("30760-08.htm")) { st.setState(STATE_STARTED); st.giveItems(G_LET_MARTIEN, 1); st.set("cond", "1"); } else if (event.equalsIgnoreCase("30760-12.htm")) { st.giveItems(G_LET_BALTHAZAR, 1); st.set("cond", "4"); } else if (event.equalsIgnoreCase("30760-16.htm")) { st.giveItems(G_LET_RODEMAI, 1); st.set("cond", "7"); } else if (event.equalsIgnoreCase("30760-20.htm")) { st.takeItems(SCEPTER_JUDGEMENT, -1); st.giveItems(PROOF_ASPIRATION, 1); st.rewardExpAndSp(0, 250000); st.exitQuest(false); finishQuestToClan(player); } else if (event.equalsIgnoreCase("30760-22.htm")) { st.set("cond", "1"); } else if (event.equalsIgnoreCase("30760-23.htm")) { st.takeItems(SCEPTER_JUDGEMENT, -1); st.giveItems(PROOF_ASPIRATION, 1); st.rewardExpAndSp(0, 250000); st.exitQuest(false); finishQuestToClan(player); } // Martien else if (event.equalsIgnoreCase("30645-03.htm")) { setQuestToClanMembers(player); st.takeItems(G_LET_MARTIEN, -1); st.set("cond", "2"); st.set("kurt", "0"); } // Kurtz else if (event.equalsIgnoreCase("30763-02.htm")) { st.giveItems(MI_DRAKE_EGGS, 6); st.giveItems(BROOCH, 1); st.set("kurt", "1"); } // Lutz else if (event.equalsIgnoreCase("30762-02.htm")) { st.giveItems(MI_DRAKE_EGGS, 4); st.giveItems(BL_WYRM_EGGS, 3); st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false); st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false); st.set("lutz", "1"); } // Fritz else if (event.equalsIgnoreCase("30761-02.htm")) { st.giveItems(BL_WYRM_EGGS, 3); st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false); st.addSpawn(BLITZ_WYRM, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false); st.set("fritz", "1"); } // Kusto else if (event.equalsIgnoreCase("30512-03.htm")) { st.takeItems(BROOCH, 1); st.giveItems(BL_ANVIL_COIN, 1); st.set("kurt", "2"); } // Balthazar else if (event.equalsIgnoreCase("30764-03.htm")) { st.takeItems(G_LET_BALTHAZAR, -1); st.set("cond", "5"); } else if (event.equalsIgnoreCase("30764-05.htm")) { st.takeItems(G_LET_BALTHAZAR, -1); st.set("cond", "5"); } else if (event.equalsIgnoreCase("30764-06.htm")) { st.takeItems(BL_ANVIL_COIN, -1); st.giveItems(RECIPE_POWER_STONE, 1); } // Rodemai else if (event.equalsIgnoreCase("30868-04.htm")) { st.takeItems(G_LET_RODEMAI, -1); st.set("cond", "8"); } else if (event.equalsIgnoreCase("30868-06a.htm")) { st.set("cond", "10"); } else if (event.equalsIgnoreCase("30868-10.htm")) { st.set("cond", "12"); } // Cleo else if (event.equalsIgnoreCase("30766-04.htm")) { st.set("cond", "9"); npc.broadcastNpcSay("Blood and Honor"); final Npc sister1 = addSpawn(KALIS, 160665, 21209, -3710, npc.getHeading(), false, 180000, false); sister1.broadcastNpcSay("Ambition and Power"); final Npc sister2 = addSpawn(ATHREA, 160665, 21291, -3710, npc.getHeading(), false, 180000, false); sister2.broadcastNpcSay("War and Death"); } // Coffer else if (event.equalsIgnoreCase("Open")) { if (st.getQuestItemsCount(IMP_KEYS) < 6) { htmltext = "30765-03a.htm"; } else { htmltext = "30765-03.htm"; st.set("cond", "11"); st.takeItems(IMP_KEYS, 6); st.giveItems(SCEPTER_JUDGEMENT, 1); } } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); final QuestState st = player.getQuestState(getName()); if (st == null) { return htmltext; } switch (st.getState()) { case STATE_CREATED: if (player.getClan() == null) { htmltext = "30760-01.htm"; st.exitQuest(true); } else if (player.isClanLeader()) { if (st.hasQuestItems(PROOF_ASPIRATION)) { htmltext = "30760-03.htm"; st.exitQuest(true); } else if (player.getClan().getLevel() != 4) { htmltext = "30760-02.htm"; st.exitQuest(true); } else { htmltext = "30760-04.htm"; } } else { htmltext = "30760-04t.htm"; st.exitQuest(true); } break; case STATE_STARTED: final int cond = st.getInt("cond"); int memberCond = 0; if (getClanLeaderQuestState(player, npc) != null) { memberCond = getClanLeaderQuestState(player, npc).getInt("cond"); } switch (npc.getNpcId()) { case GUSTAF: if (player.isClanLeader()) { if (cond == 1) { htmltext = "30760-09.htm"; } else if (cond == 2) { htmltext = "30760-10.htm"; } else if (cond == 3) { htmltext = "30760-11.htm"; } else if (cond == 4) { htmltext = "30760-13.htm"; } else if (cond == 5) { htmltext = "30760-14.htm"; } else if (cond == 6) { htmltext = "30760-15.htm"; } else if (cond == 7) { htmltext = "30760-17.htm"; } else if (cond == 12) { htmltext = "30760-19.htm"; } else if (cond == 13) { htmltext = "30760-24.htm"; } else { htmltext = "30760-18.htm"; } } else { if (memberCond == 3) { htmltext = "30760-11t.htm"; } else if (memberCond == 4) { htmltext = "30760-15t.htm"; } else if (memberCond == 12) { htmltext = "30760-19t.htm"; } else if (memberCond == 13) { htmltext = "30766-24t.htm"; } } break; case MARTIEN: if (player.isClanLeader()) { if (cond == 1) { htmltext = "30645-02.htm"; } else if (cond == 2) { if ((st.getQuestItemsCount(MI_DRAKE_EGGS) > 9) && (st.getQuestItemsCount(BL_WYRM_EGGS) > 9) && (st.getQuestItemsCount(DRAKE_EGGS) > 9) && (st.getQuestItemsCount(TH_WYRM_EGGS) > 9)) { htmltext = "30645-05.htm"; st.set("cond", "3"); st.takeItems(MI_DRAKE_EGGS, -1); st.takeItems(BL_WYRM_EGGS, -1); st.takeItems(DRAKE_EGGS, -1); st.takeItems(TH_WYRM_EGGS, -1); } else { htmltext = "30645-04.htm"; } } else if (cond == 3) { htmltext = "30645-07.htm"; } else { htmltext = "30645-08.htm"; } } else { if ((memberCond == 1) || (memberCond == 2) || (memberCond == 3)) { htmltext = "30645-01.htm"; } } break; case LUTZ: if (player.isClanLeader() && (cond == 2)) { if (st.getInt("lutz") == 1) { htmltext = "30762-03.htm"; } else { htmltext = "30762-01.htm"; } } break; case KURTZ: if (player.isClanLeader() && (cond == 2)) { if (st.getInt("kurt") == 1) { htmltext = "30763-03.htm"; } else { htmltext = "30763-01.htm"; } } break; case FRITZ: if (player.isClanLeader() && (cond == 2)) { if (st.getInt("fritz") == 1) { htmltext = "30761-03.htm"; } else { htmltext = "30761-01.htm"; } } break; case KUSTO: if (player.isClanLeader()) { if (st.getQuestItemsCount(BROOCH) == 1) { if (st.getInt("kurt") == 0) { htmltext = "30512-01.htm"; } else if (st.getInt("kurt") == 1) { htmltext = "30512-02.htm"; } else { htmltext = "30512-04.htm"; } } } else { if ((memberCond > 2) && (memberCond < 6)) { htmltext = "30512-01a.htm"; } } break; case BALTHAZAR: if (player.isClanLeader()) { if (cond == 4) { if (st.getInt("kurt") == 2) { htmltext = "30764-04.htm"; } else { htmltext = "30764-02.htm"; } } else if (cond == 5) { if ((st.getQuestItemsCount(POWER_STONE) > 9) && (st.getQuestItemsCount(NEBULITE_CRYSTALS) > 9)) { htmltext = "30764-08.htm"; st.takeItems(POWER_STONE, -1); st.takeItems(NEBULITE_CRYSTALS, -1); st.takeItems(BROOCH, -1); st.set("cond", "6"); } else { htmltext = "30764-07.htm"; } } else if (cond == 6) { htmltext = "30764-09.htm"; } } else { if (memberCond == 4) { htmltext = "30764-01.htm"; } } break; case RODEMAI: if (player.isClanLeader()) { if (cond == 7) { htmltext = "30868-02.htm"; } else if (cond == 8) { htmltext = "30868-05.htm"; } else if (cond == 9) { htmltext = "30868-06.htm"; } else if (cond == 10) { htmltext = "30868-08.htm"; } else if (cond == 11) { htmltext = "30868-09.htm"; } else if (cond == 12) { htmltext = "30868-11.htm"; } } else { if (memberCond == 7) { htmltext = "30868-01.htm"; } else if ((memberCond == 9) || (memberCond == 10)) { htmltext = "30868-07.htm"; } } break; case CLEO: if (player.isClanLeader()) { if (cond == 8) { htmltext = "30766-02.htm"; } else if (cond == 9) { htmltext = "30766-05.htm"; } else if (cond == 10) { htmltext = "30766-06.htm"; } else if ((cond == 11) || (cond == 12) || (cond == 13)) { htmltext = "30766-07.htm"; } } else { if (memberCond == 8) { htmltext = "30766-01.htm"; } } break; case COFFER: if (player.isClanLeader()) { if (cond == 10) { htmltext = "30765-01.htm"; } } else { if (memberCond == 10) { htmltext = "30765-02.htm"; } } break; case KALIS: if (player.isClanLeader()) { htmltext = "30759-01.htm"; } break; case ATHREA: if (player.isClanLeader()) { htmltext = "30758-01.htm"; } break; } break; } return htmltext; } @Override public String onKill(Npc npc, Player player, boolean isPet) { QuestState st = null; st = getClanLeaderQuestState(player, npc); if ((st == null) || !st.isStarted()) { return null; } for (int[] element : DROPLIST) { if (element[0] == npc.getNpcId()) { final int cond = element[1]; final int maxCount = element[2]; final int chance = element[3]; final int item1 = element[4]; final int item2 = element[5]; final int item3 = element[6]; if (st.getInt("cond") == cond) { if (item1 != 0) { st.dropItems(item1, 1, maxCount, chance); } else { if (element[0] == IMPERIAL_GRAVEKEEPER) { final Npc coffer = addSpawn(COFFER, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 180000, false); coffer.broadcastNpcSay("Curse of the gods on the one that defiles the property of the empire!"); } else if ((element[0] == GRAVE_GUARD) && (st.getQuestItemsCount(IMP_KEYS) < 6) && (Rnd.get(50) < chance)) { addSpawn(GRAVE_KEYMASTER, player.getX(), player.getY(), player.getZ(), player.getHeading(), true, 0, false); } } if ((item2 != 0) && (item3 != 0)) { if (Rnd.get(4) == 0) { st.dropItems(item2, 1, maxCount, chance); } else { st.dropItems(item3, 1, maxCount, chance); } } } } } return null; } @Override public String onAttack(Npc npc, Player attacker, int damage, boolean isPet, L2Skill skill) { if ((npc.getMaxHp() / 2) > npc.getCurrentHp()) { if (Rnd.get(100) < 4) { addSpawn(IMPERIAL_SLAVE, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 0, false); } else { attacker.teleToLocation(185462, 20342, -3250, 0); } } return super.onAttack(npc, attacker, damage, isPet, skill); } } NVM, Fixed :) close this topic!
  6. 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
  7. Original L2D converter from aCis gameserver sources (rewritten for C# style). Moved from console release to Windows Form style. Added auto detecting source geodata format. Version 1.0.1.2: Syncronized with aCis Changeset #1785 (GeoDataConverter fix check condition for NWSE correction). Version 1.0.1.0: Syncronized with aCis Changeset #1261 (GeoDataConverter diagonals flags must be validated in both direction). New version 1.0.0.8: Optimized source code for multi-threading; Added multi-threading (x2 times faster); Added percentage of progress in application title; Added progress notification to application icon in task bar (ONLY for Windows 7 OS and above); Reworked Hasha's object model. Not for faster implementation and has low performance. Project page here.
  8. 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!
  9. Hello guys, I want to share with you my buffer ( nothing special but i like ). The buffer is Tryskell on acis and i edited htmls and the instance too (Free rev). Added fighter/mage set (with configs) with buffs animation :not bad: And Manual buffs. Also, I am not 'pro' :dat: so... There may be some mistakes.. Download Changes: ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: config/npcs.properties =================================================================== --- config/npcs.properties (revision 5) +++ config/npcs.properties (working copy) @@ -52,6 +52,12 @@ # The list of buffs, under a skillId,buffPrice,groupType format. BufferBuffs = 264,0,Songs;265,0,Songs;266,0,Songs;267,0,Songs;268,0,Songs;269,0,Songs;270,0,Songs;304,0,Songs;305,0,Songs;306,0,Songs;308,0,Songs;349,0,Songs;363,0,Songs;364,0,Songs;271,0,Dances;272,0,Dances;273,0,Dances;274,0,Dances;275,0,Dances;276,0,Dances;277,0,Dances;309,0,Dances;310,0,Dances;311,0,Dances;1002,0,Warcryer;1006,0,Warcryer;1007,0,Warcryer;1009,0,Warcryer;1308,0,Warcryer;1309,0,Warcryer;1310,0,Warcryer;1362,0,Warcryer;1390,0,Warcryer;1391,0,Warcryer;1413,0,Warcryer;1416,0,Overlord;1003,0,Overlord;1004,0,Overlord;1005,0,Overlord;1008,0,Overlord;1249,0,Overlord;1364,0,Overlord;1365,0,Overlord;1032,0,Prophet;1033,0,Prophet;1035,0,Prophet;1036,0,Prophet;1040,0,Prophet;1043,0,Prophet;1044,0,Prophet;1045,0,Prophet;1048,0,Prophet;1059,0,Shillen_Elder;1062,0,Prophet;1068,0,Prophet;1073,0,Elder;1077,0,Shillen_Elder;1078,0,Shillen_Elder;1085,0,Prophet;1086,0,Prophet;1087,0,Elder;1182,0,Elder;1189,0,Shillen_Elder;1191,0,Prophet;1204,0,Prophet;1242,0,Shillen_Elder;1243,0,Prophet;1259,0,Elder;1268,0,Shillen_Elder;1303,0,Shillen_Elder;1304,0,Elder;1352,0,Elder;1353,0,Elder;1354,0,Elder;1388,0,Shillen_Elder;1389,0,Shillen_Elder;1392,0,Prophet;1393,0,Elder;1397,0,Elder;1355,0,Elder;1356,0,Prophet;1357,0,Shillen_Elder;1363,0,Warcryer;1414,0,Overlord +#Set of fighter buffs +FighterSet = 1087,1243,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1268,1036,1363,1240,1062,271,274,275,310,304,308,306,264,267,269,349,364,268,270,1416 + +#Set of Mage buffs +MageSet = 1087,1243,1204,1040,1036,1048,1045,1389,1062,1363,1085,1059,1303,1304,273,276,365,268,270,349,264,267,268,306,308,1416 + #============================================================= # Misc #============================================================= Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 5) +++ java/net/sf/l2j/Config.java (working copy) @@ -297,6 +297,10 @@ public static int CHAMPION_REWARD_QTY; /** Buffer */ + public static String FIGHTER_SET; + public static int[] FIGHTER_SET_LIST; + public static String MAGE_SET; + public static int[] MAGE_SET_LIST; public static int BUFFER_MAX_SCHEMES; public static int BUFFER_MAX_SKILLS; public static int BUFFER_STATIC_BUFF_COST; @@ -885,7 +889,19 @@ BUFFER_MAX_SKILLS = npcs.getProperty("BufferMaxSkillsPerScheme", 24); BUFFER_STATIC_BUFF_COST = npcs.getProperty("BufferStaticCostPerBuff", -1); BUFFER_BUFFS = npcs.getProperty("BufferBuffs"); + FIGHTER_SET = npcs.getProperty("FighterSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650"); + MAGE_SET = npcs.getProperty("MageSet", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650"); + + String[] FighterList = FIGHTER_SET.split(","); + FIGHTER_SET_LIST = new int[FighterList.length]; + for (int i = 0; i < FighterList.length; i++) + FIGHTER_SET_LIST[i] = Integer.parseInt(FighterList[i]); + String[] MageList = MAGE_SET.split(","); + MAGE_SET_LIST = new int[MageList.length]; + for (int i = 0; i < MageList.length; i++) + MAGE_SET_LIST[i] = Integer.parseInt(MageList[i]); + BUFFER_BUFFLIST = new HashMap<>(); for (String skillInfo : BUFFER_BUFFS.split(";")) { Index: java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java =================================================================== --- java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (revision 5) +++ java/net/sf/l2j/gameserver/model/actor/instance/L2BufferInstance.java (working copy) @@ -27,9 +27,11 @@ import net.sf.l2j.commons.lang.StringUtil; import net.sf.l2j.gameserver.datatables.BufferTable; import net.sf.l2j.gameserver.datatables.SkillTable; +import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.L2Character; import net.sf.l2j.gameserver.model.actor.L2Summon; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; +import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; public class L2BufferInstance extends L2NpcInstance @@ -42,8 +44,11 @@ @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String currentCommand = st.nextToken(); + int buffid = 0; if (currentCommand.startsWith("menu")) { @@ -52,13 +57,29 @@ html.replace("%objectId%", getObjectId()); player.sendPacket(html); } + if (currentCommand.startsWith("chat")) + { + final NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile(getHtmlPath(getNpcId(), Integer.parseInt(st.nextToken()))); + html.replace("%objectId%", getObjectId()); + player.sendPacket(html); + } else if (currentCommand.startsWith("cleanup")) { + L2Skill buff; + buff = SkillTable.getInstance().getInfo(1056, 1); + buff.getEffects(this, player); player.stopAllEffectsExceptThoseThatLastThroughDeath(); + player.broadcastPacket(new MagicSkillUse(this, player, 1056, 1, 5, 0)); final L2Summon summon = player.getPet(); if (summon != null) + { + buff.getEffects(this, summon); + summon.broadcastPacket(new MagicSkillUse(this, summon, 1056, 1, 5, 0)); summon.stopAllEffectsExceptThoseThatLastThroughDeath(); + } + final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(getNpcId(), 0)); @@ -69,10 +90,17 @@ { player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp()); player.setCurrentCp(player.getMaxCp()); + L2Skill buff = SkillTable.getInstance().getInfo(1218, 1); + buff.getEffects(this, player); + player.broadcastPacket(new MagicSkillUse(this, player, 1218, 1, 5, 0)); final L2Summon summon = player.getPet(); if (summon != null) + { + buff.getEffects(this, player); + summon.broadcastPacket(new MagicSkillUse(this, summon, 1218, 1, 5, 0)); summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp()); + } final NpcHtmlMessage html = new NpcHtmlMessage(0); html.setFile(getHtmlPath(getNpcId(), 0)); @@ -103,6 +131,53 @@ { showEditSchemeWindow(player, st.nextToken(), st.nextToken()); } + if (currentCommand.startsWith("getbuff")) + { + buffid = Integer.parseInt(st.nextToken()); + int nextWindow = Integer.parseInt(st.nextToken()); + if (buffid != 0) + { + L2Skill buff =SkillTable.getInstance().getInfo(buffid, SkillTable.getInstance().getMaxLevel(buffid)); + buff.getEffects(this, player); + player.broadcastPacket(new MagicSkillUse(this, player, buffid, SkillTable.getInstance().getMaxLevel(buffid), 0, 0)); + final NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile(getHtmlPath(getNpcId(), nextWindow)); + html.replace("%objectId%", getObjectId()); + player.sendPacket(html); + } + } + else if (currentCommand.startsWith("fighterSet")) + { + int fighterSet[] = Config.FIGHTER_SET_LIST; + player.stopAllEffectsExceptThoseThatLastThroughDeath(); + L2Skill buff ; + for (int id: fighterSet) + { + buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)); + buff.getEffects(this, player); + player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0)); + } + final NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile(getHtmlPath(getNpcId(), 0)); + html.replace("%objectId%", getObjectId()); + player.sendPacket(html); + } + else if (currentCommand.startsWith("mageSet")) + { + int mageSet[] = Config.MAGE_SET_LIST; + player.stopAllEffectsExceptThoseThatLastThroughDeath(); + L2Skill buff ; + for (int id: mageSet) + { + buff = SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)); + buff.getEffects(this, player); + player.broadcastPacket(new MagicSkillUse(this, player, id, buff.getLevel(), 0, 0)); + } + final NpcHtmlMessage html = new NpcHtmlMessage(0); + html.setFile(getHtmlPath(getNpcId(), 0)); + html.replace("%objectId%", getObjectId()); + player.sendPacket(html); + } else if (currentCommand.startsWith("skill")) { final String groupType = st.nextToken(); @@ -226,7 +301,7 @@ final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) - sb.append("<font color=\"LEVEL\">You haven't defined any scheme, please go to 'Manage my schemes' and create at least one valid scheme.</font>"); + sb.append("<center><font color=\"LEVEL\">You haven't defined any scheme</font></center>"); else { for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) @@ -254,12 +329,14 @@ final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) - sb.append("<font color=\"LEVEL\">You haven't created any scheme.</font>"); + sb.append("<center><font color=\"3399CC\">You haven't created any scheme.</font></center>"); else { - sb.append("<table>"); + sb.append("<table bgcolor=000000 width =300>"); for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) - StringUtil.append(sb, "<tr><td width=140>", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</td><td width=60><button value=\"Clear\" action=\"bypass -h npc_%objectId%_clearscheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td><td width=60><button value=\"Drop\" action=\"bypass -h npc_%objectId%_deletescheme ", scheme.getKey(), "\" width=55 height=15 back=\"sek.cbui94\" fore=\"sek.cbui92\"></td></tr>"); + StringUtil.append(sb, "<tr><td width=140><font color=\"3399CC\">", scheme.getKey(), " (", scheme.getValue().size(), " skill(s))</font></td><td width=60><button value=\"Clear\" action=\"bypass -h npc_%objectId%_clearscheme ", scheme.getKey(), "\" width=75 height=15 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td><td width=60><button value=\"Drop\" action=\"bypass -h npc_%objectId%_deletescheme ", scheme.getKey(), "\" width=75 height=15 back=\"L2UI.DefaultButton_click\" fore=\"L2UI.DefaultButton\"></td></tr>"); sb.append("</table>"); } @@ -311,17 +388,17 @@ { final Map<String, ArrayList<Integer>> schemes = BufferTable.getInstance().getPlayerSchemes(player.getObjectId()); if (schemes == null || schemes.isEmpty()) - return "Please create at least one scheme."; + return "<table bgcolor=000000 width =300><tr><td align=center width=300><font color=\"3399CC\">Please create at least one scheme.</font></td></tr></table>"; final StringBuilder sb = new StringBuilder(200); - sb.append("<table>"); + sb.append("<table bgcolor=000000 width =300>"); for (Map.Entry<String, ArrayList<Integer>> scheme : schemes.entrySet()) { if (schemeName.equalsIgnoreCase(scheme.getKey())) - StringUtil.append(sb, "<tr><td width=200>", scheme.getKey(), " (<font color=\"LEVEL\">", scheme.getValue().size(), "</font> / ", Config.BUFFER_MAX_SKILLS, " skill(s))</td></tr>"); + StringUtil.append(sb, "<tr><td align=center width=300>", scheme.getKey(), " (<font color=\"LEVEL\">", scheme.getValue().size(), "</font> / ", Config.BUFFER_MAX_SKILLS, " skill(s))</td></tr>"); else - StringUtil.append(sb, "<tr><td width=200><a action=\"bypass -h npc_%objectId%_editschemes none ", scheme.getKey(), "\">", scheme.getKey(), " (", scheme.getValue().size(), " / ", Config.BUFFER_MAX_SKILLS, " skill(s))</a></td></tr>"); + StringUtil.append(sb, "<tr><td align=center width=300><font color=\"3399CC\"><a action=\"bypass -h npc_%objectId%_editschemes none ", scheme.getKey(), "\">", scheme.getKey(), " (", scheme.getValue().size(), " / ", Config.BUFFER_MAX_SKILLS, " skill(s))</a></font></td></tr>"); } sb.append("</table>"); @@ -394,7 +471,7 @@ { final List<Integer> skills = BufferTable.getInstance().getScheme(player.getObjectId(), schemeName); if (skills.isEmpty()) - return "That scheme is empty."; + return "<font color=\"3399CC\">That scheme is empty.</font>"; final StringBuilder sb = new StringBuilder(500); sb.append("<table>");
  10. Fast Preview: Download (3,17KB) :[Hidden Content] Credits: HappyLDE <npc id="9994" idTemplate="100912" name="Jolie" title=" Enchant Items"> <set name="level" val="70"/> <set name="radius" val="13"/> <set name="height" val="20"/> <set name="rHand" val="22"/> <set name="lHand" val="26"/> <set name="type" val="L2Npc"/> <set name="exp" val="0"/> <set name="sp" val="0"/> <set name="hp" val="2444.46819"/> <set name="mp" val="1345.8"/> <set name="hpRegen" val="7.5"/> <set name="mpRegen" val="2.7"/> <set name="pAtk" val="688.86373"/> <set name="pDef" val="295.91597"/> <set name="mAtk" val="470.40463"/> <set name="mDef" val="216.53847"/> <set name="crit" val="4"/> <set name="atkSpd" val="253"/> <set name="str" val="40"/> <set name="int" val="21"/> <set name="dex" val="30"/> <set name="wit" val="20"/> <set name="con" val="43"/> <set name="men" val="20"/> <set name="corpseTime" val="7"/> <set name="walkSpd" val="50"/> <set name="runSpd" val="120"/> <set name="dropHerbGroup" val="0"/> <set name="attackRange" val="40"/> <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> </npc>
  11. Hello members, I made a useful search action only for gms in order to save some of your time while you want to search items (ids,actual names etc). (Its 15 min code since i copied Bookmarks code and edited it) write //search to open the html or //search {word} for directly search Coded in aCis 370 rev Video Code Html P.s Dont forget to add the commands in adminCommands.xml ps2. i didnt design the html cause im lazy. Edit: Updated by @StinkyMadness
  12. So...a guy pmed me and asked for these npc's: Acis Redesigned Npc's I searched for those files and I was lucky enough. I found everything and I decided to upload them and share them with y'all. Newbie Services Buffer Welcome message, servernews. Admin Augment Skills Info Antibot Prevention System NPC's These were made exclusively for L2jNetwork , a project made by Baggos and others. Since you can find them in that project , there's no reason to not upload them. It's much easier to download all the npc's instead of searching them 1 by 1. Download
  13. Hello..read the code and you will understand what is it go to net.sf.l2j.gameserver.model.actor.instance.Player.java find this find final boolean hadHero and put this private int spreeKill = 0; private int spreeKills = 0; private int KILL_STEAK = 0; it will look like that find final boolean hadHero private int spreeKill = 0; private int spreeKills = 0; private int KILL_STEAK = 0; now find this setPvpKills(getPvpKills() + 1); and put this KILL_STEAK++; switch (KILL_STEAK) { case 20: sendMessage("You are almost on a killing spree 5 more kills"); break; case 25: Broadcast.announceToOnlinePlayers(getName() + " is on a killing spree!!"); startAbnormalEffect(AbnormalEffect.SLEEP); //SLEEP = VITALITY EFFECT setHero(true); PlaySound _snd25 = new PlaySound(1, "killing spree"); sendPacket(_snd25); break; } spreeKill++; switch (spreeKill) { case 1: sendPacket(new CreatureSay(0, 0, "PvP", getName() + " just got a First Blood!!")); break; case 2: sendPacket(new CreatureSay(0, 2, "PvP", getName() + " just got a Double Kill!!")); break; case 3: sendPacket(new CreatureSay(0, 3, "PvP", getName() + " just got a Triple Kill!!")); break; case 4: sendPacket(new CreatureSay(0, 4, "PvP", getName() + " has a Quadra kill!!!")); break; case 5: sendPacket(new CreatureSay(0, 0, "PvP", getName() + " has a Penta Kill!!")); break; case 6: sendPacket(new CreatureSay(0, 2, "PvP", getName() + " just got a Legendary!!")); break; } spreeKills++; switch (spreeKills) { case 1: PlaySound _snd1 = new PlaySound(1, "firstblood"); sendPacket(_snd1); break; case 2: PlaySound _snd2 = new PlaySound(1, "doublekill"); sendPacket(_snd2); break; case 3: PlaySound _snd3 = new PlaySound(1, "triplekill"); sendPacket(_snd3); break; case 4: PlaySound _snd4 = new PlaySound(1, "quadrakill"); sendPacket(_snd4); break; case 5: PlaySound _snd5 = new PlaySound(1, "pentakill"); sendPacket(_snd5); break; case 6: PlaySound _snd6 = new PlaySound(1, "legendary"); sendPacket(_snd6); break; default: } find this public boolean doDie(Creature killer) and put this if (KILL_STEAK > 0) { if (KILL_STEAK > 24) Broadcast.announceToOnlinePlayers(killer.getName() + " has stopped " + getName() + "'s killing spree of " + KILL_STEAK + " kills!!"); if (!hadHero) setHero(false); stopAbnormalEffect(AbnormalEffect.SLEEP); spreeKill = 0; spreeKills = 0; KILL_STEAK = 0; } Download this file Vitality Effect Interlude Download this file League of Legends Sounds (PUT THEM IN THE Music folder in you Lineage II) And you are done.
  14. Hi friends , Im having some problems to set a default crest when faction is selected, i cant get the method to set a default crest from crestcache (previously loaded in data/crest) for all faction members. can i get some help with this ? sorry for my bad english. Greetings
  15. Hi, is there some command to refresh clan skills without re-login ?
  16. Have fun! :happyforever:
  17. Plain and comple, does not require any explanation as it's self explanatory. Core - http://pastebin.com/k6uf8v2Z Datapack - http://pastebin.com/A2k9ZT6N
  18. +++ java/net/sf/l2j/gameserver/network/clientpackets/RequestRecipeShopListSet.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -62,6 +63,12 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendMessage("You cannot craft while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_WORKSHOP_HERE); +++ java/net/sf/l2j/gameserver/network/clientpackets/Logout.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -56,6 +57,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.logout_zone) + { + player.sendMessage("You cannot Logout while inside a Multifunction zone."); + player.sendPacket(ActionFailed.STATIC_PACKET); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_LOGOUT_HERE); +++java/net/sf/l2j/gameserver/model/zone/ZoneId.java DANGER_AREA(15), CAST_ON_ARTIFACT(16), NO_RESTART(17), - SCRIPT(18); + SCRIPT(18), + MULTI_FUNCTION(19); private final int _id; +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListBuy.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -83,6 +84,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListBuy(player)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.isInsideZone(ZoneId.NO_STORE)) { player.sendPacket(SystemMessageId.NO_PRIVATE_STORE_HERE); +++java/net/sf/l2j/gameserver/network/clientpackets/SetPrivateStoreListSell.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -71,6 +72,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.store_zone) + { + player.sendPacket(new PrivateStoreManageListSell(player, _packageSale)); + player.sendMessage("You cannot start store while inside Multifunction zone."); + return; + } + if (!player.getAccessLevel().allowTransaction()) { player.sendPacket(SystemMessageId.YOU_ARE_NOT_AUTHORIZED_TO_DO_THAT); +++java/net/sf/l2j/gameserver/network/serverpackets/Die.java. +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; public class Die extends L2GameServerPacket { private final int _charObjId; private final boolean _fake; private boolean _sweepable; + private boolean _canTeleport; private L2AccessLevel _access = AccessLevels._userAccessLevel; @@ -47,6 +50,7 @@ Player player = (Player) cha; _access = player.getAccessLevel(); _clan = player.getClan(); + _canTeleport = !(player.isInsideZone(ZoneId.MULTI_FUNCTION) && L2MultiFunctionZone.revive); @@ -86,7 +90,7 @@ } else { - writeD(0x01); // to nearest village + writeD(_canTeleport ? 0x01 : 0); // to nearest village @@ -96,7 +100,7 @@ - if (_clan != null) + if (_canTeleport && _clan != null) { ++++java/net/sf/l2j/gameserver/model/actor/instance/Player.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -4384,6 +4385,8 @@ // Add PvP point to attacker. setPvpKills(getPvpKills() + 1); + L2MultiFunctionZone.givereward(this); + // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter sendPacket(new UserInfo(this)); } ++++java/net/sf/l2j/gameserver/model/itemcontainer/ItemContainer.java { protected static final Logger _log = Logger.getLogger(ItemContainer.class.getName()); - protected final List<ItemInstance> _items; + public final List<ItemInstance> _items; protected ItemContainer() { +++java/net/sf/l2j/gameserver/model/zone/type/L2MultiFunctionZone.java CREATE NEW THIS FILE DOES NOT EXIST! package net.sf.l2j.gameserver.model.zone.type; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import java.util.Properties; import net.sf.l2j.commons.concurrent.ThreadPool; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.L2Skill; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Summon; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.model.itemcontainer.PcInventory; import net.sf.l2j.gameserver.model.zone.L2ZoneType; import net.sf.l2j.gameserver.model.zone.ZoneId; public class L2MultiFunctionZone extends L2ZoneType { public L2MultiFunctionZone(int id) { super(id); loadConfigs(); } public static boolean pvp_enabled, restart_zone, store_zone, logout_zone, revive_noblesse, revive_heal, revive, remove_buffs, remove_pets, give_noblesse; static int radius, enchant, revive_delay; static int[][] spawn_loc; L2Skill noblesse = SkillTable.getInstance().getInfo(1323, 1); private static List<String> items = new ArrayList<>(), classes = new ArrayList<>(), grades = new ArrayList<>(); public static List<int[]> rewards = new ArrayList<>(); static String[] gradeNames = { "", "D", "C", "B", "A", "S" }; @Override protected void onEnter(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true); character.setInsideZone(ZoneId.MULTI_FUNCTION, true); if (character instanceof Player) { Player activeChar = ((Player) character); if (classes != null && classes.contains("" + activeChar.getClassId().getId())) { activeChar.teleToLocation(83597, 147888, -3405, 0); activeChar.sendMessage("Your class is not allowed in the MultiFunction zone."); return; } for (ItemInstance o : activeChar.getInventory()._items) { if (o.isEquipable() && o.isEquipped() && !checkItem(o)) { int slot = activeChar.getInventory().getSlotFromItem(o); activeChar.getInventory().unEquipItemInBodySlotAndRecord(slot); activeChar.sendMessage(o.getItemName() + " unequiped because is not allowed inside this zone."); } } if (give_noblesse) noblesse.getEffects(activeChar, activeChar); if (pvp_enabled) activeChar.updatePvPFlag(1); activeChar.sendMessage("You entered in a MultiFunction zone."); clear(activeChar); } } @Override protected void onExit(Creature character) { character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false); character.setInsideZone(ZoneId.MULTI_FUNCTION, false); if (character instanceof Player) { Player activeChar = ((Player) character); activeChar.sendMessage("You left from a MultiFunction zone."); if (pvp_enabled) activeChar.updatePvPFlag(0); } } @Override public void onDieInside(final Creature character) { if (character instanceof Player) { final Player activeChar = ((Player) character); if (revive) { ThreadPool.schedule(new Runnable() { @Override public void run() { activeChar.doRevive(); heal(activeChar); int[] loc = spawn_loc[Rnd.get(spawn_loc.length)]; activeChar.teleToLocation(loc[0] + Rnd.get(-radius, radius), loc[1] + Rnd.get(-radius, radius), loc[2], 0); } }, revive_delay * 1000); } } } @Override public void onReviveInside(Creature character) { if (character instanceof Player) { Player activeChar = ((Player) character); if (revive_noblesse) noblesse.getEffects(activeChar, activeChar); if (revive_heal) heal(activeChar); } } static void heal(Player activeChar) { activeChar.setCurrentHp(activeChar.getMaxHp()); activeChar.setCurrentCp(activeChar.getMaxCp()); activeChar.setCurrentMp(activeChar.getMaxMp()); } private static void clear(Player player) { if (remove_buffs) { player.stopAllEffects(); if (remove_pets) { Summon pet = player.getPet(); if (pet != null) { pet.stopAllEffects(); pet.unSummon(player); } } } else { if (remove_pets) { Summon pet = player.getPet(); if (pet != null) pet.unSummon(player); } } } public static void givereward(Player player) { if (player.isInsideZone(ZoneId.MULTI_FUNCTION)) { for (int[] reward : rewards) { PcInventory inv = player.getInventory(); inv.addItem("Custom Reward", reward[0], reward[1], player, player); } } } public static boolean checkItem(ItemInstance item) { int o = item.getItem().getCrystalType().ordinal(); int e = item.getEnchantLevel(); if (enchant != 0 && e >= enchant) return false; if (grades.contains(gradeNames[o])) return false; if (items != null && items.contains("" + item.getItemId())) return false; return true; } private static void loadConfigs() { try { Properties prop = new Properties(); prop.load(new FileInputStream(new File("./config/MultiFunctionZone.properties"))); pvp_enabled = Boolean.parseBoolean(prop.getProperty("EnablePvP", "False")); spawn_loc = parseItemsList(prop.getProperty("SpawnLoc", "150111,144740,-12248")); revive_delay = Integer.parseInt(prop.getProperty("ReviveDelay", "10")); if (revive_delay != 0) revive = true; give_noblesse = Boolean.parseBoolean(prop.getProperty("GiveNoblesse", "False")); String[] propertySplit = prop.getProperty("Items", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) items.add(i); propertySplit = prop.getProperty("Grades", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) if (i.equals("D") || i.equals("C") || i.equals("B") || i.equals("A") || i.equals("S")) grades.add(i); propertySplit = prop.getProperty("Classes", "").split(","); if (propertySplit.length != 0) for (String i : propertySplit) classes.add(i); radius = Integer.parseInt(prop.getProperty("RespawnRadius", "500")); enchant = Integer.parseInt(prop.getProperty("Enchant", "0")); remove_buffs = Boolean.parseBoolean(prop.getProperty("RemoveBuffs", "False")); remove_pets = Boolean.parseBoolean(prop.getProperty("RemovePets", "False")); restart_zone = Boolean.parseBoolean(prop.getProperty("NoRestartZone", "False")); store_zone = Boolean.parseBoolean(prop.getProperty("NoStoreZone", "False")); logout_zone = Boolean.parseBoolean(prop.getProperty("NoLogoutZone", "False")); revive_noblesse = Boolean.parseBoolean(prop.getProperty("ReviveNoblesse", "False")); revive_heal = Boolean.parseBoolean(prop.getProperty("ReviveHeal", "False")); propertySplit = prop.getProperty("Rewards", "57,100000").split(";"); for (String reward : propertySplit) { String[] rewardSplit = reward.split(","); if (rewardSplit.length == 2) { try { rewards.add(new int[] { Integer.parseInt(rewardSplit[0]), Integer.parseInt(rewardSplit[1]) }); } catch (NumberFormatException nfe) { } } } } catch (Exception e) { e.printStackTrace(); } } private static int[][] parseItemsList(String line) { final String[] propertySplit = line.split(";"); if (propertySplit.length == 0) return null; int i = 0; String[] valueSplit; final int[][] result = new int[propertySplit.length][]; for (String value : propertySplit) { valueSplit = value.split(","); if (valueSplit.length != 3) return null; result[i] = new int[3]; try { result[i][0] = Integer.parseInt(valueSplit[0]); } catch (NumberFormatException e) { return null; } try { result[i][1] = Integer.parseInt(valueSplit[1]); } catch (NumberFormatException e) { return null; } try { result[i][2] = Integer.parseInt(valueSplit[2]); } catch (NumberFormatException e) { return null; } i++; } return result; } } ++++java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java +import net.sf.l2j.gameserver.model.zone.ZoneId; +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -96,6 +98,12 @@ if (item == null) return; + if (getClient().getActiveChar().isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.checkItem(item)) + { + getClient().getActiveChar().sendMessage("You cannot use " +item.getName()+ " inside this zone."); + return; + } + +++java/net/sf/l2j/gameserver/network/clientpackets/RequestRestart.java +import net.sf.l2j.gameserver.model.zone.type.L2MultiFunctionZone; @@ -54,6 +55,13 @@ return; } + if (player.isInsideZone(ZoneId.MULTI_FUNCTION) && !L2MultiFunctionZone.restart_zone) + { + player.sendMessage("You cannot restart while inside a Multifunction zone."); + sendPacket(RestartResponse.valueOf(false)); + return; + } + if (player.isInsideZone(ZoneId.NO_RESTART)) { player.sendPacket(SystemMessageId.NO_RESTART_HERE); +++config/MultiFunctionZone.properties # --------------------------------------------------------------------------- # MultiFunctionZone # --------------------------------------------------------------------------- # This option will turn on PvP flag to all people when entering to the zone EnablePvP = True # If set to false, zone will be no-restart zone NoRestartZone = False # If set to false, zone will be no-logout zone NoLogoutZone = False # If set to false, zone will be no-store zone NoStoreZone = False # Give noblesse after revive? ReviveNoblesse = False # Heal after revive? ReviveHeal = False # Delay, in seconds, to wait before revive # 0 to disable ReviveDelay = 10 # Set the spawn points where players will be teleported on revive, if enabled # example:150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 SpawnLoc = 150111,144740,-12248;143665,144418,-12022;144443,147685,-12139 # Random respawn radius RespawnRadius = 500 # If set to true, players will take noblesse blessing when entering GiveNoblesse = True # Remove buffs when entering to the zone RemoveBuffs = False # Remove pets when entering to the zone RemovePets = False # Special rewards when hunting inside this zone # example: 57,100000;14720,1 Rewards = 57,100000;14720,1 # List of Items(id's) that won't be usable inside this area and also will be unequiped when entering # (armor, weapons, scrolls, potions, etc), example: 728,7575, 6383, 1538 Items = 728,7575,6383,1538 # List of Grades that won't be usable inside this area and also will be unequiped when entering # example: D,C,B,A,S Grades = C,B,A # Items with this enchant or more won't be usable inside this area and also will be unequiped when entering # 0 to disable Enchant = 0 # Players with one of that classes won't be able to enter to the zone # example: 93,85,12 Classes = 92 \ No newline at end of file +++ data/xml/zones/MultiFunctionZone.xml <?xml version="1.0" encoding="UTF-8"?> <list> <zone type="MultiFunctionZone" shape="Cuboid" minZ="-3752" maxZ="-352"><!-- gludin_pvp --> <node X="-88411" Y="141732" /> <node X="-87429" Y="142708" /> <spawn X="-86979" Y="142402" Z="-3643" /> </zone> </list> CREDITS: ^Wyatt
  19. Hello mates, Since all my previous posts was for H5 Chronicle so i think i’ll start post some content for Interlude Chronicle, so here is my first Interlude guide, but after all Java is Java, no matter Interlude, H5, … etc all are just Java files The Server Pack i’m gonna use in this guide will be ( aCis Rev.360 [Free Version] ), and for the IDE will use NetBeans, of course you can use Eclipse it’s just personal preferences. ---------------------------------------------------------------------------------- Requirements : – I expect that you have aCis Source Pack Installed on your computer or server – We won’t go through the process of installing and starting server, since there are a lot of good guides about this here. – You need a Java IDE (Eclipse, Netbeans, IntelliJ or any else) i’ll use NetBeans but you can use Any. – Stay Relaxed, No Stress, Coding is just Entertaining. ---------------------------------------------------------------------------------- – How things happen in Game ? Well In Lineage 2 Every thing has two sides (Client and Server), whatever you do in Client (Game) it will automatically send a request to server, then server analyze this request, start processing it and response with a response . That data the fly between Client and Server called Packets , This Packets can be a Request Packet or Response Packet, and each Packet has special code or identifier, if you click here you will find the main Packets for Interlude. For Example : You Click on Community or ALT+B, your game client will send a packet to server called RequestShowboardwith code 57, this is sent from Client to Server, so it’s ClientPacket. So if we want to do any special thing when Player try to show the community board we need to find this packet code which since it’s a ClientPacket then it will be in that package : net.sf.l2j.gameserver.network.clientpackets When Server Analyze that request and see things like if it’s enabled … etc it will reply with another Packet which is ShowBoard with code 6E (if board enabled ofc), and this is sent from Server to Client, so it’s a ServerPacket, and since it’s a ServerPacket so we can find it in that package : net.sf.l2j.gameserver.network.serverpackets , and we can expect that this class or java file will be responsible for what will be shown on the board. By now we know how to find where magic happens, but what about more power ? ---------------------------------------------------------------------------------- What is Bypass and how it works ? Whenever you click on a button or a link for an NPC or even in Community Board this buttons and links meant to do something when a player click on it, but how it happens ? and how server knows which button player clicked and what should happen after that ? Well if you try to show the code of any l2j html file that contain a link or a button, for example i’ll view source code of aCis main buffer by @Tryskell, which located in gamserver/data/html/mods/buffer/50008.htm <html><body> <center><img src="L2UI_CH3.herotower_deco" width=256 height=32 /></center><br> Hello stranger!<br> I'm Tryskell. Yup, you're right, I created an avatar of myself and decided to share some of my powerful buffs in order to improve your pew-pew-bum-zap abilities.<br> What can I do for you ? Do you want to hear <font color="LEVEL"><a action="bypass -h npc_%objectId%_Chat 9">my story</a></font> ?<br> <center> <a action="bypass -h npc_%objectId%_support player">Magic support</a><br> <a action="bypass -h npc_%objectId%_manageschemes">Manage my schemes</a><br1> <a action="bypass -h npc_%objectId%_editschemes none none">Edit my schemes</a><br> <a action="bypass -h npc_%objectId%_heal">Heal me and my pet</a><br1> <a action="bypass -h npc_%objectId%_cleanup">Cleanup all effects on me and my pet</a> </center> </body></html> Here you can see the attribute action contains something like : let’s split this action in parts and see what every part do : bypass : tells your client to send a packet RequestBypassToServer with OP Code 0x21 (0x identify a hex decimal > a numeric base 16 value ) -h : tells your client to hide the window on click event npc_%objectId%_Chat 9 : is the command that will be bypassed to server So if we wanna make a bypass to server we just wanna set the action of the link (<a>) or button to something like : “bypass -h command” or just “bypass command” But actually we still dunno what commands already available or if we can create a new custom ….. ----------------------------------------------------------- Track the Bypass down : I can just give you a list of possible bypass commands but i hate limitations, so i’ll give you a quick guide about how to find them and learn about what they do all on your own and then will give you some examples, also this will help you work with almost any pack or chronicle, so let’s see how it works. First packets sent to server will be sent to a class called L2GamePacketHandler.java, which in aCis it’s located at : net.sf.l2j.gameserver.network , and then this class will redirect that packet to the proper Handler or class depending on the received packet OPCode, and since we know that RequestBypassToServer have the OPCode of 0x21 so what about search about this in that Java File : As we can see it call a class called RequestBypassToServer, if we click on this class name : For Netbeans : Right Click > Navigate > Declaration (or CTRL+B) For Eclipse : Right Click > Go To > Declaration It will open that file we will find a part of the code like this (i removed some part just to be easier to read) : if (_command.startsWith("admin_")) { .... } else if (_command.startsWith("player_help ")) { .... } else if (_command.startsWith("npc_")) { .... } else if (_command.startsWith("manor_menu_select?")) { .... } else if (_command.startsWith("bbs_") || _command.startsWith("_bbs") || _command.startsWith("_friend") || _command.startsWith("_mail") || _command.startsWith("_block")) { .... } else if (_command.startsWith("Quest ")) { .... } else if (_command.startsWith("_match")) { .... } else if (_command.startsWith("_diary")) { .... } else if (_command.startsWith("arenachange")) { .... } So as we can see the current supported bypasses are commands that started with : Of course you can add another main custom command by adding another “else if” statement or even create a bypass handler or replace this one with an extended one. Why we don’t go further and inspect how this npc_ thing work ….. here the code of that section : else if (_command.startsWith("npc_")) { if (!activeChar.validateBypass(_command)) return; int endOfId = _command.indexOf('_', 5); String id; if (endOfId > 0) id = _command.substring(4, endOfId); else id = _command.substring(4); try { final L2Object object = L2World.getInstance().getObject(Integer.parseInt(id)); if (object != null && object instanceof L2Npc && endOfId > 0 && ((L2Npc) object).canInteract(activeChar)) ((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1)); activeChar.sendPacket(ActionFailed.STATIC_PACKET); } catch (NumberFormatException nfe) { } } The first part can be lil confusing if you’re not very familiar with java, so lemme explain it to you . That part looking for a number that comes after npc_ that followed by an “_” for example : npc_123456 , and before we saw that command npc_%objectId%_Chat 9 , so here we expect that %objectId% is a number and yes it is since server will automatically replace %objectId% with a unique numeric identifier for the NPC you’re talking to, and it’s not the id you use to spawn it, since you may spawn that npc multiple times so server needs to identify each one of them. So for now we know that command is used like this : Later in this code we will find that part : final L2Object object = L2World.getInstance().getObject(Integer.parseInt(id)); if (object != null && object instanceof L2Npc && endOfId > 0 && ((L2Npc) object).canInteract(activeChar)) ((L2Npc) object).onBypassFeedback(activeChar, _command.substring(endOfId + 1)); activeChar.sendPacket(ActionFailed.STATIC_PACKET); Also let me explain this for you, this code will search the L2World for something with that unique identifier and if found it will use it as L2Npc object and call the method onBypassFeedback to process the command in our case the command will be Chat 9. So Lets Go to declaration of that L2Npc class (as we learned how before), and lets see what this onBypassFeedback do we will find something like this : if (command.equalsIgnoreCase("TerritoryStatus")) { .... } else if (command.startsWith("Quest")) { .... } else if (command.startsWith("Chat")) { .... } else if (command.startsWith("Link")) { .... } else if (command.startsWith("Loto")) { .... } else if (command.startsWith("CPRecovery")) { .... } else if (command.startsWith("SupportMagic")) { .... } else if (command.startsWith("multisell")) { .... } else if (command.startsWith("exc_multisell")) { .... } else if (command.startsWith("Augment")) { .... } else if (command.startsWith("EnterRift")) { .... } else if (command.startsWith("ChangeRiftRoom")) { .... } else if (command.startsWith("ExitRift")) { .... } As we can see we can now expect that we can use npc_ commands as follow : But in the previous example there were number 9 in the end as npc_%objectId%_Chat 9, what this would mean ? well here is the code of Chat command : else if (command.startsWith("Chat")) { int val = 0; try { val = Integer.parseInt(command.substring(5)); } catch (IndexOutOfBoundsException ioobe) {} catch (NumberFormatException nfe) {} showChatWindow(player, val); } As we can see here it will look for that number (9 in our case) and pass it to a method called showChatWindow , which will look for an htm file with same npc id ended with -9 for example this npc id is 50008 so it will looks for 50008-9.htm , and yes it’s right : Now we know how to track things down but one thing left, which is what if you found an bypass in an npc which you cannot find in L2Npc Class, well some npc don’t directly based on L2Npc type but sometimes it’s based on something else that based on L2Npc, for example this NPC in our example has a bypass like : this “heal” command not exist but if we go to our npcs folder in path of gameserver/data/xml/npcs , and we opened the file 50000-50099.xml since our npc id is 50008 and look into that npc definition you will find this : As you can see it’s based on L2Buffer, not L2Npc directly, so we can expect that this class called L2Buffer will contain a method called onBypassFeedback and it will contain an implementation for this “heal” command, but wait a second … you’ll never find a class called L2Buffer, simply because in aCis Packs L2Buffer will redirect to a class called L2BufferInstance and L2BlaBla will redirect to L2BlaBlaInstance, it’s just how aCis simplify things, so just keep that in mind we looking for L2BufferInstance … If we go to that class which is located in the package of : net.sf.l2j.gameserver.model.actor.instance (btw this package contains a lot of interesting stuff) we will find that part inside the onBypassFeedback method : Yay , it’s here, so if we want to use this command on another npc we have 3 options : – Add this code to the main RequestBypassToServer – Set the NPC type to L2Buffer – Create a new NPC instance and implement this on it Or we can even add it to community board :D ------------------------------------------------------------------- Do you learned something from this guide ? Personally i don’t learn any thing without getting my hands into it in real action, so why not create something real, like a multi function npc and as a bonus we will create a new NPC type as well, also we can work a bit with Community Board . . . let’s go friends ------------------------------------------------------------------- 1.1 : Create a new NPC Type : Let’s Create a new Class in the package net.sf.l2j.gameserver.model.actor.instance, and i’ll call it L2MultiFunctionInstance (Name it whatever u want but don’t forget suffix it with Instance) , Just right click on the package and New > Java Class : Now i’ll make it extends the L2NpcInstance or you can use L2Npc class only, but L2NpcInstance has cool implementation so i’ll go for it, and now Server will know it’s an NPC, but you may want for example extends L2BufferInstance to take benefit of Buffer commands or anything else that considered as NPC, but i’ll go pure in this guide , and to simplify thing and to not go off topic i’ll create a simple class code for you which you can use it and i’ll highlight the important parts : //TODO: Add your Custom Bypasses Here At this place we can add our custom bypass commands “data/html/custom/multifunction/” this is where our .htm files will be located for npcs with this type ------------------------------------------------------------- 1.1 Create the Actual NPC So First let’s create our NPC, i’ll add it Below Tryskell NPC so it will be in file 50000-50099.xml : <npc id="50009" idTemplate="31324" name="Relina" title="Multifunction NPC"> <set name="level" val="70"/> <set name="radius" val="8"/> <set name="height" val="23"/> <set name="rHand" val="316"/> <set name="lHand" val="0"/> <set name="type" val="L2MultiFunction"/> <set name="exp" val="0"/> <set name="sp" val="0"/> <set name="hp" val="2444.46819"/> <set name="mp" val="1345.8"/> <set name="hpRegen" val="7.5"/> <set name="mpRegen" val="2.7"/> <set name="pAtk" val="688.86373"/> <set name="pDef" val="295.91597"/> <set name="mAtk" val="470.40463"/> <set name="mDef" val="216.53847"/> <set name="crit" val="4"/> <set name="atkSpd" val="253"/> <set name="str" val="40"/> <set name="int" val="21"/> <set name="dex" val="30"/> <set name="wit" val="20"/> <set name="con" val="43"/> <set name="men" val="20"/> <set name="corpseTime" val="7"/> <set name="walkSpd" val="50"/> <set name="runSpd" val="120"/> <set name="dropHerbGroup" val="0"/> <ai type="DEFAULT" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> <skills> <skill id="4045" level="1"/> <skill id="4416" level="16"/> </skills> </npc> Note that it has id of 50009 and type of L2MultiFunction (without Instance) ------------------------------------------------------------ 1.2 Create the html files Now the html part, we gonna create a folder called custom inside html folder and inside it will create multifunction folder which it’s where we gonna have our html files, First we need the main htm which will be on our created folder with name 50009.htm : <html> <body> <br> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32 /> <font color="D5C003">Hello Player</font><br> <font color="DDDEC0">I'm the Multi Function NPC with Awesome Customs</font><br> <button value="Open Another Chat" action="bypass -h npc_%objectId%_Chat 1" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Show a Multi Sell" action="bypass -h npc_%objectId%_multisell 50009" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Multisell [Inv.Maintain]" action="bypass -h npc_%objectId%_exc_multisell 50009" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Community Board" action="bypass _bbshome" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Acumen Buff - No Close" action="bypass npc_%objectId%_giveAcumen" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Teleport To Giran" action="bypass -h npc_%objectId%_gotogiran" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Augment" action="bypass -h npc_%objectId%_Augment 1" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <button value="Warehouse" action="bypass npc_%objectId%_warehouse_deposit" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <img src="L2UI_CH3.herotower_deco" width=256 height=32 /> </center> </body> </html> Thanks to @Sinister Smile for the buttons, and to make it work, you need to have this file > Download Also we will need another htm file for testing which will be named 50009-1.htm : <html> <body> <br> <center> <img src="L2UI_CH3.herotower_deco" width=256 height=32 /><br > <font color="D5C003">Hello Once Again</font><br> <font color="DDDEC0">This is another Chat of me</font><br> <button value="Back to Main" action="bypass -h npc_%objectId%_Chat 0" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> <img src="L2UI_CH3.herotower_deco" width=256 height=32 /> </center> </body> </html> ----------------------------------------------------------------- 1.3 Create the Multisell File I’ll Create a multisell file with name 50009.xml in multisell folder : <?xml version='1.0' encoding='utf-8'?> <list maintainEnchantment="true"> <item> <production id="6608" count="1"/> <ingredient id="6579" count="1" /> </item> <item> <production id="5643" count="1" /> <ingredient id="151" count="1"/> </item> </list> --------------------------------------------------------------- 1.4 Start Server (If not Yet) and let’s Test Each one Open Another Chat : Action : bypass -h npc_%objectId%_Chat 1 This will Open the htm file called 50009-1.htm Show Multi Sell : Action : bypass -h npc_%objectId%_multisell 50009 This will Show a Multisell with id of 50009, and will show all items even items player can’t buy Multi Sell [Inv.Maintain] : Action : bypass -h npc_%objectId%_exc_multisell 50009 This will Show a Multisell with id of 50009, and will show only items player can buy (have the required items for it) Community Board : Action : bypass _bbshome Will Show Community Board if enabled, you can also use : Augment : Action : bypass -h npc_%objectId%_Augment 1 Will Show Augment Panel, also you can use bypass -h npc_%objectId%_Augment 2, to show Remove Augment Panel ----------------------------------------------------------- 1.5 Implement Missed Bypasses : So Now we need to add our custom bypasses to the NPC Type which are : giveAcument, gotogiran, warehouse_deposit Let’s get back to Java and inside onBypassFeedback in the Class we just created we will add this : if(command.equalsIgnoreCase("giveAcumen")) { SkillTable.getInstance().getInfo(1085, SkillTable.getInstance().getMaxLevel(1085)).getEffects(player, player); } else if(command.equalsIgnoreCase("gotogiran")) { player.teleToLocation(82698,148638,-3473,0); } else if(command.equalsIgnoreCase("warehouse_deposit")) { player.sendPacket(ActionFailed.STATIC_PACKET); player.setActiveWarehouse(player.getWarehouse()); player.tempInventoryDisable(); player.sendPacket(new WarehouseDepositList(player, WarehouseDepositList.PRIVATE)); } else { super.onBypassFeedback(player, command); } ------------------------------------------------------------------ 1.6 Let’s Test this When we test this everything will be find except one thing, which is Warehouse, it will show deposit window, but when you confirm, it will not move items to warehouse, since in client packet of SendWareHouseDepositList it will check if the last npc was a Warehouse and our npc is not warehouse : And to Fix this it simple, just we can add another method to our custom NPC class which will make it pretend as being warehouse : @Override public boolean isWarehouse() { return true; } So we end up with this code : package net.sf.l2j.gameserver.model.actor.instance; import net.sf.l2j.gameserver.cache.HtmCache; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.WarehouseDepositList; /** * Multi Function NPC Instance * * Made for MxC Bypasses Guide * * @author Sam Dev */ public class L2MultiFunctionInstance extends L2NpcInstance { public L2MultiFunctionInstance(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { if(command.equalsIgnoreCase("giveAcumen")) { SkillTable.getInstance().getInfo(1085, SkillTable.getInstance().getMaxLevel(1085)).getEffects(player, player); } else if(command.equalsIgnoreCase("gotogiran")) { player.teleToLocation(82698,148638,-3473,0); } else if(command.equalsIgnoreCase("warehouse_deposit")) { player.sendPacket(ActionFailed.STATIC_PACKET); player.setActiveWarehouse(player.getWarehouse()); player.tempInventoryDisable(); player.sendPacket(new WarehouseDepositList(player, WarehouseDepositList.PRIVATE)); } else { super.onBypassFeedback(player, command); } } @Override public boolean isWarehouse() { return true; } @Override public String getHtmlPath(int npcId, int val) { String filename = "data/html/custom/multifunction/" + npcId + ((val == 0) ? "" : "-"+ val ) + ".htm"; return (HtmCache.getInstance().isLoadable(filename)) ? filename : "data/html/npcdefault.htm"; } } By Now we have our Multi Function NPC, But Guess what .... we have a Bonus in this Guide . ----------------------------------------------------------------- 2.0 The Bonus : How to Open a Multisell in Community Board Well i’m sure it’s easy for you now, all we need to do is to add another command to CommunityBoard since we can’t use npc_%objectId% stuff here ----------------------------------------------------------------- 2.1 Add the Command to the CommunityBoard.java You can find it in the package : net.sf.l2j.gameserver.communitybbs , Then we gonna add this code after the _bbshome code else if(command.startsWith("_bbsmultisell")) {MultisellData.getInstance().separateAndSend(command.substring(13).trim(), activeChar, null, false);} To look like : ----------------------------------------------------- 2.1 Add the Mutlisell Button to the Community Board Home Go to : data/html/CommunityBoard/top/Index.htm, and add this code any where you like it to appear : <br> <center> <button value="Multisell In Community" action="bypass _bbsmultisell 50009" width=150 height=22 back="TutorialBut.fortut" fore="TutorialBut.fortut"> </center> ------------------------------------------------------- 2.2 Now Build your Server Core and Restart Server to Test Now Guess What ?? it’s Working and we have Multisell in Community Board At the End i hope you learned something new, and i wish it’s useful to anyone Thanks and Regards
  20. This little code will shows the real diff range of async between server and client position. By default, this code was maked for aCis but can be use for any L2J forks. ### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (revision 1133) +++ java/net/sf/l2j/gameserver/network/clientpackets/MoveBackwardToLocation.java (working copy) @@ -2,6 +2,8 @@ import java.nio.BufferUnderflowException; +import net.sf.l2j.commons.math.MathUtil; + import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.actor.ai.CtrlIntention; import net.sf.l2j.gameserver.model.actor.instance.Player; @@ -95,6 +97,18 @@ activeChar.sendPacket(ActionFailed.STATIC_PACKET); return; } + + // Check async range. + dx = _originX - activeChar.getX(); + dy = _originY - activeChar.getY(); + double dz1 = _originZ - activeChar.getZ(); + float diff = (float) Math.sqrt(dx * dx + dy * dy + dz1 * dz1); + int heading = MathUtil.calculateHeadingFrom(_originX, _originY, activeChar.getX(), activeChar.getY()); + if (Math.abs(activeChar.getHeading() - heading) > 16000) + diff = diff * -1; + + activeChar.sendMessage("Async distance: " + diff); + activeChar.getAI().setIntention(CtrlIntention.MOVE_TO, new Location(_targetX, _targetY, _targetZ)); } } \ No newline at end of file Index: java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java (revision 1133) +++ java/net/sf/l2j/gameserver/network/clientpackets/ValidatePosition.java (working copy) @@ -1,5 +1,7 @@ package net.sf.l2j.gameserver.network.clientpackets; +import net.sf.l2j.commons.math.MathUtil; + import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.zone.ZoneId; import net.sf.l2j.gameserver.network.serverpackets.GetOnVehicle; @@ -88,5 +90,17 @@ player.setClientY(_y); player.setClientZ(_z); player.setClientHeading(_heading); // No real need to validate heading. + + // Check async range. + dx = _x - player.getX(); + dy = _y - player.getY(); + dz = _z - player.getZ(); + float diff = (float) Math.sqrt(dx * dx + dy * dy + dz * dz); + + int heading = MathUtil.calculateHeadingFrom(_x, _y, player.getX(), player.getY()); + if (Math.abs(player.getHeading() - heading) > 16000) + diff = diff * -1; + + player.sendMessage("[4] Async distance: " + diff); } } \ No newline at end of file Have fun, so!
  21. simplest custom buffer - easy in use, intuitive window. magical support has been divided onto five independent groups where users can buffup themselves manually or automatically via two pre-definied sets (mage, fighter). also there's an additional option to bestow heroic valor effect in exchange for any item (in this case: gold bar). i recommend to combine this feature with vote reward system :) preview: http://s9.postimg.org/czbrb670v/buffer.gif create new instance: java/gameserver/model/actor/instance/L2BufferInstance.java /* * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package net.sf.l2j.gameserver.model.actor.instance; import java.util.StringTokenizer; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.ai.CtrlIntention; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; import net.sf.l2j.gameserver.network.serverpackets.MyTargetSelected; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; import net.sf.l2j.gameserver.network.serverpackets.SocialAction; import net.sf.l2j.gameserver.network.serverpackets.ValidateLocation; import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse; import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; /** * * @author Caparso */ public final class L2BufferInstance extends L2NpcInstance { int fighterbuffs [] = {1397,1087,1044,1243,1304,1259,1204,1068,1388,1040,1036,1035,1048,1045,1077,1242,1086,1043,1240,1268,1032,1033,1191,1189,1182,1354,1353,1352,1392,1393,4699,4700,1416,1363,277,307,309,311,310,272,271,275,274,264,269,265,270,267,268,266,364,349,308,306,304}; int magebuffs [] = {1397,1087,1044,1243,1304,1259,1204,1040,1389,1036,1035,1048,1045,1085,1078,1303,1059,1032,1033,1191,1189,1182,1353,1354,1352,1392,1393,4703,1416,1363,273,276,365,307,309,311,264,265,270,267,268,266,363,349,308,306,304}; int voterewards [] = {1374}; public L2BufferInstance(int objectId, NpcTemplate template) { super(objectId, template); } @Override public void onBypassFeedback(L2PcInstance player, String command) { StringTokenizer st = new StringTokenizer(command, " "); String actualCommand = st.nextToken(); int buffid = 0; int bufflevel = 1; String nextWindow = null; if (st.countTokens() == 3) { buffid = Integer.valueOf(st.nextToken()); bufflevel = Integer.valueOf(st.nextToken()); nextWindow = st.nextToken(); } else if (st.countTokens() == 1) { buffid = Integer.valueOf(st.nextToken()); } if (actualCommand.equalsIgnoreCase("getbuff")) { if (buffid != 0) { MagicSkillUse mgc = new MagicSkillUse(this, player, buffid, bufflevel, -1, 0); SkillTable.getInstance().getInfo(buffid, bufflevel).getEffects(this, player); showMessageWindow(player); player.broadcastPacket(mgc); showChatWindow(player, nextWindow); } } else if (actualCommand.equalsIgnoreCase("fighterset")) { for (int id: fighterbuffs) { SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player); } showChatWindow(player); } else if (actualCommand.equalsIgnoreCase("mageset")) { for (int id: magebuffs) { SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player); } showChatWindow(player); } else if (actualCommand.equalsIgnoreCase("rewards")) { if (player.destroyItemByItemId("voterewards",10600,1, player.getCurrentFolkNPC(), true)) { for (int id: voterewards) { SkillTable.getInstance().getInfo(id, SkillTable.getInstance().getMaxLevel(id)).getEffects(this, player); } } else { player.sendMessage("You don't have heroic's certifications to exchange."); } showChatWindow(player); } else if (actualCommand.equalsIgnoreCase("restore")) { player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp()); player.setCurrentCp(player.getMaxCp()); showMessageWindow(player); } else if (actualCommand.equalsIgnoreCase("cancel")) { player.stopAllEffects(); showMessageWindow(player); } else super.onBypassFeedback(player, command); } @Override public void onAction(L2PcInstance player) { if (this != player.getTarget()) { player.setTarget(this); player.sendPacket(new MyTargetSelected(getObjectId(), player.getLevel() - getLevel())); player.sendPacket(new ValidateLocation(this)); } else if (isInsideRadius(player, INTERACTION_DISTANCE, false, false)) { SocialAction sa = new SocialAction(this, Rnd.get(8)); broadcastPacket(sa); player.setCurrentFolkNPC(this); showMessageWindow(player); player.sendPacket(ActionFailed.STATIC_PACKET); } else { player.getAI().setIntention(CtrlIntention.INTERACT, this); player.sendPacket(ActionFailed.STATIC_PACKET); } } private void showMessageWindow(L2PcInstance player) { String filename = "data/html/buffer/" + getNpcId() + ".htm"; filename = getHtmlPath(getNpcId(), 0); NpcHtmlMessage html = new NpcHtmlMessage(getObjectId()); html.setFile(filename); html.replace("%objectId%", String.valueOf(getObjectId())); html.replace("%npcname%", getName()); player.sendPacket(html); } @Override public String getHtmlPath(int npcId, int val) { String pom = ""; if (val == 0) pom = "" + npcId; else pom = npcId + "-" + val; return "data/html/buffer/" + pom + ".htm"; } }create new npc: <npc id="9001" idTemplate="31081" name="BUFFER" title="L2EUPHORIA.COM"> <set name="level" val="70"/> <set name="radius" val="8"/> <set name="height" val="30.5"/> <set name="rHand" val="0"/> <set name="lHand" val="5802"/> <set name="type" val="L2Buffer"/> <set name="exp" val="0"/> <set name="sp" val="0"/> <set name="hp" val="2444.46819"/> <set name="mp" val="1345.8"/> <set name="hpRegen" val="7.5"/> <set name="mpRegen" val="2.7"/> <set name="pAtk" val="688.86373"/> <set name="pDef" val="295.91597"/> <set name="mAtk" val="470.40463"/> <set name="mDef" val="216.53847"/> <set name="crit" val="4"/> <set name="atkSpd" val="253"/> <set name="str" val="40"/> <set name="int" val="21"/> <set name="dex" val="30"/> <set name="wit" val="20"/> <set name="con" val="43"/> <set name="men" val="20"/> <set name="corpseTime" val="7"/> <set name="walkSpd" val="50"/> <set name="runSpd" val="120"/> <set name="dropHerbGroup" val="0"/> <set name="attackRange" val="40"/> <ai type="default" ssCount="0" ssRate="0" spsCount="0" spsRate="0" aggro="0" canMove="true" seedable="false"/> <skills> <skill id="4045" level="1"/> <skill id="4416" level="14"/> </skills> </npc> don't forget to paste this folder within htmls in the right section (gameserver/data/html), then spawn 9001.
  22. Looking for a working rebirth manager for rev 370+ yes i have searched... yes i have tryed adapting.... get error: cannot find symbol [javac] if (rsl.getId() == _skillId && rsl.getLevel() == _skillLevel) or if someone know how to fix... some help please p.s. not an eclipse pro. :-(
  23. Hello i found a code in another forum and i post here. working fine in acis 365 Gameserver: http://pastebin.com/Pc2ZxS1L gameserver http://pastebin.com/ArftpRKH DataPck some pictures
  24. This code show up a window with a list of ur target's inventory , and removes an item or more . code is not mine i found it on net i think credits go to Zealar , i just readapted it to 374 aCis rev . anyway it may come usefull for wiping bot's inv or ... w/e code tested and workin . package net.sf.l2j.gameserver.handler.admincommandhandlers; import java.util.Set; import net.sf.l2j.commons.lang.StringUtil; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.Player; import net.sf.l2j.gameserver.model.item.instance.ItemInstance; import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage; /** * This class handles following admin commands: * <ul> * <li>show_ivetory</li> * <li>delete_item</li> * </ul> * @author Zealar */ public class AdminInventory implements IAdminCommandHandler { private static final String[] ADMIN_COMMANDS = { "admin_show_inventory", "admin_delete_item" }; @Override public boolean useAdminCommand(String command, Player activeChar) { if ((activeChar.getTarget() == null)) { activeChar.sendMessage("Select a target"); return false; } if (!(activeChar.getTarget() instanceof Player)) { activeChar.sendMessage("Target need to be player"); return false; } Player player = activeChar.getTarget().getActingPlayer(); if (command.startsWith(ADMIN_COMMANDS[0])) { if (command.length() > ADMIN_COMMANDS[0].length()) { String com = command.substring(ADMIN_COMMANDS[0].length() + 1); if (StringUtil.isDigit(com)) { showItemsPage(activeChar, Integer.parseInt(com)); } } else { showItemsPage(activeChar, 0); } } else if (command.contains(ADMIN_COMMANDS[1])) { String val = command.substring(ADMIN_COMMANDS[1].length() + 1); player.destroyItem("GM Destroy", Integer.parseInt(val), player.getInventory().getItemByObjectId(Integer.parseInt(val)).getCount(), null, true); showItemsPage(activeChar, 0); } return true; } private static void showItemsPage(Player activeChar, int page) { final Player target = activeChar.getTarget().getActingPlayer(); final Set<ItemInstance> items = target.getInventory().getItems(); int maxItemsPerPage = 16; int maxPages = items.size() / maxItemsPerPage; if (items.size() > (maxItemsPerPage * maxPages)) { maxPages++; } if (page > maxPages) { page = maxPages; } int itemsStart = maxItemsPerPage * page; int itemsEnd = items.size(); if ((itemsEnd - itemsStart) > maxItemsPerPage) { itemsEnd = itemsStart + maxItemsPerPage; } final NpcHtmlMessage adminReply = new NpcHtmlMessage(0); adminReply.setFile("data/html/admin/inventory.htm"); adminReply.replace("%PLAYER_NAME%", target.getName()); StringBuilder sbPages = new StringBuilder(); for (int x = 0; x < maxPages; x++) { int pagenr = x + 1; sbPages.append("<td><button value=\"" + String.valueOf(pagenr) + "\" action=\"bypass -h admin_show_inventory " + String.valueOf(x) + "\" width=14 height=14 back=\"sek.cbui67\" fore=\"sek.cbui67\"></td>"); } adminReply.replace("%PAGES%", sbPages.toString()); StringBuilder sbItems = new StringBuilder(); for (ItemInstance item: items) { sbItems.append("<tr><td><button action=\"bypass -h admin_delete_item " + String.valueOf(item.getObjectId()) + "\" width=16 height=16 back=\"L2UI.bbs_delete\" fore=\"L2UI.bbs_delete\">" + "</td>"); sbItems.append("<td width=60>" + item.getName() + "</td></tr><br>"); } adminReply.replace("%ITEMS%", sbItems.toString()); activeChar.sendPacket(adminReply); } @Override public String[] getAdminCommandList() { return ADMIN_COMMANDS; } } register the handler and create : inventory.htm into gameserver/data/html/admin <html><body><title>Inventory : %PLAYER_NAME%</title> <center> <table width=270> <tr> %PAGES% </tr> </table> ___________________________________ </center> <br> <table width=270> %ITEMS% </table> </body> </html>
  25. Hello guys, I had a request to make a donation manager but when i finished the guy decided to not open his server (wtf?) so the npc is now useless to me. What is this? A donation manager that selling packages with items and stats like nobl,rec etc. Categories can be added easily i will explain later Current added categories: Bronze,Silver,Gold,Platinum,Diamond,Master,Grandmaster How to configure it? Its configurable via xml How i can add items? <Package item="57,500"/> Will have as a reward 500 adena. How i can add enchanted item? <Package item="7575,1" enchant ="15"/> Will have as reward draconic bow +15 How to add stats like nobl? <Package noblesse="true"/> <Package autoDyes="true"/> <Package rec="50"/> It is can handle noblesse,auto dyes (depends on the current class of the player) and recommends. Some photos: I wont upload video ... I'm not sure about in which aCis rev is coded but it does not matter. Also i'm not friend with html designs, so don't hit me :D P.s Auto dyes system is setted up by my opinion about dyes. You can easily edit it in DonationDyes.java code data/html/mods/donate/ data/xml