Jump to content
  • 0

is this correct?


Question

Posted

public List<FakePlayer> getFakePlayers() {
        return World.getInstance().getPlayers().stream().filter(x -> x instanceof FakePlayer && !x.isInsideZone(ZoneId.PEACE)).map(x -> (FakePlayer) x)

 

i want to get the count of fakeplayers that are not inside a peacefull zone

5 answers to this question

Recommended Posts

  • 1
Posted

If you want only the count and not a list with all those fakes, change the return type to long (since you are looking for a value) and use the method .count()

 

public long getFakePlayers() 
{
    return World.getInstance().getPlayers().stream().filter(x -> x instanceof FakePlayer && !x.isInsideZone(ZoneId.PEACE)).count();
}

  • 0
Posted (edited)
On 12/17/2020 at 8:31 AM, arm4729 said:

public List<FakePlayer> getFakePlayers() {
        return World.getInstance().getPlayers().stream().filter(x -> x instanceof FakePlayer && !x.isInsideZone(ZoneId.PEACE)).map(x -> (FakePlayer) x)

 

i want to get the count of fakeplayers that are not inside a peacefull zone

Just collect them to list

Edited by Zake
  • 0
Posted (edited)

hey thank you i was after many minutes of trying to make 2 separate task for walkers and others 

8 hours ago, melron said:

If you want only the count and not a list with all those fakes, change the return type to long (since you are looking for a value) and use the method .count()

 

public long getFakePlayers() 
{
    return World.getInstance().getPlayers().stream().filter(x -> x instanceof FakePlayer && !x.isInsideZone(ZoneId.PEACE)).count();
}

i need a list to make all fakeplayers that are inside town to use a other separate aitask from players that are in combat zone , i am trying to spawn 100 bots ... 30 in town and 60 in lets say monastery of sillence and pagans temple i want to get best performance out of them because sometime they get stuck and get an error in console about aitask 

 

 

i changed this and i google it a bit , i was trying to get best performance for 100 spawned bots do you have any suggestions ? 

 

 

# Specifies how many threads will be in a single scheduled pool.
ThreadsPerScheduledThreadPool = 33 (it was 4)

# Determines the amount of instant thread pools. If set to -1, the server will decide the amount depending on the available processors.
InstantThreadPoolCount = -1

# Specifies how many threads will be in a single instant pool.
ThreadsPerInstantThreadPool = 33 (it was 8)

and im using separate iterations for walkers and others that are in combat

    private final int aiTaskRunnerInterval = 180;
    private final int _playerCountPerTask = 193; (this is combaT)

 

    private final int aiTaskRunnerInterval = 4800;
    private final int _playerCountPerTask = 93;(this is walkers)

 

i dont know if im doing something good here but bots are running better 

cpu dual core 2.39ghz

Edited by arm4729
  • 0
Posted
16 minutes ago, arm4729 said:

hey thank you i was after many minutes of trying to make 2 separate task for walkers and others 

i need a list to make all fakeplayers that are inside town to use a other separate aitask from players that are in combat zone , i am trying to spawn 100 bots ... 30 in town and 60 in lets say monastery of sillence and pagans temple i want to get best performance out of them because sometime they get stuck and get an error in console about aitask 

 

 

Can you explain it better? You need to move out of town 60 bots at different locations OR to 'create' 100 bots (30 spawn at town, 60 at not peace zones) ?

 

  • 0
Posted (edited)

i need to know what number to set iterations and threadpool settings for 2.39 ghz dual core / 100 bots spawned 

Edited by arm4729

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

    • Hello everyone, we are one of the top gaming currency stores. We work exclusively with top projects. If you are interested in anything like Adena, Coins, Equip, write to us Discord - pchelacoin Telegram - https://t.me/ipchelacoin BOHPTS, KETRAWARS, EURO-PVP, L2REBORN, E-GLOBAL, LA2DREAM TOP PRICE !!!!!!!
    • L2Elixir – Patch 4 Is Live!   We’re working non-stop, day and night, to deliver the best possible quality and bring back what made L2Elixir special. This project is built with passion, not shortcuts — for the old-school players who remember, and the new ones who want to experience it properly. Thank you for being part of the journey. Together, we’re making L2Elixir great again ❤️ The legends never fade.    ⚙️ General Enabled Class Change service (same class type only) ALT + B → Services → Character Development Enabled Shift + Click on Treasure Chests Players can now identify real chests (Adena, scroll drops) and use Key / Unlock Event deaths now cancel only debuffs, All self buffs are preserved, fixes issues with Root and similar effects Bladedancer class can now log in even when Max Clients (2) is reached. Since an active Bladedancer is not available for every damage dealer and some players tried to abuse this via VPN or a second PC, this feature was added to keep things fair. protections applies, requires testing!    🎒 Items Crystallizing enchanted items now gives the correct increased crystal amount (retail-like behavior) Removed Agathion Seal Bracelet: Rudolph from Santa rewards (Gracia Final item) Added Dualsword Craft Stamp into Milestone Exchange list    🧙 Skills Fixed Banish Undead lethal chance Hot Springs Malaria and similar effects now level up faster while being attacked
    • thats new SEO level tricks you know nothing of noob - bottom line: exposed.
  • 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