Jump to content
  • 0

I need info about create an effect to be seen only by party


Question

Posted (edited)

As title say guys

 

only party members can see it when we use a skill

 

any idea ? i try to understand hide skill is similar but no idea

Edited by GsL

Recommended Posts

  • 0
Posted
8 minutes ago, GsL said:

i need it when a X skill effected is active plus this dont work 

then you can maybe just make the skill a party skill, or do you want only the party to see its effect?

  • 0
Posted
Just now, nikpappa said:

then you can maybe just make the skill a party skill, or do you want only the party to see its effect?

only party can see it..

  • 0
Posted

then i think it is simpler, you can go to Creature class or L2Character (differs between packs) and go to the broadcastPacket method which is called when a skill is being casted, there you will add an if with the skill's id you want to be broadcasted only to party members and if the player that casts it is in a party then you will only broadcast it for those members

  • 0
Posted (edited)

The 50% of the solution is already posted before. The other 50% is located at your CharInfo.java.

You have to edit this server packet too, just because after you done with this skill,effect ... The time you will user any other skill that is a 'normal' one like battle heal for example, it will broadcast all your  abnormal effects to your knownlist. 

Edited by melron
  • 0
Posted
On 5/10/2021 at 11:03 PM, melron said:

The 50% of the solution is already posted before. The other 50% is located at your CharInfo.java.

You have to edit this server packet too, just because after you done with this skill,effect ... The time you will user any other skill that is a 'normal' one like battle heal for example, it will broadcast all your  abnormal effects to your knownlist. 

 

 

// Send a packet starting the casting.
        final int actionId = caster.isSummon() ? ActionData.getInstance().getSkillActionId(_skill.getId()) : -1;
        if (!_skill.isNotBroadcastable() || ((_skill.getId() != 10033) || ((_skill.getId() != 10032) && caster.isInParty())))
        {
            caster.broadcastPacket(new MagicSkillUse(caster, target, 0, 0, displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
        }

 


 

this 

 

 

and on char info this 

 

 

    final Set<AbnormalVisualEffect> abnormalVisualEffects = _player.getEffectList().getCurrentAbnormalVisualEffects();
        packet.writeD(abnormalVisualEffects.size() + (_gmSeeInvis ? 1 : 0)); // Confirmed
        // boolean party = _player.isInParty();
        // packet.writeD(abnormalVisualEffects.size() + (party ? 1 : 0));
        for (AbnormalVisualEffect abnormalVisualEffect : abnormalVisualEffects)
        {
            packet.writeH(abnormalVisualEffect.getClientId()); // Confirmed
        }
        if (_gmSeeInvis)
        {
            packet.writeH(AbnormalVisualEffect.STEALTH.getClientId());
        }
        if (!_player.isInParty())
        {
            packet.writeH(AbnormalVisualEffect.IN_A_DECAL.getClientId());
        }


This don't work forgot to say*

  • 0
Posted
8 minutes ago, iTopZ said:

This is so funny, so this guy leaves bad comments on @Kara for shared codes while cant handle a limit on effect. amazing!

 

Did I say somewhere I sell codes ?

  • 0
Posted

🙈you try to ruin another mans store with your good knowledge of what is shared or not and now you ask for help 🙉

 

🙊

 

see you're funny 🙂

  • 0
Posted

L2Party.java create a method broadcastToParty

public void broadcastToParty(final GameServerpacket gsp)
{
    for (final var member : getPartyMembers())
    {
        member.sendPacket(gsp);
    }

}

L2PcInstance create a method broadcastToMyParty

public void broadcastToMyParty(final GameServerPacket gsp)
{
    final var party = getParty();
    
    if (party != null)
        party.broadcastToParty(gsp);
    else
        sendPacket(gsp);
}

L2SkillTemplate.java create method isPartyBroadcast

final boolean _partyBroadcast;

constructor:
    _partyBroadcast = set.getBoolean("PartyBroadcast", false);
    
getter

    public boolean isPartyBroadcast()
    {
        return _partyBroadcast;
    }

L2Character.java find this (more than one)
broadcastPacket(new MagicSkillUse(...));

change it to

if (skill.isPartyBroadcast())
    broadcastToMyParty(new MagicSkillUse(...));
else
    broadcastPacket(new MagicSkillUse(...));

 

 

PS: No need to thank me, please don't talk shit about me next time Cheers

  • 0
Posted
2 hours ago, iTopZ said:

🙈you try to ruin another mans store with your good knowledge of what is shared or not and now you ask for help 🙉

 

🙊

 

see you're funny 🙂

 

Really ? 

 

 

1 hour ago, xdem said:

L2Party.java create a method broadcastToParty

public void broadcastToParty(final GameServerpacket gsp)
{
    for (final var member : getPartyMembers())
    {
        member.sendPacket(gsp);
    }

}

L2PcInstance create a method broadcastToMyParty

public void broadcastToMyParty(final GameServerPacket gsp)
{
    final var party = getParty();
    
    if (party != null)
        party.broadcastToParty(gsp);
    else
        sendPacket(gsp);
}

L2SkillTemplate.java create method isPartyBroadcast

final boolean _partyBroadcast;

constructor:
    _partyBroadcast = set.getBoolean("PartyBroadcast", false);
    
getter

    public boolean isPartyBroadcast()
    {
        return _partyBroadcast;
    }

L2Character.java find this (more than one)
broadcastPacket(new MagicSkillUse(...));

change it to

if (skill.isPartyBroadcast())
    broadcastToMyParty(new MagicSkillUse(...));
else
    broadcastPacket(new MagicSkillUse(...));

 

 

PS: No need to thank me, please don't talk shit about me next time Cheers

public void broadcastToParty(final IClientOutgoingPacket[] gsp)
    {
        for (final var member : getMembers())
        {
            member.sendPacket(gsp);
        }

    }

 

{gr]

 

epidi einai mobius i paparia exeis idea pws kanw adapt edw?

  • Sad 1
  • 0
Posted
11 minutes ago, GsL said:

 

Really ? 

 

 

public void broadcastToParty(final IClientOutgoingPacket[] gsp)
    {
        for (final var member : getMembers())
        {
            member.sendPacket(gsp);
        }

    }

 

{gr]

 

epidi einai mobius i paparia exeis idea pws kanw adapt edw?

public void broadcastToParty(final IClientOutgoingPacket[] gsp)

 

alakse to se

 

public void broadcastToParty(final IClientOutgoingPacket ... gsp)

  • 0
Posted
6 minutes ago, xdem said:

public void broadcastToParty(final IClientOutgoingPacket[] gsp)

 

alakse to se

 

public void broadcastToParty(final IClientOutgoingPacket ... gsp)

L2SkillTemplate  == SkillCaster tha les logika ?

  • 0
Posted
2 minutes ago, GsL said:

L2SkillTemplate  == SkillCaster tha les logika ?

SkillTemplate sto mobius

  • 0
Posted (edited)
10 hours ago, xdem said:

SkillTemplate sto mobius

skill apla prepei na legete , nmz to fixara

 

to last part 

L2Character.java find this (more than one)
broadcastPacket(new MagicSkillUse(...));

change it to

if (skill.isPartyBroadcast())
    broadcastToMyParty(new MagicSkillUse(...));
else
    broadcastPacket(new MagicSkillUse(...));

 

 

prepei na exei parei auto apo to l2character k na to exei balei sto skillcaster  o mobius

opote paw ekei k kanw to check

 

example pws einai 

 

 

    // Send a packet starting the casting.
        final int actionId = caster.isSummon() ? ActionData.getInstance().getSkillActionId(_skill.getId()) : -1;
        
        if (!_skill.isNotBroadcastable())
        {
            caster.broadcastPacket(new MagicSkillUse(caster, target, 0, _skill.getDisplayId(), displayedCastTime, reuseDelay, _skill.getReuseDelayGroup(), actionId, _castingType));
        }
        
        if (caster.isPlayer() && !instantCast)
        {
            // Send a system message to the player.
            caster.sendPacket(_skill.getId() != 2046 ? new SystemMessage(SystemMessageId.YOU_USE_S1).addSkillName(_skill) : new SystemMessage(SystemMessageId.SUMMONING_YOUR_PET));
            
            // Show the gauge bar for casting.
            caster.sendPacket(new SetupGauge(caster.getObjectId(), SetupGauge.BLUE, displayedCastTime));
        }

 

 

[gr]

 

arxidia , zitaei k alla sto skillcaster , to mobius to exei allaksi entelos , plus eixa kataferi na kripso ta animation alla to thema einai oti einai abnormal effect k auto fenete gt to thelw na einai monimo panw stous players k auto fenete akoma k an to ekriba

 

kserw oti m ena 10-15e to exw .. fraga exw .. alla ithela to gamidi na to codaro egw 😕

 

 

Edited by GsL
  • Sad 1
  • 0
Posted (edited)

 

16 hours ago, iTopZ said:

This is so funny, so this guy leaves bad comments on @Kara for shared codes while cant handle a limit on effect. amazing!

 

[Offtopic] I'm sorry, i'm way too successful seller/developer in this forum to try even observe tiny people. ☺️ [/Offtopic]

 

PS. Someone tell that low GsL that this is EN section and greek is not allowed.

Edited by Kara
Guest
This topic is now closed to further replies.

×
×
  • Create New...