Package l2p.gameserver.model.instances

Examples of l2p.gameserver.model.instances.L2MonsterInstance


        _penaltyMobsNotSpawned = false;
        for(int i = 0; i < 2; i++)
        {
          try
          {
            L2MonsterInstance npc = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(PENALTY_MOBS[Rnd.get(PENALTY_MOBS.length)]));
            npc.setSpawnedLoc(((L2MonsterInstance) actor).getMinionPosition());
            npc.setReflection(actor.getReflection());
            npc.onSpawn();
            npc.spawnMe(npc.getSpawnedLoc());
            npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, Rnd.get(1, 100));
          }
          catch(Exception e)
          {
            e.printStackTrace();
          }
View Full Code Here


    private ScheduledFuture<?> _deadMonsterCheckTask = null;

    public void enterNaia() {
        int roofLockHpPercent = 100;
        L2Player player = (L2Player) getSelf();
        L2MonsterInstance roofLock = TowerOfNaiaManager.getRoofLock();
        if (roofLock != null) {
            roofLockHpPercent = (int) roofLock.getCurrentHpPercents();
        }
        if (roofLockHpPercent <= 10) {
            if (mInstance.enterInstance(player, REFLECTION_ID, true, true)) {
                handleDoors(player.getReflection(), 0, BEFORE_SPAWN);
            }
View Full Code Here

                case EARTH:
                  epidosId = EPIDOS_WIND_ID;
                  break;
      }
     
      L2MonsterInstance epidos = new L2MonsterInstance(IdFactory.getInstance().getNextId(), NpcTable.getTemplate(epidosId));
      epidos.setSpawnedLoc(CENTRAL_COLUMN);
      epidos.onSpawn();
      epidos.spawnMe(CENTRAL_COLUMN);
     
      ThreadPoolManager.getInstance().scheduleGeneral(new TeleportEpidosTask(epidos), 3000);
   
View Full Code Here

          {
            activeChar.sendPacket(Msg.ALREADY_SPOILED);
          }
          else
          {
            L2MonsterInstance monster = (L2MonsterInstance) target;
            boolean success;
            if(!Config.ALT_SPOIL_FORMULA)
            {
              int monsterLevel = monster.getLevel();
              int modifier = Math.abs(monsterLevel - activeChar.getLevel());
              double rateOfSpoil = Config.BASE_SPOIL_RATE;
              if(modifier > 8)
              {
                rateOfSpoil = rateOfSpoil - rateOfSpoil * (modifier - 8) * 9 / 100;
              }
              rateOfSpoil = rateOfSpoil * getMagicLevel() / monsterLevel;
              if(rateOfSpoil < Config.MINIMUM_SPOIL_RATE)
              {
                rateOfSpoil = Config.MINIMUM_SPOIL_RATE;
              }
              else if(rateOfSpoil > 99.)
              {
                rateOfSpoil = 99.;
              }
              activeChar.sendMessage(new CustomMessage("l2p.gameserver.skills.skillclasses.Spoil.Chance", activeChar).addNumber((long) rateOfSpoil));
              success = Rnd.chance(rateOfSpoil);
            }
            else
            {
              success = Formulas.calcSkillSuccess(activeChar, target, this, getActivateRate());
            }
            if(success)
            {
              monster.setSpoiled(true, (L2Player) activeChar);
              activeChar.sendPacket(Msg.THE_SPOIL_CONDITION_HAS_BEEN_ACTIVATED);
            }
            else
            {
              activeChar.sendPacket(new SystemMessage(SystemMessage.S1_HAS_FAILED).addSkillName(_id, getDisplayLevel()));
View Full Code Here

TOP

Related Classes of l2p.gameserver.model.instances.L2MonsterInstance

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.