Jump to content
  • 0

[Help] Olympiad


Question

3 answers to this question

Recommended Posts

  • 0
Posted

 

--- 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 

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


  • Posts

    • There is a ready-made option and the possibility to work according to "Wishlist"
    • Contact me, Discord: xbaus
    • WTB GRACIA FINAL INTERFACE
    • Dear partners! At the moment we are in great need of the following positions: — Snapchat old and new accounts | With snapscores | Geo: Europe/USA | Full access via email/phone number — Reddit old (brute or hacked origin, self-registered) accounts with post and comment karma from 100 to 100,000+ | Full email access included — LinkedIn old accounts with real connections | Geo: Europe/USA | Full email access + active 2FA password — Instagram old accounts (2010–2023) | Full email access (possibly with active 2FA password) — Facebook old accounts (2010–2023) | Full email access (possibly with active 2FA password) | With friends or without friends | Geo: Europe/USA/Asia — Threads accounts | Full email access (possibly with active 2FA password) — TikTok/Facebook/Google ADS Agency advertising accounts — Email accounts: mail.ru, yahoo.com, gazeta.pl, gmx.ch / gmx.de / gmx.net (BUT NOT gmx.com) — Google ADS Manual Farm accounts (verified via email and phone number) | GEO: USA/Europe, mostly USA. — WhatsApp OLD Accounts — Twitter accounts with followers and posts (old accounts) Contact us via the details below. We will be glad to cooperate! We are also ready to consider other partnership and collaboration options. Active links to our projects: Digital goods store (Website): Go to Store Telegram bot: Go to – convenient access to the store via the Telegram messenger. Virtual numbers service: Go to Telegram bot for purchasing Telegram Stars: Go to – fast and profitable purchase of Stars in Telegram. SMM Panel: Go to – promotion of your social media accounts. Contacts and support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock