Jump to content

l2jkain

Members
  • Posts

    207
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by l2jkain

  1. I want this to appear after 10 seconds after the player logs on how? Because as soon as the play loga opens the days of vip they still have if (Config.SERVER_TIME_ON_START) activeChar.sendPacket(new ExShowScreenMessage("L2 Serve Time is " + fmt.format(new Date(System.currentTimeMillis())), 10000, 0x02, true));
  2. Good as the title speaks everything I want. I want for a 5-second interval to appear a second message. I use google translator if you have something wrong, sorry.
  3. Good evening everyone, Good tried to create a Feanor to acis using drope system for NPCs but do not have much knowledge of java if one could help me thank you do not know where to post this so if I'm wrong I apologize I use google translator if the wrong word descupe me !!! ### Eclipse Workspace Patch 1.0 #P aCis_datapack Index: data/xml/feanor.xml =================================================================== --- data/xml/feanor.xml (revision 0) +++ data/xml/feanor.xml (working copy) @@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='utf-8'?> +<list> + <template itemid="3470" min="5" max="10" chance="550000"/> +</list> \ No newline at end of file Index: data/html/admin/server_menu.htm =================================================================== --- data/html/admin/server_menu.htm (revision 332) +++ data/html/admin/server_menu.htm (working copy) @@ -11,7 +11,7 @@ Reload <table width=240> <tr> - <td><combobox width=120 height=21 var="cb" list=acar;config;crest;cw;door;htm;item;multisell;npc;npcwalker;scripts;skill;teleport;zone;></td> + <td><combobox width=120 height=21 var="cb" list=acar;config;crest;cw;door;htm;feanor;item;multisell;npc;npcwalker;scripts;skill;teleport;zone;></td> <td><button value="Reload" action="bypass -h admin_reload $cb" width=75 height=21 back="L2UI_ch3.Btn1_normalOn" fore="L2UI_ch3.Btn1_normal"></td> </tr> </table><br> #P aCis_gameserver Index: java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java =================================================================== --- java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (revision 332) +++ java/net/sf/l2j/gameserver/handler/admincommandhandlers/AdminAdmin.java (working copy) @@ -30,6 +30,7 @@ import net.sf.l2j.gameserver.datatables.NpcTable; import net.sf.l2j.gameserver.datatables.NpcWalkerRoutesTable; import net.sf.l2j.gameserver.datatables.SkillTable; +import net.sf.l2j.gameserver.datatables.SkipTable; import net.sf.l2j.gameserver.datatables.TeleportLocationTable; import net.sf.l2j.gameserver.handler.IAdminCommandHandler; import net.sf.l2j.gameserver.instancemanager.CursedWeaponsManager; @@ -227,6 +228,11 @@ ItemTable.getInstance().reload(); activeChar.sendMessage("Items' templates have been reloaded."); } + else if (type.startsWith("feanor")) + { + FeanorTable.getInstance(); + activeChar.sendMessage("Feanor list have been reloaded."); + } else if (type.equals("multisell")) { MultisellData.getInstance().reload(); Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 332) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -56,6 +56,7 @@ import net.sf.l2j.gameserver.datatables.RecipeTable; import net.sf.l2j.gameserver.datatables.SkillTable; import net.sf.l2j.gameserver.datatables.SkillTreeTable; +import net.sf.l2j.gameserver.datatables.FeanorTable; import net.sf.l2j.gameserver.datatables.SoulCrystalsTable; import net.sf.l2j.gameserver.datatables.SpawnTable; import net.sf.l2j.gameserver.datatables.SpellbookTable; @@ -194,6 +195,7 @@ HennaTable.getInstance(); HelperBuffTable.getInstance(); CursedWeaponsManager.getInstance(); + FeanorTable.getInstance(); Util.printSection("Clans"); ClanTable.getInstance(); Index: java/net/sf/l2j/gameserver/datatables/NpcTable.java =================================================================== --- java/net/sf/l2j/gameserver/datatables/NpcTable.java (revision 332) +++ java/net/sf/l2j/gameserver/datatables/NpcTable.java (working copy) @@ -23,6 +23,7 @@ import java.util.logging.Level; import java.util.logging.Logger; +import net.sf.l2j.Config; import net.sf.l2j.gameserver.model.L2MinionData; import net.sf.l2j.gameserver.model.L2NpcAIData; import net.sf.l2j.gameserver.model.L2Skill; @@ -201,6 +202,10 @@ _log.warning("Droplist data for undefined itemId: " + data.getItemId()); continue; } + + if (Config.ENABLE_FEANOR && FeanorTable.isFeanor(data.getItemId())) + continue; + template.addDropData(dropDat, category); } } Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 332) +++ java/net/sf/l2j/Config.java (working copy) @@ -374,6 +374,9 @@ public static int GRID_NEIGHBOR_TURNON_TIME; public static int GRID_NEIGHBOR_TURNOFF_TIME; + /** Feanor Drop */ + public static boolean ENABLE_FEANOR; + // -------------------------------------------------- // Players // -------------------------------------------------- @@ -995,6 +998,8 @@ GRID_NEIGHBOR_TURNON_TIME = npcs.getProperty("GridNeighborTurnOnTime", 1); GRID_NEIGHBOR_TURNOFF_TIME = npcs.getProperty("GridNeighborTurnOffTime", 90); + ENABLE_FEANOR = npcs.getProperty("EnableFeanorList", false); + // players ExProperties players = load(PLAYERS_FILE); STARTING_ADENA = players.getProperty("StartingAdena", 100); Index: config/npcs.properties =================================================================== --- config/npcs.properties (revision 332) +++ config/npcs.properties (working copy) @@ -263,4 +263,12 @@ # The always on option allows to ignore all this and let all grids be active at all times GridsAlwaysOn = False GridNeighborTurnOnTime = 1 -GridNeighborTurnOffTime = 90 \ No newline at end of file +GridNeighborTurnOffTime = 90 + +#============================================================= +# Feanor Settings +#============================================================= + +# Enable skip all items from feanor.xml out from droplist of all monsters. +# Default: False +EnableFeanorList = False \ No newline at end of file Index: java/net/sf/l2j/gameserver/datatables/FeanorTable.java =================================================================== --- java/net/sf/l2j/gameserver/datatables/FeanorTable.java (revision 0) +++ java/net/sf/l2j/gameserver/datatables/FeanorTable.java (working copy) +/* + * 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.datatables; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import net.sf.l2j.gameserver.templates.StatsSet; +import net.sf.l2j.gameserver.xmlfactory.XMLDocumentFactory; + +import org.w3c.dom.Document; +import org.w3c.dom.NamedNodeMap; +import org.w3c.dom.Node; + +/** + * @author Williams + * + */ +public class FeanorTable +{ + protected static final Logger _log = Logger.getLogger(FeanorTable.class.getName()); + + private static List<Feanor> _feanor; + + public static FeanorTable getInstance() + { + return SingletonHolder._instance; + } + + private static class SingletonHolder + { + protected static final FeanorTable _instance = new FeanorTable(); + } + + protected FeanorTable() + { + _feanor = new ArrayList<>(); + loadFeanor(); + } + + public void reload() + { + _feanor.clear(); + loadFeanor(); + } + + private void loadFeanor() + { + try + { + File f = new File("./data/xml/feanor.xml"); + Document doc = XMLDocumentFactory.getInstance().loadDocument(f); + + Node n = doc.getFirstChild(); + for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling()) + { + if (d.getNodeName().equalsIgnoreCase("template")) + { + NamedNodeMap attrs = d.getAttributes(); + + int itemId = Integer.valueOf(attrs.getNamedItem("itemId").getNodeValue()); + int min = Integer.parseInt(attrs.getNamedItem("min").getNodeValue()); + int max = Integer.parseInt(attrs.getNamedItem("max").getNodeValue()); + int chance = Integer.parseInt(attrs.getNamedItem("chance").getNodeValue()); + + StatsSet set = new StatsSet(); + set.set("itemId", itemId); + set.set("min", min); + set.set("max", max); + set.set("chance", chance); + + _feanor.add(new Feanor(set)); + } + } + } + catch (Exception e) + { + _log.warning("Exception: FeanorTable loadFeanor: " + e); + } + + _log.info("FeanorTable: Loaded " + _feanor.size() + " item's template(s)."); + } + + public static boolean isFeanor(int itemId) + { + return _feanor.contains(itemId); + } + + public class Feanor + { + private int _itemId; + private int _chance; + private int _min; + private int _max; + + public Feanor(StatsSet set) + { + _itemId = set.getInteger("itemId"); + _chance = set.getInteger("chance"); + _min = set.getInteger("min"); + _max = set.getInteger("max"); + } + + public int getItemId() + { + return _itemId; + } + + public int getChance() + { + return _chance; + } + + public int getMax() + { + return _max; + } + + public int getMin() + { + return _min; + } + } +} http://pastebin.com/2mgUAQVe
  4. I will post better after that I made a very cool and much more complete :) for acis 362
  5. for acis 362 http://pastebin.com/6d9P4wm1
  6. you have this gk yet? with these pvp and farm areas and boss? http://www.maxcheaters.com/topic/176534-gatekeeper-interlude/
  7. does anyone know how would let me lvl 85 in acis because leaving the way there're the error to lvl 85 of an error list and the character gets negative experience is -1
  8. credits to adapt Williams For acis 362 100% tested https://mega.nz/#!sQFkDR7b!tJiSUoJDsGJF8wTz3rSiS38-oqslSsLpJfDSaN--Dw0
  9. great model more or needed config because you will always have to add the handler in items.
  10. thanks for trying to help I would never use this team would change acesslevel lot easier and better, because in this way would not work because acis not have columns in the db to save the colors
  11. How about creating a way to put color in the title and name of the new characters? Setting the days I tried it can not eternal is the accor. for Acis
  12. change the letter I for IT, because the description says alt + I, more if using alt + T
  13. Index: config/players.properties =================================================================== --- config/players.properties (revision 5) +++ config/players.properties (working copy) @@ -320,4 +320,18 @@ DressMeLegs = Imperial,6374 DressMeBoots = Draconic,6381;Imperial,6376;Arcana,6385 DressMeGloves = Draconic,6380;Imperial,6375;Arcana,6384 DressMeWeapons = Draconic_Bow,7577;Shining_Bow,6594;Arcana_Mace,6608 + +#============================================================= +# Global Drop +#============================================================= +# Configuração de Drop Global +# Liga / Desliga Drop Global +AllowGlobalDrop = True +# Ativa Drop random que aumenta de acordo com level do MOB. +AllowRandomQuantityDrop = True +# Itemid,chance,min,max;Itemid,chance,min,max +GlobalDropItems = 6392,100,1,2;6393,50,1,3; +# Itemid,chance,min,max;Itemid,chance,min,max +# Essa configuração é para mobs do tipo Champion +ChampionGlobalDropItems = 6391,100,1,2; \ No newline at end of file Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 5) +++ java/net/sf/l2j/Config.java (working copy) @@ -690,6 +690,11 @@ public static int CLIENT_PACKET_QUEUE_MAX_OVERFLOWS_PER_MIN = 1; // default 1 public static int CLIENT_PACKET_QUEUE_MAX_UNDERFLOWS_PER_MIN = 1; // default 1 public static int CLIENT_PACKET_QUEUE_MAX_UNKNOWN_PER_MIN = 5; // default 5 + + public static Map<Integer, List<Integer>> GLOBAL_DROP_ITEMS = new HashMap<>(); + public static Map<Integer, List<Integer>> GLOBAL_DROP_ITEMS_CHAMPION = new HashMap<>(); + public static boolean ALLOW_GLOBAL_DROP_RANDOM; + public static boolean ALLOW_GLOBAL_DROP; // -------------------------------------------------- @@ -1133,7 +1138,31 @@ */ private static final void loadPlayers() { final ExProperties players = initProperties(PLAYERS_FILE); + String globalTemp = players.getProperty("GlobalDropItems", ""); + String[] globalTemp2 = globalTemp.split(";"); + for (String s : globalTemp2) + { + List<Integer> list = new ArrayList<>(); + String[] t = s.split(","); + list.add(Integer.parseInt(t[1])); + list.add(Integer.parseInt(t[2])); + list.add(Integer.parseInt(t[3])); + GLOBAL_DROP_ITEMS.put(Integer.parseInt(t[0]), list); + } + globalTemp = players.getProperty("ChampionGlobalDropItems", ""); + globalTemp2 = globalTemp.split(";"); + for (String s : globalTemp2) + { + List<Integer> list = new ArrayList<>(); + String[] t = s.split(","); + list.add(Integer.parseInt(t[1])); + list.add(Integer.parseInt(t[2])); + list.add(Integer.parseInt(t[3])); + GLOBAL_DROP_ITEMS_CHAMPION.put(Integer.parseInt(t[0]), list); + } + ALLOW_GLOBAL_DROP_RANDOM = players.getProperty("AllowRandomQuantityDrop", true); + ALLOW_GLOBAL_DROP = players.getProperty("AllowGlobalDrop", true); STARTING_ADENA = players.getProperty("StartingAdena", 100); EFFECT_CANCELING = players.getProperty("CancelLesserEffect", true); HP_REGEN_MULTIPLIER = players.getProperty("HpRegenMultiplier", 1.); Index: java/net/sf/l2j/gameserver/scripting/scripts/custom/Feanor.java =================================================================== --- java/net/sf/l2j/gameserver/scripting/scripts/custom/Feanor.java (nonexistent) +++ java/net/sf/l2j/gameserver/scripting/scripts/custom/Feanor.java (working copy) @@ -0,0 +1,125 @@ + +package net.sf.l2j.gameserver.scripting.scripts.custom; + +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import net.sf.l2j.commons.random.Rnd; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.datatables.NpcTable; +import net.sf.l2j.gameserver.model.actor.L2Attackable; +import net.sf.l2j.gameserver.model.actor.L2Npc; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.model.actor.template.NpcTemplate; +import net.sf.l2j.gameserver.model.holder.IntIntHolder; +import net.sf.l2j.gameserver.model.item.instance.ItemInstance; +import net.sf.l2j.gameserver.scripting.Quest; + +/** + * @author Tayran.JavaDev + * @version 4 + */ +public class Feanor extends Quest +{ + + @Override + public String onKill(L2Npc mob, L2PcInstance killer, boolean isPet) + { + int levelMobMin = 0; + for (int i = 1; i < 81; i++) + { + levelMobMin = killer.getLevel() - 8; + if (i > 10) + { + if (killer.getLevel() == i && mob.getLevel() < levelMobMin) + return ""; + } + } + if (mob.isChampion()) + dropItem(mob, killer, Config.GLOBAL_DROP_ITEMS_CHAMPION); + else + dropItem(mob, killer, Config.GLOBAL_DROP_ITEMS); + return super.onKill(mob, killer, isPet); + } + + private static void dropItem(final L2Npc mob, final L2PcInstance player, final Map<Integer, List<Integer>> droplist) + { + Integer key; + Integer chance; + Integer min; + Integer max; + Integer itemMin; + Integer itemMax; + Integer count; + Integer rnd; + for (Entry<Integer, List<Integer>> entry : droplist.entrySet()) + { + key = entry.getKey(); + List<Integer> valueList = entry.getValue(); + + chance = valueList.get(0); + min = valueList.get(1); + max = valueList.get(2); + + if (mob.getLevel() > 9 && Config.ALLOW_GLOBAL_DROP_RANDOM) + { + itemMin = mob.getLevel() * min / 5; + itemMax = mob.getLevel() * max / 6; + } + else + { + itemMin = min; + itemMax = max; + } + count = Rnd.get(itemMin, itemMax); + + rnd = Rnd.get(100); + + if (rnd < chance) + { + IntIntHolder item = new IntIntHolder(key, count); + dropItem(mob, player, item); + continue; + } + } + + } + + /** + * Drop item. + * @author Tayran.JavaDev + * @param mob + * @param lastAttacker The player who made ultimate damage. + * @param item instance IntIntHolder. + * @return the dropped item instance. + */ + public static ItemInstance dropItem(L2Npc mob, L2PcInstance lastAttacker, IntIntHolder item) + { + if (Config.AUTO_LOOT) + lastAttacker.doAutoLoot((L2Attackable) mob, item); + else + return ((L2Attackable) mob).dropItem(lastAttacker, item); + return null; + } + + + public Feanor() + { + super(-1, Feanor.class.getSimpleName()); + if (Config.ALLOW_GLOBAL_DROP) + { + for (NpcTemplate npcTemplate : NpcTable.getInstance().getAllNpcs()) + { + if (npcTemplate.getType().equalsIgnoreCase("L2Monster")) + super.addKillId(npcTemplate.getIdTemplate()); + } + System.out.println("[Feanor Activated] All L2Monster have been added with Global Drop Items"); + } + else + { + System.out.println("[Feanor Disabled] No L2Monster was changed"); + } + } +} \ No newline at end of file Acis_datapack/data/xml/script.xml <script path="scripts.custom.HeroWeapon"/> +<script path="scripts.custom.Feanor"/> Creditos : Tayran.JavaDev
  14. someone would have adapted to acis ? Engine do not think so nowhere to acis . not able to adapt .
  15. I did not understand this gracia serves interlude or it is only for gracia?
×
×
  • Create New...