Jump to content

Recommended Posts

Posted

Ayto to  Share to kanw giati blepw kapoies fores  san kai ayto edw to post  giati i perisoterh den  kanoun seacrh

 

Index: trunk/gameserver/java/config/players.properties
===================================================================
--- a/trunk/gameserver/java/config/players.properties
+++ b/trunk/gameserver/java/config/players.properties
@@ -137,2 +137,9 @@
MaxbuffAmount = 24
StoreSkillCooltime = True
+
+EnchantChanceWeaponCrystal = 100  
+EnchantChanceArmorCrystal = 100  
+EnchantChanceJewelryCrystal = 100           
+EnchantChanceWeaponBlessed = 85  
+EnchantChanceArmorBlessed = 85  
+EnchantChanceJewelryBlessed = 85 
Index: trunk/gameserver/java/net/sf/l2j/Config.java
===================================================================
--- a/trunk/gameserver/java/net/sf/l2j/Config.java
+++ b/trunk/gameserver/java/net/sf/l2j/Config.java
@@ -195,4 +195,12 @@
     public static boolean WEDDING_FORMALWEAR;
     public static int WEDDING_DIVORCE_COSTS;
+
+    /** Chance blessed-crystal enchants */ 
+   public static int ENCHANT_CHANCE_WEAPON_CRYSTAL;  
+   public static int ENCHANT_CHANCE_ARMOR_CRYSTAL;  
+   public static int ENCHANT_CHANCE_JEWELRY_CRYSTAL;  
+        public static int ENCHANT_CHANCE_WEAPON_BLESSED;  
+        public static int ENCHANT_CHANCE_ARMOR_BLESSED;  
+   public static int ENCHANT_CHANCE_JEWELRY_BLESSED;  
     
     /** Lottery */
@@ -925,4 +933,7 @@
                 WEDDING_DIVORCE_COSTS           = Integer.parseInt(eventsSettings.getProperty("WeddingDivorceCosts", "20"));               
                 
+                
+                /* if different from 100 (ie 100%) heal rate is modified acordingly */            
+                
                 ALT_LOTTERY_PRIZE                = Integer.parseInt(eventsSettings.getProperty("AltLotteryPrize","50000"));
                 ALT_LOTTERY_TICKET_PRICE         = Integer.parseInt(eventsSettings.getProperty("AltLotteryTicketPrice","2000"));
@@ -1073,4 +1084,11 @@
                 ENCHANT_SAFE_MAX_FULL   = Integer.parseInt(playersSettings.getProperty("EnchantSafeMaxFull", "4"));

+                ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceWeaponCrystal", "100"));   
+                ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceArmorCrystal", "100"));   
+                ENCHANT_CHANCE_JEWELRY_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceJewelryCrystal", "100"));   
+                ENCHANT_CHANCE_WEAPON_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceWeaponBlessed", "85"));   
+                ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceArmorBlessed", "85"));   
+                ENCHANT_CHANCE_JEWELRY_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceJewelryBlessed", "85"));                
+                
                 KARMA_PLAYER_CAN_BE_KILLED_IN_PZ= Boolean.valueOf(playersSettings.getProperty("KarmaPlayerCanBeKilledInPeaceZone", "False"));
                 KARMA_PLAYER_CAN_SHOP           = Boolean.valueOf(playersSettings.getProperty("KarmaPlayerCanShop", "True"));

Index: trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- a/trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -40,6 +40,8 @@
{
     protected static final Logger _log = Logger.getLogger(Inventory.class.getName());
+    private static final int[] ENCHANT_SCROLLS = { 729, 730, 947, 948, 951, 952, 955, 956, 959, 960 }; 
     private static final String _C__58_REQUESTENCHANTITEM = "[C] 58 RequestEnchantItem";
     private static final int[] CRYSTAL_SCROLLS = { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962 };
+    private static final int[] BLESSED_SCROLLS = { 6569, 6570, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578 }; 
     
     private int _objectId;
@@ -56,4 +58,11 @@
         L2PcInstance activeChar = getClient().getActiveChar();
         if (activeChar == null || _objectId == 0) return;
+        
+        if (activeChar.isProcessingTransaction())  
+         {  
+        activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION));  
+         activeChar.setActiveEnchantItem(null);  
+        return;  
+          }  
         
         if (activeChar.isProcessingTransaction()) 
@@ -195,25 +204,93 @@
             return;
         }
-
-        SystemMessage sm;
-
-        int chance = 0;
-        int maxEnchantLevel = 0;
-
-        if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
-        {
-                chance = Config.ENCHANT_CHANCE_WEAPON;
-                maxEnchantLevel = Config.ENCHANT_MAX_WEAPON;
-        }
-        else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)
-        {
-                chance = Config.ENCHANT_CHANCE_ARMOR;
-                maxEnchantLevel = Config.ENCHANT_MAX_ARMOR;
-        }
-        else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)
-        {
-                chance = Config.ENCHANT_CHANCE_JEWELRY;
-                maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY;
-        }
+ 
+                                                        // SystemMessage(SystemMessageId.ENCHANT_SCROLL_CANCELLED);  
+                                                        // activeChar.sendPacket(sm);  
+                                                        SystemMessage sm;  
+                                                        int chance = 0;  
+                                                int maxEnchantLevel = 0;  
+                                                if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)  
+                                                        {  
+                                                                maxEnchantLevel = Config.ENCHANT_MAX_WEAPON;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                             {  
+                                                                        chance = Config.ENCHANT_CHANCE_WEAPON;  
+                                                                        break;  
+                                                                }  
+                                                                }  
+                                                                for (int scrollId : CRYSTAL_SCROLLS)  
+                                                        {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                                chance = Config.ENCHANT_CHANCE_WEAPON_CRYSTAL;  
+                                                                        ;  
+                                                                                break;  
+                                                                }  
+                                                        }  
+                                                                for (int scrollId : BLESSED_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                                        chance = Config.ENCHANT_CHANCE_WEAPON_BLESSED;  
+                                                                   break;  
+                                                                        }  
+                                                                }  
+                                                } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)  
+                                                        {  
+                                                     maxEnchantLevel = Config.ENCHANT_MAX_ARMOR;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                               {  
+                                                                                chance = Config.ENCHANT_CHANCE_ARMOR;  
+                                                                                break;  
+                                                                        }  
+                                                                }  
+                                                                for (int scrollId : CRYSTAL_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                                chance = Config.ENCHANT_CHANCE_ARMOR_CRYSTAL;  
+                                                                                break;  
+                                                                        }  
+                                                        }  
+                                                        for (int scrollId : BLESSED_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                        chance = Config.ENCHANT_CHANCE_ARMOR_BLESSED;  
+                                                                                break;  
+                                                                }  
+                                                        }  
+                                                        } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)  
+                                                        {  
+                                                                maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                        if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                                chance = Config.ENCHANT_CHANCE_JEWELRY;  
+                                                                                break;  
+                                                                        }  
+                                                                }  
+                                                        for (int scrollId : CRYSTAL_SCROLLS)  
+                                                        {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                        chance = Config.ENCHANT_CHANCE_JEWELRY_CRYSTAL;  
+                                                               break;  
+                                                                }  
+                                                                }  
+                                                        for (int scrollId : BLESSED_SCROLLS)  
+                                                        {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                     chance = Config.ENCHANT_CHANCE_JEWELRY_BLESSED;  
+                                                                     break;  
+                                                                }  
+                                                        }  
+                                                        } 

         if (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX

Posted

File PsychoSquad* eleos  pragmatika.. :)

to ekana post  gia ton logo oti  den to briskhs kai giati to  eixa perasei para poly palia  otan asxoliomouna me to Interlude na les pali kala pou exw to palio mou svn... :)

Posted

File PsychoSquad* eleos  pragmatika.. :)

to ekana post  gia ton logo oti  den to briskhs kai giati to  eixa perasei para poly palia  otan asxoliomouna me to Interlude na les pali kala pou exw to palio mou svn... :)

Το ξέρω ρε πλάκα έκανα..
Posted

Ayto to  Share to kanw giati blepw kapoies fores  san kai ayto edw to post  giati i perisoterh den  kanoun seacrh

 

Index: trunk/gameserver/java/config/players.properties
===================================================================
--- a/trunk/gameserver/java/config/players.properties
+++ b/trunk/gameserver/java/config/players.properties
@@ -137,2 +137,9 @@
MaxbuffAmount = 24
StoreSkillCooltime = True
+
+EnchantChanceWeaponCrystal = 100  
+EnchantChanceArmorCrystal = 100  
+EnchantChanceJewelryCrystal = 100           
+EnchantChanceWeaponBlessed = 85  
+EnchantChanceArmorBlessed = 85  
+EnchantChanceJewelryBlessed = 85 
Index: trunk/gameserver/java/net/sf/l2j/Config.java
===================================================================
--- a/trunk/gameserver/java/net/sf/l2j/Config.java
+++ b/trunk/gameserver/java/net/sf/l2j/Config.java
@@ -195,4 +195,12 @@
     public static boolean WEDDING_FORMALWEAR;
     public static int WEDDING_DIVORCE_COSTS;
+
+    /** Chance blessed-crystal enchants */ 
+   public static int ENCHANT_CHANCE_WEAPON_CRYSTAL;  
+   public static int ENCHANT_CHANCE_ARMOR_CRYSTAL;  
+   public static int ENCHANT_CHANCE_JEWELRY_CRYSTAL;  
+        public static int ENCHANT_CHANCE_WEAPON_BLESSED;  
+        public static int ENCHANT_CHANCE_ARMOR_BLESSED;  
+   public static int ENCHANT_CHANCE_JEWELRY_BLESSED;  
     
     /** Lottery */
@@ -925,4 +933,7 @@
                 WEDDING_DIVORCE_COSTS           = Integer.parseInt(eventsSettings.getProperty("WeddingDivorceCosts", "20"));               
                 
+                
+                /* if different from 100 (ie 100%) heal rate is modified acordingly */            
+                
                 ALT_LOTTERY_PRIZE                = Integer.parseInt(eventsSettings.getProperty("AltLotteryPrize","50000"));
                 ALT_LOTTERY_TICKET_PRICE         = Integer.parseInt(eventsSettings.getProperty("AltLotteryTicketPrice","2000"));
@@ -1073,4 +1084,11 @@
                 ENCHANT_SAFE_MAX_FULL   = Integer.parseInt(playersSettings.getProperty("EnchantSafeMaxFull", "4"));

+                ENCHANT_CHANCE_WEAPON_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceWeaponCrystal", "100"));   
+                ENCHANT_CHANCE_ARMOR_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceArmorCrystal", "100"));   
+                ENCHANT_CHANCE_JEWELRY_CRYSTAL = Integer.parseInt(playersSettings.getProperty("EnchantChanceJewelryCrystal", "100"));   
+                ENCHANT_CHANCE_WEAPON_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceWeaponBlessed", "85"));   
+                ENCHANT_CHANCE_ARMOR_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceArmorBlessed", "85"));   
+                ENCHANT_CHANCE_JEWELRY_BLESSED = Integer.parseInt(playersSettings.getProperty("EnchantChanceJewelryBlessed", "85"));                
+                
                 KARMA_PLAYER_CAN_BE_KILLED_IN_PZ= Boolean.valueOf(playersSettings.getProperty("KarmaPlayerCanBeKilledInPeaceZone", "False"));
                 KARMA_PLAYER_CAN_SHOP           = Boolean.valueOf(playersSettings.getProperty("KarmaPlayerCanShop", "True"));

Index: trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- a/trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
+++ b/trunk/gameserver/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
@@ -40,6 +40,8 @@
{
     protected static final Logger _log = Logger.getLogger(Inventory.class.getName());
+    private static final int[] ENCHANT_SCROLLS = { 729, 730, 947, 948, 951, 952, 955, 956, 959, 960 }; 
     private static final String _C__58_REQUESTENCHANTITEM = "[C] 58 RequestEnchantItem";
     private static final int[] CRYSTAL_SCROLLS = { 731, 732, 949, 950, 953, 954, 957, 958, 961, 962 };
+    private static final int[] BLESSED_SCROLLS = { 6569, 6570, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578 }; 
     
     private int _objectId;
@@ -56,4 +58,11 @@
         L2PcInstance activeChar = getClient().getActiveChar();
         if (activeChar == null || _objectId == 0) return;
+        
+        if (activeChar.isProcessingTransaction())  
+         {  
+        activeChar.sendPacket(new SystemMessage(SystemMessageId.INAPPROPRIATE_ENCHANT_CONDITION));  
+         activeChar.setActiveEnchantItem(null);  
+        return;  
+          }  
         
         if (activeChar.isProcessingTransaction()) 
@@ -195,25 +204,93 @@
             return;
         }
-
-        SystemMessage sm;
-
-        int chance = 0;
-        int maxEnchantLevel = 0;
-
-        if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)
-        {
-                chance = Config.ENCHANT_CHANCE_WEAPON;
-                maxEnchantLevel = Config.ENCHANT_MAX_WEAPON;
-        }
-        else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)
-        {
-                chance = Config.ENCHANT_CHANCE_ARMOR;
-                maxEnchantLevel = Config.ENCHANT_MAX_ARMOR;
-        }
-        else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)
-        {
-                chance = Config.ENCHANT_CHANCE_JEWELRY;
-                maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY;
-        }
+ 
+                                                        // SystemMessage(SystemMessageId.ENCHANT_SCROLL_CANCELLED);  
+                                                        // activeChar.sendPacket(sm);  
+                                                        SystemMessage sm;  
+                                                        int chance = 0;  
+                                                int maxEnchantLevel = 0;  
+                                                if (item.getItem().getType2() == L2Item.TYPE2_WEAPON)  
+                                                        {  
+                                                                maxEnchantLevel = Config.ENCHANT_MAX_WEAPON;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                             {  
+                                                                        chance = Config.ENCHANT_CHANCE_WEAPON;  
+                                                                        break;  
+                                                                }  
+                                                                }  
+                                                                for (int scrollId : CRYSTAL_SCROLLS)  
+                                                        {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                                chance = Config.ENCHANT_CHANCE_WEAPON_CRYSTAL;  
+                                                                        ;  
+                                                                                break;  
+                                                                }  
+                                                        }  
+                                                                for (int scrollId : BLESSED_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                                        chance = Config.ENCHANT_CHANCE_WEAPON_BLESSED;  
+                                                                   break;  
+                                                                        }  
+                                                                }  
+                                                } else if (item.getItem().getType2() == L2Item.TYPE2_SHIELD_ARMOR)  
+                                                        {  
+                                                     maxEnchantLevel = Config.ENCHANT_MAX_ARMOR;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                               {  
+                                                                                chance = Config.ENCHANT_CHANCE_ARMOR;  
+                                                                                break;  
+                                                                        }  
+                                                                }  
+                                                                for (int scrollId : CRYSTAL_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                                chance = Config.ENCHANT_CHANCE_ARMOR_CRYSTAL;  
+                                                                                break;  
+                                                                        }  
+                                                        }  
+                                                        for (int scrollId : BLESSED_SCROLLS)  
+                                                                {  
+                                                                        if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                        chance = Config.ENCHANT_CHANCE_ARMOR_BLESSED;  
+                                                                                break;  
+                                                                }  
+                                                        }  
+                                                        } else if (item.getItem().getType2() == L2Item.TYPE2_ACCESSORY)  
+                                                        {  
+                                                                maxEnchantLevel = Config.ENCHANT_MAX_JEWELRY;  
+                                                        for (int scrollId : ENCHANT_SCROLLS)  
+                                                                {  
+                                                        if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                                chance = Config.ENCHANT_CHANCE_JEWELRY;  
+                                                                                break;  
+                                                                        }  
+                                                                }  
+                                                        for (int scrollId : CRYSTAL_SCROLLS)  
+                                                        {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                                        {  
+                                                                        chance = Config.ENCHANT_CHANCE_JEWELRY_CRYSTAL;  
+                                                               break;  
+                                                                }  
+                                                                }  
+                                                        for (int scrollId : BLESSED_SCROLLS)  
+                                                        {  
+                                                                if (scroll.getItemId() == scrollId)  
+                                                                {  
+                                                                     chance = Config.ENCHANT_CHANCE_JEWELRY_BLESSED;  
+                                                                     break;  
+                                                                }  
+                                                        }  
+                                                        } 

         if (item.getEnchantLevel() < Config.ENCHANT_SAFE_MAX

ine kalo p voi8as new an k pistevw oti 8eli ligo psaksimo aftw :P

Posted

akoma ena dwraki gia esas magkes..

einai kati aplos  alla  ma fou to exw  kai einai gia Interlude  oriste..

 

Index: trunk/Gameserver/java/net/gp/gameserver/handler/itemhandlers/ScrollOfEscape.java
===================================================================
--- trunk/Gameserver/java/net/gp/gameserver/handler/itemhandlers/ScrollOfEscape.java (revision 52)
+++ trunk/Gameserver/java/net/gp/gameserver/handler/itemhandlers/ScrollOfEscape.java (revision 58)
@@ -84,4 +84,11 @@
             return;
         }
+		
+        if (Config.ALLOW_SOE_IN_PVP && activeChar.getPvpFlag() != 0)
+        {  
+                activeChar.sendMessage("You can't use SOE if you're flagged!");  
+                return;  
+        }  
+

         // Check to see if the player is in a festival.
Index: trunk/Gameserver/java/net/gp/Config.java
===================================================================
--- trunk/Gameserver/java/net/gp/Config.java (revision 57)
+++ trunk/Gameserver/java/net/gp/Config.java (revision 58)
@@ -874,4 +874,5 @@
     public static int L2JMOD_WEDDING_DIVORCE_COSTS;
	public static boolean ALLOW_GK_IN_PVP; 
+	public static boolean ALLOW_SOE_IN_PVP;

     
@@ -1924,4 +1925,5 @@
                 L2JMOD_WEDDING_DIVORCE_COSTS            = Integer.parseInt(L2JModSettings.getProperty("WeddingDivorceCosts", "20"));
				ALLOW_GK_IN_PVP                         = Boolean.parseBoolean(L2JModSettings.getProperty("AllowGkInPvP", "True"));
+				ALLOW_SOE_IN_PVP                        = Boolean.parseBoolean(L2JModSettings.getProperty("AllowSoEInPvP", "True"));


Index: trunk/Gameserver/config/l2jmods.properties
===================================================================
--- trunk/Gameserver/config/l2jmods.properties (revision 57)
+++ trunk/Gameserver/config/l2jmods.properties (revision 58)
@@ -137,2 +137,6 @@
# Default : True
AllowGkInPvP = True
+
+# If is set to False , players can't use SOE when they are flagged!
+# Default : True
+AllowSoEInPvP = True

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..