Jump to content
  • 0

2 Healer Same party


testaroaverta

Question

i have heal panalty when 2 healers in same party (cardinal - shillien - evas)

i need to remove this penalty and make it 2 healer in same pt no heal penalty cardinal-evas or cardinal shillien...

cardinal with cardinal should have heal penalty.. or 3 healers 

https://pastebin.com/Yrnpbquc

 

sorry for my bad english

 

Edited by testaroaverta
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

if (party.getMembers().stream().filter(k -> k.getClassId() == (ClassId.CARDINAL)).count() >= 2)

 

you better make the party allow only 2 healers maximum , its better because many ppl will get trolled if you only make healing power lower without notifications etc...

Link to comment
Share on other sites

  • 0

Edit and introduce getClassId() checks here :

 

        if (activeChar.getParty() != null) {
            for (L2PcInstance player : activeChar.getParty().getPartyMembers()) {
                if (player != null && player.isHealerClass()
                        && !player.isInStance()) {
                    healers++;
 
                    if (minus != 2
                            && (player.getPvpFlag() != 0 || player.getKarma() > 0
                        minus = 2;
                }
            }
        }

 

 

There are no easy ways to do it, so it gonna be messy if your point is to checks all classes.

Edited by Tryskell
Link to comment
Share on other sites

  • 0
17 minutes ago, Tryskell said:

Edit and introduce getClassId() checks here :

 

        if (activeChar.getParty() != null) {
            for (L2PcInstance player : activeChar.getParty().getPartyMembers()) {
                if (player != null && player.isHealerClass()
                        && !player.isInStance()) {
                    healers++;
 
                    if (minus != 2
                            && (player.getPvpFlag() != 0 || player.getKarma() > 0
                        minus = 2;
                }
            }
        }

 

 

There are no easy ways to do it, so it gonna be messy if your point is to checks all classes.

 

not really. its not as messy as it seems

 

image.thumb.png.62c5dd427c3eb64d27545e0bf17033af.png

 

reuse canClassIdJoin on:

L2PcInstance@addSubClass

L2PcInstance@modifySubClass

L2PcInstance@setActiveClass

 

The above codes are battle tested on my live server, you can thank me later 🙂

Link to comment
Share on other sites

  • 0
4 hours ago, xdem said:

 

not really. its not as messy as it seems

 

image.thumb.png.62c5dd427c3eb64d27545e0bf17033af.png

 

reuse canClassIdJoin on:

L2PcInstance@addSubClass

L2PcInstance@modifySubClass

L2PcInstance@setActiveClass

 

The above codes are battle tested on my live server, you can thank me later 🙂

 

Well, calling 6 times (for 2nd and 3rd classes) a method is what I would call messy :).

 

You can eventually put parameter as "ClassId..." to cut the calls.

 

Also, in your exemple canClassIdJoin can be

 

return getMemberCount(classId) < classId.getPartyLimit();

 

Link to comment
Share on other sites

  • 0
6 hours ago, Tryskell said:

 

Well, calling 6 times (for 2nd and 3rd classes) a method is what I would call messy :).

 

You can eventually put parameter as "ClassId..." to cut the calls.

 

Also, in your exemple canClassIdJoin can be

 

return getMemberCount(classId) < classId.getPartyLimit();

 

 

my canClassIdJoin has more lines which I removed for the sake of this example

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


  • Posts

    • Totally understood. You are right. I am not denying the time and the effort that you guys have poured in learning and developing yourselves as able devs. If I am not a learner then I would have bought a ready solution like korean client worked-out (not sure if there is. I have never tried to look for) Frankly, I have never bought any packs or some stuffs but just been working on a pure pack from l2j by myself. Actually I am not asking you guys to do everything for me. I just looked for a clue to solve my problem. (I am a korean and there is no korean community for l2j developing) I searched this forum for related articles and found some but all the instructions were just from normal users, not devs. They just shared their thoughts or opinions not apt informations. Namely, I could not get any clue for my problem.   Anyways, I already gave up to mod client due to lack of informations and knowleges. Have a good day brother.
    • Hi, I have seen in l2gold.in that there is an item that when clicked spawns a mob/raid_boss ramdom, this is edited from the ai or you have to create a mod in extender?, I am using the Dandiarena datapack.   I have seen the skill to spawn a pet with an item (dragon flaute) and I have seen the s_skill to spawn the unicorns (elemental summoner), I tried to create a s_summon of a raid boss but it threw error, for this reason I decided to come here to ask, this can help many people.   --------------------------------------------------------------------------------------------------------------------------------   SPAWN CAT: skill_begin    skill_name=[s_summon_blackcat1]    /* [쀜뀼 삣 끔 삣] */    skill_id=1111    level=1    operate_type=A1    magic_level=20    effect={{i_summon;[cat_the_cat_a];70;[crystal_d];0}}    operate_cond={{can_summon}}    is_magic=1    mp_consume1=8    mp_consume2=31    item_consume={[crystal_d];3}    cast_range=-1    effective_range=-1    skill_hit_time=15    skill_cool_time=0    skill_hit_cancel_time=0.5    reuse_delay=21600    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none;@ride_wind;@ride_star;@ride_twilight}    skill_end   SPAWN ITEM (DB +10): skill_begin    skill_name=[s_en_draconic_bow_focus_10_box]    /* [Box with Draconic Bow Focus + 10] */    skill_id=10043    level=1    operate_type=A1    magic_level=1    effect={{i_add_enchanted_item;7577;10}}    is_magic=0    mp_consume2=0    item_consume={[en_draconic_bow_focus_10_box];1}    cast_range=-1    effective_range=-1    skill_hit_time=0.2    skill_cool_time=0    skill_hit_cancel_time=0    reuse_delay=0    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none;@ride_wind;@ride_star;@ride_twilight}    skill_end   DRAGON FLAUTE: skill_begin    skill_name=[s_wolf_collar]    /* [Modified 15 May 2009 18:44] */    skill_id=2046    level=1    operate_type=A1    magic_level=1    effect={{i_summon_pet}}    operate_cond={{can_summon_pet};{op_not_territory;{{51341;218103;-3252;-2932};{53341;218103;-3252;-2932};{53341;220103;-3252;-2932};{51341;220103;-3252;-2932}}}}    is_magic=0    mp_consume2=0    cast_range=-1    effective_range=-1    skill_hit_time=5    skill_cool_time=0    skill_hit_cancel_time=0.5    reuse_delay=0    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none}    skill_end     ITEM WITH RAMDOM DROP (GIFT/BOX): skill_begin    skill_name=[s_ingredient_box_1]    /* [샜쁽쁘 상삐] */    skill_id=2175    level=1    operate_type=A1    magic_level=1    effect={{i_restoration_random;{{{{[blood_root];2}};20};{{{[sulfur];2}};20};{{{[infernium_ore];1}};35};{{{[demons_blood];2}};25}}}}    is_magic=2    mp_consume2=0    item_consume={[ingredient_box];1}    cast_range=-1    effective_range=-1    skill_hit_time=0    skill_cool_time=0    skill_hit_cancel_time=0    reuse_delay=0    attribute=attr_none    effect_point=0    target_type=self    affect_scope=single    affect_limit={0;0}    next_action=none    ride_state={@ride_none;@ride_wind;@ride_star;@ride_twilight}    skill_end   --------------------------------------------------------------------------------------------------------------------------------   SPAWN RAID BOSS/MOB W/ ITEM: ??? HELP!     --------------------------------------------------------------------------------------------------------------------------------   I am learning how to create an OFF server, but I have many doubts, I would like you to guide me, I would appreciate it very much!    
    • Hello, is possible any effect spawn raid boss/mobs?
    • wts 100kk adena set mj light unsealed set nightmare sealed set tallum heavy unsealed set jewels tts unsealed! soul bow ITEMS C GRADE  l2reborn origins x1
    • WTB AQ Reborn Origins x1  Only middleman.  discord: Mr.Saran#1369
  • 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