Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Creature.sendPacket()


      if (pos != null)
      {
        list.add(new CursedWeaponInfo(pos, cw.getItemId(), cw.isActivated() ? 1 : 0));
      }
    }
    activeChar.sendPacket(new ExCursedWeaponLocation(list));
  }
}
View Full Code Here


    {
      actor.deleteMe();
      st.set("seeksp", 0);
      st.set("zone", 1);
      st.unset("saytimes");
      target.sendPacket(new ExShowScreenMessage(NpcString.KING_HAS_RETURNED_TO_DEF_RETURN_TO_DEF_AND_START_AGAIN, 5500, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER));
      return false;
    }
    if ((lastSayTimer + SAY_RAFF) < System.currentTimeMillis())
    {
      lastSayTimer = System.currentTimeMillis();
View Full Code Here

      {
        final int heading = actor.calcHeading(target.getX(), target.getY());
        actor.setHeading(heading);
        actor.broadcastPacket(new ExRotation(actor.getObjectId(), heading));
        lastSayTime = System.currentTimeMillis();
        target.sendPacket(new ExShowScreenMessage(NpcString.CATCH_UP_TO_KING_HES_WAITING, 1500, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER));
        st.set("saytimes", ++saytimes);
      }
    }
    else if (zone == 2)
    {
View Full Code Here

    else if (zone == 2)
    {
      if ((actor.getDistance(target) >= 100) && ((lastSayTime + SAY_INTERVAL) < System.currentTimeMillis()))
      {
        lastSayTime = System.currentTimeMillis();
        target.sendPacket(new ExShowScreenMessage(NpcString.YOU_MUST_MOVE_TO_EXPLORATION_AREA_5_IN_ORDER_TO_CONTINUE, 2000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER));
        st.set("saytimes", ++saytimes);
      }
      else if (actor.getDistance(target) < 100)
      {
        st.set("zone", 3);
View Full Code Here

      {
        final int heading = actor.calcHeading(target.getX(), target.getY());
        actor.setHeading(heading);
        actor.broadcastPacket(new ExRotation(actor.getObjectId(), heading));
        lastSayTime = System.currentTimeMillis();
        target.sendPacket(new ExShowScreenMessage(NpcString.CATCH_UP_TO_KING_HES_WAITING, 1500, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER));
        st.set("saytimes", ++saytimes);
      }
    }
    return true;
  }
View Full Code Here

        if ((lethal1 > 0) && Rnd.chance(lethal1))
        {
          if (realTarget.isPlayer())
          {
            realTarget.reduceCurrentHp(realTarget.getCurrentCp(), 0, activeChar, this, true, true, false, true, false, false, true);
            realTarget.sendPacket(SystemMsg.LETHAL_STRIKE);
            activeChar.sendPacket(SystemMsg.YOUR_LETHAL_STRIKE_WAS_SUCCESSFUL);
          }
          else if (realTarget.isNpc() && !realTarget.isLethalImmune())
          {
            realTarget.reduceCurrentHp(realTarget.getCurrentHp() / 2, 0, activeChar, this, true, true, false, true, false, false, true);
View Full Code Here

        else if ((lethal2 > 0) && Rnd.chance(lethal2))
        {
          if (realTarget.isPlayer())
          {
            realTarget.reduceCurrentHp((realTarget.getCurrentHp() + realTarget.getCurrentCp()) - 1, 0, activeChar, this, true, true, false, true, false, false, true);
            realTarget.sendPacket(SystemMsg.LETHAL_STRIKE);
            activeChar.sendPacket(SystemMsg.YOUR_LETHAL_STRIKE_WAS_SUCCESSFUL);
          }
          else if (realTarget.isNpc() && !realTarget.isLethalImmune())
          {
            realTarget.reduceCurrentHp(realTarget.getCurrentHp() - 1, 0, activeChar, this, true, true, false, true, false, false, true);
View Full Code Here

    {
      return false;
    }
    if (mpConsume > effector.getCurrentMp())
    {
      effector.sendPacket(Msg.NOT_ENOUGH_MP);
      return false;
    }
    effector.reduceCurrentMp(mpConsume, effector);
    for (Creature cha : World.getAroundCharacters(symbol, getSkill().getSkillRadius(), 200))
    {
View Full Code Here

        continue;
      }
      double max_heal = calc();
      double heal = Math.min(damage, max_heal);
      double newHp = Math.min(damager.getCurrentHp() + heal, damager.getMaxHp());
      damager.sendPacket(new SystemMessage(SystemMessage.S1_HPS_HAVE_BEEN_RESTORED).addNumber((long) (newHp - damager.getCurrentHp())));
      damager.setCurrentHp(newHp, false);
    }
    _damageList.clear();
    return true;
  }
View Full Code Here

    Creature activeChar = getClient().getActiveChar();
    if (activeChar == null)
    {
      return;
    }
    activeChar.sendPacket(new ExCursedWeaponList());
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.