Tópico: [L2JServer] Restrição MageUseHeavyOrLight
Ver um Único Post
Antigo 26-11-2010, 08:38 PM   #1 (permalink)
Mazokista
Membro - Veterano
 
Avatar de Mazokista
 
Registrado em: Dec 2009
Posts: 1,335
Agradeceu: 490
Agradecido 803 Vezes em 427 Posts
Achei Ruim:
Acharam ruim Vezes em Posts
Meu Sistema
Rate Designer: Iniciante
Meu Estado:
Enviar mensagem via Windows Live Messenger para Mazokista
Nome Real: Roberto

Inventório de Mazokista

Icon2 Restrição MageUseHeavyOrLight

Esse Mod faz com qui Mago nao Usse Set Heavy Ow Light

Código: [Somente Usuários Registrados Podem Visualizar os Links Desta PáginaClique aqui para se Registrar]
Index: CORE/java/config/customs.ini
====================================================================
--- CORE/java/config/customs.ini (revision 203)
+++ CORE/java/config/customs.ini (revision 210)
@@ -175,7 +175,9 @@
 # Default: False
 GMTradeRestrictedItems = False
 
-# Heavy Equipment Restriction
+# Heavy/Light Equipment Restriction
+# IF False , Mage Classes Won't Be Able To Use Heavy/Lights Armors
+AllowMageUseHeavyOrLight = False
 # IF False , Dagger Classes Won't Be Able To Use Heavy Armors
 AllowDaggersUseHeavy = True
 # IF False , Archer Classes Won't Be Able To Use Heavy Armors

 
Index: CORE/java/l2j/umbrella/il/Config.java
====================================================================
--- CORE/java/l2j/umbrella/il/Config.java (revision 208)
+++ CORE/java/l2j/umbrella/il/Config.java (revision 210)
@@ -574,6 +574,7 @@
     public static int MAX_SPEED; 
     public static int MAX_PCRIT_RATE; 
     public static int MAX_MCRIT_RATE; 
+    public static boolean ALLOW_MAGE_USE_HEAVY_OR_LIGHT;
     public static boolean ALLOW_DAGGERS_WEAR_HEAVY; 
     public static boolean ALLOW_ARCHERS_WEAR_HEAVY; 
     public static boolean ALLOW_SAME_IP_NOT_GIVE_PVP_POINT;
@@ -1020,6 +1021,7 @@
               MAX_SPEED = Integer.parseInt(Customs.getProperty("MaxSpeed", "250")); 
               MAX_PCRIT_RATE = Integer.parseInt(Customs.getProperty("MaxPCritRate", "500")); 
               MAX_MCRIT_RATE = Integer.parseInt(Customs.getProperty("MaxMCritRate", "300")); 
+              ALLOW_MAGE_USE_HEAVY_OR_LIGHT = Boolean.parseBoolean(Customs.getProperty("AllowMageUseHeavyOrLight", "True"));
               ALLOW_DAGGERS_WEAR_HEAVY = Boolean.parseBoolean(Customs.getProperty("AllowDaggersUseHeavy", "True")); 
               ALLOW_ARCHERS_WEAR_HEAVY = Boolean.parseBoolean(Customs.getProperty("AllowArchersUseHeavy", "True"));
     		   ALT_SUBCLASS_LEVEL = Integer.parseInt(Customs.getProperty("AltSubClassLevel", "40")); 
Index: CORE/java/l2j/umbrella/il/gameserver/network/clientpackets/UseItem.java
====================================================================
--- CORE/java/l2j/umbrella/il/gameserver/network/clientpackets/UseItem.java (revision 208)
+++ CORE/java/l2j/umbrella/il/gameserver/network/clientpackets/UseItem.java (revision 210)
@@ -189,7 +189,7 @@
 			if (Config.BOW_TANK_RESTRICTION)
 			{
 				int classid = activeChar.getClassId().getId();
-				if (!activeChar.isInOlympiadMode() && (classid == 88 || classid == 89 || classid == 6 || classid == 90 || classid == 91 || classid == 100 || classid == 99 || classid == 113 || classid == 114))
+				if (!activeChar.isGM() && !activeChar.isInOlympiadMode() && (classid == 1 || classid == 2 || classid == 3 || classid == 4 || classid == 5 || classid == 6 || classid == 19 || classid == 20 || classid == 21 || classid == 32 || classid == 33 || classid == 34 || classid == 44 || classid == 45 || classid == 46 || classid == 47 || classid == 48 || classid == 53 || classid == 54 || classid == 55 || classid == 56 || classid == 57 || classid == 88 || classid == 89 || classid == 90 || classid == 99 || classid == 100 || classid == 106 || classid == 107 || classid == 113 || classid == 114 || classid == 117 || classid == 118))
 				{
 					if (item.getItemType() == L2WeaponType.BOW)
 					{
@@ -200,7 +200,7 @@
 			}
 
 			if (Config.DEBUG)
-                        _log.finest(activeChar.getObjectId() + ": use item " + _objectId);
+				_log.finest(activeChar.getObjectId() + ": use item " + _objectId);
  
 			if (item.isEquipable())
 			{
@@ -316,6 +316,16 @@
 	                                        return; 
                                 }    
                         } 
+						
+				if (!Config.ALLOW_MAGE_USE_HEAVY_OR_LIGHT)
+					if (activeChar.getClassId().getId() == 10 || activeChar.getClassId().getId() == 11 || activeChar.getClassId().getId() == 12 || activeChar.getClassId().getId() == 13 || activeChar.getClassId().getId() == 14 || activeChar.getClassId().getId() == 15 || activeChar.getClassId().getId() == 16 || activeChar.getClassId().getId() == 17 || activeChar.getClassId().getId() == 25 || activeChar.getClassId().getId() == 26 || activeChar.getClassId().getId() == 27 || activeChar.getClassId().getId() == 28 || activeChar.getClassId().getId() == 29 || activeChar.getClassId().getId() == 30 || activeChar.getClassId().getId() == 38 || activeChar.getClassId().getId() == 39 || activeChar.getClassId().getId() == 40 || activeChar.getClassId().getId() == 41 || activeChar.getClassId().getId() == 42 || activeChar.getClassId().getId() == 43 || activeChar.getClassId().getId() == 49 || activeChar.getClassId().getId() == 50 || activeChar.getClassId().getId() == 51 || activeChar.getClassId().getId() == 52 || activeChar.getClassId().getId() == 94 || activeChar.getClassId().getId() == 95 || activeChar.getClassId().getId() == 96 || activeChar.getClassId().getId() == 97 || activeChar.getClassId().getId() == 98 || activeChar.getClassId().getId() == 103 || activeChar.getClassId().getId() == 104 || activeChar.getClassId().getId() == 105 || activeChar.getClassId().getId() == 110 || activeChar.getClassId().getId() == 111 || activeChar.getClassId().getId() == 112 || activeChar.getClassId().getId() == 115 || activeChar.getClassId().getId() == 116) 
+					{
+						if (item.getItemType() == L2ArmorType.HEAVY || item.getItemType() == L2ArmorType.LIGHT)
+						{
+							activeChar.sendPacket(new SystemMessage(SystemMessageId.CANNOT_EQUIP_ITEM_DUE_TO_BAD_CONDITION));
+							return;
+						}
+					}
                  
                 if (!Config.ALLOW_ARCHERS_WEAR_HEAVY) 
 	                        if (activeChar.getClassId().getId() == 9 || activeChar.getClassId().getId() == 92 || activeChar.getClassId().getId() == 24 || activeChar.getClassId().getId() == 102 || activeChar.getClassId().getId() == 37 || activeChar.getClassId().getId() == 109)

Creditos : Manoel-Adm,Mazokista

Arquivos Anexados
Tipo de Arquivo: txt Restricao Armor.txt (5.8 KB, 14 visualizações) Baixar
Mazokista está offline  
Links Patrocinados
 

Search Engine Optimization by vBSEO 3.3.0