Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Player.broadcastPacket()


    }
    else if (((lastSayTime + SAY_INTERVAL) < System.currentTimeMillis()) && (actor.getDestination() == null))
    {
      final int heading = actor.calcHeading(target.getX(), target.getY());
      actor.setHeading(heading);
      actor.broadcastPacket(new ExRotation(actor.getObjectId(), heading));
      lastSayTime = System.currentTimeMillis();
      Functions.npcSay(actor, string, ChatType.NPC_SAY, 800, target.getName());
    }
    return true;
  }
View Full Code Here


      case SPIKE_STAKATO_NURSE:
        if (_minion == null)
        {
          break;
        }
        actor.broadcastPacket(new MagicSkillUse(actor, actor, 2046, 1, 1000, 0));
        for (int i = 0; i < 3; i++)
        {
          spawnMonster(_minion, killer, SPIKED_STAKATO_CAPTAIN);
        }
        break;
View Full Code Here

      case MALE_SPIKED_STAKATO:
        if (_minion == null)
        {
          break;
        }
        actor.broadcastPacket(new MagicSkillUse(actor, actor, 2046, 1, 1000, 0));
        for (int i = 0; i < 3; i++)
        {
          spawnMonster(_minion, killer, SPIKED_STAKATO_GUARD);
        }
        break;
View Full Code Here

      }
      else if (((lastSayTime + SAY_INTERVAL) < System.currentTimeMillis()) && (actor.getDestination() == null))
      {
        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);
      }
    }
View Full Code Here

      }
      else if (((lastSayTime + SAY_INTERVAL) < System.currentTimeMillis()) && (actor.getDestination() == null))
      {
        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);
      }
    }
View Full Code Here

    rewarder.setHeading((int) (Math.atan2(spawnLoc.y - rewarded.getY(), spawnLoc.x - rewarded.getX()) * Creature.HEADINGS_IN_PI) + 32768);
    rewarder.spawnMe();
    Functions.npcSayCustomMessage(rewarder, "scripts.events.SavingSnowman.RewarderPhrase1");
    Location targetLoc = Location.findFrontPosition(rewarded, rewarded, 40, 50);
    rewarder.setSpawnedLoc(targetLoc);
    rewarder.broadcastPacket(new CharMoveToLocation(rewarder.getObjectId(), rewarder.getLoc(), targetLoc));
    executeTask("events.SavingSnowman.SavingSnowman", "reward", new Object[]
    {
      rewarder,
      rewarded
    }, 5000);
View Full Code Here

      {
        Functions.npcSayInRange(actor, 600, NpcString.I_HAVENT_EATEN_ANYTHING_IM_SO_WEAK);
      }
      else
      {
        actor.broadcastPacket(new MagicSkillUse(actor, s_display_jackpot_firework.getId(), 1, s_display_jackpot_firework.getHitTime(), 0));
      }
      int i0, i1;
      switch (i_ai2)
      {
        case 1:
View Full Code Here

          npc.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, attacker, 30000);
        }
      }
      if (Rnd.chance(15) && !_notUsedTransform)
      {
        actor.broadcastPacket(new ExShowScreenMessage(TIAT_TEXT[Rnd.get(TIAT_TEXT.length)], 4000, ScreenMessageAlign.MIDDLE_CENTER, false));
      }
    }
    super.onEvtAttacked(attacker, damage);
  }
 
View Full Code Here

   * Method spawnTraps.
   */
  private void spawnTraps()
  {
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new ExShowScreenMessage("Come out, warriors. Protect Seed of Destruction.", 5000, ScreenMessageAlign.MIDDLE_CENTER, false));
    for (int i = 0; i < TRAPS_COUNT; i++)
    {
      actor.getReflection().addSpawnWithRespawn(TRAP_NPC_ID, TRAP_LOCS[i], 0, 180);
    }
  }
View Full Code Here

  @Override
  protected void onEvtDead(Creature killer)
  {
    _firstTimeAttacked = true;
    final NpcInstance actor = getActor();
    actor.broadcastPacket(new ExShowScreenMessage("Obelisk has collapsed. Don't let the enemies jump around wildly anymore!!!!", 3000, ScreenMessageAlign.MIDDLE_CENTER, false));
    actor.stopDecay();
    for (NpcInstance n : actor.getReflection().getNpcs())
    {
      if (n.getNpcId() == 18777)
      {
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.