brett16
Members-
Posts
158 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
brett16's Achievements
Newbie (1/16)
0
Reputation
-
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.
-
Help Core Buffer Close Html After Preset
brett16 replied to brett16's question in Request Server Development Help [L2J]
It stays on the first main page now, but no idea how to stop the bypass popups and spam on gameserver console. -
Help Core Buffer Close Html After Preset
brett16 replied to brett16's question in Request Server Development Help [L2J]
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? -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
Ah ok, thanks for explaining. Alright I am going to test this right now and get back to you guys. Edit: It works now. -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
Whats different? I don't notice anything different? -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
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. -
Help Core Buffer Close Html After Preset
brett16 replied to brett16's question in Request Server Development Help [L2J]
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. -
Help Core Buffer Close Html After Preset
brett16 replied to brett16's question in Request Server Development Help [L2J]
So remove that line? -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
// 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. -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
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. -
Request I Guess It's "simple" To Create...
brett16 replied to R3spawn's question in Request Server Development Help [L2J]
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. -
Help Core Buffer Close Html After Preset
brett16 posted a question in Request Server Development Help [L2J]
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); } } } -
Help Custom Item & Skill Not Showing Up Ingame?
brett16 replied to brett16's question in Request Server Development Help [L2J]
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. -
Help Custom Item & Skill Not Showing Up Ingame?
brett16 posted a question in Request Server Development Help [L2J]
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! -
Rin4A's Scheme Buffer Fully Working Updated To Highfive
brett16 replied to Squirtle's topic in Server Shares & Files [L2J]
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