Jump to content
  • 0

Mod Ant-Pk


Voldigoad

Question

achei esse codigo porem nao sei se esta completo ou correto 
to tentando adicionar ele no meu projeto 
mas nao ta facil 
mas ta ai se tiver completo use 
e quem puder adaptar ele para frozen 1132
agradeço 
 

Citar
Crie um novo arquivo de classe Java chamado "AntPk.java

net.sf.l2j.gameserver.model.actor.instance.AntPk.java

package net.sf.l2j.gameserver.model.actor.instance;

import net.sf.l2j.gameserver.Config;
import net.sf.l2j.gameserver.model.L2Attackable;
import net.sf.l2j.gameserver.model.actor.template.NpcTemplate;

public class AntPk extends L2Attackable {

    public AntPk(int objectId, NpcTemplate template) {
        super(objectId, template);
    }

    @Override
    public boolean isAutoAttackable(L2Character attacker) {
        if (attacker instanceof L2PcInstance) {
            L2PcInstance player = (L2PcInstance) attacker;
            if (!Config.ANT_PK_ENABLED || player.isGM()) {
                return false;
            }
        }
        return super.isAutoAttackable(attacker);
    }

    @Override
    public void doDie(L2Character killer) {
        if (killer instanceof L2PcInstance) {
            L2PcInstance player = (L2PcInstance) killer;
            if (getLevel() > player.getLevel()) {
                player.deathPenalty(false);
                player.sendMessage("You lost a level due to death from AntPk.");
            }
        }
        super.doDie(killer);
    }
    
    @Override
    public void onSpawn() {
        setDamage(getPDef() + getMDef() + 1000000000);
        setAttackSpeed(2000);
        super.onSpawn();
    }
    
    @Override
    protected boolean isAttackableTarget(L2Character attacker) {
        if (attacker instanceof L2MonsterInstance || attacker instanceof L2RaidBossInstance || attacker instanceof L2GrandBossInstance || attacker instanceof L2MinionInstance) {
            return false;
        }
        return super.isAttackableTarget(attacker);
    }
    
}

==============
mod.properties=
==============
# Enable or disable AntPk
# Type: boolean
# Default: false
antPkEnabled = false

===========
Config.java=
===========
public static boolean ANT_PK_ENABLED = Boolean.parseBoolean(Config.getProperty("antPkEnabled", "false"));

======================
AltSettings.properties=
======================
# Death penalty rate
# Type: double
# Default: 1.0
DeathPenaltyRate = 1.0

 

 

Me parece q essse mod antpk
ele ingnora os mod redboss e os grandesboss alem de roubar o level do play

assim parece

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Join now

    Be part of the largest and oldest communities about Lineage2 in Latin America.





×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.