Ir para conteúdo
  • Cadastre-se

Zaken acis 364 desenvolvimento 85%


terry123456

Posts recomendados


Olá,

 

Sugiro que quando for postar scripts no fórum, use alguns sites para organiza-los, ex: Zaken Acis 364

 

Boa sorte com o projeto, minha área não é Java mas logo logo alguém da área aparece

Link para o comentário
Compartilhar em outros sites

Olá amigo, estou fazendo um projeto também e adicionei o Zaken, mas não tive tempo de testar, se puder dá uma testada neste Zaken, ficaria agradecido.

 

 

 

 

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.scripting.scripts.ai.individual;

import net.sf.l2j.commons.concurrent.ThreadPool;
import net.sf.l2j.commons.random.Rnd;

/**
 * Zaken AI
 * @author dEvilKinG
 * @reword by Leonardo Holanda(BossForever)
 */

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.DoorTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.datatables.SkillTable.FrequentSkill;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.instancemanager.ZoneManager;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Attackable;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
import net.sf.l2j.gameserver.scripting.EventType;
import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
import net.sf.l2j.gameserver.taskmanager.GameTimeTaskManager;
import net.sf.l2j.gameserver.templates.StatsSet;
import net.sf.l2j.gameserver.util.Util;

public class Zaken extends L2AttackableAIScript
{
    private static final L2BossZone _zakenLair = ZoneManager.getInstance().getZoneById(110000, L2BossZone.class);
    
    private L2Object _target;// used for CallSkills
    int _telecheck; // used for zakens self teleportings
    private int _minionStatus = 0; // used for spawning minions cycles
    private int hate = 0; // used for most hated players progress
    private static final int[] Xcoords =
    {
        53950,
        55980,
        54950,
        55970,
        53930,
        55970,
        55980,
        54960,
        53950,
        53930,
        55970,
        55980,
        54960,
        53950,
        53930
    };
    private static final int[] Ycoords =
    {
        219860,
        219820,
        218790,
        217770,
        217760,
        217770,
        219920,
        218790,
        219860,
        217760,
        217770,
        219920,
        218790,
        219860,
        217760
    };
    private static final int[] Zcoords =
    {
        -3488,
        -3488,
        -3488,
        -3488,
        -3488,
        -3216,
        -3216,
        -3216,
        -3216,
        -3216,
        -2944,
        -2944,
        -2944,
        -2944,
        -2944
    };
    
    // Skills
    private static final int TELEPORT = 4216;
    private static final int MASS_TELEPORT = 4217;
    private static final int DRAIN = 4218;
    private static final int HOLD = 4219;
    private static final int DUAL_ATTACK = 4220;
    private static final int MASS_DUAL_ATTACK = 4221;
    private static final int SELF_TELEPORT = 4222;
    private static final int NIGHT_TO_DAY = 4223;
    private static final int DAY_TO_NIGHT = 4224;
    private static final int REGEN_NIGHT = 4227;
    private static final int REGEN_DAY = 4242;
    
    // Boss
    private static final int ZAKEN = 29022;
    
    // Minions
    private static final int DOLLBLADER = 29023;
    private static final int VALEMASTER = 29024;
    private static final int PIRATECAPTAIN = 29026;
    private static final int PIRATEZOMBIE = 29027;
    
    // ZAKEN Status Tracking :
    private static final byte ALIVE = 0; // Zaken is spawned.
    private static final byte DEAD = 1; // Zaken has been killed.
    
    public Zaken()
    {
        super("ai/individual");
        
        ThreadPool.scheduleAtFixedRate(new Runnable()
        {
            @Override
            public void run()
            {
                if (GetTimeHour() == 0)
                {
                    DoorTable.getInstance().getDoor(21240006).openMe();
                    ThreadPool.schedule(new Runnable()
                    {
                        @Override
                        public void run()
                        {
                            DoorTable.getInstance().getDoor(21240006).closeMe();
                        }
                    }, 300000L);
                }
            }
        }, 2000L, 600000L);
        
        registerNpcs();
        
        final StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
        final int status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
        if (status == DEAD)
        {
            // load the unlock date and time for zaken from DB
            long temp = info.getLong("respawn_time") - System.currentTimeMillis();
            // if zaken is locked until a certain time, mark it so and start the unlock timer
            // the unlock time has not yet expired.
            if (temp > 0)
            {
                startQuestTimer("zaken_unlock", temp, null, null, false);
            }
            else
            {
                // the time has already expired while the server was offline. Immediately spawn zaken.
                int i1 = Rnd.get(15);
                L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, Xcoords[i1], Ycoords[i1], Zcoords[i1], i1, false, 0, false);
                GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
                spawnBoss(zaken);
            }
        }
        else
        {
            int loc_x = info.getInteger("loc_x");
            int loc_y = info.getInteger("loc_y");
            int loc_z = info.getInteger("loc_z");
            int heading = info.getInteger("heading");
            int hp = info.getInteger("currentHP");
            int mp = info.getInteger("currentMP");
            L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0, false);
            zaken.setCurrentHpMp(hp, mp);
            spawnBoss(zaken);
        }
    }
    
    
    @Override
    protected void registerNpcs()
    {
        addEventIds(ZAKEN, EventType.ON_ATTACK, EventType.ON_KILL,EventType.ON_SPAWN,EventType.ON_SPELL_FINISHED,EventType.ON_SKILL_SEE,EventType.ON_FACTION_CALL,EventType.ON_AGGRO);
        addEventIds(DOLLBLADER, EventType.ON_ATTACK, EventType.ON_KILL,EventType.ON_SPAWN,EventType.ON_SPELL_FINISHED,EventType.ON_SKILL_SEE,EventType.ON_FACTION_CALL,EventType.ON_AGGRO);
        addEventIds(VALEMASTER, EventType.ON_ATTACK, EventType.ON_KILL,EventType.ON_SPAWN,EventType.ON_SPELL_FINISHED,EventType.ON_SKILL_SEE,EventType.ON_FACTION_CALL,EventType.ON_AGGRO);
        addEventIds(PIRATECAPTAIN, EventType.ON_ATTACK, EventType.ON_KILL,EventType.ON_SPAWN,EventType.ON_SPELL_FINISHED,EventType.ON_SKILL_SEE,EventType.ON_FACTION_CALL,EventType.ON_AGGRO);
        addEventIds(PIRATEZOMBIE, EventType.ON_ATTACK, EventType.ON_KILL,EventType.ON_SPAWN,EventType.ON_SPELL_FINISHED,EventType.ON_SKILL_SEE,EventType.ON_FACTION_CALL,EventType.ON_AGGRO);

    }

    public void spawnBoss(L2GrandBossInstance npc)
    {
        if (npc == null)
        {
            _log.warning("Zaken AI failed to load, missing Zaken in grandboss_data.sql");
            return;
        }
        GrandBossManager.getInstance().addBoss(npc);
        
        npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
        
        hate = 0;
        if (_zakenLair == null)
        {
            _log.warning("Zaken AI failed to load, missing zone for Zaken");
            return;
        }
        if (_zakenLair.isInsideZone(npc))
        {
            _minionStatus = 1;
            startQuestTimer("minion_cycle", 1700, null, null, true);
        }
        _telecheck = 3;
        startQuestTimer("timer", 1000, npc, null, false);
    }
    
    @Override
    public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
    {
        int status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
        if ((status == DEAD) && !event.equalsIgnoreCase("zaken_unlock"))
        {
            return super.onAdvEvent(event, npc, player);
        }
        
        if (event.equalsIgnoreCase("timer"))
        {
            if (GetTimeHour() < 5)
            {
                L2Skill skill = SkillTable.getInstance().getInfo(DAY_TO_NIGHT, 1);
                if (npc.getFirstEffect(skill) == null)
                {
                    npc.doCast(SkillTable.getInstance().getInfo(DAY_TO_NIGHT, 1));
                    npc.doCast(SkillTable.getInstance().getInfo(REGEN_NIGHT, 1));
                    
                }
            }
            else if (GetTimeHour() > 5)
            {
                L2Skill skill = SkillTable.getInstance().getInfo(NIGHT_TO_DAY, 1);
                if (npc.getFirstEffect(skill) == null)
                {
                    _telecheck = 3;
                    npc.doCast(SkillTable.getInstance().getInfo(NIGHT_TO_DAY, 1));
                    npc.doCast(SkillTable.getInstance().getInfo(REGEN_DAY, 1));
                }
            }
            
            L2Character _mostHated = null;
            if ((npc.getAI().getIntention() == CtrlIntention.ATTACK) && (hate == 0))
            {
                if (((L2Attackable) npc).getMostHated() != null)
                {
                    _mostHated = ((L2Attackable) npc).getMostHated();
                    hate = 1;
                }
            }
            else if ((npc.getAI().getIntention() == CtrlIntention.ATTACK) && (hate != 0))
            {
                if (((L2Attackable) npc).getMostHated() != null)
                {
                    if (_mostHated == ((L2Attackable) npc).getMostHated())
                    {
                        hate = hate + 1;
                    }
                    else
                    {
                        hate = 1;
                        _mostHated = ((L2Attackable) npc).getMostHated();
                    }
                }
            }
            if (npc.getAI().getIntention() == CtrlIntention.IDLE)
            {
                hate = 0;
            }
            if (hate > 5)
            {
                ((L2Attackable) npc).stopHating(_mostHated);
                L2Character nextTarget = ((L2Attackable) npc).getMostHated();
                if (nextTarget != null)
                {
                    npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);
                }
                hate = 0;
            }
            
            if (getPlayersCountInRadius(1500, npc, true) == 0)
            {
                npc.doCast(SkillTable.getInstance().getInfo(SELF_TELEPORT, 1));
            }
            
            startQuestTimer("timer", 30000, npc, null, true);
        }
        
        if (event.equalsIgnoreCase("minion_cycle"))
        {
            if (_minionStatus == 1)
            {
                int rr = Rnd.get(15);
                addSpawn(PIRATECAPTAIN, Xcoords[rr], Ycoords[rr], Zcoords[rr], Rnd.get(65536), false, 0, true);
                _minionStatus = 2;
            }
            else if (_minionStatus == 2)
            {
                int rr = Rnd.get(15);
                addSpawn(DOLLBLADER, Xcoords[rr], Ycoords[rr], Zcoords[rr], Rnd.get(65536), false, 0, true);
                _minionStatus = 3;
            }
            else if (_minionStatus == 3)
            {
                addSpawn(VALEMASTER, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                _minionStatus = 4;
            }
            else if (_minionStatus == 4)
            {
                addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
                _minionStatus = 5;
            }
            else if (_minionStatus == 5)
            {
                addSpawn(DOLLBLADER, 52675, 219371, -3290, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 52687, 219596, -3368, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 52672, 219740, -3418, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 52857, 219992, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 52959, 219997, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 53381, 220151, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54236, 220948, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54885, 220144, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55264, 219860, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55399, 220263, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55679, 220129, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 56276, 220783, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 57173, 220234, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 56267, 218826, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56294, 219482, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 56094, 219113, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56364, 218967, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 57113, 218079, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56186, 217153, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55440, 218081, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55202, 217940, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55225, 218236, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54973, 218075, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 53412, 218077, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54226, 218797, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54394, 219067, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54139, 219253, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 54262, 219480, -3488, Rnd.get(65536), false, 0, true);
                _minionStatus = 6;
            }
            else if (_minionStatus == 6)
            {
                addSpawn(PIRATEZOMBIE, 53412, 218077, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54413, 217132, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 54841, 217132, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 55372, 217128, -3343, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 55893, 217122, -3488, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 56282, 217237, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 56963, 218080, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 56267, 218826, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56294, 219482, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 56094, 219113, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56364, 218967, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 56276, 220783, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 57173, 220234, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54885, 220144, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55264, 219860, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55399, 220263, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55679, 220129, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54236, 220948, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54464, 219095, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54226, 218797, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54394, 219067, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54139, 219253, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 54262, 219480, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 53412, 218077, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55440, 218081, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55202, 217940, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55225, 218236, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54973, 218075, -3216, Rnd.get(65536), false, 0, true);
                _minionStatus = 7;
            }
            else if (_minionStatus == 7)
            {
                addSpawn(PIRATEZOMBIE, 54228, 217504, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54181, 217168, -3216, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 54714, 217123, -3168, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 55298, 217127, -3073, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 55787, 217130, -2993, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 56284, 217216, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 56963, 218080, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 56267, 218826, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56294, 219482, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 56094, 219113, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 56364, 218967, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 56276, 220783, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 57173, 220234, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54885, 220144, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55264, 219860, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55399, 220263, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55679, 220129, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54236, 220948, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54464, 219095, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54226, 218797, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(VALEMASTER, 54394, 219067, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54139, 219253, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(DOLLBLADER, 54262, 219480, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 53412, 218077, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 54280, 217200, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55440, 218081, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATECAPTAIN, 55202, 217940, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 55225, 218236, -2944, Rnd.get(65536), false, 0, true);
                addSpawn(PIRATEZOMBIE, 54973, 218075, -2944, Rnd.get(65536), false, 0, true);
                cancelQuestTimer("minion_cycle", null, null);
            }
        }
        
        else if (event.equalsIgnoreCase("zaken_unlock"))
        {
            int i1 = Rnd.get(15);
            L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, Xcoords[i1], Ycoords[i1], Zcoords[i1], i1, false, 0, false);
            GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
            spawnBoss(zaken);
        }
        else if (event.equalsIgnoreCase("CreateOnePrivateEx"))
        {
            addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0, true);
        }
        return super.onAdvEvent(event, npc, player);
    }
    
    public String onFactionCall(L2Npc npc, L2NpcInstance caller, L2PcInstance attacker, boolean isPet)
    {
        if ((caller == null) || (npc == null))
        {
            return super.onFactionCall(npc, caller, attacker, isPet);
        }

        if ((GetTimeHour() < 5) && (caller.getNpcId() != ZAKEN) && (npc.getNpcId() != ZAKEN))
        {
            if ((npc.getAI().getIntention() == CtrlIntention.IDLE) && (caller.getCurrentHp() < (0.9 * caller.getMaxHp())) && (Rnd.get(450) < 1))
            {
                int x = caller.getX();
                int y = caller.getY();
                int z = caller.getZ();
                npc.teleToLocation(x, y, z, 0);
            }
        }
        return super.onFactionCall(npc, caller, attacker, isPet);
    }
    
    @Override
    public String onSpellFinished(L2Npc npc, L2PcInstance player, L2Skill skill)
    {
        if (npc.getNpcId() == ZAKEN)
        {
            int skillId = skill.getId();
            if (skillId == SELF_TELEPORT)
            {
                int i1 = Rnd.get(15);
                npc.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], 0);
                npc.getAI().setIntention(CtrlIntention.IDLE);
            }
            else if (skillId == TELEPORT)
            {
                int i1 = Rnd.get(15);
                player.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], i1);
                ((L2Attackable) npc).stopHating(player);
                L2Character nextTarget = ((L2Attackable) npc).getMostHated();
                if (nextTarget != null)
                {
                    npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);
                }
                
            }
            else if (skillId == MASS_TELEPORT)
            {
                int i1 = Rnd.get(15);
                player.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], i1);
                ((L2Attackable) npc).stopHating(player);
                
                for (L2Character character : npc.getKnownType(L2MonsterInstance.class))
                {
                    if ((character != player) && !Util.checkIfInRange(250, player, character, true))
                    {
                        int r1 = Rnd.get(15);
                        character.teleToLocation(Xcoords[r1], Ycoords[r1], Zcoords[r1], r1);
                        ((L2Attackable) npc).stopHating(character);
                    }
                }
                
                L2Character nextTarget = ((L2Attackable) npc).getMostHated();
                if (nextTarget != null)
                {
                    npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);
                }
            }
        }
        return super.onSpellFinished(npc, player, skill);
    }
    
    @Override
    public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
    {
        if (skill.getAggroPoints() > 0)
        {
            ((L2Attackable) npc).addDamageHate(caster, 0, ((skill.getAggroPoints() / npc.getMaxHp()) * 10 * 150));
        }
        
        if (Rnd.get(12) < 1)
        {
            _target = caster;
            CallSkills(npc);
        }
        return super.onSkillSee(npc, caster, skill, targets, isPet);
    }
    
    @Override
    public String onAggro(L2Npc npc, L2PcInstance player, boolean isPet)
    {
        if (npc == null)
            return null;
            
        final boolean isMage;
        final L2Playable character;
        if (isPet)
        {
            isMage = false;
            character = player.getPet();
        }
        else
        {
            isMage = player.isMageClass();
            character = player;
        }
        
        if (character == null)
            return null;
            
        if (!Config.RAID_DISABLE_CURSE && character.getLevel() - npc.getLevel() > 8)
        {
            L2Skill curse = null;
            if (isMage)
            {
                if (!character.isMuted() && Rnd.get(4) == 0)
                    curse = FrequentSkill.RAID_CURSE.getSkill();
            }
            else
            {
                if (!character.isParalyzed() && Rnd.get(4) == 0)
                    curse = FrequentSkill.RAID_CURSE2.getSkill();
            }
            
            if (curse != null)
            {
                npc.broadcastPacket(new MagicSkillUse(npc, character, curse.getId(), curse.getLevel(), 300, 0));
                curse.getEffects(npc, character);
            }
            
            ((L2Attackable) npc).stopHating(character); // for calling again
            return null;
        }
        
        if (_zakenLair.isInsideZone(npc))
        {
            L2Character target = isPet ? player.getPet() : player;
            ((L2Attackable) npc).addDamageHate(target, 1, 200);
        }
        
        int npcId = npc.getNpcId();
        if (npcId == ZAKEN)
        {
            if (Rnd.get(15) < 1)
            {
                _target = player;
                CallSkills(npc);
            }
        }
        return super.onAggro(npc, player, isPet);
    }
    
    public void CallSkills(L2Npc npc)
    {
        if (npc.isCastingNow())
            return;
            
        int chance = Rnd.get(225);
        npc.setTarget(_target);
        if (chance < 1)
            npc.doCast(SkillTable.getInstance().getInfo(TELEPORT, 1));
            
        else if (chance < 2)
            npc.doCast(SkillTable.getInstance().getInfo(MASS_TELEPORT, 1));
            
        else if (chance < 4)
            npc.doCast(SkillTable.getInstance().getInfo(HOLD, 1));
            
        else if (chance < 8)
            npc.doCast(SkillTable.getInstance().getInfo(DRAIN, 1));
            
        else if (chance < 15)
            npc.doCast(SkillTable.getInstance().getInfo(MASS_DUAL_ATTACK, 1));
            
        if (Rnd.get(2) < 1)
        {
            if (_target == ((L2Attackable) npc).getMostHated())
            {
                npc.doCast(SkillTable.getInstance().getInfo(DUAL_ATTACK, 1));
            }
        }
        
        if ((GetTimeHour() > 5) && (npc.getCurrentHp() < (npc.getMaxHp() * _telecheck) / 4))
        {
            _telecheck -= 1;
            npc.doCast(SkillTable.getInstance().getInfo(SELF_TELEPORT, 1));
        }
    }
    
    @Override
    public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill)
    {
        int npcId = npc.getNpcId();
        if (npcId == ZAKEN)
        {
            if (attacker.getMountType() == 1)
            {
                skill = SkillTable.getInstance().getInfo(4258, 1);
                if (attacker.getFirstEffect(skill) == null)
                {
                    npc.setTarget(attacker);
                    npc.doCast(skill);
                }
            }
            final L2Character originalAttacker = isPet ? attacker.getPet() : attacker;
            final int hating = (int) ((damage / npc.getMaxHp() / 0.05) * 20000);
            ((L2Attackable) npc).addDamageHate(originalAttacker, 0, hating);
            
            if (Rnd.get(10) < 1)
            {
                _target = attacker;
                CallSkills(npc);
            }
            
        }
        return super.onAttack(npc, attacker, damage, isPet, skill);
    }
    
    @Override
    public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
    {
        int npcId = npc.getNpcId();
        if (npcId == ZAKEN)
        {
            cancelQuestTimer("timer", npc, null);
            cancelQuestTimer("minion_cycle", npc, null);
            npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
            GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
            long respawnTime = (long) Config.SPAWN_INTERVAL_ZAKEN + Rnd.get(-Config.RANDOM_SPAWN_TIME_ZAKEN, Config.RANDOM_SPAWN_TIME_ZAKEN);
            respawnTime *= 3600000;
            startQuestTimer("zaken_unlock", respawnTime, null, null, false);
            
            StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
            info.set("respawn_time", System.currentTimeMillis() + respawnTime);
            GrandBossManager.getInstance().setStatsSet(ZAKEN, info);
        }
        else if (GrandBossManager.getInstance().getBossStatus(ZAKEN) == ALIVE)
        {
            startQuestTimer("CreateOnePrivateEx", ((30 + Rnd.get(60)) * 1000), npc, null, false);
        }
        return super.onKill(npc, killer, isPet);
    }
    
    public int GetTimeHour()
    {
        return GameTimeTaskManager.getInstance().getGameHour();
    }
}

 

 

Link para o comentário
Compartilhar em outros sites

Obrigado que ainda n aprendi a usar as ferramentas aqui tem como esconder o script para ficar mais organizado mesmo assim muito obrigado ^^

 

 

Leonardo Holanda

 

ok pode eixar comigo estou vendo Frintezza tbm jaja posto o script

 

 

 

 

http://pastebin.com/MK5m94DJ <---- Frintezza quest esta entrando normal porem esta faltando npc do inicio, quando mata os mobs as portas não

abrem e no final da quest o anfitrião não aparece kkkk meio da quest ok

Editado por terry123456
Link para o comentário
Compartilhar em outros sites

Obrigado que ainda n aprendi a usar as ferramentas aqui tem como esconder o script para ficar mais organizado mesmo assim muito obrigado ^^

 

 

Leonardo Holanda

 

ok pode eixar comigo estou vendo Frintezza tbm jaja posto o script

Para o código ficar mais organizado, utilize os comando [*code] e [*/code] e para colocar um spoiler, basta utilizar os comando [*spoiler] e [*/spoiler], sem os *.

Link para o comentário
Compartilhar em outros sites

Leonardo Holanda

 

Acredito que tem um erro aqui esta com paralize toda hora acima e lvl 35 boss de lvl 60 com 45,55 lvl trava

 

 

if (!Config.RAID_DISABLE_CURSE && character.getLevel() - npc.getLevel() > 8)

{

L2Skill curse = null;

if (isMage)

{

if (!character.isMuted() && Rnd.get(4) == 0)

curse = FrequentSkill.RAID_CURSE.getSkill();

}

else

{

if (!character.isParalyzed() && Rnd.get(4) == 0)

curse = FrequentSkill.RAID_CURSE2.getSkill();

}

 

if (curse != null)

{

npc.broadcastPacket(new MagicSkillUse(npc, character, curse.getId(), curse.getLevel(), 300, 0));

curse.getEffects(npc, character);

}

 

((L2Attackable) npc).stopHating(character); // for calling again

return null;

}

 

 

Editado por terry123456
Link para o comentário
Compartilhar em outros sites

O Cod. acima está funcionando até certo ponto (Zaken) porem assim que se chega a zona do mesmo esta dando paralizy, e se quer da para procurar o Boss

Fiz modificações em outro Zaken, se puder testar esse aqui.

 

http://pastebin.com/raw/UvESVtz8

Link para o comentário
Compartilhar em outros sites

Fiz modificações em outro Zaken, se puder testar esse aqui.

 

http://pastebin.com/raw/UvESVtz8

Testei aqui e o primeiro que postou estava ok, o char nao pode estar + que 7 lvl acima do boss para entrar na zona dele, mas oque alterou ?

j58fx5.gif

Link para o comentário
Compartilhar em outros sites

Ainda esta dando paralizy assim que entra na proa do barco bem território de Zakem !!! Bem eu estando aqui assim que entra na zona da paralizy lvl 30,40,50,60 para teste

 

 

Brincadeira em fico triste com isso pouca gente ajuda ou se interessa a fazer o zaken mais todo mundo quer, cada vez eu desanimo de postar as

coisas ou ajudar a galera ou até colocar novidades.

 

A galera não se interessa nem para testar as coisas ai ou procurar para por na rev, nego fica só esperando, o gente vamos ajudar ai deu erro fala deu certo mostre falei

opina pouca gente se manifesta.

 

 

VOU DA UMA IDEIA AOS ADMS

 

ABRE UMA ÁREA DE ATIVOS OU TANTAS CURTIDAS OU UMA ÁREA EXCLUSIVA ALGO QUE PESSOAS ATIVAS POSSA TRABALHA ONDE SUGADOR NÃO PODE ENTRAR FÁCIL !!!!

Editado por terry123456
Link para o comentário
Compartilhar em outros sites

gameserver/data/xml/zones/EffectZone
procure essa linha:

<zone type="EffectZone" shape="NPoly" minZ="-4815" maxZ="-315"><!-- Zaken Curse Zone -->
<stat name="skillIdLvl" val="4515-1;" />
<stat name="chance" val="100" />
<!-- stat name="initialDelay" val="2000" / -->
<stat name="reuse" val="6000" />
<stat name="affectedLvlMin" val="70" />
<node X="50797" Y="213515" />
<node X="57617" Y="213510" />
<node X="57669" Y="221683" />
<node X="50773" Y="221632" />

Remova essa linha:
<stat name="chance" val="100" />
Ou simplismente altere para:
<stat name="chance" val="0" />

tbm tem a % por level

 

<stat name="affectedLvlMin" val="70" />

 

 

 

isso deve resolver o paralizy, estou parado com l2 mais sempre quando dar passo por aqui.

espero ter ajudado :D

Link para o comentário
Compartilhar em outros sites

Bem com ajuda de amigos conseguimos resolver boss testado funcionando rev L2JAcis 364 funcionando

Quase ia esquecendo obrigado ao amigo ai em cima ajudou zaken funcionando

 

 

gameserver/data/xml/zones/EffectZone
procure essa linha:

Spoiler Ocultar
<zone type="EffectZone" shape="NPoly" minZ="-4815" maxZ="-315"><!-- Zaken Curse Zone -->
<stat name="skillIdLvl" val="4515-1;" />
<stat name="chance" val="100" />
<!-- stat name="initialDelay" val="2000" / -->
<stat name="reuse" val="6000" />
<stat name="affectedLvlMin" val="70" />
<node X="50797" Y="213515" />
<node X="57617" Y="213510" />
<node X="57669" Y="221683" />
<node X="50773" Y="221632" />

Remova essa linha:
<stat name="chance" val="100" />
Ou simplismente altere para:
<stat name="chance" val="0" />

tbm tem a % por level

<stat name="affectedLvlMin" val="70" />



essa parte tbm


### Eclipse Workspace Patch 1.0
#P aCis_datapack
Index: data/xml/skills/4200-4299.xml
===================================================================
--- data/xml/skills/4200-4299.xml (revision 306)
+++ data/xml/skills/4200-4299.xml (working copy)
@@ -364,23 +364,19 @@
<set name="skillType" val="DUMMY" />
</skill>
<skill id="4223" levels="1" name="Face Chance: Night to Day">
- <set name="coolTime" val="1900" />
- <set name="hitTime" val="1100" />
<set name="operateType" val="OP_ACTIVE" />
<set name="skillType" val="BUFF" />
<set name="target" val="TARGET_SELF" />
<for>
- <effect name="Buff" time="14400" val="0" stackOrder="1" stackType="public_slot" />
+ <effect name="Buff" time="10800" abnormal="unknown16" val="0" stackOrder="1" stackType="public_slot" />
</for>
</skill>
<skill id="4224" levels="1" name="Face Chance: Day to Night">
- <set name="coolTime" val="1900" />
- <set name="hitTime" val="1100" />
<set name="operateType" val="OP_ACTIVE" />
<set name="skillType" val="BUFF" />
<set name="target" val="TARGET_SELF" />
<for>
- <effect name="Buff" time="10" val="0" stackOrder="2" stackType="public_slot" />
+ <effect name="Buff" time="3600" val="0" stackOrder="1" stackType="public_slot" />
</for>
</skill>




import java.util.logging.Logger;

import net.sf.l2j.commons.concurrent.ThreadPool;
import net.sf.l2j.commons.random.Rnd;

/**
* Zaken AI
* @author dEvilKinG
* @reword by Leonardo Holanda(BossForever)
*/

import net.sf.l2j.Config;
import net.sf.l2j.gameserver.ai.CtrlIntention;
import net.sf.l2j.gameserver.datatables.DoorTable;
import net.sf.l2j.gameserver.datatables.SkillTable;
import net.sf.l2j.gameserver.datatables.SkillTable.FrequentSkill;
import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
import net.sf.l2j.gameserver.instancemanager.ZoneManager;
import net.sf.l2j.gameserver.model.L2Object;
import net.sf.l2j.gameserver.model.L2Skill;
import net.sf.l2j.gameserver.model.actor.L2Attackable;
import net.sf.l2j.gameserver.model.actor.L2Character;
import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2NpcInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
import net.sf.l2j.gameserver.scripting.EventType;
import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
import net.sf.l2j.gameserver.taskmanager.GameTimeTaskManager;
import net.sf.l2j.gameserver.templates.StatsSet;
import net.sf.l2j.gameserver.util.Util;

/**
* Zaken AI
* @author dEvilKinG, Trance
*/
public class Zaken extends L2AttackableAIScript
{
static final Logger _log = Logger.getLogger(Zaken.class.getName());
private static final L2BossZone _zakenLair = ZoneManager.getInstance().getZoneById(110000, L2BossZone.class);
private int hate = 0; // Used for most hated players progress
private int _minionStatus = 0; // Used for spawning minions cycles
int _telecheck; // Used for zakens self teleportings
private L2Object _target; // Used for CallSkills

// Coords
private static final int[] Xcoords =
{
53950,
55980,
54950,
55970,
53930,
55970,
55980,
54960,
53950,
53930,
55970,
55980,
54960,
53950,
53930
};
private static final int[] Ycoords =
{
219860,
219820,
218790,
217770,
217760,
217770,
219920,
218790,
219860,
217760,
217770,
219920,
218790,
219860,
217760
};
private static final int[] Zcoords =
{
-3488,
-3488,
-3488,
-3488,
-3488,
-3216,
-3216,
-3216,
-3216,
-3216,
-2944,
-2944,
-2944,
-2944,
-2944
};

// Skills
private static final int TELEPORT = 4216;
private static final int MASS_TELEPORT = 4217;
private static final int DRAIN = 4218;
private static final int HOLD = 4219;
private static final int DUAL_ATTACK = 4220;
private static final int MASS_DUAL_ATTACK = 4221;
private static final int SELF_TELEPORT = 4222;
private static final int NIGHT_TO_DAY = 4223;
private static final int DAY_TO_NIGHT = 4224;
private static final int REGEN_NIGHT = 4227;
private static final int REGEN_DAY = 4242;

// Boss
private static final int ZAKEN = 29022;

// Minions
private static final int DOLLBLADER = 29023;
private static final int VALEMASTER = 29024;
private static final int PIRATECAPTAIN = 29026;
private static final int PIRATEZOMBIE = 29027;

// Zaken Status Tracking
private static final byte ALIVE = 0; // Zaken is spawned.
private static final byte DEAD = 1; // Zaken has been killed.

public Zaken()
{
super("ai/individual");

ThreadPool.scheduleAtFixedRate(new Runnable()
{
@Override
public void run()
{
try
{
if (GetTimeHour() == 0)
{
DoorTable.getInstance().getDoor(21240006).openMe();
ThreadPool.schedule(new Runnable()
{
@Override
public void run()
{
try
{
DoorTable.getInstance().getDoor(21240006).closeMe();
}
catch (Throwable e)
{
_log.warning("Cannot close door ID: 21240006 " + e);
}
}
}, 300000L);
}
}
catch (Throwable e)
{
_log.warning("Cannot open door ID: 21240006 " + e);
}
}
}, 2000L, 600000L);

final StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
final int status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
if (status == DEAD)
{
// Load the unlock date and time for Zaken from database.
long temp = info.getLong("respawn_time") - System.currentTimeMillis();
// If zaken is locked until a certain time, mark it so and start the unlock timer the unlock time has not yet expired.
if (temp > 0)
startQuestTimer("zaken_unlock", temp, null, null, false);
else
{
// The time has already expired while the server was offline. Immediately spawn Zaken.
int i1 = Rnd.get(15);
L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, Xcoords[i1], Ycoords[i1], Zcoords[i1], i1, false, 0, false);
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
spawnBoss(zaken);
}
}
else
{
int loc_x = info.getInteger("loc_x");
int loc_y = info.getInteger("loc_y");
int loc_z = info.getInteger("loc_z");
int heading = info.getInteger("heading");
int hp = info.getInteger("currentHP");
int mp = info.getInteger("currentMP");
L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0, false);
zaken.setCurrentHpMp(hp, mp);
spawnBoss(zaken);
}
}

@Override
protected void registerNpcs()
{
addEventIds(ZAKEN, EventType.ON_ATTACK, EventType.ON_KILL, EventType.ON_SPAWN, EventType.ON_SPELL_FINISHED, EventType.ON_SKILL_SEE, EventType.ON_FACTION_CALL, EventType.ON_AGGRO);
addEventIds(DOLLBLADER, EventType.ON_ATTACK, EventType.ON_KILL, EventType.ON_SPAWN, EventType.ON_SPELL_FINISHED, EventType.ON_SKILL_SEE, EventType.ON_FACTION_CALL, EventType.ON_AGGRO);
addEventIds(VALEMASTER, EventType.ON_ATTACK, EventType.ON_KILL, EventType.ON_SPAWN, EventType.ON_SPELL_FINISHED, EventType.ON_SKILL_SEE, EventType.ON_FACTION_CALL, EventType.ON_AGGRO);
addEventIds(PIRATECAPTAIN, EventType.ON_ATTACK, EventType.ON_KILL, EventType.ON_SPAWN, EventType.ON_SPELL_FINISHED, EventType.ON_SKILL_SEE, EventType.ON_FACTION_CALL, EventType.ON_AGGRO);
addEventIds(PIRATEZOMBIE, EventType.ON_ATTACK, EventType.ON_KILL, EventType.ON_SPAWN, EventType.ON_SPELL_FINISHED, EventType.ON_SKILL_SEE, EventType.ON_FACTION_CALL, EventType.ON_AGGRO);

}

public void spawnBoss(L2GrandBossInstance npc)
{
if (npc == null)
{
_log.warning("Zaken AI failed to load, missing Zaken in grandboss_data.sql");
return;
}

GrandBossManager.getInstance().addBoss(npc);
npc.broadcastPacket(new PlaySound(1, "BS01_A", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
hate = 0;

if (_zakenLair == null)
{
_log.warning("Zaken AI failed to load, missing zone for Zaken");
return;
}

if (_zakenLair.isInsideZone(npc))
{
_minionStatus = 1;
startQuestTimer("minion_cycle", 1700, null, null, true);
}

_telecheck = 3;
startQuestTimer("timer", 1000, npc, null, false);
}

@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
int status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
if ((status == DEAD) && !event.equalsIgnoreCase("zaken_unlock"))
return super.onAdvEvent(event, npc, player);

if (event.equalsIgnoreCase("timer"))
{
if (GetTimeHour() < 5)
{
L2Skill skill = SkillTable.getInstance().getInfo(DAY_TO_NIGHT, 1);
if (npc.getFirstEffect(skill) == null)
{
npc.doCast(SkillTable.getInstance().getInfo(DAY_TO_NIGHT, 1));
npc.doCast(SkillTable.getInstance().getInfo(REGEN_NIGHT, 1));

}
}
else if (GetTimeHour() > 5)
{
L2Skill skill = SkillTable.getInstance().getInfo(NIGHT_TO_DAY, 1);
if (npc.getFirstEffect(skill) == null)
{
_telecheck = 3;
npc.doCast(SkillTable.getInstance().getInfo(NIGHT_TO_DAY, 1));
npc.doCast(SkillTable.getInstance().getInfo(REGEN_DAY, 1));
}
}

L2Character _mostHated = null;
if ((npc.getAI().getIntention() == CtrlIntention.ATTACK) && (hate == 0))
{
if (((L2Attackable) npc).getMostHated() != null)
{
_mostHated = ((L2Attackable) npc).getMostHated();
hate = 1;
}
}
else if ((npc.getAI().getIntention() == CtrlIntention.ATTACK) && (hate != 0))
{
if (((L2Attackable) npc).getMostHated() != null)
{
if (_mostHated == ((L2Attackable) npc).getMostHated())
hate = hate + 1;
else
{
hate = 1;
_mostHated = ((L2Attackable) npc).getMostHated();
}
}
}

if (npc.getAI().getIntention() == CtrlIntention.IDLE)
hate = 0;

if (hate > 5)
{
((L2Attackable) npc).stopHating(_mostHated);
L2Character nextTarget = ((L2Attackable) npc).getMostHated();
if (nextTarget != null)
npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);

hate = 0;
}

if (getPlayersCountInRadius(1500, npc, true) == 0)
npc.doCast(SkillTable.getInstance().getInfo(SELF_TELEPORT, 1));

startQuestTimer("timer", 30000, npc, null, true);
}

if (event.equalsIgnoreCase("minion_cycle"))
{
if (_minionStatus == 1)
{
int rr = Rnd.get(15);
addSpawn(PIRATECAPTAIN, Xcoords[rr], Ycoords[rr], Zcoords[rr], Rnd.get(65536), false, 0, true);
_minionStatus = 2;
}
else if (_minionStatus == 2)
{
int rr = Rnd.get(15);
addSpawn(DOLLBLADER, Xcoords[rr], Ycoords[rr], Zcoords[rr], Rnd.get(65536), false, 0, true);
_minionStatus = 3;
}
else if (_minionStatus == 3)
{
addSpawn(VALEMASTER, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
_minionStatus = 4;
}
else if (_minionStatus == 4)
{
addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, Xcoords[Rnd.get(15)], Ycoords[Rnd.get(15)], Zcoords[Rnd.get(15)], Rnd.get(65536), false, 0, true);
_minionStatus = 5;
}
else if (_minionStatus == 5)
{
addSpawn(DOLLBLADER, 52675, 219371, -3290, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 52687, 219596, -3368, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 52672, 219740, -3418, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 52857, 219992, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 52959, 219997, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 53381, 220151, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54236, 220948, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54885, 220144, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55264, 219860, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55399, 220263, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55679, 220129, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 56276, 220783, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 57173, 220234, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 56267, 218826, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56294, 219482, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 56094, 219113, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56364, 218967, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 57113, 218079, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56186, 217153, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55440, 218081, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55202, 217940, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55225, 218236, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54973, 218075, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 53412, 218077, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54226, 218797, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54394, 219067, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54139, 219253, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 54262, 219480, -3488, Rnd.get(65536), false, 0, true);
_minionStatus = 6;
}
else if (_minionStatus == 6)
{
addSpawn(PIRATEZOMBIE, 53412, 218077, -3488, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54413, 217132, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 54841, 217132, -3488, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 55372, 217128, -3343, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 55893, 217122, -3488, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 56282, 217237, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 56963, 218080, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 56267, 218826, -3216, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56294, 219482, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 56094, 219113, -3216, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56364, 218967, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 56276, 220783, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 57173, 220234, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54885, 220144, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55264, 219860, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55399, 220263, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55679, 220129, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54236, 220948, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54464, 219095, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54226, 218797, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54394, 219067, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54139, 219253, -3216, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 54262, 219480, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 53412, 218077, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55440, 218081, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55202, 217940, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55225, 218236, -3216, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54973, 218075, -3216, Rnd.get(65536), false, 0, true);
_minionStatus = 7;
}
else if (_minionStatus == 7)
{
addSpawn(PIRATEZOMBIE, 54228, 217504, -3216, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54181, 217168, -3216, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 54714, 217123, -3168, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 55298, 217127, -3073, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 55787, 217130, -2993, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 56284, 217216, -2944, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 56963, 218080, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 56267, 218826, -2944, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56294, 219482, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 56094, 219113, -2944, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 56364, 218967, -2944, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 56276, 220783, -2944, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 57173, 220234, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54885, 220144, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55264, 219860, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55399, 220263, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55679, 220129, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54236, 220948, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54464, 219095, -2944, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54226, 218797, -2944, Rnd.get(65536), false, 0, true);
addSpawn(VALEMASTER, 54394, 219067, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54139, 219253, -2944, Rnd.get(65536), false, 0, true);
addSpawn(DOLLBLADER, 54262, 219480, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 53412, 218077, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 54280, 217200, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55440, 218081, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATECAPTAIN, 55202, 217940, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 55225, 218236, -2944, Rnd.get(65536), false, 0, true);
addSpawn(PIRATEZOMBIE, 54973, 218075, -2944, Rnd.get(65536), false, 0, true);
cancelQuestTimer("minion_cycle", null, null);
}
}
else if (event.equalsIgnoreCase("zaken_unlock"))
{
int i1 = Rnd.get(15);
L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, Xcoords[i1], Ycoords[i1], Zcoords[i1], i1, false, 0, false);
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
spawnBoss(zaken);
}
else if (event.equalsIgnoreCase("CreateOnePrivateEx"))
addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0, true);

return super.onAdvEvent(event, npc, player);
}

public String onFactionCall(L2Npc npc, L2NpcInstance caller, L2PcInstance attacker, boolean isPet)
{
if ((caller == null) || (npc == null))
return super.onFactionCall(npc, caller, attacker, isPet);

if ((GetTimeHour() < 5) && (caller.getNpcId() != ZAKEN) && (npc.getNpcId() != ZAKEN))
{
if ((npc.getAI().getIntention() == CtrlIntention.IDLE) && (caller.getCurrentHp() < (0.9 * caller.getMaxHp())) && (Rnd.get(450) < 1))
{
int x = caller.getX();
int y = caller.getY();
int z = caller.getZ();
npc.teleToLocation(x, y, z, 0);
}
}
return super.onFactionCall(npc, caller, attacker, isPet);
}

@Override
public String onSpellFinished(L2Npc npc, L2PcInstance player, L2Skill skill)
{
if (npc.getNpcId() == ZAKEN)
{
int skillId = skill.getId();
if (skillId == SELF_TELEPORT)
{
int i1 = Rnd.get(15);
npc.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], 0);
npc.getAI().setIntention(CtrlIntention.IDLE);
}
else if (skillId == TELEPORT)
{
int i1 = Rnd.get(15);
player.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], i1);
((L2Attackable) npc).stopHating(player);
L2Character nextTarget = ((L2Attackable) npc).getMostHated();
if (nextTarget != null)
npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);
}
else if (skillId == MASS_TELEPORT)
{
int i1 = Rnd.get(15);
player.teleToLocation(Xcoords[i1], Ycoords[i1], Zcoords[i1], i1);
((L2Attackable) npc).stopHating(player);

for (L2Character character : npc.getKnownType(L2MonsterInstance.class))
{
if ((character != player) && !Util.checkIfInRange(250, player, character, true))
{
int r1 = Rnd.get(15);
character.teleToLocation(Xcoords[r1], Ycoords[r1], Zcoords[r1], r1);
((L2Attackable) npc).stopHating(character);
}
}

L2Character nextTarget = ((L2Attackable) npc).getMostHated();
if (nextTarget != null)
npc.getAI().setIntention(CtrlIntention.ATTACK, nextTarget);
}
}
return super.onSpellFinished(npc, player, skill);
}

@Override
public String onSkillSee(L2Npc npc, L2PcInstance caster, L2Skill skill, L2Object[] targets, boolean isPet)
{
if (skill.getAggroPoints() > 0)
((L2Attackable) npc).addDamageHate(caster, 0, ((skill.getAggroPoints() / npc.getMaxHp()) * 10 * 150));

if (Rnd.get(12) < 1)
{
_target = caster;
CallSkills(npc);
}
return super.onSkillSee(npc, caster, skill, targets, isPet);
}

@Override
public String onAggro(L2Npc npc, L2PcInstance player, boolean isPet)
{
if (npc == null)
return null;

final boolean isMage;
final L2Playable character;
if (isPet)
{
isMage = false;
character = player.getPet();
}
else
{
isMage = player.isMageClass();
character = player;
}

if (character == null)
return null;

if (!Config.RAID_DISABLE_CURSE && character.getLevel() - npc.getLevel() > 8)
{
L2Skill curse = null;
if (isMage)
{
if (!character.isMuted() && Rnd.get(4) == 0)
curse = FrequentSkill.RAID_CURSE.getSkill();
}
else
{
if (!character.isParalyzed() && Rnd.get(4) == 0)
curse = FrequentSkill.RAID_CURSE2.getSkill();
}

if (curse != null)
{
npc.broadcastPacket(new MagicSkillUse(npc, character, curse.getId(), curse.getLevel(), 300, 0));
curse.getEffects(npc, character);
}

((L2Attackable) npc).stopHating(character); // for calling again
return null;
}

if (_zakenLair.isInsideZone(npc))
{
L2Character target = isPet ? player.getPet() : player;
((L2Attackable) npc).addDamageHate(target, 1, 200);
}

int npcId = npc.getNpcId();
if (npcId == ZAKEN)
{
if (Rnd.get(15) < 1)
{
_target = player;
CallSkills(npc);
}
}
return super.onAggro(npc, player, isPet);
}

public void CallSkills(L2Npc npc)
{
if (npc.isCastingNow())
return;

int chance = Rnd.get(225);
npc.setTarget(_target);
if (chance < 1)
npc.doCast(SkillTable.getInstance().getInfo(TELEPORT, 1));
else if (chance < 2)
npc.doCast(SkillTable.getInstance().getInfo(MASS_TELEPORT, 1));
else if (chance < 4)
npc.doCast(SkillTable.getInstance().getInfo(HOLD, 1));
else if (chance < 8)
npc.doCast(SkillTable.getInstance().getInfo(DRAIN, 1));
else if (chance < 15)
npc.doCast(SkillTable.getInstance().getInfo(MASS_DUAL_ATTACK, 1));

if (Rnd.get(2) < 1)
{
if (_target == ((L2Attackable) npc).getMostHated())
npc.doCast(SkillTable.getInstance().getInfo(DUAL_ATTACK, 1));
}

if ((GetTimeHour() > 5) && (npc.getCurrentHp() < (npc.getMaxHp() * _telecheck) / 4))
{
_telecheck -= 1;
npc.doCast(SkillTable.getInstance().getInfo(SELF_TELEPORT, 1));
}
}

@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill)
{
int npcId = npc.getNpcId();
if (npcId == ZAKEN)
{
if (attacker.getMountType() == 1)
{
L2Skill skill2 = SkillTable.getInstance().getInfo(4258, 1);
if (attacker.getFirstEffect(skill2) == null)
{
npc.setTarget(attacker);
npc.doCast(skill2);
}
}
L2Character originalAttacker = isPet ? attacker.getPet() : attacker;
int hate = (int) ((damage / npc.getMaxHp() / 0.05) * 20000);
((L2Attackable) npc).addDamageHate(originalAttacker, 0, hate);

if (Rnd.get(10) < 1)
{
_target = attacker;
CallSkills(npc);
}

}
return super.onAttack(npc, attacker, damage, isPet, skill);
}

@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
{
int npcId = npc.getNpcId();
if (npcId == ZAKEN)
{
cancelQuestTimer("timer", npc, null);
cancelQuestTimer("minion_cycle", npc, null);
npc.broadcastPacket(new PlaySound(1, "BS02_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
long respawnTime = (long) Config.SPAWN_INTERVAL_ZAKEN + Rnd.get(-Config.RANDOM_SPAWN_TIME_ZAKEN, Config.RANDOM_SPAWN_TIME_ZAKEN);
respawnTime *= 3600000;
startQuestTimer("zaken_unlock", respawnTime, null, null, false);

StatsSet info = GrandBossManager.getInstance().getStatsSet(ZAKEN);
info.set("respawn_time", System.currentTimeMillis() + respawnTime);
GrandBossManager.getInstance().setStatsSet(ZAKEN, info);
}
else if (GrandBossManager.getInstance().getBossStatus(ZAKEN) == ALIVE)
{
if (npcId != ZAKEN)
startQuestTimer("CreateOnePrivateEx", ((30 + Rnd.get(60)) * 1000), npc, null, false);
}
return super.onKill(npc, killer, isPet);
}

public int GetTimeHour()
{
return (GameTimeTaskManager.getInstance().getGameTime() / 60) % 24;
}

}




Créditos Leonardo Holanda



Agora vamos Frintezza Uiiiiiiiaaaaaa !!!!! já vou add Zaken na nossa svn source

 

Ta vendo quem quer faz conseguimos ajudei pouco mas conseguimos um ajuda ali outro aqui e chega la

Editado por terry123456
Link para o comentário
Compartilhar em outros sites

Como podem ver o video demostrando o Tezza 95%

 

 

https://www.youtube.com/watch?v=S5GmfQoqNus

 

 

Código feito por reborn é o mesmo do video porém ele foi feito na base da acis 350 eu adaptei para o meu , esse código não era pra ser compartilhado como ele pediu a mim . Porém perdi contato com ele ai estar. ( Tentem adaptar ai ). Qual quer coisa eu ajudo.

 

 

aCis_GameServer

 

 

### Eclipse Workspace Patch 1.0

#P aCis_gameserver
Index: config/npcs.properties
===================================================================
--- config/npcs.properties (revision 90)
+++ config/npcs.properties (working copy)
@@ -185,9 +185,13 @@
# Random interval. Value is hour.
FrintezzaRandomSpawn = 8
-# Delay of appearance time of Frintezza. Value is minute.
-FrintezzaWaitTime = 1
+# Delay of appearance time of Frintezza. Value is minutes.
+FrintezzaWaitTime = 10
+# Min and Max Party in Frintezza Default Min = 4 | Max = 5
+FrintezzaMinParties = 4
+FrintezzaMaxParties = 5
+
# ------------------------------------------------------------
# Orfen
# ------------------------------------------------------------
Index: java/net/sf/l2j/Config.java
===================================================================
--- java/net/sf/l2j/Config.java (revision 90)
+++ java/net/sf/l2j/Config.java (working copy)
@@ -347,6 +347,8 @@
public static int SPAWN_INTERVAL_FRINTEZZA;
public static int RANDOM_SPAWN_TIME_FRINTEZZA;
public static int WAIT_TIME_FRINTEZZA;
+ public static int FRINTEZZA_MIN_PARTIES;
+ public static int FRINTEZZA_MAX_PARTIES;
public static int SPAWN_INTERVAL_ORFEN;
public static int RANDOM_SPAWN_TIME_ORFEN;
@@ -1052,7 +1054,9 @@
SPAWN_INTERVAL_FRINTEZZA = npcs.getProperty("FrintezzaSpawnInterval", 48);
RANDOM_SPAWN_TIME_FRINTEZZA = npcs.getProperty("FrintezzaRandomSpawn", 8);
- WAIT_TIME_FRINTEZZA = npcs.getProperty("FrintezzaWaitTime", 1) * 60000;
+ WAIT_TIME_FRINTEZZA = npcs.getProperty("FrintezzaWaitTime", 10) * 60000;
+ FRINTEZZA_MIN_PARTIES = npcs.getProperty("FrintezzaMinParties", 4);
+ FRINTEZZA_MAX_PARTIES = npcs.getProperty("FrintezzaMaxParties", 5);
SPAWN_INTERVAL_ORFEN = npcs.getProperty("OrfenSpawnInterval", 48);
RANDOM_SPAWN_TIME_ORFEN = npcs.getProperty("OrfenRandomSpawn", 20);
Index: java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java
===================================================================
--- java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java (revision 0)
+++ java/net/sf/l2j/gameserver/scripting/scripts/ai/individual/Frintezza.java (working copy)
@@ -0,0 +1,1503 @@
+/*
+ * This program is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later
+ * version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package net.sf.l2j.gameserver.scripting.scripts.ai.individual;
+
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import net.sf.l2j.commons.random.Rnd;
+
+import net.sf.l2j.Config;
+import net.sf.l2j.gameserver.ai.CtrlIntention;
+import net.sf.l2j.gameserver.datatables.DoorTable;
+import net.sf.l2j.gameserver.datatables.SkillTable;
+import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
+import net.sf.l2j.gameserver.instancemanager.ZoneManager;
+import net.sf.l2j.gameserver.model.L2CommandChannel;
+import net.sf.l2j.gameserver.model.L2Party;
+import net.sf.l2j.gameserver.model.L2Skill;
+import net.sf.l2j.gameserver.model.actor.L2Attackable;
+import net.sf.l2j.gameserver.model.actor.L2Character;
+import net.sf.l2j.gameserver.model.actor.L2Npc;
+import net.sf.l2j.gameserver.model.actor.instance.L2GrandBossInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2MonsterInstance;
+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.model.zone.type.L2BossZone;
+import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.serverpackets.AbstractNpcInfo.NpcInfo;
+import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;
+import net.sf.l2j.gameserver.network.serverpackets.Earthquake;
+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillCanceld;
+import net.sf.l2j.gameserver.network.serverpackets.MagicSkillUse;
+import net.sf.l2j.gameserver.network.serverpackets.NpcSay;
+import net.sf.l2j.gameserver.network.serverpackets.PlaySound;
+import net.sf.l2j.gameserver.network.serverpackets.SocialAction;
+import net.sf.l2j.gameserver.network.serverpackets.SpecialCamera;
+import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
+import net.sf.l2j.gameserver.scripting.scripts.ai.L2AttackableAIScript;
+import net.sf.l2j.gameserver.skills.AbnormalEffect;
+import net.sf.l2j.gameserver.templates.StatsSet;
+
+/**
+ * Frintezza AI
+ * @author Darki699
+ * @author SANDMAN L2J_JP(modified)
+ * @author JOJO Update by rocknow Updated by L2jOff team
+ */
+public class Frintezza extends L2AttackableAIScript
+{
+ private static final int[][] _invadeLoc =
+ {
+ { 174102, -76039, -5105 },
+ { 173235, -76884, -5105 },
+ { 175003, -76933, -5105 },
+ { 174196, -76190, -5105 },
+ { 174013, -76120, -5105 },
+ { 173263, -75161, -5105 }
+ };
+ private static final int[][] _skill =
+ {
+ { 5015, 1, 5000 },
+ { 5015, 4, 5000 },
+ { 5015, 2, 5000 },
+ { 5015, 5, 5000 },
+ { 5018, 1, 10000 },
+ { 5016, 1, 5000 },
+ { 5015, 3, 5000 },
+ { 5015, 6, 5000 },
+ { 5018, 2, 10000 },
+ { 5019, 1, 10000 },
+ { 5016, 1, 5000 }
+ };
+ private static final int[][] _mobLoc =
+ {
+ { 18328,172894,-76019,-5107,243 },
+ { 18328,174095,-77279,-5107,16216 },
+ { 18328,174111,-74833,-5107,49043 },
+ { 18328,175344,-76042,-5107,32847 },
+ { 18330,173489,-76227,-5134,63565 },
+ { 18330,173498,-75724,-5107,58498 },
+ { 18330,174365,-76745,-5107,22424 },
+ { 18330,174570,-75584,-5107,31968 },
+ { 18330,174613,-76179,-5107,31471 },
+ { 18332,173620,-75981,-5107,4588 },
+ { 18332,173630,-76340,-5107,62454 },
+ { 18332,173755,-75613,-5107,57892 },
+ { 18332,173823,-76688,-5107,2411 },
+ { 18332,174000,-75411,-5107,54718 },
+ { 18332,174487,-75555,-5107,33861 },
+ { 18332,174517,-76471,-5107,21893 },
+ { 18332,174576,-76122,-5107,31176 },
+ { 18332,174600,-75841,-5134,35927 },
+ { 18329,173481,-76043,-5107,61312 },
+ { 18329,173539,-75678,-5107,59524 },
+ { 18329,173584,-76386,-5107,3041 },
+ { 18329,173773,-75420,-5107,51115 },
+ { 18329,173777,-76650,-5107,12588 },
+ { 18329,174585,-76510,-5107,21704 },
+ { 18329,174623,-75571,-5107,40141 },
+ { 18329,174744,-76240,-5107,29202 },
+ { 18329,174769,-75895,-5107,29572 },
+ { 18333,173861,-76011,-5107,383 },
+ { 18333,173872,-76461,-5107,8041 },
+ { 18333,173898,-75668,-5107,51856 },
+ { 18333,174422,-75689,-5107,42878 },
+ { 18333,174460,-76355,-5107,27311 },
+ { 18333,174483,-76041,-5107,30947 },
+ { 18331,173515,-76184,-5107,6971 },
+ { 18331,173516,-75790,-5134,3142 },
+ { 18331,173696,-76675,-5107,6757 },
+ { 18331,173766,-75502,-5134,60827 },
+ { 18331,174473,-75321,-5107,37147 },
+ { 18331,174493,-76505,-5107,34503 },
+ { 18331,174568,-75654,-5134,41661 },
+ { 18331,174584,-76263,-5107,31729 },
+ { 18339,173892,-81592,-5123,50849 },
+ { 18339,173958,-81820,-5123,7459 },
+ { 18339,174128,-81805,-5150,21495 },
+ { 18339,174245,-81566,-5123,41760 },
+ { 18334,173264,-81529,-5072,1646 },
+ { 18334,173265,-81656,-5072,441 },
+ { 18334,173267,-81889,-5072,0 },
+ { 18334,173271,-82015,-5072,65382 },
+ { 18334,174867,-81655,-5073,32537 },
+ { 18334,174868,-81890,-5073,32768 },
+ { 18334,174869,-81485,-5073,32315 },
+ { 18334,174871,-82017,-5073,33007 },
+ { 18335,173074,-80817,-5107,8353 },
+ { 18335,173128,-82702,-5107,5345 },
+ { 18335,173181,-82544,-5107,65135 },
+ { 18335,173191,-80981,-5107,6947 },
+ { 18335,174859,-80889,-5134,24103 },
+ { 18335,174924,-82666,-5107,38710 },
+ { 18335,174947,-80733,-5107,22449 },
+ { 18335,175096,-82724,-5107,42205 },
+ { 18336,173435,-80512,-5107,65215 },
+ { 18336,173440,-82948,-5107,417 },
+ { 18336,173443,-83120,-5107,1094 },
+ { 18336,173463,-83064,-5107,286 },
+ { 18336,173465,-80453,-5107,174 },
+ { 18336,173465,-83006,-5107,2604 },
+ { 18336,173468,-82889,-5107,316 },
+ { 18336,173469,-80570,-5107,65353 },
+ { 18336,173469,-80628,-5107,166 },
+ { 18336,173492,-83121,-5107,394 },
+ { 18336,173493,-80683,-5107,0 },
+ { 18336,173497,-80510,-5134,417 },
+ { 18336,173499,-82947,-5107,0 },
+ { 18336,173521,-83063,-5107,316 },
+ { 18336,173523,-82889,-5107,128 },
+ { 18336,173524,-80627,-5134,65027 },
+ { 18336,173524,-83007,-5107,0 },
+ { 18336,173526,-80452,-5107,64735 },
+ { 18336,173527,-80569,-5134,65062 },
+ { 18336,174602,-83122,-5107,33104 },
+ { 18336,174604,-82949,-5107,33184 },
+ { 18336,174609,-80514,-5107,33234 },
+ { 18336,174609,-80684,-5107,32851 },
+ { 18336,174629,-80627,-5107,33346 },
+ { 18336,174632,-80570,-5107,32896 },
+ { 18336,174632,-83066,-5107,32768 },
+ { 18336,174635,-82893,-5107,33594 },
+ { 18336,174636,-80456,-5107,32065 },
+ { 18336,174639,-83008,-5107,33057 },
+ { 18336,174660,-80512,-5107,33057 },
+ { 18336,174661,-83121,-5107,32768 },
+ { 18336,174663,-82948,-5107,32768 },
+ { 18336,174664,-80685,-5107,32676 },
+ { 18336,174687,-83008,-5107,32520 },
+ { 18336,174691,-83066,-5107,32961 },
+ { 18336,174692,-80455,-5107,33202 },
+ { 18336,174692,-80571,-5107,32768 },
+ { 18336,174693,-80630,-5107,32994 },
+ { 18336,174693,-82889,-5107,32622 },
+ { 18337,172837,-82382,-5107,58363 },
+ { 18337,172867,-81123,-5107,64055 },
+ { 18337,172883,-82495,-5107,64764 },
+ { 18337,172916,-81033,-5107,7099 },
+ { 18337,172940,-82325,-5107,58998 },
+ { 18337,172946,-82435,-5107,58038 },
+ { 18337,172971,-81198,-5107,14768 },
+ { 18337,172992,-81091,-5107,9438 },
+ { 18337,173032,-82365,-5107,59041 },
+ { 18337,173064,-81125,-5107,5827 },
+ { 18337,175014,-81173,-5107,26398 },
+ { 18337,175061,-82374,-5107,43290 },
+ { 18337,175096,-81080,-5107,24719 },
+ { 18337,175169,-82453,-5107,37672 },
+ { 18337,175172,-80972,-5107,32315 },
+ { 18337,175174,-82328,-5107,41760 },
+ { 18337,175197,-81157,-5107,27617 },
+ { 18337,175245,-82547,-5107,40275 },
+ { 18337,175249,-81075,-5107,28435 },
+ { 18337,175292,-82432,-5107,42225 },
+ { 18338,173014,-82628,-5107,11874 },
+ { 18338,173033,-80920,-5107,10425 },
+ { 18338,173095,-82520,-5107,49152 },
+ { 18338,173115,-80986,-5107,9611 },
+ { 18338,173144,-80894,-5107,5345 },
+ { 18338,173147,-82602,-5107,51316 },
+ { 18338,174912,-80825,-5107,24270 },
+ { 18338,174935,-80899,-5107,18061 },
+ { 18338,175016,-82697,-5107,39533 },
+ { 18338,175041,-80834,-5107,25420 },
+ { 18338,175071,-82549,-5107,39163 },
+ { 18338,175154,-82619,-5107,36345 }
+ };
+
+ private static final int SCARLET1 = 29046;
+ private static final int SCARLET2 = 29047;
+ private static final int FRINTEZZA = 29045;
+ private static final int GUIDE = 32011;
+ private static final int CUBE = 29061;
+
+ // Frintezza Status Tracking :
+ private static final byte DORMANT = 0; // Frintezza is spawned and no one has entered yet. Entry is unlocked
+ private static final byte WAITING = 1; // Frintezza is spawend and someone has entered, triggering a 30 minute window for additional people to enter before he unleashes his attack. Entry is unlocked
+ private static final byte FIGHTING = 2; // Frintezza is engaged in battle, annihilating his foes. Entry is locked
+ private static final byte DEAD = 3; // Frintezza has been killed. Entry is locked
+
+ private static long _LastAction = 0;
+ private static int _Angle = 0;
+ private static int _Heading = 0;
+ private static int _LocCycle = 0;
+ private static int _Bomber = 0;
+ private static int _CheckDie = 0;
+ private static int _OnCheck = 0;
+ private static int _OnSong = 0;
+ private static int _Abnormal = 0;
+ private static int _OnMorph = 0;
+ private static int _Scarlet_x = 0;
+ private static int _Scarlet_y = 0;
+ private static int _Scarlet_z = 0;
+ private static int _Scarlet_h = 0;
+ private static int _SecondMorph = 0;
+ private static int _ThirdMorph = 0;
+ private static int _KillHallAlarmDevice = 0;
+ private static int _KillDarkChoirPlayer = 0;
+ private static int _KillDarkChoirCaptain = 0;
+
+ private static L2BossZone _Zone;
+ private L2GrandBossInstance frintezza, weakScarlet, strongScarlet, activeScarlet;
+ private L2MonsterInstance demon1, demon2, demon3, demon4, portrait1, portrait2, portrait3, portrait4;
+ private L2Npc _frintezzaDummy, _overheadDummy, _portraitDummy1, _portraitDummy3, _scarletDummy;
+ private static List<L2PcInstance> _PlayersInside = new CopyOnWriteArrayList<>();
+ private static List<L2Npc> _Room1Mobs = new CopyOnWriteArrayList<>();
+ private static List<L2Npc> _Room2Mobs = new CopyOnWriteArrayList<>();
+ private static List<L2Attackable> Minions = new CopyOnWriteArrayList<>();
+
+ // Boss: Frintezza
+ public Frintezza()
+ {
+ super("ai/individual");
+ int[] mob = {SCARLET1, SCARLET2, FRINTEZZA, 18328, 18329, 18330, 18331, 18332, 18333, 18334, 18335, 18336, 18337, 18338, 18339, 29048, 29049, 29050, 29051};
+ _Zone = ZoneManager.getInstance().getZoneById(110011, L2BossZone.class);
+ addAttackId(mob);
+ addKillId(mob);
+ addStartNpc(GUIDE);
+ addTalkId(GUIDE);
+ addStartNpc(CUBE);
+ addTalkId(CUBE);
+ StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
+ int status = GrandBossManager.getInstance().getBossStatus(FRINTEZZA);
+ if (status == DEAD)
+ {
+ long temp = (info.getLong("respawn_time") - System.currentTimeMillis());
+ if (temp > 0)
+ startQuestTimer("frintezza_unlock", temp, null, null, false);
+ else
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
+ }
+ else if (status != DORMANT)
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
+ }
+
+ @Override
+ public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ long temp = 0;
+ if (event.equalsIgnoreCase("waiting"))
+ {
+ startQuestTimer("close", 27000, npc, null, false);
+ startQuestTimer("camera_1", 30000, npc, null, false);
+ _Zone.broadcastPacket(new Earthquake(174232, -88020, -5116, 45, 27));
+ }
+ else if (event.equalsIgnoreCase("room1_spawn"))
+ {
+ CreatureSay cs = new CreatureSay(0, 1, "Hall Alarm Device", "Intruders! Sound the alarm!");
+ _Zone.broadcastPacket(cs);
+ for (int i = 0; i <= 17; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room1Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room1_spawn2"))
+ {
+ for (int i = 18; i <= 26; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room1Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room1_spawn3"))
+ {
+ for (int i = 27; i <= 32; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room1Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room1_spawn4"))
+ {
+ for (int i = 33; i <= 40; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room1Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room2_spawn"))
+ {
+ for (int i = 41; i <= 44; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room2Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room2_spawn2"))
+ {
+ for (int i = 45; i <= 131; i++)
+ {
+ L2Npc mob = addSpawn(_mobLoc[0], _mobLoc[1], _mobLoc[2], _mobLoc[3], _mobLoc[4], false, 0, false);
+ _Room2Mobs.add(mob);
+ }
+ }
+ else if (event.equalsIgnoreCase("room1_del"))
+ {
+ for (L2Npc mob : _Room1Mobs)
+ {
+ if (mob != null)
+ mob.deleteMe();
+ }
+ _Room1Mobs.clear();
+ }
+ else if (event.equalsIgnoreCase("room2_del"))
+ {
+ for (L2Npc mob : _Room2Mobs)
+ {
+ if (mob != null)
+ mob.deleteMe();
+ }
+ _Room2Mobs.clear();
+ }
+ else if (event.equalsIgnoreCase("room3_del"))
+ {
+ if (demon1 != null)
+ demon1.deleteMe();
+ if (demon2 != null)
+ demon2.deleteMe();
+ if (demon3 != null)
+ demon3.deleteMe();
+ if (demon4 != null)
+ demon4.deleteMe();
+ if (portrait1 != null)
+ portrait1.deleteMe();
+ if (portrait2 != null)
+ portrait2.deleteMe();
+ if (portrait3 != null)
+ portrait3.deleteMe();
+ if (portrait4 != null)
+ portrait4.deleteMe();
+ if (frintezza != null)
+ frintezza.deleteMe();
+ if (weakScarlet != null)
+ weakScarlet.deleteMe();
+ if (strongScarlet != null)
+ strongScarlet.deleteMe();
+
+ demon1 = null;
+ demon2 = null;
+ demon3 = null;
+ demon4 = null;
+ portrait1 = null;
+ portrait2 = null;
+ portrait3 = null;
+ portrait4 = null;
+ frintezza = null;
+ weakScarlet = null;
+ strongScarlet = null;
+ activeScarlet = null;
+ }
+ else if (event.equalsIgnoreCase("clean"))
+ {
+ _LastAction = 0;
+ _LocCycle = 0;
+ _CheckDie = 0;
+ _OnCheck = 0;
+ _Abnormal = 0;
+ _OnMorph = 0;
+ _SecondMorph = 0;
+ _ThirdMorph = 0;
+ _KillHallAlarmDevice = 0;
+ _KillDarkChoirPlayer = 0;
+ _KillDarkChoirCaptain = 0;
+ _PlayersInside.clear();
+ }
+ else if (event.equalsIgnoreCase("close"))
+ {
+ for (int i = 25150051; i <= 25150058; i++)
+ DoorTable.getInstance().getDoor(i).closeMe();
+ for (int i = 25150061; i <= 25150070; i++)
+ DoorTable.getInstance().getDoor(i).closeMe();
+
+ DoorTable.getInstance().getDoor(25150042).closeMe();
+ DoorTable.getInstance().getDoor(25150043).closeMe();
+ DoorTable.getInstance().getDoor(25150045).closeMe();
+ DoorTable.getInstance().getDoor(25150046).closeMe();
+ }
+ else if (event.equalsIgnoreCase("loc_check"))
+ {
+ if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
+ {
+ if (!_Zone.isInsideZone(npc))
+ npc.teleToLocation(174232, -88020, -5116, 0);
+ if (npc.getX() < 171932 || npc.getX() > 176532 || npc.getY() < -90320 || npc.getY() > -85720 || npc.getZ() < -5130)
+ npc.teleToLocation(174232, -88020, -5116, 0);
+ }
+ }
+ else if (event.equalsIgnoreCase("camera_1"))
+ {
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, FIGHTING);
+ _frintezzaDummy = addSpawn(29052, 174240, -89805, -5022, 16048, false, 0, false);
+ _frintezzaDummy.setIsInvul(true);
+ _frintezzaDummy.setIsImmobilized(true);
+ _overheadDummy = addSpawn(29052, 174232, -88020, -5110, 16384, false, 0, false);
+ _overheadDummy.setIsInvul(true);
+ _overheadDummy.setIsImmobilized(true);
+ _overheadDummy.setCollisionHeight(600);
+ _Zone.broadcastPacket(new NpcInfo(_overheadDummy, null));
+ _portraitDummy1 = addSpawn(29052, 172450, -87890, -5100, 16048, false, 0, false);
+ _portraitDummy1.setIsImmobilized(true);
+ _portraitDummy1.setIsInvul(true);
+ _portraitDummy3 = addSpawn(29052, 176012, -87890, -5100, 16048, false, 0, false);
+ _portraitDummy3.setIsImmobilized(true);
+ _portraitDummy3.setIsInvul(true);
+ _scarletDummy = addSpawn(29053, 174232, -88020, -5110, 16384, false, 0, false);
+ _scarletDummy.setIsInvul(true);
+ _scarletDummy.setIsImmobilized(true);
+ startQuestTimer("stop_pc", 0, npc, null, false);
+ startQuestTimer("camera_2", 1000, _overheadDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_2"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
+ startQuestTimer("camera_2b", 0, _overheadDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_2b"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 0, 75, -89, 0, 100, 0, 0, 1, 0));
+ startQuestTimer("camera_3", 0, _overheadDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_3"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 300, 90, -10, 6500, 7000, 0, 0, 1, 0));
+ frintezza = (L2GrandBossInstance) addSpawn(FRINTEZZA, 174240, -89805, -5022, 16048, false, 0, false);
+ GrandBossManager.getInstance().addBoss(frintezza);
+ frintezza.setIsImmobilized(true);
+ frintezza.setIsInvul(true);
+ frintezza.disableAllSkills();
+ _Zone.updateKnownList(frintezza);
+ demon2 = (L2MonsterInstance) addSpawn(29051, 175876, -88713, -5100, 28205, false, 0, false);
+ demon2.setIsImmobilized(true);
+ demon2.disableAllSkills();
+ _Zone.updateKnownList(demon2);
+ demon3 = (L2MonsterInstance) addSpawn(29051, 172608, -88702, -5100, 64817, false, 0, false);
+ demon3.setIsImmobilized(true);
+ demon3.disableAllSkills();
+ _Zone.updateKnownList(demon3);
+ demon1 = (L2MonsterInstance) addSpawn(29050, 175833, -87165, -5100, 35048, false, 0, false);
+ demon1.setIsImmobilized(true);
+ demon1.disableAllSkills();
+ _Zone.updateKnownList(demon1);
+ demon4 = (L2MonsterInstance) addSpawn(29050, 172634, -87165, -5100, 57730, false, 0, false);
+ demon4.setIsImmobilized(true);
+ demon4.disableAllSkills();
+ _Zone.updateKnownList(demon4);
+ startQuestTimer("camera_4", 6500, _overheadDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_4"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 1800, 90, 8, 6500, 7000, 0, 0, 1, 0));
+ startQuestTimer("camera_5", 900, _frintezzaDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_5"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_frintezzaDummy.getObjectId(), 140, 90, 10, 2500, 4500, 0, 0, 1, 0));
+ startQuestTimer("camera_5b", 4000, _frintezzaDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_5b"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 1000, 0, 0, 1, 0));
+ startQuestTimer("camera_6", 0, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_6"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 40, 75, -10, 0, 12000, 0, 0, 1, 0));
+ startQuestTimer("camera_7", 1350, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_7"))
+ {
+ _Zone.broadcastPacket(new SocialAction(frintezza, 2));
+ startQuestTimer("camera_8", 7000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_8"))
+ {
+ startQuestTimer("camera_9", 1000, frintezza, null, false);
+ _frintezzaDummy.deleteMe();
+ _frintezzaDummy = null;
+ }
+ else if (event.equalsIgnoreCase("camera_9"))
+ {
+ _Zone.broadcastPacket(new SocialAction(demon2, 1));
+ _Zone.broadcastPacket(new SocialAction(demon3, 1));
+ startQuestTimer("camera_9b", 400, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_9b"))
+ {
+ _Zone.broadcastPacket(new SocialAction(demon1, 1));
+ _Zone.broadcastPacket(new SocialAction(demon4, 1));
+ for (L2Character pc : _Zone.getCharactersInside())
+ {
+ if (pc instanceof L2PcInstance)
+ if (pc.getX() < 174232)
+ pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 1000, 0, 0, 1, 0));
+ else
+ pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 1000, 0, 0, 1, 0));
+ }
+ startQuestTimer("camera_9c", 0, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_9c"))
+ {
+ for (L2Character pc : _Zone.getCharactersInside())
+ {
+ if (pc instanceof L2PcInstance)
+ if (pc.getX() < 174232)
+ pc.broadcastPacket(new SpecialCamera(_portraitDummy1.getObjectId(), 1000, 118, 0, 0, 10000, 0, 0, 1, 0));
+ else
+ pc.broadcastPacket(new SpecialCamera(_portraitDummy3.getObjectId(), 1000, 62, 0, 0, 10000, 0, 0, 1, 0));
+ }
+ startQuestTimer("camera_10", 2000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_10"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 0, 0, 1000, 0, 0, 1, 0));
+ startQuestTimer("camera_11", 0, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_11"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 240, 90, 25, 5500, 10000, 0, 0, 1, 0));
+ _Zone.broadcastPacket(new SocialAction(frintezza, 3));
+ _portraitDummy1.deleteMe();
+ _portraitDummy3.deleteMe();
+ _portraitDummy1 = null;
+ _portraitDummy3 = null;
+ startQuestTimer("camera_12", 4500, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_12"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
+ startQuestTimer("camera_13", 700, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_13"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 195, 35, 0, 10000, 0, 0, 1, 0));
+ startQuestTimer("camera_14", 1300, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_14"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 120, 180, 45, 1500, 10000, 0, 0, 1, 0));
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
+ startQuestTimer("camera_16", 1500, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_16"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 520, 135, 45, 8000, 10000, 0, 0, 1, 0));
+ startQuestTimer("camera_17", 7500, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_17"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 1500, 110, 25, 10000, 13000, 0, 0, 1, 0));
+ startQuestTimer("camera_18", 9500, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_18"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 930, 160, -20, 0, 1000, 0, 0, 1, 0));
+ startQuestTimer("camera_18b", 0, _overheadDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_18b"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_overheadDummy.getObjectId(), 600, 180, -25, 0, 10000, 0, 0, 1, 0));
+ _Zone.broadcastPacket(new MagicSkillUse(_scarletDummy, _overheadDummy, 5004, 1, 5800, 0));
+ weakScarlet = (L2GrandBossInstance) addSpawn(29046, 174232, -88020, -5110, 16384, false, 0, true);
+ weakScarlet.setIsInvul(true);
+ weakScarlet.setIsImmobilized(true);
+ weakScarlet.disableAllSkills();
+ _Zone.updateKnownList(weakScarlet);
+ activeScarlet = weakScarlet;
+ startQuestTimer("camera_19", 2400, _scarletDummy, null, false);
+ startQuestTimer("camera_19b", 5000, _scarletDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_19"))
+ weakScarlet.teleToLocation(174232, -88020, -5110, 0);
+ else if (event.equalsIgnoreCase("camera_19b"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(_scarletDummy.getObjectId(), 800, 180, 10, 1000, 10000, 0, 0, 1, 0));
+ startQuestTimer("camera_20", 2100, _scarletDummy, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_20"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 300, 60, 8, 0, 10000, 0, 0, 1, 0));
+ startQuestTimer("camera_21", 2000, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_21"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 500, 90, 10, 3000, 5000, 0, 0, 1, 0));
+ startQuestTimer("camera_22", 3000, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_22"))
+ {
+ portrait2 = (L2MonsterInstance) addSpawn(29049, 175876, -88713, -5000, 28205, false, 0, false);
+ portrait2.setIsImmobilized(true);
+ portrait2.disableAllSkills();
+ _Zone.updateKnownList(portrait2);
+ portrait3 = (L2MonsterInstance) addSpawn(29049, 172608, -88702, -5000, 64817, false, 0, false);
+ portrait3.setIsImmobilized(true);
+ portrait3.disableAllSkills();
+ _Zone.updateKnownList(portrait3);
+ portrait1 = (L2MonsterInstance) addSpawn(29048, 175833, -87165, -5000, 35048, false, 0, false);
+ portrait1.setIsImmobilized(true);
+ portrait1.disableAllSkills();
+ _Zone.updateKnownList(portrait1);
+ portrait4 = (L2MonsterInstance) addSpawn(29048, 172634, -87165, -5000, 57730, false, 0, false);
+ portrait4.setIsImmobilized(true);
+ portrait4.disableAllSkills();
+ _Zone.updateKnownList(portrait4);
+ _overheadDummy.deleteMe();
+ _scarletDummy.deleteMe();
+ _overheadDummy = null;
+ _scarletDummy = null;
+ startQuestTimer("camera_23", 2000, weakScarlet, null, false);
+ startQuestTimer("start_pc", 2000, weakScarlet, null, false);
+ startQuestTimer("loc_check", 60000, weakScarlet, null, true);
+ startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
+ startQuestTimer("skill01", 10000 + Rnd.get(10000), weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("camera_23"))
+ {
+ demon1.setIsImmobilized(false);
+ demon2.setIsImmobilized(false);
+ demon3.setIsImmobilized(false);
+ demon4.setIsImmobilized(false);
+ demon1.enableAllSkills();
+ demon2.enableAllSkills();
+ demon3.enableAllSkills();
+ demon4.enableAllSkills();
+ portrait1.setIsImmobilized(false);
+ portrait2.setIsImmobilized(false);
+ portrait3.setIsImmobilized(false);
+ portrait4.setIsImmobilized(false);
+ portrait1.enableAllSkills();
+ portrait2.enableAllSkills();
+ portrait3.enableAllSkills();
+ portrait4.enableAllSkills();
+ weakScarlet.setIsInvul(false);
+ weakScarlet.setIsImmobilized(false);
+ weakScarlet.enableAllSkills();
+ weakScarlet.setRunning();
+
+ startQuestTimer("spawn_minion", 20000, portrait1, null, false);
+ startQuestTimer("spawn_minion", 20000, portrait2, null, false);
+ startQuestTimer("spawn_minion", 20000, portrait3, null, false);
+ startQuestTimer("spawn_minion", 20000, portrait4, null, false);
+ }
+ else if (event.equalsIgnoreCase("stop_pc"))
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ cha.abortAttack();
+ cha.abortCast();
+ cha.disableAllSkills();
+ cha.setTarget(null);
+ cha.stopMove(null);
+ cha.setIsImmobilized(true);
+ cha.getAI().setIntention(CtrlIntention.IDLE);
+ }
+ }
+ else if (event.equalsIgnoreCase("stop_npc"))
+ {
+ _Heading = npc.getHeading();
+ if (_Heading < 32768)
+ _Angle = Math.abs(180 - (int) (_Heading / 182.044444444));
+ else
+ _Angle = Math.abs(540 - (int) (_Heading / 182.044444444));
+ }
+ else if (event.equalsIgnoreCase("start_pc"))
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ if (cha != frintezza)
+ {
+ cha.enableAllSkills();
+ cha.setIsImmobilized(false);
+ }
+ }
+ }
+ else if (event.equalsIgnoreCase("start_npc"))
+ {
+ npc.setRunning();
+ npc.setIsInvul(false);
+ }
+ else if (event.equalsIgnoreCase("morph_end"))
+ {
+ _OnMorph = 0;
+ }
+ else if (event.equalsIgnoreCase("morph_01"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 2000, 15000, 0, 0, 1, 0));
+ startQuestTimer("morph_02", 3000, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_02"))
+ {
+ _Zone.broadcastPacket(new SocialAction(weakScarlet, 1));
+ weakScarlet.setRHandId(7903);
+ startQuestTimer("morph_03", 4000, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_03"))
+ {
+ startQuestTimer("morph_04", 1500, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_04"))
+ {
+ _Zone.broadcastPacket(new SocialAction(weakScarlet, 4));
+ L2Skill skill = SkillTable.getInstance().getInfo(5017, 1);
+ if (skill != null)
+ skill.getEffects(weakScarlet, weakScarlet);
+
+ startQuestTimer("morph_end", 6000, weakScarlet, null, false);
+ startQuestTimer("start_pc", 3000, weakScarlet, null, false);
+ startQuestTimer("start_npc", 3000, weakScarlet, null, false);
+ startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
+ startQuestTimer("skill02", 10000 + Rnd.get(10000), weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_05a"))
+ {
+ _Zone.broadcastPacket(new SocialAction(frintezza, 4));
+ }
+ else if (event.equalsIgnoreCase("morph_05"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 1000, 0, 0, 1, 0));
+ startQuestTimer("morph_06", 0, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_06"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 250, 120, 15, 0, 10000, 0, 0, 1, 0));
+
+ cancelQuestTimers("loc_check");
+
+ _Scarlet_x = weakScarlet.getX();
+ _Scarlet_y = weakScarlet.getY();
+ _Scarlet_z = weakScarlet.getZ();
+ _Scarlet_h = weakScarlet.getHeading();
+ weakScarlet.deleteMe();
+ weakScarlet = null;
+ activeScarlet = null;
+ weakScarlet = (L2GrandBossInstance) addSpawn(29046, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
+ weakScarlet.setIsInvul(true);
+ weakScarlet.setIsImmobilized(true);
+ weakScarlet.disableAllSkills();
+ weakScarlet.setRHandId(7903);
+ _Zone.updateKnownList(weakScarlet);
+
+ startQuestTimer("morph_07", 7000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_07"))
+ {
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 500, 70, 15, 3000, 10000, 0, 0, 1, 0));
+ startQuestTimer("morph_08", 3000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_08"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 2500, 90, 12, 6000, 10000, 0, 0, 1, 0));
+ startQuestTimer("morph_09", 3000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_09"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 1000, 0, 0, 1, 0));
+ startQuestTimer("morph_10", 0, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_10"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 250, _Angle, 12, 0, 10000, 0, 0, 1, 0));
+ startQuestTimer("morph_11", 500, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_11"))
+ {
+ weakScarlet.doDie(weakScarlet);
+ _Zone.broadcastPacket(new SpecialCamera(weakScarlet.getObjectId(), 450, _Angle, 14, 8000, 8000, 0, 0, 1, 0));
+
+ startQuestTimer("morph_12", 6250, weakScarlet, null, false);
+ startQuestTimer("morph_13", 7200, weakScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_12"))
+ {
+ weakScarlet.deleteMe();
+ weakScarlet = null;
+ }
+ else if (event.equalsIgnoreCase("morph_13"))
+ {
+ strongScarlet = (L2GrandBossInstance) addSpawn(SCARLET2, _Scarlet_x, _Scarlet_y, _Scarlet_z, _Scarlet_h, false, 0, false);
+ strongScarlet.setIsInvul(true);
+ strongScarlet.setIsImmobilized(true);
+ strongScarlet.disableAllSkills();
+ _Zone.updateKnownList(strongScarlet);
+ activeScarlet = strongScarlet;
+
+ _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 450, _Angle, 12, 500, 14000, 0, 0, 1, 0));
+
+ startQuestTimer("morph_14", 3000, strongScarlet, null, false);
+ startQuestTimer("loc_check", 60000, strongScarlet, null, true);
+ }
+ else if (event.equalsIgnoreCase("morph_14"))
+ {
+ startQuestTimer("morph_15", 5100, strongScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_15"))
+ {
+ _Zone.broadcastPacket(new SocialAction(strongScarlet, 2));
+ L2Skill skill = SkillTable.getInstance().getInfo(5017, 1);
+ if (skill != null)
+ skill.getEffects(strongScarlet, strongScarlet);
+
+ startQuestTimer("morph_end", 9000, strongScarlet, null, false);
+ startQuestTimer("start_pc", 6000, strongScarlet, null, false);
+ startQuestTimer("start_npc", 6000, strongScarlet, null, false);
+ startQuestTimer("songs_play", 10000 + Rnd.get(10000), frintezza, null, false);
+ startQuestTimer("skill03", 10000 + Rnd.get(10000), strongScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_16"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 300, _Angle - 180, 5, 0, 7000, 0, 0, 1, 0));
+ startQuestTimer("morph_17", 0, strongScarlet, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_17"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(strongScarlet.getObjectId(), 200, _Angle, 85, 4000, 10000, 0, 0, 1, 0));
+ startQuestTimer("morph_17b", 7400, frintezza, null, false);
+ startQuestTimer("morph_18", 7500, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_17b"))
+ {
+ frintezza.doDie(frintezza);
+ }
+ else if (event.equalsIgnoreCase("morph_18"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 120, 5, 0, 7000, 0, 0, 1, 0));
+ startQuestTimer("morph_19", 0, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_19"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 100, 90, 5, 5000, 15000, 0, 0, 1, 0));
+ startQuestTimer("morph_20", 7000, frintezza, null, false);
+ startQuestTimer("spawn_cubes", 7000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("morph_20"))
+ {
+ _Zone.broadcastPacket(new SpecialCamera(frintezza.getObjectId(), 900, 90, 25, 7000, 10000, 0, 0, 1, 0));
+ startQuestTimer("start_pc", 7000, frintezza, null, false);
+ }
+ else if (event.equalsIgnoreCase("songs_play"))
+ {
+ if (frintezza != null && !frintezza.isDead() && _OnMorph == 0)
+ {
+ _OnSong = Rnd.get(1, 5);
+ if (_OnSong == 1 && _ThirdMorph == 1 && strongScarlet.getCurrentHp() < strongScarlet.getMaxHp() * 0.6 && Rnd.get(100) < 80)
+ {
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 1, 32000, 0));
+ startQuestTimer("songs_effect", 5000, frintezza, null, false);
+ startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
+ }
+ else if (_OnSong == 2 || _OnSong == 3)
+ {
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, _OnSong, 32000, 0));
+ startQuestTimer("songs_effect", 5000, frintezza, null, false);
+ startQuestTimer("songs_play", 32000 + Rnd.get(10000), frintezza, null, false);
+ }
+ else if (_OnSong == 4 && _SecondMorph == 1)
+ {
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 4, 31000, 0));
+ startQuestTimer("songs_effect", 5000, frintezza, null, false);
+ startQuestTimer("songs_play", 31000 + Rnd.get(10000), frintezza, null, false);
+ }
+ else if (_OnSong == 5 && _ThirdMorph == 1 && _Abnormal == 0)
+ {
+ _Abnormal = 1;
+ _Zone.broadcastPacket(new MagicSkillUse(frintezza, frintezza, 5007, 5, 35000, 0));
+ startQuestTimer("songs_effect", 5000, frintezza, null, false);
+ startQuestTimer("songs_play", 35000 + Rnd.get(10000), frintezza, null, false);
+ }
+ else
+ startQuestTimer("songs_play", 5000 + Rnd.get(5000), frintezza, null, false);
+ }
+ }
+ else if (event.equalsIgnoreCase("songs_effect"))
+ {
+ L2Skill skill = SkillTable.getInstance().getInfo(5008, _OnSong);
+ if (skill == null)
+ return null;
+
+ if (_OnSong == 1 || _OnSong == 2 || _OnSong == 3)
+ {
+ if (frintezza != null && !frintezza.isDead() && activeScarlet != null && !activeScarlet.isDead())
+ skill.getEffects(frintezza, activeScarlet);
+ }
+ else if (_OnSong == 4)
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ if (cha instanceof L2PcInstance && Rnd.get(100) < 80)
+ {
+ skill.getEffects(frintezza, cha);
+ cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(5008, 4));
+ }
+ }
+ }
+ else if (_OnSong == 5)
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ if (cha instanceof L2PcInstance && Rnd.get(100) < 70)
+ {
+ cha.abortAttack();
+ cha.abortCast();
+ cha.disableAllSkills();
+ cha.stopMove(null);
+ cha.setIsParalyzed(true);
+ cha.setIsImmobilized(true);
+ cha.getAI().setIntention(CtrlIntention.IDLE);
+ skill.getEffects(frintezza, cha);
+ cha.startAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
+ cha.sendPacket(SystemMessage.getSystemMessage(SystemMessageId.YOU_FEEL_S1_EFFECT).addSkillName(5008, 5));
+ }
+ }
+ startQuestTimer("stop_effect", 25000, frintezza, null, false);
+ }
+ }
+ else if (event.equalsIgnoreCase("stop_effect"))
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ if (cha instanceof L2PcInstance)
+ {
+ cha.stopAbnormalEffect(AbnormalEffect.DANCE_STUNNED);
+ cha.stopAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
+ cha.enableAllSkills();
+ cha.setIsImmobilized(false);
+ cha.setIsParalyzed(false);
+ }
+ }
+ _Abnormal = 0;
+ }
+ else if (event.equalsIgnoreCase("attack_stop"))
+ {
+ cancelQuestTimers("skill01");
+ cancelQuestTimers("skill02");
+ cancelQuestTimers("skill03");
+ cancelQuestTimers("songs_play");
+ cancelQuestTimers("songs_effect");
+
+ _Zone.broadcastPacket(new MagicSkillCanceld(frintezza.getObjectId()));
+ }
+ else if (event.equalsIgnoreCase("check_hp"))
+ {
+ if (npc.isDead())
+ {
+ _OnMorph = 1;
+ _Zone.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
+
+ startQuestTimer("attack_stop", 0, frintezza, null, false);
+ startQuestTimer("stop_pc", 0, npc, null, false);
+ startQuestTimer("stop_npc", 0, npc, null, false);
+ startQuestTimer("morph_16", 0, npc, null, false);
+ }
+ else
+ {
+ _CheckDie = _CheckDie + 10;
+ if (_CheckDie < 3000)
+ startQuestTimer("check_hp", 10, npc, null, false);
+ else
+ {
+ _OnCheck = 0;
+ _CheckDie = 0;
+ }
+ }
+ }
+ else if (event.equalsIgnoreCase("skill01"))
+ {
+ if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0)
+ {
+ int i = Rnd.get(0, 1);
+ L2Skill skill = SkillTable.getInstance().getInfo(_skill[0], _skill[1]);
+ if (skill != null)
+ {
+ weakScarlet.stopMove(null);
+ weakScarlet.setIsCastingNow(true);
+ weakScarlet.doCast(skill);
+ }
+ startQuestTimer("skill01", _skill[2] + 5000 + Rnd.get(10000), npc, null, false);
+ }
+ }
+ else if (event.equalsIgnoreCase("skill02"))
+ {
+ if (weakScarlet != null && !weakScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0)
+ {
+ int i = 0;
+ if (_Abnormal == 0)
+ i = Rnd.get(2, 5);
+ else
+ i = Rnd.get(2, 4);
+
+ L2Skill skill = SkillTable.getInstance().getInfo(_skill[0], _skill[1]);
+ if (skill != null)
+ {
+ weakScarlet.stopMove(null);
+ weakScarlet.setIsCastingNow(true);
+ weakScarlet.doCast(skill);
+ }
+ startQuestTimer("skill02", _skill[2] + 5000 + Rnd.get(10000), npc, null, false);
+
+ if (i == 5)
+ {
+ _Abnormal = 1;
+ startQuestTimer("float_effect", 4000, weakScarlet, null, false);
+ }
+ }
+ }
+ else if (event.equalsIgnoreCase("skill03"))
+ {
+ if (strongScarlet != null && !strongScarlet.isDead() && _SecondMorph == 1 && _ThirdMorph == 1 && _OnMorph == 0)
+ {
+ int i = 0;
+ if (_Abnormal == 0)
+ i = Rnd.get(6, 10);
+ else
+ i = Rnd.get(6, 9);
+
+ L2Skill skill = SkillTable.getInstance().getInfo(_skill[0], _skill[1]);
+ if (skill != null)
+ {
+ strongScarlet.stopMove(null);
+ strongScarlet.setIsCastingNow(true);
+ strongScarlet.doCast(skill);
+ }
+ startQuestTimer("skill03", _skill[2] + 5000 + Rnd.get(10000), npc, null, false);
+
+ if (i == 10)
+ {
+ _Abnormal = 1;
+ startQuestTimer("float_effect", 3000, npc, null, false);
+ }
+ }
+ }
+ else if (event.equalsIgnoreCase("float_effect"))
+ {
+ if (npc.isCastingNow())
+ {
+ startQuestTimer("float_effect", 500, npc, null, false);
+ }
+ else
+ {
+ for (L2Character cha : _Zone.getCharactersInside())
+ {
+ if (cha instanceof L2PcInstance)
+ {
+ if (cha.getFirstEffect(5016) != null)
+ {
+ cha.abortAttack();
+ cha.abortCast();
+ cha.disableAllSkills();
+ cha.stopMove(null);
+ cha.setIsParalyzed(true);
+ cha.setIsImmobilized(true);
+ cha.getAI().setIntention(CtrlIntention.IDLE);
+ cha.startAbnormalEffect(AbnormalEffect.FLOATING_ROOT);
+ }
+ }
+ }
+ startQuestTimer("stop_effect", 25000, npc, null, false);
+ }
+ }
+ else if (event.equalsIgnoreCase("action"))
+ {
+ _Zone.broadcastPacket(new SocialAction(npc, 1));
+ }
+ else if (event.equalsIgnoreCase("bomber"))
+ {
+ _Bomber = 0;
+ }
+ else if (event.equalsIgnoreCase("room_final"))
+ {
+ _Zone.broadcastPacket(new NpcSay(npc.getObjectId(), 1, npc.getNpcId(), "Exceeded his time limit, challenge failed!"));
+ _Zone.oustAllPlayers();
+
+ cancelQuestTimers("waiting");
+ cancelQuestTimers("frintezza_despawn");
+ startQuestTimer("clean", 1000, npc, null, false);
+ startQuestTimer("close", 1000, npc, null, false);
+ startQuestTimer("room1_del", 1000, npc, null, false);
+ startQuestTimer("room2_del", 1000, npc, null, false);
+
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
+ }
+ else if (event.equalsIgnoreCase("frintezza_despawn"))
+ {
+ temp = (System.currentTimeMillis() - _LastAction);
+ if (temp > 900000)
+ {
+ _Zone.oustAllPlayers();
+
+ cancelQuestTimers("waiting");
+ cancelQuestTimers("loc_check");
+ cancelQuestTimers("room_final");
+ cancelQuestTimers("spawn_minion");
+ startQuestTimer("clean", 1000, npc, null, false);
+ startQuestTimer("close", 1000, npc, null, false);
+ startQuestTimer("attack_stop", 1000, npc, null, false);
+ startQuestTimer("room1_del", 1000, npc, null, false);
+ startQuestTimer("room2_del", 1000, npc, null, false);
+ startQuestTimer("room3_del", 1000, npc, null, false);
+ startQuestTimer("minions_despawn", 1000, npc, null, false);
+
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
+
+ cancelQuestTimers("frintezza_despawn");
+ }
+ }
+ else if (event.equalsIgnoreCase("minions_despawn"))
+ {
+ for (int i = 0; i < Minions.size(); i++)
+ {
+ L2Attackable mob = Minions.get(i);
+ if (mob != null)
+ mob.decayMe();
+ }
+ Minions.clear();
+ }
+ else if (event.equalsIgnoreCase("spawn_minion"))
+ {
+ if (npc != null && !npc.isDead() && frintezza != null && !frintezza.isDead())
+ {
+ L2Npc mob = addSpawn(npc.getNpcId() + 2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false);
+ ((L2Attackable) mob).setIsRaidMinion(true);
+ Minions.add((L2Attackable) mob);
+ startQuestTimer("action", 200, mob, null, false);
+ startQuestTimer("spawn_minion", 18000, npc, null, false);
+ }
+ }
+ else if (event.equalsIgnoreCase("spawn_cubes"))
+ {
+ addSpawn(CUBE, 174232, -88020, -5114, 16384, false, 900000, false);
+ }
+ else if (event.equalsIgnoreCase("frintezza_unlock"))
+ {
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DORMANT);
+ }
+ else if (event.equalsIgnoreCase("remove_players"))
+ {
+ _Zone.oustAllPlayers();
+ }
+
+ return super.onAdvEvent(event, npc, player);
+ }
+
+ @Override
+ public String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ if (npc.getNpcId() == CUBE)
+ {
+ int x = 150037 + Rnd.get(500);
+ int y = -57720 + Rnd.get(500);
+ player.teleToLocation(x, y, -2976, 0);
+ return null;
+ }
+
+ String htmltext = "";
+ if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == DEAD)
+ {
+ htmltext = "<html><body>There is nothing beyond the Magic Force Field. Come back later.<br>(You may not enter because Frintezza is not inside the Imperial Tomb.)</body></html>";
+ }
+ else if (GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == DORMANT)
+ {
+ boolean party_check_success = true;
+
+ if (!player.isGM()) // GMs can enter without a party.
+ {
+ if ((!player.isInParty() || !player.getParty().isLeader(player)) || (player.getParty().getCommandChannel() == null) || (player.getParty().getCommandChannel().getChannelLeader() != player))
+ {
+ htmltext = "<html><body>No reaction. Contact must be initiated by the Command Channel Leader.</body></html>";
+ party_check_success = false;
+ }
+ else if (player.getParty().getCommandChannel().getPartys().size() < Config.FRINTEZZA_MIN_PARTIES || player.getParty().getCommandChannel().getPartys().size() > Config.FRINTEZZA_MAX_PARTIES)
+ {
+ htmltext = "<html><body>Your command channel needs to have at least " + Config.FRINTEZZA_MIN_PARTIES + " parties and a maximum of " + Config.FRINTEZZA_MAX_PARTIES + ".</body></html>";
+ party_check_success = false;
+ }
+ }
+
+ if (party_check_success)
+ {
+ if (player.getInventory().getItemByItemId(8073) == null)
+ {
+ htmltext = "<html><body>You dont have required item.</body></html>";
+ }
+ else
+ {
+ player.destroyItemByItemId("Quest", 8073, 1, player, true);
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, WAITING);
+
+ startQuestTimer("close", 0, npc, null, false);
+ startQuestTimer("room1_spawn", 5000, npc, null, false);
+ startQuestTimer("room_final", 2100000, null, null, false);
+ startQuestTimer("frintezza_despawn", 60000, null, null, true);
+
+ _LastAction = System.currentTimeMillis();
+
+ if (player.isGM())
+ {
+ if (player.getParty() != null)
+ {
+ L2CommandChannel CC = player.getParty().getCommandChannel();
+
+ if (CC != null)
+ { // teleport all parties into CC reb12
+ for (L2Party party : CC.getPartys())
+ {
+ if (party == null)
+ continue;
+
+ synchronized (_PlayersInside)
+ {
+
+ for (L2PcInstance member : party.getPartyMembers())
+ {
+ if (member == null || member.getLevel() < 74)
+ continue;
+ if (!member.isInsideRadius(npc, 700, false, false))
+ continue;
+ if (_PlayersInside.size() > 45)
+ {
+ member.sendMessage("The number of challenges have been full, so can not enter.");
+ break;
+ }
+ _PlayersInside.add(member);
+ _Zone.allowPlayerEntry(member, 300);
+ member.teleToLocation(_invadeLoc[_LocCycle][0] + Rnd.get(50), _invadeLoc[_LocCycle][1] + Rnd.get(50), _invadeLoc[_LocCycle][2], 0);
+ }
+ if (_PlayersInside.size() > 45)
+ break;
+ }
+ _LocCycle++;
+ if (_LocCycle >= 6)
+ _LocCycle = 1;
+ }
+ }
+ else
+ { // teleport just actual party reb12
+ L2Party party = player.getParty();
+
+ for (L2PcInstance member : party.getPartyMembers())
+ {
+ if (member == null || member.getLevel() < 74)
+ continue;
+ if (!member.isInsideRadius(npc, 700, false, false))
+ continue;
+
+ synchronized (_PlayersInside)
+ {
+ if (_PlayersInside.size() > 45)
+ {
+ member.sendMessage("The number of challenges have been full, so can not enter.");
+ break;
+ }
+ _PlayersInside.add(member);
+ }
+
+ _Zone.allowPlayerEntry(member, 300);
+ member.teleToLocation(_invadeLoc[_LocCycle][0] + Rnd.get(50), _invadeLoc[_LocCycle][1] + Rnd.get(50), _invadeLoc[_LocCycle][2], 0);
+ }
+ _LocCycle++;
+ if (_LocCycle >= 6)
+ _LocCycle = 1;
+ }
+ }
+ else
+ { // teleport just player reb12
+ if (player.isInsideRadius(npc, 700, false, false))
+ {
+ synchronized (_PlayersInside)
+ {
+ _PlayersInside.add(player);
+
+ }
+ player.teleToLocation(_invadeLoc[_LocCycle][0] + Rnd.get(50), _invadeLoc[_LocCycle][1] + Rnd.get(50), _invadeLoc[_LocCycle][2], 0);
+ }
+ }
+ }
+ else
+ {
+ L2CommandChannel CC = player.getParty().getCommandChannel();
+
+ for (L2Party party : CC.getPartys())
+ {
+ if (party == null)
+ continue;
+
+ synchronized (_PlayersInside)
+ {
+ for (L2PcInstance member : party.getPartyMembers())
+ {
+ if (member == null || member.getLevel() < 74)
+ continue;
+ if (!member.isInsideRadius(npc, 700, false, false))
+ continue;
+ if (_PlayersInside.size() > 45)
+ {
+ member.sendMessage("The number of challenges have been full, so can not enter.");
+ break;
+ }
+ _PlayersInside.add(member);
+ _Zone.allowPlayerEntry(member, 300);
+ member.teleToLocation(_invadeLoc[_LocCycle][0] + Rnd.get(50), _invadeLoc[_LocCycle][1] + Rnd.get(50), _invadeLoc[_LocCycle][2], 0);
+ }
+ if (_PlayersInside.size() > 45)
+ break;
+ }
+ _LocCycle++;
+ if (_LocCycle >= 6)
+ _LocCycle = 1;
+ }
+ }
+ }
+ }
+ }
+ else
+ htmltext = "<html><body>Someone else is already inside the Magic Force Field. Try again later.</body></html>";
+
+ return htmltext;
+ }
+
+ @Override
+ public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isPet, L2Skill skill)
+ {
+ _LastAction = System.currentTimeMillis();
+ if (npc.getNpcId() == FRINTEZZA)
+ {
+ npc.setCurrentHpMp(npc.getMaxHp(), 0);
+ return null;
+ }
+ if (npc.getNpcId() == SCARLET1 && _SecondMorph == 0 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.75 && GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
+ {
+ startQuestTimer("attack_stop", 0, frintezza, null, false);
+
+ _SecondMorph = 1;
+ _OnMorph = 1;
+
+ startQuestTimer("stop_pc", 1000, npc, null, false);
+ startQuestTimer("stop_npc", 1000, npc, null, false);
+ startQuestTimer("morph_01", 1100, npc, null, false);
+ }
+ else if (npc.getNpcId() == SCARLET1 && _SecondMorph == 1 && _ThirdMorph == 0 && _OnMorph == 0 && npc.getCurrentHp() < npc.getMaxHp() * 0.5 && GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
+ {
+ startQuestTimer("attack_stop", 0, frintezza, null, false);
+
+ _ThirdMorph = 1;
+ _OnMorph = 1;
+
+ startQuestTimer("stop_pc", 2000, npc, null, false);
+ startQuestTimer("stop_npc", 2000, npc, null, false);
+ startQuestTimer("morph_05a", 2000, npc, null, false);
+ startQuestTimer("morph_05", 2100, npc, null, false);
+ }
+ else if (npc.getNpcId() == SCARLET2 && _SecondMorph == 1 && _ThirdMorph == 1 && _OnCheck == 0 && damage >= npc.getCurrentHp() && GrandBossManager.getInstance().getBossStatus(FRINTEZZA) == FIGHTING)
+ {
+ _OnCheck = 1;
+ startQuestTimer("check_hp", 0, npc, null, false);
+ }
+ else if ((npc.getNpcId() == 29050 || npc.getNpcId() == 29051) && _Bomber == 0)
+ {
+ if (npc.getCurrentHp() < npc.getMaxHp() * 0.1)
+ {
+ if (Rnd.get(100) < 30)
+ {
+ _Bomber = 1;
+ startQuestTimer("bomber", 3000, npc, null, false);
+
+ L2Skill sk = SkillTable.getInstance().getInfo(5011, 1);
+ if (sk != null)
+ {
+ npc.doCast(sk);
+ }
+ }
+ }
+ }
+
+ return super.onAttack(npc, attacker, damage, isPet, skill);
+ }
+
+ @Override
+ public String onKill(L2Npc npc, L2PcInstance killer, boolean isPet)
+ {
+ if (npc.getNpcId() == SCARLET2)
+ {
+ _Zone.broadcastPacket(new PlaySound(1, "BS01_D", 1, npc.getObjectId(), npc.getX(), npc.getY(), npc.getZ()));
+
+ startQuestTimer("stop_pc", 0, null, null, false);
+ startQuestTimer("stop_npc", 0, npc, null, false);
+ startQuestTimer("morph_16", 0, npc, null, false);
+
+ GrandBossManager.getInstance().setBossStatus(FRINTEZZA, DEAD);
+ long respawnTime = (long) Config.SPAWN_INTERVAL_FRINTEZZA + Rnd.get(-Config.RANDOM_SPAWN_TIME_FRINTEZZA, Config.RANDOM_SPAWN_TIME_FRINTEZZA);
+ respawnTime *= 3600000;
+
+ cancelQuestTimers("spawn_minion");
+ cancelQuestTimers("frintezza_despawn");
+ startQuestTimer("close", 0, null, null, false);
+ startQuestTimer("rooms_del", 0, npc, null, false);
+ startQuestTimer("minions_despawn", 0, null, null, false);
+ startQuestTimer("remove_players", 900000, null, null, false);
+ startQuestTimer("frintezza_unlock", respawnTime, null, null, false);
+
+ StatsSet info = GrandBossManager.getInstance().getStatsSet(FRINTEZZA);
+ info.set("respawn_time", System.currentTimeMillis() + respawnTime);
+ GrandBossManager.getInstance().setStatsSet(FRINTEZZA, info);
+ }
+ else if (npc.getNpcId() == 18328)
+ {
+ _KillHallAlarmDevice++;
+ if (_KillHallAlarmDevice == 3) // open walls reb12
+ {
+ for (int i = 25150051; i <= 25150058; i++)
+ DoorTable.getInstance().getDoor(i).openMe();
+ }
+ else if (_KillHallAlarmDevice == 4)
+ {
+ startQuestTimer("room1_del", 100, npc, null, false);
+ startQuestTimer("room2_spawn", 100, npc, null, false);
+ DoorTable.getInstance().getDoor(25150042).openMe();
+ DoorTable.getInstance().getDoor(25150043).openMe();
+ }
+ }
+ else if (npc.getNpcId() == 18339)
+ {
+ _KillDarkChoirPlayer++;
+ if (_KillDarkChoirPlayer == 2)
+ {
+ DoorTable.getInstance().getDoor(25150042).closeMe();
+ DoorTable.getInstance().getDoor(25150043).closeMe();
+
+ for (int i = 25150061; i <= 25150070; i++)
+ DoorTable.getInstance().getDoor(i).openMe();
+
+ startQuestTimer("room2_spawn2", 1000, npc, null, false);
+ }
+ }
+ else if (npc.getNpcId() == 18334)
+ {
+ _KillDarkChoirCaptain++;
+ if (_KillDarkChoirCaptain == 8)
+ {
+ startQuestTimer("room2_del", 100, npc, null, false);
+
+ DoorTable.getInstance().getDoor(25150045).openMe();
+ DoorTable.getInstance().getDoor(25150046).openMe();
+
+ startQuestTimer("waiting", Config.WAIT_TIME_FRINTEZZA, npc, null, false);
+ cancelQuestTimers("room_final");
+ }
+ }
+
+ return super.onKill(npc, killer, isPet);
+ }
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java
===================================================================
--- java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java (revision 90)
+++ java/net/sf/l2j/gameserver/model/zone/type/L2BossZone.java (working copy)
@@ -3,12 +3,12 @@
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
- *
+ *
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
- *
+ *
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -27,6 +27,7 @@
import net.sf.l2j.gameserver.datatables.MapRegionTable.TeleportWhereType;
import net.sf.l2j.gameserver.model.actor.L2Attackable;
import net.sf.l2j.gameserver.model.actor.L2Character;
+import net.sf.l2j.gameserver.model.actor.L2Npc;
import net.sf.l2j.gameserver.model.actor.L2Playable;
import net.sf.l2j.gameserver.model.actor.L2Summon;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
@@ -304,6 +305,18 @@
_playerAllowed.clear();
}
+ public void updateKnownList(L2Npc npc)
+ {
+ if (_characterList == null || _characterList.isEmpty())
+ return;
+
+ for (L2Character character : _characterList)
+ {
+ if (character instanceof L2PcInstance)
+ npc.getKnownList().addKnownObject(character);
+ }
+ }
+
@Override
public void onDieInside(L2Character character)

{

 

 

aCis_datapack

 

 

### Eclipse Workspace Patch 1.0

#P aCis_datapack
Index: data/xml/scripts.xml
===================================================================
--- data/xml/scripts.xml (revision 90)
+++ data/xml/scripts.xml (working copy)
@@ -372,7 +372,7 @@
<!-- <script path="scripts.ai.individual.Benom"/> -->
<script path="scripts.ai.individual.Core"/>
<script path="scripts.ai.individual.DrChaos"/>
-<!-- <script path="scripts.ai.individual.Frintezza"/> -->
+ <script path="scripts.ai.individual.Frintezza"/>
<script path="scripts.ai.individual.Gordon"/>
<!-- <script path="scripts.ai.individual.IceFairySirra"/> -->
<script path="scripts.ai.individual.Orfen"/>
Index: data/xml/zones/BossZone.xml
===================================================================
--- data/xml/zones/BossZone.xml (revision 90)
+++ data/xml/zones/BossZone.xml (working copy)
@@ -98,11 +98,11 @@
<node X="229176" Y="-98508" />
<node X="196880" Y="-98498" />
</zone>
- <zone id="110011" type="BossZone" shape="Cuboid" minZ="-9205" maxZ="-8065"><!-- Frintezza Boss TODO -->
- <stat name="InvadeTime" val="1800000" />
- <node X="-89840" Y="-139384" />
- <node X="-85732" Y="-155311" />
- </zone>
+ <zone id="110011" type="BossZone" shape="Cuboid" minZ="-5140" maxZ="-4000"><!-- Frintezza Boss -->
+ <stat name="InvadeTime" val="1800000" />
+ <node X="172176" Y="-74106" />
+ <node X="176284" Y="-90033" />
+ </zone>
<zone id="110012" type="BossZone" shape="NPoly" minZ="-5947" maxZ="-5547"><!-- Queen Ant Boss TODO -->
<stat name="EnabledByDefault" val="false" />
<node X="-21490" Y="178613" />
Index: data/html/default/32011.htm
===================================================================
--- data/html/default/32011.htm (revision 90)
+++ data/html/default/32011.htm (working copy)
@@ -1,7 +1,7 @@
<html><body>
I feel an invisible barrier... Some sort of Magic Force Field has been put in place...<br>
...? The guide of the Imperial mausoleum seems to have something to say.<br><br>
-<a action="bypass -h npc_%objectId%_Quest FinalEmperialTomb">Enter the Magic Force Field</a><br>
+<a action="bypass -h npc_%objectId%_Quest Frintezza">Enter the Magic Force Field</a><br>
<a action="bypass -h npc_%objectId%_Chat 1">Listen to Imperial Tomb Guide</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>
\ No newline at end of file
Index: data/html/teleporter/29061.htm
===================================================================
--- data/html/teleporter/29061.htm (revision 0)
+++ data/html/teleporter/29061.htm (working copy)
@@ -0,0 +1,3 @@
+<html><body>Teleportation Cubic:<br>
+<a action="bypass -h npc_%objectId%_Quest Frintezza">Exit the Last Imperial Tomb</a><br>
+</body></html>

\ No newline at end of file

 

Editado por Williamss
Link para o comentário
Compartilhar em outros sites

Bom dia, em amigo esse frintezza a parte do Frintezza.java ta para acis 364 porem a outras pates tem que adaptar

 

 

public void updateKnownList(L2Npc npc)
{
if (_characterList == null || _characterList.isEmpty())
{
return;
}
for (L2Character character : _characterList)
{
if (character instanceof L2PcInstance)
{
npc.getStatus().addStatusListener(character);
}
}
}
essa aqui .
Gente tem uma coisa me intrigando faz tempo que não logo no l2off então essa quest do frintezza não está invertida o começo ?????? tipo no inicio vc bate no npc até ele sumir ai as laterais levanta e vem um monte de mobs que nem na sala 2 esta certo só a primeira parte que esta invertida
Alguém pode clarear minha mente ???????????????????????????
Editado por terry123456
Link para o comentário
Compartilhar em outros sites

 

Bom dia, em amigo esse frintezza a parte do Frintezza.java ta para acis 364 porem a outras pates tem que adaptar

 

 

public void updateKnownList(L2Npc npc)

{

if (_characterList == null || _characterList.isEmpty())

{

return;

}

 

for (L2Character character : _characterList)

{

if (character instanceof L2PcInstance)

{

npc.getStatus().addStatusListener(character);

}

}

}

 

essa aqui .

 

Gente tem uma coisa me intrigando faz tempo que não logo no l2off então essa quest do frintezza não está invertida o começo ?????? tipo no inicio vc bate no npc até ele sumir ai as laterais levanta e vem um monte de mobs que nem na sala 2 esta certo só a primeira parte que esta invertida

Alguém pode clarear minha mente ???????????????????????????

 

Quando ele fala com NPC acesso o boss ele vai para uma sala no default é de 4 na party 2 nasce dentro 2 fora assim os que tá dentro mata os mobes e os de fora destrói as coluna não tá nada de ao contrário só você ler o código ver os check

Link para o comentário
Compartilhar em outros sites

Williamss

 

NN filho o que estou falando é da quest não do código, quando entra no frintezza tem 1 npc que tem vida ai vc vai batendo até o hp descer quando acabar ele sobe as portas ai sim vem os mobs para que os players matem isso que estou achando estranho não faz sentido o player entrar na sala com 10 mobs e 1 porta subir e cada vez que se mata o npc que esta atras delas ??

 

estranho eu não lembro de ser assim.

Link para o comentário
Compartilhar em outros sites

Alguém sabe configurar a github estou apanhando aqui para colocar a source limpa e ir add os fix !!!!!!!!

 

Bom dia pessoal, é o Frintezza vai demorar um pouco vai ter que fazer o scritp praticamente todo.

 

O Zaken não estar bom , ele não ta nascendo com hp full

Link para o comentário
Compartilhar em outros sites

O Zaken não estar bom , ele não ta nascendo com hp full

Acho que para resolver isso, basta ir no Zaken.java e procurar por:

 

 

O Zaken não estar bom , ele não ta nascendo com hp full

 

 

zaken.setCurrentHpMp(hp, mp);

E adicionar embaixo:

                zaken.setCurrentHp(zaken.getMaxHp());
                zaken.setCurrentMp(zaken.getMaxMp());
Editado por Leonardo Holanda
Link para o comentário
Compartilhar em outros sites

 

Acho que para resolver isso, basta ir no Zaken.java e procurar por:

 

 

O Zaken não estar bom , ele não ta nascendo com hp full

 

 

zaken.setCurrentHpMp(hp, mp);

E adicionar embaixo:

                zaken.setCurrentHp(zaken.getMaxHp());
                zaken.setCurrentMp(zaken.getMaxMp());

 

 

E remover isso

 

int hp = info.getInteger("currentHP");
int mp = info.getInteger("currentMP");
Link para o comentário
Compartilhar em outros sites

Como podem ver o video demostrando o Tezza 95%

 

Esse tezza, mostra os effects na barra ? e esta travando quando nasce ? é o mesmo codigo que postou em outro forum pedindo ajuda ?! L2JKain.

 

essa "correção" do zaken irá causar problemas, Nao esta dando raid curse nos players level 60+ que entram dentro da area do boss, sendo assim qualquer player level 80 poderá entrar e matar os lvl 60 que irão estar matando o boss, boa intenção, mas gambiarras não é a melhor opção.

j58fx5.gif

Link para o comentário
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  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.

Processando...
  • Registre-se

    Faça parte da maior e  mais antigas comunidades sobre Lineage2 da América Latina.





  • Patrocinadores

  • Quem Está Navegando

    • Nenhum usuário registrado visualizando esta página.
  • Posts

    • Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?     Teria como fazer do dusk shield e do zombie shield dessa maneira?    
    • muchas gracias muy lindos NPC 🙂
    • relaxa jovem gafanhoto, testa as quests. e posTa os erros indesejaveis.  
    • Se alguém pudesse me ensinar como codificar as missões, eu ficaria feliz em fazer isso sozinho ou pelo menos ajudar. Eu realmente quero jogar em um servidor onde todas as quests funcionem bem e melhor ainda se você puder fazer quests customizadas!
    • mas no interlude, nem todas as quests de class,  vai mostrar onde tem que ir, ate o reborn nao mostrava quando era interlude, só mostrou depois que eles colocaram client classic pra rodar, e ficou melhor ainda quando virou hellbound em diante, mas ha sim alguma chance de modificar isso direto no script para fazer igualmente, só basta te um pouco de paciencia e persistencia exato
    • 408_PathToElvenwizard dá Orion eu tive que mexer tbm, até modifiquei e consegui deixar ela igual do Classic, com a seta e a marcação no mapa. (não retail IL) Dá pra importar py de várias revs, o foda é que não da regular as quest py através do debug em tempo real, pelo menos eu não consegui rsrs
    • Hasta el momento todas las QUESTS son completables si te guias con un tutorial de youtube. El problema es que tienen bugs de locacion y de subquests que no avanzan o no te marcan correctamente a donde ir en el mapa, cosa que en Retail si se ve como corresponde.
    • estranho, mas pelo menos a galera nunca reclamo das quests quando tinha aberto 5x, geral fez class primeira e segunda job, poucos que compraram a class
    • en RUSaCis-3.5 data pack, las Quests estan en formato .java y son diferentes a como estan redactadas en jOrion y jFrozen 1.5 (ProyectX) package net.sf.l2j.gameserver.scripting.quest; import net.sf.l2j.commons.random.Rnd; import net.sf.l2j.gameserver.enums.Paperdoll; import net.sf.l2j.gameserver.enums.QuestStatus; import net.sf.l2j.gameserver.enums.actors.ClassId; import net.sf.l2j.gameserver.model.actor.Creature; import net.sf.l2j.gameserver.model.actor.Npc; import net.sf.l2j.gameserver.model.actor.Player; import net.sf.l2j.gameserver.network.serverpackets.SocialAction; import net.sf.l2j.gameserver.scripting.QuestState; public class Q224_TestOfSagittarius extends SecondClassQuest { private static final String QUEST_NAME = "Q224_TestOfSagittarius"; // Items private static final int BERNARD_INTRODUCTION = 3294; private static final int HAMIL_LETTER_1 = 3295; private static final int HAMIL_LETTER_2 = 3296; private static final int HAMIL_LETTER_3 = 3297; private static final int HUNTER_RUNE_1 = 3298; private static final int HUNTER_RUNE_2 = 3299; private static final int TALISMAN_OF_KADESH = 3300; private static final int TALISMAN_OF_SNAKE = 3301; private static final int MITHRIL_CLIP = 3302; private static final int STAKATO_CHITIN = 3303; private static final int REINFORCED_BOWSTRING = 3304; private static final int MANASHEN_HORN = 3305; private static final int BLOOD_OF_LIZARDMAN = 3306; private static final int CRESCENT_MOON_BOW = 3028; private static final int WOODEN_ARROW = 17; // Rewards private static final int MARK_OF_SAGITTARIUS = 3293; // NPCs private static final int BERNARD = 30702; private static final int HAMIL = 30626; private static final int SIR_ARON_TANFORD = 30653; private static final int VOKIAN = 30514; private static final int GAUEN = 30717; // Monsters private static final int ANT = 20079; private static final int ANT_CAPTAIN = 20080; private static final int ANT_OVERSEER = 20081; private static final int ANT_RECRUIT = 20082; private static final int ANT_PATROL = 20084; private static final int ANT_GUARD = 20086; private static final int NOBLE_ANT = 20089; private static final int NOBLE_ANT_LEADER = 20090; private static final int BREKA_ORC_SHAMAN = 20269; private static final int BREKA_ORC_OVERLORD = 20270; private static final int MARSH_STAKATO_WORKER = 20230; private static final int MARSH_STAKATO_SOLDIER = 20232; private static final int MARSH_STAKATO_DRONE = 20234; private static final int MARSH_SPIDER = 20233; private static final int ROAD_SCAVENGER = 20551; private static final int MANASHEN_GARGOYLE = 20563; private static final int LETO_LIZARDMAN = 20577; private static final int LETO_LIZARDMAN_ARCHER = 20578; private static final int LETO_LIZARDMAN_SOLDIER = 20579; private static final int LETO_LIZARDMAN_WARRIOR = 20580; private static final int LETO_LIZARDMAN_SHAMAN = 20581; private static final int LETO_LIZARDMAN_OVERLORD = 20582; private static final int SERPENT_DEMON_KADESH = 27090; public Q224_TestOfSagittarius() { super(224, "Test Of Sagittarius"); setItemsIds(BERNARD_INTRODUCTION, HAMIL_LETTER_1, HAMIL_LETTER_2, HAMIL_LETTER_3, HUNTER_RUNE_1, HUNTER_RUNE_2, TALISMAN_OF_KADESH, TALISMAN_OF_SNAKE, MITHRIL_CLIP, STAKATO_CHITIN, REINFORCED_BOWSTRING, MANASHEN_HORN, BLOOD_OF_LIZARDMAN, CRESCENT_MOON_BOW); addQuestStart(BERNARD); addTalkId(BERNARD, HAMIL, SIR_ARON_TANFORD, VOKIAN, GAUEN); addMyDying(ANT, ANT_CAPTAIN, ANT_OVERSEER, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, NOBLE_ANT, NOBLE_ANT_LEADER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, MARSH_SPIDER, ROAD_SCAVENGER, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, SERPENT_DEMON_KADESH); } @Override public String onAdvEvent(String event, Npc npc, Player player) { String htmltext = event; QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; // BERNARD if (event.equalsIgnoreCase("30702-04.htm")) { st.setState(QuestStatus.STARTED); st.setCond(1); playSound(player, SOUND_ACCEPT); giveItems(player, BERNARD_INTRODUCTION, 1); if (giveDimensionalDiamonds39(player)) htmltext = "30702-04a.htm"; } // HAMIL else if (event.equalsIgnoreCase("30626-03.htm")) { st.setCond(2); playSound(player, SOUND_MIDDLE); takeItems(player, BERNARD_INTRODUCTION, 1); giveItems(player, HAMIL_LETTER_1, 1); } else if (event.equalsIgnoreCase("30626-07.htm")) { st.setCond(5); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_1, 10); giveItems(player, HAMIL_LETTER_2, 1); } // SIR_ARON_TANFORD else if (event.equalsIgnoreCase("30653-02.htm")) { st.setCond(3); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_1, 1); } // VOKIAN else if (event.equalsIgnoreCase("30514-02.htm")) { st.setCond(6); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_2, 1); } return htmltext; } @Override public String onTalk(Npc npc, Player player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestList().getQuestState(QUEST_NAME); if (st == null) return htmltext; switch (st.getState()) { case CREATED: if (player.getClassId() != ClassId.ROGUE && player.getClassId() != ClassId.ELVEN_SCOUT && player.getClassId() != ClassId.ASSASSIN) htmltext = "30702-02.htm"; else if (player.getStatus().getLevel() < 39) htmltext = "30702-01.htm"; else htmltext = "30702-03.htm"; break; case STARTED: int cond = st.getCond(); switch (npc.getNpcId()) { case BERNARD: htmltext = "30702-05.htm"; break; case HAMIL: if (cond == 1) htmltext = "30626-01.htm"; else if (cond == 2 || cond == 3) htmltext = "30626-04.htm"; else if (cond == 4) htmltext = "30626-05.htm"; else if (cond > 4 && cond < 8) htmltext = "30626-08.htm"; else if (cond == 8) { htmltext = "30626-09.htm"; st.setCond(9); playSound(player, SOUND_MIDDLE); takeItems(player, HUNTER_RUNE_2, 10); giveItems(player, HAMIL_LETTER_3, 1); } else if (cond > 8 && cond < 12) htmltext = "30626-10.htm"; else if (cond == 12) { htmltext = "30626-11.htm"; st.setCond(13); playSound(player, SOUND_MIDDLE); } else if (cond == 13) htmltext = "30626-12.htm"; else if (cond == 14) { htmltext = "30626-13.htm"; takeItems(player, BLOOD_OF_LIZARDMAN, -1); takeItems(player, CRESCENT_MOON_BOW, 1); takeItems(player, TALISMAN_OF_KADESH, 1); giveItems(player, MARK_OF_SAGITTARIUS, 1); rewardExpAndSp(player, 54726, 20250); player.broadcastPacket(new SocialAction(player, 3)); playSound(player, SOUND_FINISH); st.exitQuest(false); } break; case SIR_ARON_TANFORD: if (cond == 2) htmltext = "30653-01.htm"; else if (cond > 2) htmltext = "30653-03.htm"; break; case VOKIAN: if (cond == 5) htmltext = "30514-01.htm"; else if (cond == 6) htmltext = "30514-03.htm"; else if (cond == 7) { htmltext = "30514-04.htm"; st.setCond(8); playSound(player, SOUND_MIDDLE); takeItems(player, TALISMAN_OF_SNAKE, 1); } else if (cond > 7) htmltext = "30514-05.htm"; break; case GAUEN: if (cond == 9) { htmltext = "30717-01.htm"; st.setCond(10); playSound(player, SOUND_MIDDLE); takeItems(player, HAMIL_LETTER_3, 1); } else if (cond == 10) htmltext = "30717-03.htm"; else if (cond == 11) { htmltext = "30717-02.htm"; st.setCond(12); playSound(player, SOUND_MIDDLE); takeItems(player, MANASHEN_HORN, 1); takeItems(player, MITHRIL_CLIP, 1); takeItems(player, REINFORCED_BOWSTRING, 1); takeItems(player, STAKATO_CHITIN, 1); giveItems(player, CRESCENT_MOON_BOW, 1); giveItems(player, WOODEN_ARROW, 10); } else if (cond > 11) htmltext = "30717-04.htm"; break; } break; case COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; } @Override public void onMyDying(Npc npc, Creature killer) { final Player player = killer.getActingPlayer(); final QuestState st = checkPlayerState(player, npc, QuestStatus.STARTED); if (st == null) return; switch (npc.getNpcId()) { case ANT: case ANT_CAPTAIN: case ANT_OVERSEER: case ANT_RECRUIT: case ANT_PATROL: case ANT_GUARD: case NOBLE_ANT: case NOBLE_ANT_LEADER: if (st.getCond() == 3 && dropItems(player, HUNTER_RUNE_1, 1, 10, 500000)) st.setCond(4); break; case BREKA_ORC_SHAMAN: case BREKA_ORC_OVERLORD: if (st.getCond() == 6 && dropItems(player, HUNTER_RUNE_2, 1, 10, 500000)) { st.setCond(7); giveItems(player, TALISMAN_OF_SNAKE, 1); } break; case MARSH_STAKATO_WORKER: case MARSH_STAKATO_SOLDIER: case MARSH_STAKATO_DRONE: if (st.getCond() == 10 && dropItems(player, STAKATO_CHITIN, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING)) st.setCond(11); break; case MARSH_SPIDER: if (st.getCond() == 10 && dropItems(player, REINFORCED_BOWSTRING, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case ROAD_SCAVENGER: if (st.getCond() == 10 && dropItems(player, MITHRIL_CLIP, 1, 1, 100000) && player.getInventory().hasItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN)) st.setCond(11); break; case MANASHEN_GARGOYLE: if (st.getCond() == 10 && dropItems(player, MANASHEN_HORN, 1, 1, 100000) && player.getInventory().hasItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN)) st.setCond(11); break; case LETO_LIZARDMAN: case LETO_LIZARDMAN_ARCHER: case LETO_LIZARDMAN_SOLDIER: case LETO_LIZARDMAN_WARRIOR: case LETO_LIZARDMAN_SHAMAN: case LETO_LIZARDMAN_OVERLORD: if (st.getCond() == 13) { if (((player.getInventory().getItemCount(BLOOD_OF_LIZARDMAN) - 120) * 5) > Rnd.get(100)) { playSound(player, SOUND_BEFORE_BATTLE); takeItems(player, BLOOD_OF_LIZARDMAN, -1); addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } else dropItemsAlways(player, BLOOD_OF_LIZARDMAN, 1, 0); } break; case SERPENT_DEMON_KADESH: if (st.getCond() == 13) { if (player.getInventory().getItemIdFrom(Paperdoll.RHAND) == CRESCENT_MOON_BOW) { st.setCond(14); playSound(player, SOUND_MIDDLE); giveItems(player, TALISMAN_OF_KADESH, 1); } else addSpawn(SERPENT_DEMON_KADESH, player, false, 300000, true); } break; } } }  
×
×
  • Criar Novo...

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.