Package net.sf.l2j.gameserver.model.actor.instance

Examples of net.sf.l2j.gameserver.model.actor.instance.L2PcInstance.broadcastPacket()


        if (door.getDoorName().startsWith("Anteroom")){
                  if (openChance > 0 && Rnd.get(100) < openChance) {
                    activeChar.sendMessage("You opened Anterooms Door.");
                    door.openMe();
                    door.onOpen(); // Closes the door after 60sec
                    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));
                  }
                  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));
View Full Code Here


                    activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(), 3));
                  }
                  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{
View Full Code Here

      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");
View Full Code Here

                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{
View Full Code Here

      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");
View Full Code Here

                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{
View Full Code Here

      break;
    }

        // Create a summon effect!
        MagicSkillUser MSU = new MagicSkillUser(playable, activeChar, 2003, 1, 1, 0);
        activeChar.broadcastPacket(MSU);

    // Update the changed stat for the character in the DB.
    activeChar.store();

        // Remove the item from inventory.
View Full Code Here

        activeChar.getAI().getIntention()==CtrlIntention.AI_INTENTION_IDLE)
    {
      if (Config.DEBUG) _log.fine("Social Action:" + _actionId);

      SocialAction atk = new SocialAction(activeChar.getObjectId(), _actionId);
      activeChar.broadcastPacket(atk);
      /*
      // Schedule a social task to wait for the animation to finish
      ThreadPoolManager.getInstance().scheduleGeneral(new SocialTask(this), 2600);
      activeChar.setIsParalyzed(true);
      */
 
View Full Code Here

        // Remove the item from inventory.
    activeChar.destroyItem("Consume", item.getObjectId(), 1, null, false);

    // Broadcast the changes to the char and all those nearby.
    UserInfo ui = new UserInfo(activeChar);
    activeChar.broadcastPacket(ui);
  }

  @Override
  public int[] getItemIds()
  {
View Full Code Here

           try{L2PcInstance character = L2World.getInstance().getPlayer(it.next().toString());
           character.setCurrentHpMp(character.getMaxHp(), character.getMaxMp());
           character.setCurrentCp(character.getMaxCp());
           Revive revive = new Revive(character);
           SocialAction sa = new SocialAction(character.getObjectId(), 15);
           character.broadcastPacket(sa);
           character.sendPacket(sa);
           character.sendPacket(revive);
           character.broadcastPacket(revive);}catch(Exception e){}
       }
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.