Skip to content

[Help] Olympiad

Featured Replies

Yparxei kapio java code gia oly pou oi players na mpainoun mono me s grade items|?kai oi mage me a?

 

--- gameserver/config/functions/l2jfrozen.properties       (revision 938)
+++ gameserver/config/functions/l2jfrozen.properies             (working copy)


+# Default : False
+AllowOllyGradeS = False

--- gameserver/head-src/com/l2jfrozen/Config.java       (revision 938)
+++ gameserver/head-src/com/l2jfrozen/Config.java       (working copy)
+       public static boolean OLLY_GRADE_A;

          +      OLLY_GRADE_A = Boolean.parseBoolean(L2JFrozenSettings.getProperty("AllowOllyGradeS", "False"));
--- gameserver/head-src/com/l2jfrozen/gameserver/model/entity/olympiad/L2OlympiadGame.java      (revision 938)
+++ gameserver/head-src/com/l2jfrozen/gameserver/model/entity/olympiad/L2OlympiadGame.java      (working copy)
                                         for(L2Skill skill : player.getClan().getAllSkills())
                                                player.removeSkill(skill, false);
                                }
+
+                               if(!Config.OLLY_GRADE_A) {
+                                       checkItems(player);
+                               }
                                //Abort casting if player casting  
                                if(player.isCastingNow())

--- gameserver/head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java    (revision 938)
+++ gameserver/head-src/com/l2jfrozen/gameserver/model/entity/olympiad/Olympiad.java    (working copy)
         return true;
         {
                        noble.sendMessage("You can't participate to Olympiad. You are in Observer Mode");
                        return false;
                }

+        if(!Config.OLLY_GRADE_A) {
+                checkItems(noble);
+        }
         
        if(noble.getBaseClass() != noble.getClassId().getId())
                {
                        sm = new SystemMess

        }

        /**
         * @param noble
         */

+       protected void checkItems(L2PcInstance player){  
+        L2ItemInstance item;
+        int slot;
+        for(int i=1; i < 15; i++){
+                item = player.getInventory().getPaperdollItem(i);
+                if(item==null)
+                        continue;
+                if(item.getItem().getItemGrade() == L2Item.CRYSTAL_S){
+                        slot = item.getItem().getBodyPart();
+                        switch(item.getEquipSlot()) {
+                                case 1:
+                                        slot = L2Item.SLOT_L_EAR;
+                                        break;
+                                case 2:
+                                        slot = L2Item.SLOT_R_EAR;
+                                        break;
+                                case 4:
+                                        slot = L2Item.SLOT_L_FINGER;
+                                        break;
+                                case 5:
+                                        slot = L2Item.SLOT_R_FINGER;
+                                        break;
+                                case 6:
+                                        slot = L2Item.SLOT_UNDERWEAR;
+                                          break;
+                                default:
+                                          break;
+                        }
+
+                        L2ItemInstance[] items = player.getInventory().unEquipItemInBodySlotAndRecord(slot);
+                          InventoryUpdate iu = new InventoryUpdate();
+                                iu.addItems(Arrays.asList(items));
+                        player.sendPacket(iu);
+                }
+        }
+        player.sendPacket(new ItemList(player, true));
+        player.broadcastUserInfo();
+       }
        public boolean isRegistered(L2PcInstance noble)
        {
                if(_nonClassBasedRegisters == null)
                        return false;

--- gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java     (revision 938)
+++ gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/UseItem.java     (working copy)
@@ -155,6 +156,12 @@
         // Items that cannot be used
                if(itemId == 57)
                        return;

+       if(!Config.OLLY_GRADE_A && item.getItem().getItemGrade() == L2Item.CRYSTAL_S &&
+               (activeChar.isInOlympiadMode() || Olympiad.getInstance().isRegistered(activeChar))){
+          activeChar.sendMessage("Olympiad: Items Grade S cannot be used in Olympiad Event");
+          return;
          }

                   if((itemId == 5858) && (ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan()) == null))
                {

 

 

o kwdikas einai mono gia A grade twra gia auto pou zeitas den nomizw na exei gunei share. gia na min pedeuesai anevase ta stats apo tin fighter A grade stoli 

  • Author

afto isxiei kai gia ta ring??dld mpaineis mono me a grade items?

afto isxiei kai gia ta ring??dld mpaineis mono me a grade items?

y einai kai gia ta rings 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.