Package com.l2jfrozen.gameserver.model

Examples of com.l2jfrozen.gameserver.model.L2Character$PvPFlag


  }

  @Override
  protected void runImpl()
  {
    L2Character activeChar = getClient().getActiveChar();
    if(activeChar == null)
      return;

    List<CursedWeaponInfo> list = new FastList<CursedWeaponInfo>();
    for(CursedWeapon cw : CursedWeaponsManager.getInstance().getCursedWeapons())
    {
      if(!cw.isActive())
      {
        continue;
      }

      Point3D pos = cw.getWorldPosition();

      if(pos != null)
      {
        list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0));
      }
    }

    if(!list.isEmpty())
    {
      activeChar.sendPacket(new ExCursedWeaponLocation(list));
    }
  }
View Full Code Here


    boolean sps = activeChar.checkSps();
    boolean ss = activeChar.checkSs();
   
    for(final L2Object target2 : targets)
    {
      L2Character target = (L2Character) target2;

      if(target == null){
        continue;
      }
     
      if(target instanceof L2PcInstance && activeChar instanceof L2PlayableInstance && skill.isOffensive())
      {
        L2PcInstance _char = (activeChar instanceof L2PcInstance)?(L2PcInstance)activeChar:((L2Summon)activeChar).getOwner();
        L2PcInstance _attacked = (L2PcInstance) target;
        if(_attacked.getClanId()!=0 && _char.getClanId()!=0 &&
           _attacked.getClanId() == _char.getClanId() && _attacked.getPvpFlag()==0)
          continue;
        if(_attacked.getAllyId()!=0 && _char.getAllyId()!=0 &&
           _attacked.getAllyId()==_char.getAllyId() && _attacked.getPvpFlag()==0)
          continue;
      }

      if(skill.getSkillType() != L2Skill.SkillType.BUFF && skill.getSkillType() != L2Skill.SkillType.HOT && skill.getSkillType() != L2Skill.SkillType.CPHOT && skill.getSkillType() != L2Skill.SkillType.MPHOT && skill.getSkillType() != L2Skill.SkillType.UNDEAD_DEFENSE && skill.getSkillType() != L2Skill.SkillType.AGGDEBUFF && skill.getSkillType() != L2Skill.SkillType.CONT)
      {
        if(target.reflectSkill(skill))
          target = activeChar;
      }

      // Walls and Door should not be buffed
      if(target instanceof L2DoorInstance && (skill.getSkillType() == L2Skill.SkillType.BUFF || skill.getSkillType() == L2Skill.SkillType.HOT))
        continue;

      // Anti-Buff Protection prevents you from getting buffs by other players
      if (activeChar instanceof L2PlayableInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill()
            && (skill.getSkillType() == L2Skill.SkillType.BUFF
            || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT
          || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF
          || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
          || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
          || skill.getSkillType() == L2Skill.SkillType.REFLECT))
          continue;
     
      // Player holding a cursed weapon can't be buffed and can't buff
      if(skill.getSkillType() == L2Skill.SkillType.BUFF)
      {
        if(target != activeChar)
        {
          if(target instanceof L2PcInstance && ((L2PcInstance) target).isCursedWeaponEquiped())
            continue;
          else if(player != null && player.isCursedWeaponEquiped())
            continue;
        }
      }

      //Possibility of a lethal strike
      if(!target.isRaid() && !(target instanceof L2NpcInstance && ((L2NpcInstance) target).getNpcId() == 35062))
      {
        int chance = Rnd.get(100);
        Formulas.getInstance();
        if(skill.getLethalChance2() > 0 && chance < Formulas.calcLethal(activeChar, target, skill.getLethalChance2()))
        {
          if(target instanceof L2NpcInstance)
          {
            target.reduceCurrentHp(target.getCurrentHp() - 1, activeChar);
            activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE));
          }
        }
        else
        {
          Formulas.getInstance();
          if(skill.getLethalChance1() > 0 && chance < Formulas.calcLethal(activeChar, target, skill.getLethalChance1()))
          {
            if(target instanceof L2NpcInstance)
            {
              target.reduceCurrentHp(target.getCurrentHp() / 2, activeChar);
              activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE));
            }
          }
        }
      }

      if(skill.isOffensive())
      {
       
        boolean acted = Formulas.getInstance().calcSkillSuccess(activeChar, target, skill, ss, sps, bss);

        if(!acted)
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.ATTACK_FAILED));
          continue;
        }

      }
      else if(skill.getSkillType() == L2Skill.SkillType.BUFF)
      {
        if(!Formulas.getInstance().calcBuffSuccess(target, skill))
        {
          if(player!=null)
          {
            SystemMessage sm = new SystemMessage(SystemMessageId.S1_WAS_UNAFFECTED_BY_S2);
            sm.addString(target.getName());
            sm.addSkillName(skill.getDisplayId());
            activeChar.sendPacket(sm);
          }
          continue;
        }
      }
     


      if(skill.isToggle()){

        boolean stopped = false;
       
              L2Effect[] effects = target.getAllEffects();
              if(effects != null)
              {
                for(L2Effect e : effects)
                {
                  if(e != null)
                    if(e.getSkill().getId() == skill.getId())
                    {
                      e.exit(false);
                      stopped = true;
                    }
                }
              }
             
             
        if(stopped)
          break;
      }
       

      // If target is not in game anymore...
      if((target instanceof L2PcInstance) && ((L2PcInstance) target).isOnline()==0)
        continue;
     

      // if this is a debuff let the duel manager know about it
      // so the debuff can be removed after the duel
      // (player & target must be in the same duel)
      if(target instanceof L2PcInstance && player != null
          && ((L2PcInstance) target).isInDuel()
          && (skill.getSkillType() == L2Skill.SkillType.DEBUFF
            || skill.getSkillType() == L2Skill.SkillType.BUFF)
          && player.getDuelId() == ((L2PcInstance) target).getDuelId())
      {
        DuelManager dm = DuelManager.getInstance();
        if(dm!=null)
        {
          L2Effect[] effects = skill.getEffects(activeChar, target, ss, sps, bss);
          if(effects!=null)
            for(L2Effect buff : effects)
              if(buff != null)
                dm.onBuff(((L2PcInstance) target), buff);
        }
        dm = null;
      }
      else
        skill.getEffects(activeChar, target, ss, sps, bss);

      if(skill.getSkillType() == L2Skill.SkillType.AGGDEBUFF)
      {
        if(target instanceof L2Attackable)
          target.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, activeChar, (int) skill.getPower());
        else if(target instanceof L2PlayableInstance)
        {
          if(target.getTarget() == activeChar)
            target.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, activeChar);
          else
            target.setTarget(activeChar);
        }
      }

      if(target.isDead() && skill.getTargetType() == L2Skill.SkillTargetType.TARGET_AREA_CORPSE_MOB && target instanceof L2NpcInstance)
      {
        ((L2NpcInstance) target).endDecayTask();
      }
    }
   
View Full Code Here

  }

  private void handleKill(L2PcInstance activeChar, String player)
  {
    L2Object obj = activeChar.getTarget();
    L2Character target = (L2Character) obj;
    String filename = "main_menu.htm";

    if(player != null)
    {
      L2PcInstance plyr = L2World.getInstance().getPlayer(player);
      if(plyr != null)
      {
        target = plyr;
        activeChar.sendMessage("You killed " + player);
      }
    }

    if(target != null)
    {
      if(target instanceof L2PcInstance)
      {
        target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar);
        filename = "charmanage.htm";
      }
      else if(Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
      {
        target.reduceCurrentHp(target.getMaxHp() * Config.L2JMOD_CHAMPION_HP + 1, activeChar);
      }
      else
      {
        target.reduceCurrentHp(target.getMaxHp() + 1, activeChar);
      }
    }
    else
    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
View Full Code Here

    {
      if(Config.ENABLE_ALL_EXCEPTIONS)
        e.printStackTrace();
    }

    L2Character target = null;

    L2PcInstance player = null;
    if(activeChar instanceof L2PcInstance)
      player = (L2PcInstance) activeChar;

    double fullHP = 0;
    double currentHPs = 0;

    for(L2Object target2 : targets)
    {
      target = (L2Character) target2;

      // We should not heal if char is dead
      if(target == null || target.isDead())
        continue;

      // Player holding a cursed weapon can't be healed and can't heal
      if(target != activeChar)
      {
        if(target instanceof L2PcInstance && ((L2PcInstance) target).isCursedWeaponEquiped())
          continue;
        else if(player != null && player.isCursedWeaponEquiped())
          continue;
      }

      player = null;

      fullHP += target.getMaxHp();
      currentHPs += target.getCurrentHp();
    }
    target = null;

    double percentHP = currentHPs / fullHP;

    for(L2Object target2 : targets)
    {
      target = (L2Character) target2;

      if(target == null || target.isDead())
        continue;

      double newHP = target.getMaxHp() * percentHP;
      double totalHeal = newHP - target.getCurrentHp();

      target.setCurrentHp(newHP);

      if(totalHeal > 0)
        target.setLastHealAmount((int) totalHeal);

      StatusUpdate su = new StatusUpdate(target.getObjectId());
      su.addAttribute(StatusUpdate.CUR_HP, (int) target.getCurrentHp());
      target.sendPacket(su);
      su = null;

      SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
      sm.addString("HP of the party has been balanced.");
      target.sendPacket(sm);
      sm = null;

    }
    target = null;
  }
View Full Code Here

       }
       catch(Exception e){}
            try
             {
             L2Object target = activeChar.getTarget();
             L2Character player = null;
             if (target instanceof L2Character)
               {
                player = (L2Character)target;
                if (type.equals("1"))
                    player.startAbnormalEffect(0x0400);
                else
                    player.startAbnormalEffect(0x0800);
                player.setIsParalyzed(true);
                StopMove sm = new StopMove(player);
                player.sendPacket(sm);
               player.broadcastPacket(sm);
               }
             }
       catch (Exception e)
       {}
    }
   
    else if (command.equals("admin_unpara")||command.equals("admin_unpara_menu"))
    {
    try
    {
      L2Object target = activeChar.getTarget();
      L2Character player = null;
      if (target instanceof L2Character)
      {
         player = (L2Character)target;
         player.stopAbnormalEffect((short)0x0400);
         player.setIsParalyzed(false);
      }
    }
    catch (Exception e)
    {}
    }
   
    else if (command.startsWith("admin_para_all"))
    {
    try
    {
    for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
      {
      if (!player.isGM())
         {
           player.startAbnormalEffect(0x0400);
           player.setIsParalyzed(true);
          StopMove sm = new StopMove(player);
           player.sendPacket(sm);
           player.broadcastPacket(sm);
           }
      }
    }
    catch (Exception e)
    { }
    }
   
    else if (command.startsWith("admin_unpara_all"))
    {
    try
    {
    for (L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
      {
         player.stopAbnormalEffect(0x0400);
         player.setIsParalyzed(false);
      }
    }
    catch (Exception e)
    {}
    }

    else if(command.startsWith("admin_bighead"))
    {
      try
      {
        L2Object target = activeChar.getTarget();
        L2Character player = null;

        if(target instanceof L2Character)
        {
          player = (L2Character) target;
          player.startAbnormalEffect(0x2000);
        }

        target = null;
        player = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_shrinkhead"))
    {
      try
      {
        L2Object target = activeChar.getTarget();
        L2Character player = null;

        if(target instanceof L2Character)
        {
          player = (L2Character) target;
          player.stopAbnormalEffect((short) 0x2000);
        }

        target = null;
        player = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_gmspeed"))
    {
      try
      {
        int val = Integer.parseInt(st.nextToken());
        boolean sendMessage = activeChar.getFirstEffect(7029) != null;

        activeChar.stopSkillEffects(7029);

        if(val == 0 && sendMessage)
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.EFFECT_S1_DISAPPEARED).addSkillName(7029));
        }
        else if(val >= 1 && val <= 4)
        {
          L2Skill gmSpeedSkill = SkillTable.getInstance().getInfo(7029, val);
          activeChar.doCast(gmSpeedSkill);
        }
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
        e.printStackTrace();
     
        activeChar.sendMessage("Use //gmspeed value (0=off...4=max).");
      }
      finally
      {
        activeChar.updateEffectIcons();
      }
    }

    else if(command.startsWith("admin_polyself"))
    {
      try
      {
        String id = st.nextToken();

        activeChar.getPoly().setPolyInfo("npc", id);
        activeChar.teleToLocation(activeChar.getX(), activeChar.getY(), activeChar.getZ(), false);

        CharInfo info1 = new CharInfo(activeChar);
        activeChar.broadcastPacket(info1);
        UserInfo info2 = new UserInfo(activeChar);
        activeChar.sendPacket(info2);

        info1 = null;
        info2 = null;
        id = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_unpolyself"))
    {
      try
      {
        activeChar.getPoly().setPolyInfo(null, "1");
        activeChar.decayMe();
        activeChar.spawnMe(activeChar.getX(), activeChar.getY(), activeChar.getZ());

        CharInfo info1 = new CharInfo(activeChar);
        activeChar.broadcastPacket(info1);
        UserInfo info2 = new UserInfo(activeChar);
        activeChar.sendPacket(info2);

        info1 = null;
        info2 = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.equals("admin_clear_teams"))
    {
      try
      {
        for(L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
        {
          player.setTeam(0);
          player.broadcastUserInfo();
        }
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_setteam_close"))
    {
      try
      {
        String val = st.nextToken();

        int teamVal = Integer.parseInt(val);

        for(L2PcInstance player : activeChar.getKnownList().getKnownPlayers().values())
        {
          if(activeChar.isInsideRadius(player, 400, false, true))
          {
            player.setTeam(0);

            if(teamVal != 0)
            {
              SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
              sm.addString("You have joined team " + teamVal);
              player.sendPacket(sm);
              sm = null;
            }

            player.broadcastUserInfo();
          }
        }

        val = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_setteam"))
    {
      String val = command.substring(14);

      int teamVal = Integer.parseInt(val);

      L2Object target = activeChar.getTarget();
      L2PcInstance player = null;

      if(target instanceof L2PcInstance)
      {
        player = (L2PcInstance) target;
      }
      else
        return false;

      player.setTeam(teamVal);

      if(teamVal != 0)
      {
        SystemMessage sm = new SystemMessage(SystemMessageId.S1_S2);
        sm.addString("You have joined team " + teamVal);
        player.sendPacket(sm);
        sm = null;
      }

      player.broadcastUserInfo();

      val = null;
      target = null;
      player = null;
    }

    else if(command.startsWith("admin_social"))
    {
      try
      {
        String target = null;
        L2Object obj = activeChar.getTarget();

        if(st.countTokens() == 2)
        {
          int social = Integer.parseInt(st.nextToken());

          target = st.nextToken();

          if(target != null)
          {
            L2PcInstance player = L2World.getInstance().getPlayer(target);

            if(player != null)
            {
              if(performSocial(social, player, activeChar))
              {
                activeChar.sendMessage(player.getName() + " was affected by your request.");
              }
            }
            else
            {
              try
              {
                int radius = Integer.parseInt(target);

                for(L2Object object : activeChar.getKnownList().getKnownObjects().values())
                  if(activeChar.isInsideRadius(object, radius, false, false))
                  {
                    performSocial(social, object, activeChar);
                  }

                activeChar.sendMessage(radius + " units radius affected by your request.");
              }
              catch(NumberFormatException nbe)
              {
                if(Config.ENABLE_ALL_EXCEPTIONS)
                  nbe.printStackTrace();
               
                activeChar.sendMessage("Incorrect parameter");
              }
            }

            player = null;
          }
        }
        else if(st.countTokens() == 1)
        {
          int social = Integer.parseInt(st.nextToken());

          if(obj == null)
          {
            obj = activeChar;
          }

          if(performSocial(social, obj, activeChar))
          {
            activeChar.sendMessage(obj.getName() + " was affected by your request.");
          }
          else
          {
            activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
          }
        }
        else if(!command.contains("menu"))
        {
          activeChar.sendMessage("Usage: //social <social_id> [player_name|radius]");
        }

        target = null;
        obj = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("debuff"))
    {
      try
      {
        L2Object target = activeChar.getTarget();
        L2Character player = null;

        if(target instanceof L2Character)
        {
          player = (L2Character) target;
          player.stopAllEffects();
          activeChar.sendMessage("Effects has been cleared from " + player + ".");
        }

        target = null;
        player = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }

    else if(command.startsWith("admin_abnormal"))
    {
      try
      {
        String target = null;
        L2Object obj = activeChar.getTarget();

        if(st.countTokens() == 2)
        {
          String parm = st.nextToken();

          int abnormal = Integer.decode("0x" + parm);

          target = st.nextToken();

          if(target != null)
          {
            L2PcInstance player = L2World.getInstance().getPlayer(target);

            if(player != null)
            {
              if(performAbnormal(abnormal, player))
              {
                activeChar.sendMessage(player.getName() + "'s abnormal status was affected by your request.");
              }
              else
              {
                activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
              }
            }
            else
            {
              try
              {
                int radius = Integer.parseInt(target);

                for(L2Object object : activeChar.getKnownList().getKnownObjects().values())
                  if(activeChar.isInsideRadius(object, radius, false, false))
                  {
                    performAbnormal(abnormal, object);
                  }

                activeChar.sendMessage(radius + " units radius affected by your request.");
              }
              catch(NumberFormatException nbe)
              {
                if(Config.ENABLE_ALL_EXCEPTIONS)
                  nbe.printStackTrace();
               
                activeChar.sendMessage("Usage: //abnormal <hex_abnormal_mask> [player|radius]");
              }
            }

            player = null;
          }

          parm = null;
        }
        else if(st.countTokens() == 1)
        {
          int abnormal = Integer.decode("0x" + st.nextToken());

          if(obj == null)
          {
            obj = activeChar;
          }
         
          if(performAbnormal(abnormal, obj))
          {
            activeChar.sendMessage(obj.getName() + "'s abnormal status was affected by your request.");
          }
          else
          {
            activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
          }
        }
        else if(!command.contains("menu"))
        {
          activeChar.sendMessage("Usage: //abnormal <abnormal_mask> [player_name|radius]");
        }

        target = null;
        obj = null;
      }
      catch(Exception e)
      {
        if(Config.ENABLE_ALL_EXCEPTIONS)
          e.printStackTrace();
      }
    }
     else if(command.startsWith("admin_adminspeed"))
    {
                try
                {
                  int val = Integer.parseInt(st.nextToken());
                 boolean sendMessage = activeChar.getFirstEffect(10000) != null;
                
                         activeChar.stopSkillEffects(10000);
                
                         if(val == 0 && sendMessage)
                         {
                           activeChar.sendPacket(new SystemMessage(SystemMessageId.EFFECT_S1_DISAPPEARED).addSkillName(10000));
                         }
                         else if(val >= 1 && val <= 4)
                         {
                           L2Skill gmSpeedSkill = SkillTable.getInstance().getInfo(10000, val);
                           activeChar.doCast(gmSpeedSkill);
                         }
                       }
                       catch(Exception e)
                       {
                         if(Config.ENABLE_ALL_EXCEPTIONS)
                         e.printStackTrace();
                      
                         activeChar.sendMessage("Use //gmspeed value (0=off...4=max).");
                       }
                       finally
                {
                     activeChar.updateEffectIcons();
                    }             
            }

    else if(command.startsWith("admin_effect"))
    {
      try
      {
        L2Object obj = activeChar.getTarget();

        int level = 1, hittime = 1;
        int skill = Integer.parseInt(st.nextToken());

        if(st.hasMoreTokens())
        {
          level = Integer.parseInt(st.nextToken());
        }

        if(st.hasMoreTokens())
        {
          hittime = Integer.parseInt(st.nextToken());
        }

        if(obj == null)
        {
          obj = activeChar;
        }
       
        if(!(obj instanceof L2Character))
        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
        }
        else
        {
          L2Character target = (L2Character) obj;

          target.broadcastPacket(new MagicSkillUser(target, activeChar, skill, level, hittime, 0));
          activeChar.sendMessage(obj.getName() + " performs MSU " + skill + "/" + level + " by your request.");

        }
      }
      catch(Exception e)
View Full Code Here

   */
  private boolean performAbnormal(int action, L2Object target)
  {
    if(target instanceof L2Character)
    {
      L2Character character = (L2Character) target;

      if((character.getAbnormalEffect() & action) == action)
      {
        character.stopAbnormalEffect(action);
      }
      else
      {
        character.startAbnormalEffect(action);
      }

      character = null;

      return true;
View Full Code Here

          activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));

          return false;
        }

        L2Character character = (L2Character) target;
        character.broadcastPacket(new SocialAction(target.getObjectId(), action));
        character = null;
      }
      else
        return false;
    }
View Full Code Here

      if(npcId == treeId)
      {
        for(int i = 0; i < 20; i++)
        {
          L2Attackable newNpc = (L2Attackable) addSpawn(27189, npc.getX(), npc.getY(), npc.getZ(), 0, false, 30000);
          L2Character originalKiller = isPet ? killer.getPet() : killer;
          newNpc.setRunning();
          newNpc.addDamageHate(originalKiller, 0, 999);
          newNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, originalKiller);
          if(Rnd.nextBoolean())
          {
View Full Code Here

    {
      for (int index = 0; index < targets.length; index++)
      {
        if (!(targets[index] instanceof L2Character))
          continue;
        L2Character target = (L2Character) targets[index];
        int ch = (Rnd.get(14) + 1);
        if (ch == 1)
        {
          target.teleToLocation(55299, 219120, -2952, true);
        }
        else if (ch == 2)
        {
          target.teleToLocation(56363, 218043, -2952, true);
        }
        else if (ch == 3)
        {
          target.teleToLocation(54245, 220162, -2952, true);
        }
        else if (ch == 4)
        {
          target.teleToLocation(56289, 220126, -2952, true);
        }
        else if (ch == 5)
        {
          target.teleToLocation(55299, 219120, -3224, true);
        }
        else if (ch == 6)
        {
          target.teleToLocation(56363, 218043, -3224, true);
        }
        else if (ch == 7)
        {
          target.teleToLocation(54245, 220162, -3224, true);
        }
        else if (ch == 8)
        {
          target.teleToLocation(56289, 220126, -3224, true);
        }
        else if (ch == 9)
        {
          target.teleToLocation(55299, 219120, -3496, true);
        }
        else if (ch == 10)
        {
          target.teleToLocation(56363, 218043, -3496, true);
        }
        else if (ch == 11)
        {
          target.teleToLocation(54245, 220162, -3496, true);
        }
        else if (ch == 12)
        {
          target.teleToLocation(56289, 220126, -3496, true);
        }
        else
        {
          target.teleToLocation(53930, 217760, -2944, true);
        }
      }
    }
    catch (Throwable e)
    {
View Full Code Here

  @Override
  public String onAttack(L2NpcInstance npc, L2PcInstance attacker, int damage, boolean isPet)
  {
    int npcObjId = npc.getObjectId();
   
    L2Character target = isPet ? attacker.getPet() : attacker;
   
    if (_attackersList.get(npcObjId) == null)
    {
      FastList<L2Character> player = new FastList<L2Character>();
      player.add(target);
View Full Code Here

TOP

Related Classes of com.l2jfrozen.gameserver.model.L2Character$PvPFlag

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.