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 (edited)
3 minutes ago, InFocus said:

i didnt give you this line...

 

check again

return Arrays.asList(getInventory().getItems()).stream().filter(i -> i.isEquipped() && i.getItem().getCrystalType() == type).findAny().isPresent();

 

Edited by melron
  • 0
Posted
3 minutes ago, melron said:

What about a small refactored code?

 

https://imgur.com/a/WlU1ThX

 

@InFocus

use this

 

 

The millisecond is because of the printLn. If you remove printLn you will see that there is no difference. And even if there is a 30 millisecond difference do you know what 30 millisecond mean?  It's the 0.03 of a second. Your neurotransmitters pass a signal though in 0.6 millisecond. The code is execute faster than this. 

 

  • 0
Posted
1 minute ago, Kara` said:

 

The millisecond is because of the printLn. If you remove printLn you will see that there is no difference. And even if there is a 30 millisecond difference do you know what 30 millisecond mean?  It's the 0.03 of a second. Your neurotransmitters pass a signal though in 0.6 millisecond. The code is execute faster than this. 

 

thats why i didnt even touch the code because the difference for what he needs is absolutely 0. but lets get real, the correct syntax is not the one you posted

  • 0
Posted
1 minute ago, melron said:

thats why i didnt even touch the code because the difference for what he needs is absolutely 0. but lets get real, the correct syntax is not the one you posted

 

It's corrent no matter what. If you dig so far then the syntax of java as a language is not correct and we should wait for jdk 12 update. Now if you want dig so far for 30 millisecond go ahead i dont care Melronious Melroni.

  • 0
Posted
2 minutes ago, Kara` said:

 

It's corrent no matter what. If you dig so far then the syntax of java as a language is not correct and we should wait for jdk 12 update. Now if you want dig so far for 30 millisecond go ahead i dont care Melronious Melroni.

Did you change your try() style or... ?

  • 0
Posted
Just now, melron said:

Did you change your try() style or... ?

 

Depends if i wake up, drink my tea, sit on PC, open maxcheaters and the first thing i see is a post of yours then nop. 

But most of the times. I had even difficult time moving from normal for to lambda even tho lambda is slower for 1 millisecond :'(

 

  • 0
Posted
else if (activeChar.hasGradeEquipped(CrystalType.S))
			{
				activeChar.sendMessage("You don't have equiped with S grade");
				return false;
			}
+

public boolean hasGradeEquipped(CrystalType s)
	{
		return Arrays.asList(getInventory().getItems()).stream().filter(i -> i.isEquipped() && (i.getItem().getCrystalType() == s)).findAny().isPresent();
	}

I no have any items S in inventory and i can teleport. Why?

  • 0
Posted (edited)
1 minute ago, InFocus said:

What's wrong :))))))))))))))) except my english

The only wrong here, is your english mate...

 

the code is working like this:

 

if the player have ATLEAST 1 item S grade equiped he CANT teleport

 

What you mean you havent items in your inventory?

Edited by melron
  • 0
Posted

Melron , Melron :) I want to say IF player have the LAST item S grade in inventory CAN teleport in that zone!!!

With 0 items s grade, i want player can't enter ! :) 

  • 0
Posted (edited)

For exemple, if player have full Draconic armor (Doesn't metter if it's light or heavy)  and no have weapon (S grade:) ) he can not enter

Edited by InFocus
Guest
This topic is now closed to further replies.



  • Posts

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
  • 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