Secret Experience

Secret Experience (https://secretexperience.net/)
-   [Lineage] Java Mods (https://secretexperience.net/lineage-java-mods/)
-   -   [L2JServer] Nobles Armor V1 (https://secretexperience.net/lineage-java-mods/28819-nobles-armor-v1.html)

Mazokista 16-01-2011 05:00 PM

Nobles Armor V1
 
1 Anexo(s)
MazokistaNo Caso RODOLFO Min Pediu pra min modificar o mod para poder add varios IDs Porem estava ocupado Resolvi fazer 3 Opcoes para cada Tipow de Armor Enfim Logo Logo Estarei Postando a modificacao para Adicionar Varios Ids Em Cada Opcao pois e so permitido 1 Id Por cada tipow de set


RODOLFO LOPESCom este código é possível criar um set noblesse. ou seja, o player não perde os buffs quando estiver com o set equipado.
Para configurar qual set receberá este poder, Basta Modificar todos os 0 para o ID do set.



Código:

Index: java/com/l2jserver/gameserver/Custom/ArmorNoblesse.java
===================================================================
--- java/com/l2jserver/gameserver/Custom/ArmorNoblesse.java    (revision 0)
+++ java/com/l2jserver/gameserver/Custom/ArmorNoblesse.java    (revision 0)
@@ -0,0 +1,72 @@
+/*
+ * 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 com.l2jserver.gameserver.Custom;
+
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.itemcontainer.Inventory;
+import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
+
+/**
+ * @author Issle
+ *
+ */
+public class ArmorNoblesse
+{
+ public static final int bodyId = Config.ITEM_LIGHY_BODY && Config.ITEM_HEAVY_BODY && Config.ITEM_MAGE_BODY;
+ public static final int pantsId = Config.ITEM_LIGHY_PLANTS && Config.ITEM_HEAVY_PLANTS && Config.ITEM_MAGE_PLANTS;
+ public static final int glovesId = Config.ITEM_LIGHY_GLOVES && Config.ITEM_HEAVY_GLOVES && Config.ITEM_MAGE_GLOVES;
+ public static final int bootsId = Config.ITEM_LIGHY_BOOTS && Config.ITEM_HEAVY_BOOTS && Config.ITEM_MAGE_BOOTS;
+ public static final int helmetId = Config.ITEM_LIGHY_HELMET && Config.ITEM_HEAVY_HELMET && Config.ITEM_MAGE_HELMET;
+   
+    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);
+       
+        if(_pantsId != pantsId)
+            return false;
+        if(_glovesId != glovesId)
+            return false;
+        if(_bodyId != bodyId)
+            return false;
+        if(_helmetId != helmetId)
+            return false;
+        if(_bootsId != bootsId)
+            return false;
+        activeChar.sendMessage("You maintained your buffs cause of your special armor configuration.");
+        return true;
+    }
+   
+    private static void printParts(L2PcInstance activeChar, int part)
+    {
+        activeChar.sendMessage(String.valueOf(part));
+    }
+}
Index: java/com/l2jserver/gameserver/model/actor/L2Playable.java
===================================================================
--- java/com/l2jserver/gameserver/model/actor/L2Playable.java    (revision 4222)
+++ java/com/l2jserver/gameserver/model/actor/L2Playable.java    (working copy)
@@ -14,6 +14,7 @@
  */
 package com.l2jserver.gameserver.model.actor;
 
+import com.l2jserver.gameserver.Custom.ArmorNoblesse;
 import com.l2jserver.gameserver.ai.CtrlEvent;
 import com.l2jserver.gameserver.model.L2Effect;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
@@ -136,6 +137,10 @@
            if (getCharmOfLuck()) //remove Lucky Charm if player have Nobless blessing buff
                stopCharmOfLuck(null);
        }
+        else if(this instanceof L2PcInstance && ArmorNoblesse.hasArmorNoblesse((L2PcInstance)this))
+        {
+            //do nothing.
+        }
        else
            stopAllEffectsExceptThoseThatLastThroughDeath();
                       
Index: config/*********.properties
===================================================================
--- config/*********.properties (revision 1793)
+++ config/*********.properties (working copy)
@@ -272,6 +272,20 @@
 # Retail : 30 Adena
 AltWarehouseDepositFee = 30
 
+#-------------------------------------
+#        Nobles Armors Items        -
+#-------------------------------------
+#Nobles Armor Set Light
+#Parte Helmet Light Set Nobles
+NoblesItemLightHelmet = 0
+#Parte Boot Light Set Nobless
+NoblesItemLightBoots = 0
+#Parte Gloves Light Set Nobles
+NoblesItemLightGloves = 0
+#Parte Plant Set Nobles
+NoblesItemLightPlants = 0
+#Parte Body Light Set Nobles
+NoblesItemLightBody = 0
+
+#Nobles Armor Set Heavy
+#Parte Helmet Heavy Set Nobles
+NoblesItemHeavyHelmet = 0
+#Parte Boot Heavy Set Nobless
+NoblesItemHeavyBoots = 0
+#Parte Gloves Heavy Set Nobles
+NoblesItemHeavyGloves = 0
+#Parte Plant Heavy Set Nobles
+NoblesItemHeavyPlants = 0
+#Parte Body Heavy Set Nobles
+NoblesItemHeavyBody = 0
+
+#Nobles Armor Set Mage
+#Parte Helmet Mage Set Nobles
+NoblesItemMageHelmet = 0
+#Parte Boot Mage Set Nobless
+NoblesItemMageBoots = 0
+#Parte Gloves Mage Set Nobles
+NoblesItemMageGloves = 0
+#Parte Plant Mage Set Nobles
+NoblesItemMagePlants = 0
+#Parte Body Mage Set Nobles
+NoblesItemMageBody = 0

 #-------------------------------------------------------
 # Christmas Engine / Evento de Natal (In Test)        -
 #-------------------------------------------------------
 
 Index: com/it/br/Config.java
===================================================================
--- com/it/br/Config.java      (revision 1793)
+++ com/it/br/Config.java      (working copy)
@@ -654,6 +654,11 @@
    public static boolean CUSTOM_SPAWNLIST_TABLE;
    public static boolean DELETE_GMSPAWN_ON_CUSTOM;
    public static boolean KEEP_SUBCLASS_SKILLS;
+        // Armor Nobles Light
+    public static int ITEM_LIGHY_BODY;
+    public static int ITEM_LIGHY_PLANTS;
+    public static int ITEM_LIGHY_GLOVES;
+    public static int ITEM_LIGHY_BOOTS;
+    public static int ITEM_LIGHY_HELMET;
+        // Armor Nobles Heavy
+    public static int ITEM_HEAVY_BODY;
+    public static int ITEM_HEAVY_PLANTS;
+    public static int ITEM_HEAVY_GLOVES;
+    public static int ITEM_HEAVY_BOOTS;
+    public static int ITEM_HEAVY_HELMET;
+        // Armor Nobles Mage
+    public static int ITEM_MAGE_BODY;
+    public static int ITEM_MAGE_PLANTS;
+    public static int ITEM_MAGE_GLOVES;
+    public static int ITEM_MAGE_BOOTS;
+    public static int ITEM_MAGE_HELMET;
    /** Voiced Command - file */
    public static boolean ENABLE_ONLINE_COMMAND;
    public static boolean ALLOW_RES_COMMAND;
@@ -1094,6 +1099,11 @@
              *********.load(is);
              is.close();
                         
                         
+                  // Armor Nobles Light
+              ITEM_LIGHY_BODY = Integer.parseInt(*********.getProperty("NoblesItemLightBody","0"));
+              ITEM_LIGHY_PLANTS = Integer.parseInt(*********.getProperty("NoblesItemLightPlants", "0"));
+              ITEM_LIGHY_GLOVES = Integer.parseInt(*********.getProperty("NoblesItemLightGloves", "0"));
+              ITEM_LIGHY_BOOTS = Integer.parseInt(*********.getProperty("NoblesItemLightBoots", "0"));
+              ITEM_LIGHY_HELMET = Integer.parseInt(*********.getProperty("NoblesItemLightHelmet", "0"));
+                    // Armor Nobles Heavy
+              ITEM_HEAVY_BODY = Integer.parseInt(*********.getProperty("NoblesItemHeavyBody","0"));
+              ITEM_HEAVY_PLANTS = Integer.parseInt(*********.getProperty("NoblesItemHeavyPlants", "0"));
+              ITEM_HEAVY_GLOVES = Integer.parseInt(*********.getProperty("NoblesItemHeavyGloves", "0"));
+              ITEM_HEAVY_BOOTS = Integer.parseInt(*********.getProperty("NoblesItemHeavyBoots", "0"));
+              ITEM_HEAVY_HELMET = Integer.parseInt(*********.getProperty("NoblesItemHeavyHelmet", "0"));
+                  // Armor Nobles Mage
+              ITEM_MAGE_BODY = Integer.parseInt(*********.getProperty("NoblesItemMageBody","0"));
+              ITEM_MAGE_PLANTS = Integer.parseInt(*********.getProperty("NoblesItemMagePlants", "0"));
+              ITEM_MAGE_GLOVES = Integer.parseInt(*********.getProperty("NoblesItemMageGloves", "0"));
+              ITEM_MAGE_BOOTS = Integer.parseInt(*********.getProperty("NoblesItemMageBoots", "0"));
+              ITEM_MAGE_HELMET = Integer.parseInt(*********.getProperty("NoblesItemMageHelmet", "0"));
              CHARS_TITLE = Boolean.parseBoolean(*********.getProperty("NewCharTitle", "False"));
              ANNOUNCE_CASTLE_LORDS = Boolean.parseBoolean(*********.getProperty("AnnounceCastleLords", "False"));
              DISPLAY_SERVER_VERSION = Boolean.parseBoolean(*********.getProperty("DisplayServerRevision","True"));


Creditos Pela Modificacao : Mazokista
Creditos : Lanterna-Verde

lordvenancio 18-01-2011 11:25 AM

[Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]

qual è a diferença ?

.Over12 19-01-2011 09:21 AM

@Lord ele fez modificações para aceitar + de 1 set e fez atalhos para ser configurados nos arquivos Properties.

So os créditos estão Errados , que é o Issle Lanterna apenas Upou os codigos.

ibirapvp 19-02-2011 02:58 PM

[SIZE="3"]Alguem Pode Postar Para L2J2010 Pois Fui Add Esse Aki e Nao Achei
Citação:

Index: java/com/l2jserver/gameserver/model/actor/L2Playable.java e java/com/l2jserver/gameserver/Custom/ArmorNoblesse.java
Alguem Me Ajude
[/SIZE]

Mazokista 19-02-2011 06:17 PM

Citação:

No caso seria pra vc criar esse arquivo
Index: java/com/l2jserver/gameserver/model/actor/L2Playable.java Local q seria para voce modificar
java/com/l2jserver/gameserver/Custom/ArmorNoblesse.java e esse para vc criar esse local

Esse mod seria mais facil teste e veja se gosta ele faz com qui o player nao perca os buff
basta determina True ow False Para ativa e desativar
Código:

Index: Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/config/Mods/pvp.ini
===================================================================
--- Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/config/Mods/pvp.ini (revision 139)
+++ Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/config/Mods/pvp.ini (revision 178)
@@ -177,4 +177,7 @@
 
 # Pk Amount & Title color level 10.
 PkAmount10 = 10000
 TitleForAmount10 = 00FF00
+#
+#Leave buffs on die, if false the effects will be not stopped on die
+LeaveBuffsOnDie = False
+
\ No newline at end of file

Index: Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/Config.java
===================================================================
--- Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/Config.java (revision 176)
+++ Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/Config.java (revision 178)
@@ -126,6 +126,7 @@
    public static int TITLE_COLOR_FOR_PK_AMOUNT8;
    public static int TITLE_COLOR_FOR_PK_AMOUNT9;
    public static int TITLE_COLOR_FOR_PK_AMOUNT10;
+    public static boolean LEAVE_BUFFS_ON_DIE;
    public static boolean DEBUG;
    public static boolean ASSERT;
    public static boolean DEVELOPER;
@@ -2376,6 +2377,7 @@
                TITLE_COLOR_FOR_PK_AMOUNT8 = Integer.decode((new StringBuilder()).append("0x").append(pvpSettings.getProperty("TitleForAmount8", "00FF00")).toString()).intValue();
                TITLE_COLOR_FOR_PK_AMOUNT9 = Integer.decode((new StringBuilder()).append("0x").append(pvpSettings.getProperty("TitleForAmount9", "00FF00")).toString()).intValue();
                TITLE_COLOR_FOR_PK_AMOUNT10 = Integer.decode((new StringBuilder()).append("0x").append(pvpSettings.getProperty("TitleForAmount10", "00FF00")).toString()).intValue();
+                LEAVE_BUFFS_ON_DIE = Boolean.parseBoolean(pvpSettings.getProperty("LeaveBuffsOnDie", "True"));
            }
            catch (Exception e)
            {

               
Index: Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/gameserver/model/L2Character.java               
===================================================================
--- Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/gameserver/model/L2Character.java (revision 176)
+++ Trunk/L2JTitanPlus/L2JTitanPlus_CORE/java/com/l2jtitanplus/gameserver/model/L2Character.java (revision 178)
@@ -1720,7 +1720,12 @@
                        ((L2PlayableInstance)this).stopCharmOfLuck(null);
                }
                else
-                        stopAllEffects();
+                {
+                        if (Config.LEAVE_BUFFS_ON_DIE)
+                        {
+                                stopAllEffects();
+                        }
+                }
               
                calculateRewards(killer);


llJuniorll 26-02-2011 06:30 PM

Se eu add 1 id de uma parte e colocar "," e add outro da certo?
Ex.:


#-------------------------------------
# Nobles Armors Items -
#-------------------------------------
#Nobles Armor Set Light
#Parte Helmet Light Set Nobles
NoblesItemLightHelmet = ID,ID

Mazokista 27-02-2011 10:43 AM

Nao So para 1 set =x

ShadowBR 20-05-2011 04:27 PM

tem como colocar uma verificação no set para q ele soh possa ser usado por nobles?
assim evita q naum noble possa usar o set e ai as vendas da skill BLessed Nobles in game continuariam para os naum noble

Mazokista 28-05-2011 07:11 PM

Sim teria como

junio 06-06-2011 10:21 AM

mim ajuda a coloca esta para nu serve aki
 
tem como coloca um tuto melhor ajuda ai ñ to sabendo onde coloca o o scrips no mods

----------

quem pode ta ai meu msn[COLOR="Red"]

----------

EMAIL RETIRADO


Horários baseados na GMT -3. Agora são 05:12 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0