Jump to content

Recommended Posts

Posted

An mporei kapios na to kanei addapt gia l2jbrasil (pou xrisimopoioun oi perisoteroi 8a helpare poli)

 

Idaka stin l2jbrasil... gt h l2jbrasil den prepei na alla3eis mono ta imports... alla stin ousia na kaneis new code....

Posted

Στα μηδενικά που έχει βάζεις τα ID από το Armor. Άν δεν υπάρχει armor (πχ όταν έχεις full-body , δεν έχεις pants ) βάζεις 0.

nai auto to katalaba alla ama 8elw kiales armor?8a grafw sto glove px 20000,15000?(ena glove apo dark knight kai apo epic armor px lew)?

Posted

nai auto to katalaba alla ama 8elw kiales armor?8a grafw sto glove px 20000,15000?(ena glove apo dark knight kai apo epic armor px lew)?

An mporei kapios na to kanei addapt gia l2jbrasil (pou xrisimopoioun oi perisoteroi 8a helpare poli)

 

Idaka stin l2jbrasil... gt h l2jbrasil den prepei na alla3eis mono ta imports... alla stin ousia na kaneis new code....

Ginete? Plz  paidia

Posted

Re  pedia sori  pou sas ta prizo  ilikrina  mporite na to perasete  sto java  dild na douleuei me tin mia  gia ta 3 set dyn

 L   9425   9428   9429   9430   9431        

H      9416   9421   9422   9423   9424      

R   9432   9437   9438   9439   9440    an sas einai eukolo

Posted

Re  pedia sori  pou sas ta prizo  ilikrina  mporite na to perasete  sto java  dild na douleuei me tin mia  gia ta 3 set dyn

  L  9425  9428  9429  9430  9431       

H      9416  9421  9422  9423  9424   

R  9432  9437  9438  9439  9440    an sas einai eukolo

dn diabases?auto to share eina gia 1 set

8a ftia3ei new me polla set akoma pfff

Posted

-Gia Interlude L2JBrazil latest revision

-exei prostethei dinatotita gia polla diaforetika armor set.

 

### Eclipse Workspace Patch 1.0
#P L2JBrasil_CORE
Index: java/com/it/br/gameserver/Custom/ArmorSet.java
===================================================================
--- java/com/it/br/gameserver/Custom/ArmorSet.java	(revision 0)
+++ java/com/it/br/gameserver/Custom/ArmorSet.java	(revision 0)
@@ -0,0 +1,89 @@
+/* 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 com.it.br.gameserver.Custom;
+
+/**
+ *
+ * @author  Issle
+ */
+public class ArmorSet
+{
+	private int glovesId;
+	private int bootsId;
+	private int helmetId;
+	private int pantsId;
+	private int bodyId;
+	
+	/**
+	 * Add the ids in the following order for this set:
+	 * 
+	 * @param _bootsId
+	 * @param _pantsId
+	 * @param _bodyId
+	 * @param _glovesId
+	 * @param _helmetId
+	 */
+	public ArmorSet(int _bootsId, int _pantsId, int _bodyId, int _glovesId, int _helmetId)
+	{
+		glovesId =_glovesId;
+		bootsId = _bootsId;
+		helmetId = _helmetId;
+		pantsId = _pantsId;
+		bodyId = _bodyId;
+	}
+	
+	/**
+	 * @return Returns the helmetId.
+	 */
+	public int getHelmetId()
+	{
+		return helmetId;
+	}
+
+	/**
+	 * @return Returns the pantsId.
+	 */
+	public int getPantsId()
+	{
+		return pantsId;
+	}
+
+	/**
+	 * @return Returns the bodyId.
+	 */
+	public int getBodyId()
+	{
+		return bodyId;
+	}
+
+	/**
+	 * @return Returns the bootsId.
+	 */
+	public int getBootsId()
+	{
+		return bootsId;
+	}
+
+	/**
+	 * @return Returns the glovesId.
+	 */
+	public int getGlovesId()
+	{
+		return glovesId;
+	}
+}
Index: java/com/it/br/gameserver/GameServer.java
===================================================================
--- java/com/it/br/gameserver/GameServer.java	(revision 1178)
+++ java/com/it/br/gameserver/GameServer.java	(working copy)
@@ -29,6 +29,7 @@
import com.it.br.Config;
import com.it.br.L2DatabaseFactory;
import com.it.br.Server;
+import com.it.br.gameserver.Custom.NoblesseArmor;
import com.it.br.gameserver.cache.CrestCache;
import com.it.br.gameserver.cache.HtmCache;
import com.it.br.gameserver.communitybbs.Manager.ForumsBBSManager;
@@ -539,6 +540,7 @@
         TvTManager.getInstance();
		Npcbuffer.getInstance().engineInit();
		NpcBufferSkillIdsTable.getInstance();
+		NoblesseArmor.loadConfigurations();
         if (Config.NPCBUFFER_FEATURE_ENABLED) 
	        { 
	                BufferSkillsTable.getInstance();
Index: java/com/it/br/gameserver/model/L2Character.java
===================================================================
--- java/com/it/br/gameserver/model/L2Character.java	(revision 1178)
+++ java/com/it/br/gameserver/model/L2Character.java	(working copy)
@@ -36,6 +36,7 @@
import com.it.br.gameserver.GameTimeController;
import com.it.br.gameserver.GeoData;
import com.it.br.gameserver.ThreadPoolManager;
+import com.it.br.gameserver.Custom.NoblesseArmor;
import com.it.br.gameserver.ai.CtrlEvent;
import com.it.br.gameserver.ai.CtrlIntention;
import com.it.br.gameserver.ai.L2AttackableAI;
@@ -1514,6 +1515,10 @@
			if (((L2PlayableInstance)this).getCharmOfLuck()) //remove Lucky Charm if player has SoulOfThePhoenix/Salvation buff 
			((L2PlayableInstance)this).stopCharmOfLuck(null); 
			} 
+		else if(this instanceof L2PcInstance && NoblesseArmor.hasArmorNoblesse((L2PcInstance)this))
+		{
+			//Do nothing aka do not remove effects.
+		}
		else
			stopAllEffects();

Index: java/com/it/br/gameserver/Custom/NoblesseArmor.java
===================================================================
--- java/com/it/br/gameserver/Custom/NoblesseArmor.java	(revision 0)
+++ java/com/it/br/gameserver/Custom/NoblesseArmor.java	(revision 0)
@@ -0,0 +1,95 @@
+/* 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 com.it.br.gameserver.Custom;
+
+import java.util.LinkedList;
+import java.util.logging.Logger;
+
+import com.it.br.gameserver.model.Inventory;
+import com.it.br.gameserver.model.PcInventory;
+import com.it.br.gameserver.model.actor.instance.L2PcInstance;
+
+/**
+ *
+ * @author  Issle
+ */
+public class NoblesseArmor
+{
+	protected static final Logger _log = Logger.getLogger(NoblesseArmor.class.getName());
+	private static LinkedList<ArmorSet> armorSets = new LinkedList<ArmorSet>();
+	
+	public static void loadConfigurations()
+	{
+		//Add your custom armor sets here. A player must have 
+		//one of these sets equiped to retain his buffs onDie.
+		armorSets.add(new ArmorSet(123, 234, 2356, 3456, 456));
+		armorSets.add(new ArmorSet(1234, 234, 2356, 3456, 4556));
+		armorSets.add(new ArmorSet(123, 2384, 2356, 34536, 456));
+		
+		
+		_log.info("[NoblesseArmor]: Loaded "+String.valueOf(armorSets.size())+" armor sets.");
+	}
+	
+	public static boolean hasArmorNoblesse(L2PcInstance activeChar)
+	{
+		PcInventory inventory = activeChar.getInventory();
+		
+		int _pantsId = inventory.getPaperdollItemId(Inventory.PAPERDOLL_LEGS);
+		int _bodyId = inventory.getPaperdollItemId(Inventory.PAPERDOLL_CHEST);
+		int _helmetId = inventory.getPaperdollItemId(Inventory.PAPERDOLL_HEAD);
+		int _glovesId = inventory.getPaperdollItemId(Inventory.PAPERDOLL_GLOVES);
+		int _bootsId = inventory.getPaperdollItemId(Inventory.PAPERDOLL_FEET);
+		
+		for(ArmorSet set: armorSets)
+		{
+			if(isValidArmor(set, _pantsId, _bodyId, _helmetId, _glovesId, _bootsId))
+			{
+				activeChar.sendMessage("You maintained your buffs cause of your special armor configuration.");
+				return true;
+			}
+		}
+		activeChar.sendMessage("No special armor configuration, you lost your buffs.");
+		return false;
+	}
+
+	/**
+	 * @param set
+	 * @param pantsId
+	 * @param bodyId
+	 * @param helmetId
+	 * @param glovesId
+	 * @param bootsId
+	 * @return
+	 */
+	private static boolean isValidArmor(ArmorSet set, int pantsId, int bodyId, int helmetId, int glovesId, int bootsId)
+	{
+		if(pantsId != set.getPantsId())
+			return false;
+		if(bodyId != set.getBodyId())
+			return false;
+		if(helmetId != set.getHelmetId())
+			return false;
+		if(glovesId != set.getGlovesId())
+			return false;
+		if(bootsId != set.getBootsId())
+			return false;
+		
+		return true;
+	}
+	
+}

 

 

Den to kano adapt gia allo l2jinterlude project giati brazil, equal, archid, teon kai den ksero ego ti alla skata einai ola projects gia klamata. Epatha otan eida ton kodika tou l2jbrazil. Oi developers tou L2JBrazil einai GIA TA KLAMATA ! Den exoun idea pos na grapsoun kodika. To leo dimosia na to akousoun metadoste to :)

 

 

Tora gia to share:

 

Prostheteis armor sets sto simeio pou grafei :

 

+ //Add your custom armor sets here. A player must have

+ //one of these sets equiped to retain his buffs onDie.

+ armorSets.add(new ArmorSet(123, 234, 2356, 3456, 456));

+ armorSets.add(new ArmorSet(1234, 234, 2356, 3456, 4556));

+ armorSets.add(new ArmorSet(123, 2384, 2356, 34536, 456));

 

Exo balei 3 tixea armor sets ta bgazete kai bazete ta dika sas. Gia na kratisei kapios ta buffs prepei na foraei ena set apo tin lista pou tha ftiaksete. I seira me tin opia mpenoun ta ID fenete ston constructor: ArmorSet(int _bootsId, int _pantsId, int _bodyId, int _glovesId, int _helmetId).

 

As to testarei kapios an to perasei giati ego den ixa interlude na ot testaro.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...