Jump to content

Question

Posted

Hi all, i have just a question. It is possible to restrict all items (armor,weapons,etc etc) and leave just 1 type or armor to access in zone? I mean for VoiceCommand teleport?

 

Recommended Posts

  • 0
Posted

@melron [GR] Οχιιι καριολακιιι θα τον λουστεις μαζι μου. Χτες επαθα καρκινο στα ματια να παθεις κ εσυ σημερα. [/GR]

 

1 Page ago you said that you don't want player to use command if he has at least 1 S equipped and now you want player to be teleport if he has at least one S in his inventory?

  • 0
Posted (edited)

Kara`, i want if player don't have S grade equiped, he can't use command. And i prefer to have set + weapon equiped to teleport in that zone. NOT IN INVENTORY !         EQUIPED to can use teleport. It is about slots i think

Edited by InFocus
  • 0
Posted

Let's forget about lambdas and show him some basic crappy code, so he can understand, I hope, I hope..

 

    if (!checkItemGrade(player, Inventory.PAPERDOLL_CHEST) || !checkItemGrade(player, Inventory.PAPERDOLL_RHAND))

    {

        player.sendMessage("S-Grade gear is required in order to enter the zone.");

        return;

    }

 

    private static final boolean checkItemGrade(Player player, int slotId)
    {
        final ItemInstance item = player.getInventory().getPaperdollItem(slotId);
        if (item != null && item.getItem().getCrystalType() == CrystalType.S)
            return true;
        
        return false;
    }

 

  • 0
Posted
  On 10/5/2018 at 12:00 AM, SweeTs said:

Let's forget about lambdas and show him some basic crappy code, so he can understand, I hope, I hope..

Expand  

 

Let's forget that he still can't realise that Player.java is the L2PcInstance and show him ... uhm what?

 

  • 0
Posted (edited)
  On 10/5/2018 at 1:50 AM, InFocus said:

SweeTs, When u understand me? I can't use player cuz i don't have player.class

Expand  

Rename the Player for L2PcInstance.

What you asked, players will cannot use .command to teleport in zone with x type/grade.. But you will need also a check on Item.java on method checkCondition.

Edited by 'Baggos'
  • 0
Posted
  On 10/5/2018 at 12:18 PM, 'Baggos' said:

ut you will need also a check on Item.java on method checkCondition.

Expand  

Pointless. It's supposed to be a S grade zone, so if someone choose to use A grade item or whatever, it's his stupidity, disadvantage. So, I would simply use only S check.

 

  On 10/5/2018 at 1:50 AM, InFocus said:

SweeTs, When u understand me? I can't use player cuz i don't have player.class

Expand  

God. Player is always L2PcInstance, after all this time you should at least understand that, manage to fix one shit on your own. Else stop doing whatever you do as your server will fail on first error and trust me, you will have them. I tho my custom is tested enough, guess what. It wasn't. 

  • 0
Posted
  On 10/5/2018 at 3:06 PM, SweeTs said:

Pointless. It's supposed to be a S grade zone, so if someone choose to use A grade item or whatever, it's his stupidity, disadvantage. So, I would simply use only S check.

Expand  

If he want only S-Grade and the server it's retail armors, Frintezza neck, Queen Ant Ring/DC/Tallum Robe, will be available.. He said restrict for all, armor/weps etc.. So, he need the check. Only in .command, will be bug.

  • 0
Posted
  On 10/5/2018 at 4:28 PM, 'Baggos' said:

Only in .command, will be bug

Expand  

No it will not be a bug, it's people choice if they want LATER equip lower grade / weaker weapon (they will not). The only restriction which is legit is to check if they should be able to enter. What they do inside, we should not care. Crappy check regarding grade equip may bring more cons than pros :D

  • 0
Posted

God. Test, don't ask, don't wait for an answer. Yes, my code checks if you have equipped S armor and weapon. 

  • 0
Posted

SweeTs for fucking god sake do something..  the guy is amateur as fuck its not about java anymore 2 pages we tell him to change Player to L2PcInstance and he can't realise it. 

Guest
This topic is now closed to further replies.

  • Posts

    • 𝐋𝐈𝐍𝐄𝐀𝐆𝐄 𝐈𝐈 𝐂𝐋𝐀𝐒𝐒𝐈𝐂 𝐄𝐈𝐍𝐇𝐎𝐕𝐀𝐍𝐓   Are you ready to relive the true Classic Lineage 2 experience? Our server brings you a hardcore x1 rate with a modern twist—a vitality system that helps casual players keep up!   🛡 Key Features: ✅ No Dualboxing – Every player controls only one character, making party play and community interaction stronger! ✅ Classic Chronicles 1.0 → 2.5 – Start from the very beginning and experience the progression up to Chronicle 2.5! ✅ Improved Buff System & Support Classes – Get the most out of your character with a reworked buff system and enhanced support classes. ✅ New & Reworked Skills – All classes have received updates, balancing the game and bringing fresh mechanics! ✅ Motivating Gameplay – Designed to keep you engaged and progressing, without feeling like an endless grind! 📖 Don't miss out on reading the wiki with all the new features that have been added to the gameplay!   🎉 Server launched on February 7th! Join now and be part of an active, competitive, and passionate community! Links: https://l2einhovant.net https://discord.com/invite/l2einhovant  
    • Change Of Heart Event is now available!     This weekend's mini event will merge with an  all-time classic event. Available 14-16 Feb. -Change of Hearts  classic event is enabled . -Inventory space increased by 10  -Elemental stones  & Raid drops increased by 10% -There is a small chance to fully recover your vitality while taking down monsters Change of hearts classic event details: -Monsters drop heart pieces with a 20% chance. -Collect the full set of 9 pieces and play a game: 1 win: L2Day buff scrolls 2 wins: Greater Potions 3 wins: x1  Blessed Scroll of Escape 4 wins: x1  Blessed Scroll of Resurrection 5 wins: x2  Scroll: Enchant Weapon (C) 6 wins: x4  Scroll: Enchant Armor (B) 7 wins: x1  Scroll: Enchant Weapon (B) 8 wins: x3  Scroll: Enchant Armor (A) 9 wins: x1  Scroll: Enchant Weapon (A) 10 wins: x2  Scroll: Enchant Armor (S) 11 wins: x1 Scroll: Enchant Weapon (S) & 20% Chance to get TOP A weapon Connect -> https://vanilla.playinera.com/connect/ Discord: https://discord.com/invite/WD8fWf5  
    • thanks. for a moment i thought you were on the side of evil.
  • Topics

×
×
  • Create New...