Autor Tema: Return  (Leído 65 veces)

Junio 11, 2018, 08:52:05 pm

Conectado 3gato

  • Usuario
  • *
  • Mensajes: 22
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
Can someone please help me adapt this mod to the last  l2jserver?

the code was made to l2jserver, I tried to add it and it was okay until I got to RecoverCancelledBuffsTask.java because the Env.java file no longer exists in the l2jserver project. I could not adapt it. Can someone please help?

You are not allowed to view links. Register or Login

Junio 11, 2018, 08:55:26 pm
Respuesta #1

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.566
  • Karma: 2
  • Sexo: Masculino
    • U3Games
You are not allowed to view links. Register or Login
Can someone please help me adapt this mod to the last  l2jserver?

the code was made to l2jserver, I tried to add it and it was okay until I got to RecoverCancelledBuffsTask.java because the Env.java file no longer exists in the l2jserver project. I could not adapt it. Can someone please help?

You are not allowed to view links. Register or Login

Post errors pls ^^

Junio 12, 2018, 09:56:23 am
Respuesta #2

Conectado 3gato

  • Usuario
  • *
  • Mensajes: 22
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Can someone please help me adapt this mod to the last  l2jserver?

the code was made to l2jserver, I tried to add it and it was okay until I got to RecoverCancelledBuffsTask.java because the Env.java file no longer exists in the l2jserver project. I could not adapt it. Can someone please help?

You are not allowed to view links. Register or Login

Post errors pls ^^

Here


Junio 13, 2018, 01:58:05 pm
Respuesta #3

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.566
  • Karma: 2
  • Sexo: Masculino
    • U3Games


Código: You are not allowed to view links. Register or Login
@Override
public void run()
{
for (BuffInfo buff : _buffs)
{
final BuffInfo stolenOrCanceled = new BuffInfo(_player, _player, buff.getSkill());
stolenOrCanceled.setAbnormalTime(buff.getTime());
buff.getSkill().applyEffectScope(EffectScope.GENERAL, stolenOrCanceled, true, true);

if (stolenOrCanceled.getAbnormalTime() > 0)
{
_player.getEffectList().add(stolenOrCanceled);
}
}

_player.sendPacket(new ExShowScreenMessage("Your cancelled buffs has been given back.", 2000));
}

Junio 13, 2018, 02:24:21 pm
Respuesta #4

Conectado 3gato

  • Usuario
  • *
  • Mensajes: 22
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
You are not allowed to view links. Register or Login


Código: You are not allowed to view links. Register or Login
@Override
public void run()
{
for (BuffInfo buff : _buffs)
{
final BuffInfo stolenOrCanceled = new BuffInfo(_player, _player, buff.getSkill());
stolenOrCanceled.setAbnormalTime(buff.getTime());
buff.getSkill().applyEffectScope(EffectScope.GENERAL, stolenOrCanceled, true, true);

if (stolenOrCanceled.getAbnormalTime() > 0)
{
_player.getEffectList().add(stolenOrCanceled);
}
}

_player.sendPacket(new ExShowScreenMessage("Your cancelled buffs has been given back.", 2000));
}





Junio 13, 2018, 02:44:17 pm
Respuesta #5

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.566
  • Karma: 2
  • Sexo: Masculino
    • U3Games
1.- Add } to end  (line 56)

2.- Remplace...

List --> You are not allowed to view links. Register or Login

Código: You are not allowed to view links. Register or Login
before: List<BLABLABLA> example = new FastList<>();
after: List<BLABLABLA> example = new ArrayList<>();

use "ArrayList"

Junio 13, 2018, 04:44:47 pm
Respuesta #6

Conectado 3gato

  • Usuario
  • *
  • Mensajes: 22
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
You are not allowed to view links. Register or Login
1.- Add } to end  (line 56)

2.- Remplace...

List --> You are not allowed to view links. Register or Login

Código: You are not allowed to view links. Register or Login
before: List<BLABLABLA> example = new FastList<>();
after: List<BLABLABLA> example = new ArrayList<>();

use "ArrayList"


thank you very much Swarlog. the mod worked 100% as it should!

but has a small problem. the Cardinal skill cleanse uses the same effect as the cancels.

look at xml gives skill cleanse:

   <skill id="1409" levels="1" name="Cleanse">
      <set name="castRange" val="600" />
      <set name="effectPoint" val="1" />
      <set name="effectRange" val="1100" />
      <set name="hitTime" val="4000" />
      <set name="icon" val="icon.skill1409" />
      <set name="isMagic" val="1" /> <!-- Magic Skill -->
      <set name="itemConsumeCount" val="1" />
      <set name="itemConsumeId" val="8874" /> <!-- Einhasad's Holy Water -->
      <set name="magicLvl" val="78" />
      <set name="mpConsume" val="46" />
      <set name="mpInitialConsume" val="12" />
      <set name="operateType" val="A1" />
      <set name="reuseDelay" val="8000" />
      <set name="rideState" val="NONE;STRIDER;WYVERN;WOLF" />
      <set name="targetType" val="ONE" />
      <for>
         <effect name="DispelByCategory">
            <param slot="debuff" rate="100" max="10" />
         </effect>
      </for>
   </skill>


See the video..

You are not allowed to view links. Register or Login

How can I fix this?

Junio 13, 2018, 10:11:50 pm
Respuesta #7

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.566
  • Karma: 2
  • Sexo: Masculino
    • U3Games
Create condition for skills not allowed and that is not saved ;)

No save list skills id in debuff effect ;)

Junio 14, 2018, 12:25:06 am
Respuesta #8

Conectado 3gato

  • Usuario
  • *
  • Mensajes: 22
  • Karma: 0
  • Sexo: Masculino
  • Learn and share my knowledge!
You are not allowed to view links. Register or Login
Create condition for skills not allowed and that is not saved ;)

No save list skills id in debuff effect ;)

How do I do this?

Junio 14, 2018, 04:06:52 pm
Respuesta #9

Conectado swarlog

  • Desarrollador
  • Usuario
  • *
  • Mensajes: 1.566
  • Karma: 2
  • Sexo: Masculino
    • U3Games
You are not allowed to view links. Register or Login
You are not allowed to view links. Register or Login
Create condition for skills not allowed and that is not saved ;)

No save list skills id in debuff effect ;)

How do I do this?

Mmm...


Código: You are not allowed to view links. Register or Login
@Override
public void run()
{
for (BuffInfo buff : _buffs)
{
if (buff.getSkill().getId() == 1409)
{
continue;
}

final BuffInfo stolenOrCanceled = new BuffInfo(_player, _player, buff.getSkill());
stolenOrCanceled.setAbnormalTime(buff.getTime());
buff.getSkill().applyEffectScope(EffectScope.GENERAL, stolenOrCanceled, true, true);

if (stolenOrCanceled.getAbnormalTime() > 0)
{
_player.getEffectList().add(stolenOrCanceled);
}
}

_player.sendPacket(new ExShowScreenMessage("Your cancelled buffs has been given back.", 2000));
}

For id restriction

Código: You are not allowed to view links. Register or Login
if (buff.getSkill().getId() == 1409)
{
continue;
}