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

    • Hello,iv got fafurion running localy just for fun and seems that files dont have geodata couse i can hit through walls so are mobs.Anyone can tell me how to activate geodata or where to insert geodata files?
    • L2Extend_Server_by_Guytis_Rev_201.rar Trojan:Script/Sabsik.FLA!ml   LOL
    • Good luck with your g/o 😃
    • You're talking complete nonsense. The source code of SphereAPI, which handles all requests, is closed and has never been published anywhere.     That return $this doesn't affect anything, PHP just ignores it. Why are you showing it?     Yes, of course I want that, and I’m asking you — go ahead and hack it, I’d even be thankful. The most you can probably do is launch a DDoS attack, but that’s not hacking. The IP you see is just a public one, used by default to handle requests. There are many other IPs involved, which aren’t disclosed for privacy reasons. So, when should I expect your hacker attack? If you fail, it means you talked big for nothing. I hope you're not all talk and can actually back up your words. UPD: To make your task easier, I have disabled limits on incorrect and failed requests, so your site/IP won't get blocked.
    • Lineage2Dex Interlude+ x50 Server launches TODAY!       The wait is over – the Lineage2Dex Interlude+ x50 Server launches TODAY! Grand Opening - April 26 at 19:00 (UTC+3) Over 10,000 registered accounts are ready to dive in! Beta with massive activity over, thx all who participate on it! It's time to begin your real Jorney! 👉 Read full roadmap 👉 Full server description 👉 Download and registration The server will be split into 3 stages, each featuring multiple content episodes. Stage 1: April 26 – May 18 Welcome to the Classic Interlude Phase. This stage is built with minimal custom content, focused on delivering that pure Interlude experience. It’s perfect for both new players unfamiliar with our project and veterans who enjoy a traditional start. Expect a smooth and nostalgic journey with familiar mechanics. Stage 2: May 19 – June 22 Time to expand the world! As most Interlude content gets completed, we gradually introduce new elements. Hellbound will open first, followed by weekly content updates. Midway through this stage, the Isle of Prayer will become available — a new zone featuring Dynasty Gear and fresh challenges. Stage 3: From June 23 Welcome to full content access! Some location become to High-level location, offering great reward! Once this phase concludes, a full merge with Union server will take place — and yes, all your characters and items will carry over safely. We wish everyone a smooth start, fair play, and tons of fun on the new x50 server! See you in-game!
  • Topics

×
×
  • Create New...