Package com.l2jfrozen.gameserver.model.actor.instance

Examples of com.l2jfrozen.gameserver.model.actor.instance.L2GrandBossInstance


      if (temp > 0)
        startQuestTimer("zaken_unlock", temp, null, null);
      else
      {
        // the time has already expired while the server was offline. Immediately spawn zaken.
        L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
        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);
      zaken.setCurrentHpMp(hp, mp);
      spawnBoss(zaken);
    }
  }
View Full Code Here


      }
    }
   
    else if (event.equalsIgnoreCase("zaken_unlock"))
    {
      L2GrandBossInstance zaken = (L2GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
      GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
      spawnBoss(zaken);
    }
    else if (event.equalsIgnoreCase("CreateOnePrivateEx"))
    {
View Full Code Here

            int loc_y = info.getInteger("loc_y");
            int loc_z = info.getInteger("loc_z");
            int heading = info.getInteger("heading");
            final int hp = info.getInteger("currentHP");
            final int mp = info.getInteger("currentMP");
            L2GrandBossInstance baium = (L2GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
            if (Config.ANNOUNCE_TO_ALL_SPAWN_RB) {
                Announcements.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
            }
            GrandBossManager.getInstance().addBoss(baium);
            final L2NpcInstance _baium = baium;
            ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() {
                @Override
View Full Code Here

            if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _Zone.isPlayerAllowed(player)) {
                // once Baium is awaken, no more people may enter until he dies, the server reboots, or
                // 30 minutes pass with no attacks made against Baium.
                GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
                npc.deleteMe();
                L2GrandBossInstance baium = (L2GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
                GrandBossManager.getInstance().addBoss(baium);
                final L2NpcInstance _baium = baium;
                ThreadPoolManager.getInstance().scheduleGeneral(new Runnable() {
                    @Override
                    public void run() {
View Full Code Here

        startQuestTimer("core_unlock", temp, null, null);
      }
      else
      {
        // the time has already expired while the server was offline. Immediately spawn Core.
        L2GrandBossInstance core = (L2GrandBossInstance) addSpawn(CORE, 17726, 108915, -6480, 0, false, 0);
        if(Config.ANNOUNCE_TO_ALL_SPAWN_RB)
        {
          Announcements.getInstance().announceToAll("Raid boss " + core.getName() + " spawned in world.");
        }
        GrandBossManager.getInstance().setBossStatus(CORE, ALIVE);
        spawnBoss(core);
      }
    }
    else
    {
      String test = loadGlobalQuestVar("Core_Attacked");
      if(test.equalsIgnoreCase("true"))
      {
        _FirstAttacked = true;
      }
      /*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 core = (L2GrandBossInstance) addSpawn(CORE,loc_x,loc_y,loc_z,heading,false,0);
      core.setCurrentHpMp(hp,mp);*/
      L2GrandBossInstance core = (L2GrandBossInstance) addSpawn(CORE, 17726, 108915, -6480, 0, false, 0);
      if(Config.ANNOUNCE_TO_ALL_SPAWN_RB)
      {
        Announcements.getInstance().announceToAll("Raid boss " + core.getName() + " spawned in world.");
      }
      spawnBoss(core);
    }
  }
View Full Code Here

  {
    Integer status = GrandBossManager.getInstance().getBossStatus(CORE);
     
    if(event.equalsIgnoreCase("core_unlock"))
    {
      L2GrandBossInstance core = (L2GrandBossInstance) addSpawn(CORE, 17726, 108915, -6480, 0, false, 0);
      if(Config.ANNOUNCE_TO_ALL_SPAWN_RB)
      {
        Announcements.getInstance().announceToAll("Raid boss " + core.getName() + " spawned in world.");
      }
      GrandBossManager.getInstance().setBossStatus(CORE, ALIVE);
      spawnBoss(core);
    }
    else if(status ==null){
View Full Code Here

        int loc_z = -1595;
        int heading = 0;
       
        final int hp = info.getInteger("currentHP");
        final int mp = info.getInteger("currentMP");
        L2GrandBossInstance valakas = (L2GrandBossInstance) addSpawn(VALAKAS, loc_x, loc_y, loc_z, heading, false, 0);
        GrandBossManager.getInstance().addBoss(valakas);
        final L2NpcInstance _valakas = valakas;
       
        ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
        {
View Full Code Here

            && (temp > (Config.VALAKAS_DESPAWN_TIME*60000))) //15 mins by default
        {
          npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
           
          //delete the actual boss
          L2GrandBossInstance _boss_instance = GrandBossManager.getInstance().deleteBoss(VALAKAS);
          _boss_instance.decayMe();
          GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
          //npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
          _Zone.oustAllPlayers();
          cancelQuestTimer("check_activity_and_do_actions", npc, null);
          i_quest2 = 0;
          i_quest3 = 0;
          i_quest4 = 0;
         
        }
        else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
        {
          if (sk_4691 == 0 || (sk_4691 == 1 && lvl != 4))
          {
            npc.setTarget(npc);
            npc.doCast(SkillTable.getInstance().getInfo(4691, 4));
          }
        }
        else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
        {
          if (sk_4691 == 0 || (sk_4691 == 1 && lvl != 3))
          {
            npc.setTarget(npc);
            npc.doCast(SkillTable.getInstance().getInfo(4691, 3));
          }
        }
        else if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
        {
          if (sk_4691 == 0 || (sk_4691 == 1 && lvl != 2))
          {
            npc.setTarget(npc);
            npc.doCast(SkillTable.getInstance().getInfo(4691, 2));
          }
        }
        else if (sk_4691 == 0 || (sk_4691 == 1 && lvl != 1))
        {
          npc.setTarget(npc);
          npc.doCast(SkillTable.getInstance().getInfo(4691, 1));
        }
      }
      else if (event.equalsIgnoreCase("launch_random_skill"))
      {
        if (!npc.isInvul())
          getRandomSkill(npc);
        else
          npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
      }
      else if (event.equalsIgnoreCase("1004"))
      {
        startQuestTimer("1102", 1500, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1300,180,-5,3000,15000));
      }
      else if (event.equalsIgnoreCase("1102"))
      {
        startQuestTimer("1103", 3300, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),500,180,-8,600,15000));
      }
      else if (event.equalsIgnoreCase("1103"))
      {
        startQuestTimer("1104", 2900, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),800,180,-8,2700,15000));
      }
      else if (event.equalsIgnoreCase("1104"))
      {
        startQuestTimer("1105", 2700, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),200,250,70,0,15000));
      }
      else if (event.equalsIgnoreCase("1105"))
      {
        startQuestTimer("1106", 1, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1100,250,70,2500,15000));
      }
      else if (event.equalsIgnoreCase("1106"))
      {
        startQuestTimer("1107", 3200, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),700,150,30,0,15000));
      }
      else if (event.equalsIgnoreCase("1107"))
      {
        startQuestTimer("1108", 1400, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1200,150,20,2900,15000));
      }
      else if (event.equalsIgnoreCase("1108"))
      {
        startQuestTimer("1109", 6700, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),750,170,15,3400,15000));
      }
      else if (event.equalsIgnoreCase("1109"))
      {
        startQuestTimer("1110", 5700, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),750,170,-10,3400,15000));
      }
      else if (event.equalsIgnoreCase("1110"))
      {
        GrandBossManager.getInstance().setBossStatus(VALAKAS,FIGHTING);
        startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
        npc.setIsInvul(false);
        getRandomSkill(npc);
      }
      else if (event.equalsIgnoreCase("1111"))
      {
        startQuestTimer("1112", 3500, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1100,210,-5,3000,10000));
      }
      else if (event.equalsIgnoreCase("1112"))
      {
        startQuestTimer("1113", 4500, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1300,200,-8,3000,10000));
      }
      else if (event.equalsIgnoreCase("1113"))
      {
        startQuestTimer("1114", 500, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1000,190,0,3000,10000));
      }
      else if (event.equalsIgnoreCase("1114"))
      {
        startQuestTimer("1115", 4600, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1700,120,0,2500,10000));
      }
      else if (event.equalsIgnoreCase("1115"))
      {
        startQuestTimer("1116", 750, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1700,20,0,3000,10000));
      }
      else if (event.equalsIgnoreCase("1116"))
      {
        startQuestTimer("1117", 2500, npc, null);
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1700,10,0,3000,10000));
      }
      else if (event.equalsIgnoreCase("1117"))
      {
        npc.broadcastPacket(new SpecialCamera(npc.getObjectId(),1700,10,0,3000,250));
       
        if(!npc.getSpawn().is_customBossInstance()){
         
          addSpawn(31759, 212852, -114842, -1632, 0, false, 900000);
          int radius = 1500;
          for (int i = 0; i < 20; i++)
          {
            int x = (int) (radius * Math.cos(i * .331)); //.331~2pi/19
            int y = (int) (radius * Math.sin(i * .331));
            addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000);
          }
          startQuestTimer("remove_players", 900000, null, null);
         
        }
        cancelQuestTimer("check_activity_and_do_actions", npc, null);
       
      }
    }
    else
    {
      if (event.equalsIgnoreCase("lock_entry_and_spawn_valakas"))
      {
        int loc_x = 213004;
        int loc_y = -114890;
        int loc_z = -1595;
        int heading = 0;
       
        L2GrandBossInstance valakas = (L2GrandBossInstance) addSpawn(VALAKAS, loc_x, loc_y, loc_z, heading, false, 0);
        GrandBossManager.getInstance().addBoss(valakas);
       
        lastAttackTime = System.currentTimeMillis();
        final L2NpcInstance _valakas = valakas;
        ThreadPoolManager.getInstance().scheduleGeneral(new Runnable()
View Full Code Here

            case DEAD: {
                long temp = info.getLong("respawn_time") - System.currentTimeMillis();
                if (temp > 0) {
                    startQuestTimer("QUEEN_SPAWN", temp, null, null);
                } else {
                    L2GrandBossInstance queen = (L2GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
                    if (Config.ANNOUNCE_TO_ALL_SPAWN_RB) {
                        Announcements.getInstance().announceToAll("Raid boss " + queen.getName() + " spawned in world.");
                    }
                    GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
                    GrandBossManager.getInstance().addBoss(queen);
                    spawnBoss(queen);
                }
            }
            break;
            case LIVE: {                /*
         * 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 queen = (L2GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
                if (Config.ANNOUNCE_TO_ALL_SPAWN_RB) {
                    Announcements.getInstance().announceToAll("Raid boss " + queen.getName() + " spawned in world.");
                }
                GrandBossManager.getInstance().addBoss(queen);
                queen.setCurrentHpMp(hp, mp);
                spawnBoss(queen);
            }
            break;
            default: {
                L2GrandBossInstance queen = (L2GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
                if (Config.ANNOUNCE_TO_ALL_SPAWN_RB) {
                    Announcements.getInstance().announceToAll("Raid boss " + queen.getName() + " spawned in world.");
                }
                GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
                GrandBossManager.getInstance().addBoss(queen);
                spawnBoss(queen);
            }
View Full Code Here

    public String onAdvEvent(String event, L2NpcInstance npc, L2PcInstance player) {
        Event event_enum = Event.valueOf(event);

        switch (event_enum) {
            case QUEEN_SPAWN: {
                L2GrandBossInstance queen = (L2GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
                if (Config.ANNOUNCE_TO_ALL_SPAWN_RB) {
                    Announcements.getInstance().announceToAll("Raid boss " + queen.getName() + " spawned in world.");
                }
                GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
                GrandBossManager.getInstance().addBoss(queen);
                spawnBoss(queen);
            }
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.actor.instance.L2GrandBossInstance

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.