Jump to content
  • 0

Some checks in party


Question

Posted

Hello,

 

I want to know if it's possible to make a check for quests.

 

For example, if the party is constitued of a healer and a buffer (like BS/SWS/PP), the party can port to a location?

 

Cordially,

Bleadd

7 answers to this question

Recommended Posts

  • 0
Posted

you can get the party from l2pcinstance and just make a for each loop with 2 flags initialized to false and turn them true when you find healer/buffer

  • 0
Posted

if i understand well you want to check the party if have some classes , if yes teleport the whole party some where?

If yes , just create a loop in the party and check the ids you want , if they have these ids teleport the whole party somewhere.

 

for(L2PcInstance j : player.getParty().getPartyMembers()){
        	int id = j.getClassId().getId();
        	if(id == 1|| id == 2){
        		for(L2PcInstance g :player.getParty().getPartyMembers())
        			g.teleToLocation(x, y, z);
        		
        	  break;		
        	}
        	
        }

  • 0
Posted

It won't work exactly as you want, if you want both a buffer AND healer you have to "memorize" on 2 booleans. If at least one of them is false, then return.

 

Atm Iracundus's code works either if you got only a buffer or an healer. Not both. Added to that you can put

L2Party party = player.getParty().getPartyMembers()

and reuse it ;p.

  • 0
Posted

It won't work exactly as you want, if you want both a buffer AND healer you have to "memorize" on 2 booleans. If at least one of them is false, then return.

 

Atm Iracundus's code works either if you got only a buffer or an healer. Not both. Added to that you can put

L2Party party = player.getParty().getPartyMembers()

and reuse it ;p.

yes.

or he can create 2 integers for each one class and combine them  ;D

  • 0
Posted

Just create a Map or something with the ID's of the classes you required. Use an iterator to go across the table and see what's avaliable in the players part. Worse case secenerio theres like ~100 (or however many classes) * 9, which is only 900 iterations, which is almost nothing.

  • 0
Posted

I've change the code . But in the for i have 2 booleans. Boolean go true if found id of healers && other boolean go true if found a buffer.

 

And after the for if the 2 booleans are true, i port the team. It works so it's fine :)

Guest
This topic is now closed to further replies.


  • 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