Examples of PlaySound


Examples of lineage2.gameserver.network.serverpackets.PlaySound

          }
          player.setVar("NewGuidReward", "1", -1);
          boolean isMage = (player.getRace() != Race.orc) && player.getClassId().isMage();
          if (isMage)
          {
            player.sendPacket(new PlaySound("tutorial_voice_027"));
            Functions.addItem(player, 5790, 100);
          }
          else
          {
            player.sendPacket(new PlaySound("tutorial_voice_026"));
            Functions.addItem(player, 5789, 200);
          }
          Functions.addItem(player, 8594, 2);
          if (player.getLevel() == 1)
          {
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.PlaySound

        long count = _id == ExtractScrollSkill ? 1 : Math.min(10, Rnd.get((int) ((getLevel() * rate) + 1)));
        int itemId = getItemId(target.getNpcId());
        if (count > 0)
        {
          player.getInventory().addItem(itemId, count);
          player.sendPacket(new PlaySound(Quest.SOUND_ITEMGET));
          player.sendPacket(SystemMessage2.obtainItems(itemId, count, 0));
          player.sendChanges();
        }
        else
        {
View Full Code Here

Examples of lineage2.gameserver.network.serverpackets.PlaySound

    }
    else if (event.equals("6") && (temp_npc != null))
    {
      Functions.npcSay(temp_npc, TEXT[6]);
      temp_npc.moveToLocation(new Location(-56511, -56647, -2008, 36863), 0, true);
      temp_npc.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "NS22_F", 0, 0, 0, 0, 0));
      NpcInstance elf = addSpawn(singer1, -56344, -56328, -2008, 32768);
      elf.moveToLocation(new Location(-56657, -56338, -2008, 33102), 0, true);
      NpcInstance elf1 = addSpawn(singer2, -56552, -56245, -2008, 36863);
      NpcInstance elf2 = addSpawn(singer2, -56546, -56426, -2008, 28672);
      NpcInstance elf3 = addSpawn(singer2, -56570, -56473, -2008, 28672);
      NpcInstance elf4 = addSpawn(singer2, -56594, -56516, -2008, 28672);
      NpcInstance elf5 = addSpawn(singer2, -56580, -56203, -2008, 36863);
      NpcInstance elf6 = addSpawn(singer2, -56606, -56157, -2008, 36863);
      startQuestTimer("social1", 6000, elf);
      startQuestTimer("social1", 6000, elf1);
      startQuestTimer("social1", 6000, elf2);
      startQuestTimer("social1", 6000, elf3);
      startQuestTimer("social1", 6000, elf4);
      startQuestTimer("social1", 6000, elf5);
      startQuestTimer("social1", 6000, elf6);
      startQuestTimer("7", 215000, temp_npc);
      startQuestTimer("7", 215000, elf);
      startQuestTimer("7", 215000, elf1);
      startQuestTimer("7", 215000, elf2);
      startQuestTimer("7", 215000, elf3);
      startQuestTimer("7", 215000, elf4);
      startQuestTimer("7", 215000, elf5);
      startQuestTimer("7", 215000, elf6);
    }
    else if (event.equals("7") && (temp_npc != null))
    {
      if (temp_npc.getNpcId() == MC)
      {
        Functions.npcSay(temp_npc, TEXT[7]);
        temp_npc.moveToLocation(new Location(-56698, -56430, -2008, 32768), 0, true);
        startQuestTimer("8", 12000, temp_npc);
      }
      else
      {
        temp_npc.moveToLocation(new Location(-56594, -56064, -2008), 0, true);
        startQuestTimer("clean_npc", 9000, temp_npc);
      }
    }
    else if (event.equals("10") && (temp_npc != null))
    {
      temp_npc.moveToLocation(new Location(-56483, -56665, -2034), 0, true);
      NpcInstance npc1 = addSpawn(circus1, -56495, -56375, -2008, 32768);
      NpcInstance npc2 = addSpawn(circus1, -56491, -56289, -2008, 32768);
      NpcInstance npc3 = addSpawn(circus2, -56502, -56246, -2008, 32768);
      NpcInstance npc4 = addSpawn(circus2, -56496, -56429, -2008, 32768);
      NpcInstance npc5 = addSpawn(circus3, -56505, -56334, -2008, 32768);
      NpcInstance npc6 = addSpawn(circus4, -56545, -56427, -2008, 32768);
      NpcInstance npc7 = addSpawn(circus4, -56552, -56248, -2008, 32768);
      NpcInstance npc8 = addSpawn(circus5, -56493, -56473, -2008, 32768);
      NpcInstance npc9 = addSpawn(circus5, -56504, -56201, -2008, 32768);
      temp_npc.broadcastPacket(new PlaySound(PlaySound.Type.MUSIC, "TP05_F", 0, 0, 0, 0, 0));
      startQuestTimer("npc1_1", 3000, npc1);
      startQuestTimer("npc2_1", 3000, npc2);
      startQuestTimer("npc3_1", 3000, npc3);
      startQuestTimer("npc4_1", 3000, npc4);
      startQuestTimer("npc5_1", 3500, npc5);
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

  public void say(int i)
  {

    Collection<L2PcInstance> knownPlayers = getKnownList().getKnownPlayers().values();
    CreatureSay sm;
    PlaySound ps;
    switch(i)
    {
    case 10:
      if(_cycle == 1)
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t1.npc1, _t1.sysmess10_1);
      }
      else
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t2.npc1, _t2.sysmess10_1);
      }
      ps = new PlaySound(0,"itemsound.ship_arrival_departure",1,getObjectId(),getX(),getY(),getZ());
      if (knownPlayers == null || knownPlayers.isEmpty())
        return;
      for (L2PcInstance player : knownPlayers)
      {
        player.sendPacket(sm);
        player.sendPacket(ps);
      }
      break;
    case 5:
      if(_cycle == 1)
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t1.npc1, _t1.sysmess5_1);
      }
      else
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t2.npc1, _t2.sysmess5_1);
      }
      ps = new PlaySound(0,"itemsound.ship_5min",1,getObjectId(),getX(),getY(),getZ());
      if (knownPlayers == null || knownPlayers.isEmpty())
        return;
      for (L2PcInstance player : knownPlayers)
      {
        player.sendPacket(sm);
        player.sendPacket(ps);
      }
      break;
    case 1:

      if(_cycle == 1)
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t1.npc1, _t1.sysmess1_1);
      }
      else
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t2.npc1, _t2.sysmess1_1);
      }
      ps = new PlaySound(0,"itemsound.ship_1min",1,getObjectId(),getX(),getY(),getZ());
      if (knownPlayers == null || knownPlayers.isEmpty())
        return;
      for (L2PcInstance player : knownPlayers)
      {
        player.sendPacket(sm);
        player.sendPacket(ps);
      }
      break;
    case 0:

      if(_cycle == 1)
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t1.npc1, _t1.sysmess0_1);
      }
      else
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t2.npc1, _t2.sysmess0_1);
      }
      if (knownPlayers == null || knownPlayers.isEmpty())
        return;
      for (L2PcInstance player : knownPlayers)
      {
        player.sendPacket(sm);
        //player.sendPacket(ps);
      }
      break;
    case -1:
      if(_cycle == 1)
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t1.npc1, _t1.sysmessb_1);
      }
      else
      {
        sm =new CreatureSay(0, Say2.SHOUT,_t2.npc1, _t2.sysmessb_1);
      }
      ps = new PlaySound(0,"itemsound.ship_arrival_departure",1,getObjectId(),getX(),getY(),getZ());
      for (L2PcInstance player : knownPlayers)
      {
        player.sendPacket(sm);
        player.sendPacket(ps);
      }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

          //Consuming used seed
        _activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);

        SystemMessage sm = null;
        if (calcSuccess()) {
            _activeChar.sendPacket(new PlaySound("Itemsound.quest_itemget"));
              _target.setSeeded();
              sm = new SystemMessage(SystemMessageId.THE_SEED_WAS_SUCCESSFULLY_SOWN);
          } else {
            sm = new SystemMessage(SystemMessageId.THE_SEED_WAS_NOT_SOWN);
      }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

                  }
                  else {
                    //test with: activeChar.sendPacket(new SystemMessage(SystemMessage.FAILED_TO_UNLOCK_DOOR));
                    activeChar.sendMessage("You failed to open Anterooms Door.");
                    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13));
                PlaySound playSound = new PlaySound("interfacesound.system_close_01");
                activeChar.sendPacket(playSound);
                  }
        }
        else{
          activeChar.sendMessage("Incorrect Door.");
        }
        break;
    case 8274: //Chapelkey, Capel Door has a Gatekeeper?? I use this key for Altar Entrance
      if (door.getDoorName().startsWith("Altar_Entrance")){
              if (openChance > 0 && Rnd.get(100) < openChance) {
                activeChar.sendMessage("You opened Altar Entrance.");
                door.openMe();
                door.onOpen();
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));
              }
              else {
                activeChar.sendMessage("You failed to open Altar Entrance.");
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13));
            PlaySound playSound = new PlaySound("interfacesound.system_close_01");
            activeChar.sendPacket(playSound);
              }
            }
      else{
        activeChar.sendMessage("Incorrect Door.");
      }
      break;
    case 8275: //Key of Darkness
      if (door.getDoorName().startsWith("Door_of_Darkness")){
              if (openChance > 0 && Rnd.get(100) < openChance) {
                activeChar.sendMessage("You opened Door of Darkness.");
                door.openMe();
                door.onOpen();
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));
              }
              else {
                activeChar.sendMessage("You failed to open Door of Darkness.");
                activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 13));
            PlaySound playSound = new PlaySound("interfacesound.system_close_01");
            activeChar.sendPacket(playSound);
              }
            }
      else{
        activeChar.sendMessage("Incorrect Door.");
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

        player.sendPacket(packet);
  }

  private void playAdminSound(L2PcInstance activeChar, String sound)
  {
    PlaySound _snd = new PlaySound(1,sound,0,0,0,0,0);
    activeChar.sendPacket(_snd);
    activeChar.broadcastPacket(_snd);
    activeChar.sendMessage("Playing "+sound+".");
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

            L2Event.participatingPlayers.clear();

            muestraNpcConInfoAPlayers(activeChar, L2Event.id);

            PlaySound _snd = new PlaySound(1,"B03_F",0,0,0,0,0);
            activeChar.sendPacket(_snd);
            activeChar.broadcastPacket(_snd);

            NpcHtmlMessage adminReply = new NpcHtmlMessage(5);
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

        {
            state++;
            SystemMessage sm = new SystemMessage(SystemMessageId.MONSRACE_RACE_START);
            sm.addNumber(0);
            activeChar.sendPacket(sm);
            PlaySound SRace = new PlaySound(1, "S_Race", 0, 0, 0, 0, 0);
            activeChar.sendPacket(SRace);
            activeChar.broadcastPacket(SRace);
            PlaySound SRace2 = new PlaySound(0, "ItemSound2.race_start", 1, 121209259, 12125, 182487,
                                             -3559);
            activeChar.sendPacket(SRace2);
            activeChar.broadcastPacket(SRace2);
            MonRaceInfo spk = new MonRaceInfo(codes[state][0], codes[state][1], race.getMonsters(),
                                              race.getSpeeds());
View Full Code Here

Examples of net.sf.l2j.gameserver.serverpackets.PlaySound

   * Send a packet in order to play sound at client terminal
   * @param sound
   */
  public void playSound(String sound)
    {
    getPlayer().sendPacket(new PlaySound(sound));
  }
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.