Jump to content
  • 0

Latest Revision Ctf Errors..!


Question

Posted

Hello... so i updated my pack (L2j) with the latest revision (skill and effect system complete rework)

and i have these problems on CTF.java:

 

for (AbstractEffect e : summon.getAllEffects())
{
if (e != null)
{
e.exit();
}
}
 
also i've solved an error by my own but didn't test it... is it ok?

AbstractEffect eInvisible = _player.getFirstEffect(L2EffectType.HIDE);
 
to
 
AbnormalType eInvisible = AbnormalType.HIDE;

i will appreciate your help! :)

Recommended Posts

  • 0
Posted (edited)

What about changing AbstractEffect to L2Effect? Last rev of unstable or stable...?

Edited by ^Wyatt
  • 0
Posted (edited)

What about changing AbstractEffect by L2Effect? Last rev of unstable or stable...?

unstable... and L2Effect renamed with AbstractEffect..!

Edited by xXObanXx
  • 0
Posted

 

Try with

CharEffectList e : summon.getEffectList()

error (Can only iterate over an array or an instance of java.lang.Iterable)

on summon.getEffectList()

  • 0
Posted

Replace the whole loop for :
 

summon.stopAllEffects();

Finale if you want to access getEffectList(), and notably if you know it's a buff, debuff, etc, you should access it via the internal map. For instance, retrieveing all buff effect types should be called like that :

summon.getEffectList().getBuffs().values()

An important note, it returns BuffInfo type.

  • 0
Posted (edited)

Oh shit, the loop's purpose was to just stopAllEffects() ? dafuq I should start reading, just do what tryskell said.

I thought it had some checks  :rage:

Edited by ^Wyatt
  • 0
Posted (edited)

Replace the whole loop for :

 

summon.stopAllEffects();

Finale if you want to access getEffectList(), and notably if you know it's a buff, debuff, etc, you should access it via the internal map. For instance, retrieveing all buff effect types should be called like that :

summon.getEffectList().getBuffs().values()

An important note, it returns BuffInfo type.

correct me if i'm wrong... is it ok?

 

from this:

if (player.getSummon() != null)
{
L2Summon summon = player.getSummon();
for (BuffInfo e : summon.getEffectList().getEffects())
{
if (e != null)
{
e.stopAllEffects(false);
}
}

if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
} 

to this:

if (player.getSummon() != null)
{
L2Summon summon = player.getSummon();
summon.stopAllEffects();
summon.getEffectList().getBuffs().values();

if (summon instanceof L2PetInstance)
{
summon.unSummon(player);
}
}
Edited by xXObanXx
  • 0
Posted

Haha :D.

 

About HIDE stuff, what is it supposed to do ? What is the original code, what do you want to do ?

about hide i replaced the original code with this

AbnormalType eInvisible = AbnormalType.HIDE;

(didn't test it yet)

  • 0
Posted (edited)

You probably want to do :

final L2Summon summon = player.getSummon();
if (summon != null)
{
    // Unsummon if it was a pet, otherwise clean current effects.
    if (summon.isPet())
        summon.unSummon(player);
    else
        summon.stopAllEffects();
}

- Latest L2J don't use instanceof anymore. You still can use, but well.

- No use to clean effects on pets as you unsummon them (not useful).

 

About

summon.getEffectList().getBuffs().values();

I was simply saying effects have been reworked, and now you can use preformated data (in that case, it returns current buffs effects from the summon). It hasn't to be part of your code. I just gave an exemple to retrieve active buffs effects. And btw you lacked a :

List<BuffInfo> list = summon.getEffectList().getBuffs().values();

 to store it... What you did was useless, if not worst :D.

 

About hide, I want original code and where it is used. What you did is wrong. Before the point of that code was to retrieve if player was under a HIDE effect, now you messed.

Edited by Tryskell
  • 0
Posted (edited)

 

About hide, I want original code and where it is used. What you did is wrong. Before the point of that code was to retrieve if player was under a HIDE effect, now you messed.

Original line:

L2Effect eInvisible = _player.getFirstEffect(L2EffectType.HIDE);

replaced with:

AbnormalType eInvisible = AbnormalType.HIDE;

the whole code is:

                // If player is invisible, make them visible
		if (_player.getAppearance().getInvisible())
		{
			@SuppressWarnings("unused")
			AbnormalType eInvisible = AbnormalType.HIDE;
		}
Edited by xXObanXx
  • 0
Posted

@Tryskell

I don't think it's useless to remove buffs from pets that will be unsummoned. If they didn't change it, as far as I remember... in l2jserver when you unsummon a pet, buffs are stored.

  • 0
Posted

@Tryskell

I don't think it's useless to remove buffs from pets that will be unsummoned. If they didn't change it, as far as I remember... in l2jserver when you unsummon a pet, buffs are stored.

 

It's a ctf, and that section is probably sent when character enters the event. There's no use to clean pet buffs. The only stuff to verify is the possibility to get a pet while being in ctf event (no possibility to summon).

 

@topic author, I want the use of eInvisible.

Guest
This topic is now closed to further replies.


  • Posts

    • Our sales are ongoing. Bump. 02 July 2025 Telegram: ContactDiscordAccS
    • Our sales are ongoing. Bump. 02 July 2025 Telegram: ContactDiscordAccS
    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt 🔧 Development Repository (SVN) GX-EXT supports open, collaborative, and professional development. That’s why we provide access to our public SVN repository where you can:   ✅ Compile your own version of the project ✅ Optimize and extend its features ✅ Learn from real production-quality source code   🔒 Delayed access: The repository is always 2 months behind the latest commercial release to prevent unauthorized reselling.   🔗 SVN URL: https://svn.l2servers.com.ar/!/#GX-EXT_INTERLUDE Username: gx Password: gx   You can use tools like TortoiseSVN to download and work with the code.
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: 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