Jump to content

brett16

Members
  • Posts

    158
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by brett16

  1. 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?

  2.  

    i'm sry,it was fast.

    just do it like this and its gonna be okey

    ### Eclipse Workspace Patch 1.0
    #P gameserver
    Index: java/net/sf/l2j/gameserver/customs/PvPRewards.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/customs/PvPRewards.java    (revision 0)
    +++ java/net/sf/l2j/gameserver/customs/PvPRewards.java    (working copy)
    @@ -0,0 +1,57 @@
    +/* 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.customs;
    +
    +import net.sf.l2j.Config;
    +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
    +
    +
    +public class PvPRewards
    +{
    +    public static PvPRewards getInstance()
    +    {
    +        PvPRewards _instance = null;
    +        if (_instance == null)
    +        {
    +            _instance = new PvPRewards();
    +        }
    +        
    +        return _instance;
    +    }
    +    
    +    public void addRewardPvP(L2PcInstance activeChar)
    +    {
    +        if(activeChar.getPvpKills() == Config.PVP_AMOUNTPVP1)
    +        {
    +            activeChar.getInventory().addItem("PvP Reward", Config.PVP_REWARD1, Config.PVP_AMOUNT1, activeChar, activeChar);
    +            activeChar.sendMessage("You've been rewarded for your pvp amounts!");
    +        }
    +        
    +        else if(activeChar.getPvpKills() == Config.PVP_AMOUNTPVP2)
    +        {
    +            activeChar.getInventory().addItem("PvP Reward", Config.PVP_REWARD2, Config.PVP_AMOUNT2, activeChar, activeChar);
    +            activeChar.sendMessage("You've been rewarded for your pvp amounts!");
    +        }
    +        
    +        else if(activeChar.getPvpKills() == Config.PVP_AMOUNTPVP3)
    +        {
    +            activeChar.getInventory().addItem("PvP Reward", Config.PVP_REWARD3, Config.PVP_AMOUNT3, activeChar, activeChar);
    +            activeChar.sendMessage("You've been rewarded for your pvp amounts!");
    +        }
    +    }
    +}
    \ No newline at end of file
    Index: java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
    ===================================================================
    --- java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (revision 42)
    +++ java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java    (working copy)
    @@ -56,6 +56,7 @@
    import net.sf.l2j.gameserver.communitybbs.BB.Forum;
    import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager;
    import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
    +import net.sf.l2j.gameserver.customs.PvPRewards;
    import net.sf.l2j.gameserver.datatables.AccessLevels;
    import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
    import net.sf.l2j.gameserver.datatables.CharNameTable;
    @@ -4810,7 +4811,10 @@
    {
    // Add karma to attacker and increase its PK counter
    setPvpKills(getPvpKills() + 1);
    + PvPRewards.getInstance().addRewardPvP(this);
    
    + 
    + 
    PvpPkColorSystem.getInstance().checkPvpColors(this);
    
    // Send a Server->Client UserInfo packet to attacker with its Karma and PK Counter
    Index: java/net/sf/l2j/Config.java
    ===================================================================
    --- java/net/sf/l2j/Config.java    (revision 41)
    +++ java/net/sf/l2j/Config.java    (working copy)
    @@ -686,6 +686,16 @@
        public static Map<Integer, Integer> PK_COLORS_LIST;
        public static boolean ALLOW_PVP_COLOR_SYSTEM;
        public static boolean ALLOW_PK_COLOR_SYSTEM;
    +    
    +    public static int PVP_AMOUNTPVP1;
    +    public static int PVP_AMOUNT1;
    +    public static int PVP_REWARD1;
    +    public static int PVP_AMOUNTPVP2;
    +    public static int PVP_AMOUNT2;
    +    public static int PVP_REWARD2;
    +    public static int PVP_AMOUNTPVP3;
    +    public static int PVP_AMOUNT3;
    +    public static int PVP_REWARD3;
    //--------------------------------------------------
    
    /**
    @@ -810,6 +820,16 @@
        String[] more_splitted_pks = i.split(",");
        PVP_COLORS_LIST.put(Integer.parseInt(more_splitted_pks[0]), Integer.decode("0x" + more_splitted_pks[1]));
        }
    +     
    +     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"));
    }
    catch (Exception e)
    {

    Whats different? I don't notice anything different?

  3. // 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.

  4. 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.
    
  5. 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);
    		}
    	}
    }
    
  6. 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!

  7. 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!

  8. 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?

  9. 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.

  10. 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.

×
×
  • Create New...