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

    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • We will help you pass verification on any service or application you need! Fast, reliable, and secure. Pay for the first verification and get a 10% discount on the second one. Learn more: Go to
    • We will help you pass verification on any service or application you need! Fast, reliable, and secure. Pay for the first verification and get a 10% discount on the second one. Learn more: Go to
    • Long-term rental of virtual numbers — maximum control and convenience. No need to change numbers every time or worry about losing access anymore. Now you can rent virtual numbers for hours, days, or months and use them as permanent ones: — stable SMS reception from popular services — permanent access to accounts — an ideal solution for registration, verification, and repeated logins — one number — full control for the entire rental period This is the choice for those who value reliability, uninterrupted access, and predictable results. Important: even many top SMS services are unable to offer such an exclusive long-term rental option. Go to the SMS service
    • We are looking for partners and account suppliers for cooperation We are open to partnerships with reliable account suppliers for the following dating services: ➡ Tinder ➡ Badoo ➡ Bumble ➡ Hinge ➡ Happn ➡ Meetic ➡ VK Dating We are considering long-term cooperation, stable volumes, and mutually beneficial terms. If you have any offers, we will be glad to discuss the details. Contact us using the details below. ➡ 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