Jump to content

brett16

Members
  • Posts

    158
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by brett16

  1. Could you get to this work for the latest high five code http://www.maxcheaters.com/topic/139771-multifunctionzone/? It seems stuff has changed and it has some errors with crystal type that wont compile.
  2. It stays on the first main page now, but no idea how to stop the bypass popups and spam on gameserver console.
  3. This is the new code that I think opens the main page 0 after using presets. But comes with another issue. public class L2NpcBufferInstance extends L2Npc { private static final Logger _log = Logger.getLogger(L2NpcBufferInstance.class.getName()); private static final Map<Integer, Integer> pageVal = new HashMap<>(); /** * Instantiates a new l2 npc buffer instance. * @param objectId the object id * @param template the template */ public L2NpcBufferInstance(int objectId, L2NpcTemplate template) { super(objectId, template); setInstanceType(InstanceType.L2NpcBufferInstance); } @Override public void showChatWindow(L2PcInstance player, int val) { if (player == null) { return; } String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer.htm"); if (val > 0) { htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer-" + val + ".htm"); } if (htmContent != null) { final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId()); npcHtmlMessage.setHtml(htmContent); npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(npcHtmlMessage); } player.sendPacket(ActionFailed.STATIC_PACKET); } @Override public void onBypassFeedback(L2PcInstance player, String command) { // BypassValidation Exploit plug. if ((player == null) || (player.getLastFolkNPC() == null) || (player.getLastFolkNPC().getObjectId() != getObjectId())) { return; } L2Character target = player; if (command.startsWith("Pet")) { if (!player.hasSummon()) // TODO: Should be hasPet() ? { player.sendPacket(SystemMessageId.DONT_HAVE_PET); showChatWindow(player, 0); // 0 = main window return; } target = player.getSummon(); } int npcId = getId(); if (command.startsWith("Chat")) { int val = Integer.parseInt(command.substring(5)); pageVal.put(player.getObjectId(), val); showChatWindow(player, val); } else if (command.startsWith("Buff") || command.startsWith("PetBuff")) { String[] buffGroupArray = command.substring(command.indexOf("Buff") + 5).split(" "); for (String buffGroupList : buffGroupArray) { if (buffGroupList == null) { _log.warning("NPC Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected."); return; } int buffGroup = Integer.parseInt(buffGroupList); final NpcBufferData npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup); if (npcBuffGroupInfo == null) { _log.warning("NPC Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + player.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!"); return; } if (npcBuffGroupInfo.getFee().getId() != 0) { L2ItemInstance itemInstance = player.getInventory().getItemByItemId(npcBuffGroupInfo.getFee().getId()); if ((itemInstance == null) || (!itemInstance.isStackable() && (player.getInventory().getInventoryItemCount(npcBuffGroupInfo.getFee().getId(), -1) < npcBuffGroupInfo.getFee().getCount()))) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL); player.sendPacket(sm); continue; } if (itemInstance.isStackable()) { if (!player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), npcBuffGroupInfo.getFee().getCount(), player.getTarget(), true)) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL); player.sendPacket(sm); continue; } } else { for (int i = 0; i < npcBuffGroupInfo.getFee().getCount(); ++i) { player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), 1, player.getTarget(), true); } } } final Skill skill = SkillData.getInstance().getSkill(npcBuffGroupInfo.getSkill().getSkillId(), npcBuffGroupInfo.getSkill().getSkillLvl()); if (skill != null) { skill.applyEffects(player, target); } } showChatWindow(player, pageVal.get(player.getObjectId())); } else if (command.startsWith("Heal") || command.startsWith("PetHeal")) { if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().hasAttackStanceTask(target)) { String[] healArray = command.substring(command.indexOf("Heal") + 5).split(" "); for (String healType : healArray) { if (healType.equalsIgnoreCase("HP")) { target.setCurrentHp(target.getMaxHp()); } else if (healType.equalsIgnoreCase("MP")) { target.setCurrentMp(target.getMaxMp()); } else if (healType.equalsIgnoreCase("CP")) { target.setCurrentCp(target.getMaxCp()); } } } showChatWindow(player, pageVal.get(player.getObjectId())); } else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) { target.stopAllEffectsExceptThoseThatLastThroughDeath(); showChatWindow(player, 0); } else { super.onBypassFeedback(player, command); } } } When I go to my buffer and select a preset fighter it buffs me, but this also pops up and sends the same message to my gameserver console. http://imgur.com/dgLhUZ1 I know how to stop to problem from happening again in game, If I select a normal buff first then use my preset it wont give me this message. But not every player will do this, they will all just use the presets. How can I fix or remove this message spam?
  4. Ah ok, thanks for explaining. Alright I am going to test this right now and get back to you guys. Edit: It works now.
  5. It works if you want the reward for every pvp kill, doesn't just give the reward at the 100th pvp count. I gave myself 99 pvps and killed a test character for 100 and got the reward, and kept killing it a few more times and kept getting the reward.
  6. Oh, I don't know this is the core buffer from L2jserver.com on their highfive beta. I didn't make this, I just want to fix the html reopening after I use a preset.
  7. // Load PvP L2Properties file (if exists) final PropertiesParser PVPSettings = new PropertiesParser(PVP_CONFIG_FILE); KARMA_DROP_GM = PVPSettings.getBoolean("CanGMDropEquipment", false); KARMA_AWARD_PK_KILL = PVPSettings.getBoolean("AwardPKKillPVPPoint", false); KARMA_PK_LIMIT = PVPSettings.getInt("MinimumPKRequiredToDrop", 5); KARMA_NONDROPPABLE_PET_ITEMS = PVPSettings.getString("ListOfPetItems", "2375,3500,3501,3502,4422,4423,4424,4425,6648,6649,6650,9882"); KARMA_NONDROPPABLE_ITEMS = PVPSettings.getString("ListOfNonDroppableItems", "57,1147,425,1146,461,10,2368,7,6,2370,2369,6842,6611,6612,6613,6614,6615,6616,6617,6618,6619,6620,6621,7694,8181,5575,7694,9388,9389,9390"); PVP_AMOUNTPVP1 = PVPSettings.getInt("PvpsRequiredFor1stReward", 100); PVP_REWARD1 = PVPSettings.getInt("Reward1ID", 57); PVP_AMOUNT1 = PVPSettings.getInt("Amount1", 10000); PVP_AMOUNTPVP2 = PVPSettings.getInt("PvpsRequiredFor2ndReward", 100); PVP_REWARD2 = PVPSettings.getInt("Reward2ID", 57); PVP_AMOUNT2 = PVPSettings.getInt("Amount2", 10000); PVP_AMOUNTPVP3 = PVPSettings.getInt("PvpsRequiredFor3rdReward", 100); PVP_REWARD3 = PVPSettings.getInt("Reward3ID", 57); PVP_AMOUNT3 = PVPSettings.getInt("Amount3", 10000); I have no errors so I am going to test it now see if this works.
  8. That's what I figured, I am currently trying to mess around with it and add it to the PVP_CONFIG_FILE section like the rest of all the pvp settings here like PVP_AMOUNTPVP1 = PVPSettings.getInt("PvpsRequiredFor1stReward", "100"); but no luck so far.
  9. I was looking for something like this for items and custom skills. But I'm getting a few errors and warnings, but it could be because I am on Highfive beta. PvPRewards _instance = null; if (_instance == null) { _instance = new PvPRewards(); } Warning says: Redundant null check: The variable_instance can only be null at this location. And errors for PVP_AMOUNTPVP1 = Integer.parseInt(pvpmods.getProperty("PvpsRequiredFor1stReward","100")); PVP_REWARD1 = Integer.parseInt(pvpmods.getProperty("Reward1ID","57")); PVP_AMOUNT1 = Integer.parseInt(pvpmods.getProperty("Amount1","10000")); PVP_AMOUNTPVP2 = Integer.parseInt(pvpmods.getProperty("PvpsRequiredFor2ndReward","100")); PVP_REWARD2 = Integer.parseInt(pvpmods.getProperty("Reward2ID","57")); PVP_AMOUNT2 = Integer.parseInt(pvpmods.getProperty("Amount2","10000")); PVP_AMOUNTPVP3 = Integer.parseInt(pvpmods.getProperty("PvpsRequiredFor3rdReward","100")); PVP_REWARD3 = Integer.parseInt(pvpmods.getProperty("Reward3ID","57")); PVP_AMOUNT3 = Integer.parseInt(pvpmods.getProperty("Amount3","10000")); pvpmods cannot be resolved.
  10. I am using this core buffer and I have it setup really nice, but there is only 1 thing bugging me with it. When you use 1 of the preset buffs it opens up a random html afterwards. Is there a line I can add some where in this code below that doesn't reopen the html for preset buffs? I don't want it to close after each single buff is picked tho if thats possible. public class L2NpcBufferInstance extends L2Npc { private static final Logger _log = Logger.getLogger(L2NpcBufferInstance.class.getName()); private static final Map<Integer, Integer> pageVal = new HashMap<>(); /** * Instantiates a new l2 npc buffer instance. * @param objectId the object id * @param template the template */ public L2NpcBufferInstance(int objectId, L2NpcTemplate template) { super(objectId, template); setInstanceType(InstanceType.L2NpcBufferInstance); } @Override public void showChatWindow(L2PcInstance player, int val) { if (player == null) { return; } String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer.htm"); if (val > 0) { htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), "data/html/mods/NpcBuffer-" + val + ".htm"); } if (htmContent != null) { final NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId()); npcHtmlMessage.setHtml(htmContent); npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId())); player.sendPacket(npcHtmlMessage); } player.sendPacket(ActionFailed.STATIC_PACKET); } @Override public void onBypassFeedback(L2PcInstance player, String command) { // BypassValidation Exploit plug. if ((player == null) || (player.getLastFolkNPC() == null) || (player.getLastFolkNPC().getObjectId() != getObjectId())) { return; } L2Character target = player; if (command.startsWith("Pet")) { if (!player.hasSummon()) // TODO: Should be hasPet() ? { player.sendPacket(SystemMessageId.DONT_HAVE_PET); showChatWindow(player, 0); // 0 = main window return; } target = player.getSummon(); } int npcId = getId(); if (command.startsWith("Chat")) { int val = Integer.parseInt(command.substring(5)); pageVal.put(player.getObjectId(), val); showChatWindow(player, val); } else if (command.startsWith("Buff") || command.startsWith("PetBuff")) { String[] buffGroupArray = command.substring(command.indexOf("Buff") + 5).split(" "); for (String buffGroupList : buffGroupArray) { if (buffGroupList == null) { _log.warning("NPC Buffer Warning: npcId = " + npcId + " has no buffGroup set in the bypass for the buff selected."); return; } int buffGroup = Integer.parseInt(buffGroupList); final NpcBufferData npcBuffGroupInfo = NpcBufferTable.getInstance().getSkillInfo(npcId, buffGroup); if (npcBuffGroupInfo == null) { _log.warning("NPC Buffer Warning: npcId = " + npcId + " Location: " + getX() + ", " + getY() + ", " + getZ() + " Player: " + player.getName() + " has tried to use skill group (" + buffGroup + ") not assigned to the NPC Buffer!"); return; } if (npcBuffGroupInfo.getFee().getId() != 0) { L2ItemInstance itemInstance = player.getInventory().getItemByItemId(npcBuffGroupInfo.getFee().getId()); if ((itemInstance == null) || (!itemInstance.isStackable() && (player.getInventory().getInventoryItemCount(npcBuffGroupInfo.getFee().getId(), -1) < npcBuffGroupInfo.getFee().getCount()))) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL); player.sendPacket(sm); continue; } if (itemInstance.isStackable()) { if (!player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), npcBuffGroupInfo.getFee().getCount(), player.getTarget(), true)) { SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_ARE_NOT_ENOUGH_NECESSARY_ITEMS_TO_USE_THE_SKILL); player.sendPacket(sm); continue; } } else { for (int i = 0; i < npcBuffGroupInfo.getFee().getCount(); ++i) { player.destroyItemByItemId("Npc Buffer", npcBuffGroupInfo.getFee().getId(), 1, player.getTarget(), true); } } } final Skill skill = SkillData.getInstance().getSkill(npcBuffGroupInfo.getSkill().getSkillId(), npcBuffGroupInfo.getSkill().getSkillLvl()); if (skill != null) { skill.applyEffects(player, target); } } showChatWindow(player, pageVal.get(player.getObjectId())); } else if (command.startsWith("Heal") || command.startsWith("PetHeal")) { if (!target.isInCombat() && !AttackStanceTaskManager.getInstance().hasAttackStanceTask(target)) { String[] healArray = command.substring(command.indexOf("Heal") + 5).split(" "); for (String healType : healArray) { if (healType.equalsIgnoreCase("HP")) { target.setCurrentHp(target.getMaxHp()); } else if (healType.equalsIgnoreCase("MP")) { target.setCurrentMp(target.getMaxMp()); } else if (healType.equalsIgnoreCase("CP")) { target.setCurrentCp(target.getMaxCp()); } } } showChatWindow(player, pageVal.get(player.getObjectId())); } else if (command.startsWith("RemoveBuffs") || command.startsWith("PetRemoveBuffs")) { target.stopAllEffectsExceptThoseThatLastThroughDeath(); showChatWindow(player, pageVal.get(player.getObjectId())); } else { super.onBypassFeedback(player, command); } } }
  11. Gotcha, alright I will try adding them client side to see if it works then. As far as my idea goes for making a custom skill book to learn a custom skill, is that possible? Because I didn't see anything under the items .xml's for the skillbooks to give a skill id.
  12. Hello, I have created a custom item and a custom skill just to test it out to see if I could get it working before I started adding more of them. I have created a custom item based off of this item <item id="10102" type="EtcItem" name="Spellbook - Throne of Wind"> <set name="icon" val="icon.etc_spell_books_element_i00" /> <set name="immediate_effect" val="true" /> <set name="material" val="PAPER" /> <set name="weight" val="120" /> <set name="price" val="30000" /> <set name="is_stackable" val="true" /> </item> made a new file in my items/custom called 22600-22699.xml and made the custom skill <item id="22600" type="EtcItem" name="Spellbook - Test"> <set name="icon" val="icon.etc_spell_books_element_i00" /> <set name="immediate_effect" val="true" /> <set name="material" val="PAPER" /> <set name="weight" val="120" /> <set name="price" val="30000" /> <set name="is_stackable" val="true" /> </item> I can create the item in the server to my character and it says I have created the item in my inventory with no errors, but I do not see the item even with client and server restarts. Same thing with my custom skills. I took the skill information from Dash id 4 and made a new skill just for testing called Dash v2 in my skills/custom/10000-10099.xml <skill id="27000" levels="1" name="Dashv2"> <set name="abnormalLvl" val="1" /> <set name="abnormalTime" val="15" /> <set name="abnormalType" val="SPEED_UP_SPECIAL" /> <set name="effectPoint" val="100" /> <set name="hitTime" val="1000" /> <set name="icon" val="icon.skill0484" /> <set name="magicLvl" val="85" /> <set name="mpConsume" val="100" /> <set name="operateType" val="A2" /> <set name="reuseDelay" val="1000" /> <set name="rideState" val="NONE" /> <set name="targetType" val="SELF" /> <for> <effect name="Buff"> <add stat="runSpd" val="100" /> </effect> </for> </skill> I gave my character the skill, it says I added skill Dash v2 but I also do not see this skill. Can I not create new items and skills? Can I only just edit old items and skills? My plan was to create custom spellbooks which would let players learn custom skills. If anyone could help me with this that would be create, thanks in advance!
  13. Lastest HighFive beta (L2jserver.com master branch) Traceback (innermost last): File "custom/555_NPCBUFFER/__init__.py", line 7, in ? ImportError: no module named jython line 7 is from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
  14. Hello guys this is my fire share and this is pretty basic for all you experts of Java. But I'm learning myself and couldn't find any shares for highfive beta that worked, so I found my own way to do it and this is how to do it. First we locate our file L2Summon.java which is at com.l2jserver.gameserver.model.actor Ctrl+F to search for public boolean doDie(L2Character killer) and you will see this on line 309: public boolean doDie(L2Character killer) { if (isNoblesseBlessedAffected()) { stopEffects(L2EffectType.NOBLESSE_BLESSING); storeEffect(true); } else { storeEffect(false); } It's very simple and all we do is replace on line 318 storeEffect(false); to storeEffect(true); Now it looks like this: public boolean doDie(L2Character killer) { if (isNoblesseBlessedAffected()) { stopEffects(L2EffectType.NOBLESSE_BLESSING); storeEffect(true); } else { storeEffect(true); } Now everytime your summon dies you can resummon it on the battlefield with buffs. Now we do the player character, so open up your L2Playable.java from the same location above and search for boolean deleteBuffs = true; on line 134 and change to boolean deleteBuffs = false; boolean deleteBuffs = false; if (isNoblesseBlessedAffected()) { stopEffects(L2EffectType.NOBLESSE_BLESSING); deleteBuffs = false; } if (isResurrectSpecialAffected()) { stopEffects(L2EffectType.RESURRECTION_SPECIAL); deleteBuffs = false; } if (isPlayer()) { L2PcInstance activeChar = getActingPlayer(); if (activeChar.hasCharmOfCourage()) { if (activeChar.isInSiege()) { getActingPlayer().reviveRequest(getActingPlayer(), null, false, 0); } activeChar.setCharmOfCourage(false); activeChar.sendPacket(new EtcStatusUpdate(activeChar)); } } if (deleteBuffs) { stopAllEffectsExceptThoseThatLastThroughDeath(); } So now you don't lose buffs on death for your characters and summons, great for pvp servers or whatever you are doing. Enjoy!
  15. Hello, I am using the L2jserver.com latest HighFive master branch code. What I want is to give custom made skills from the skills/custom/10000-10099.xml to character based on their PVP count when they reach certain numbers. Example of this would be a character reaches a certain PVP count he earns a permanent skill. 500 PVPs skillid 100001 1000 PVPS skillid 100002 1500 PVPs skillid 100003 and so on. How would I go about making this?
  16. I'm dead stuck at trying to make custom guards for each faction team. I don't know how to make 1 guard attack .isgood() only and the other to attack .isevil() only. Could anyone help me with this?
  17. Already fixed the issue, was some problems with a line of code. Can close this thread.
  18. Summons don't disappear after they die, so summoners can't respawn another without a server restart. How could I fix this?
  19. I have installed a pretty good geodata pack for my server. You can't attack people through walls and you need perfect LoS, when you try to move to 1 area and its blocked of lineage2 automatic runs your character another path. But the issue I am having is characters can keep running into doors till it ports them outside and through them. Is there something I can do to fix this? I tried spawning boxes to block the paths but characters just seem to port through them if they run at them long enough like 10 seconds.
  20. Thank you Tryskell those are some useful tips ;)
  21. I've been learning from looking at other code, but its from things already made lol. Thought maybe someone had a guide out there with the basic logics l2j uses or something.
  22. So i've been learning the basics of java from a good website http://www.thenewboston.com/?cat=36&pOpen=tutorial . I was wondering if anyone had or knew of some good guides of the basic commands for lineage2 used in java. What I'm having problems with is not knowing what to use for lineage2 if anyone understands what I'm getting at, when I try to make something to test out or whatever I just don't know what code of lineage2 I should be using etc.
  23. I would check the lines 1666 in Config.Java and line 488 in GameServer.java see what eclipse says with those lines.
×
×
  • Create New...