Package net.sf.l2j.gameserver.serverpackets

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


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


          // Notify the L2PcInstance AI with AI_INTENTION_INTERACT
          player.getAI().setIntention(CtrlIntention.AI_INTENTION_INTERACT, this);
        }
        else
        {
          SocialAction sa = new SocialAction(getObjectId(), Rnd.nextInt(8));
          broadcastPacket(sa);
          sendPacket(sa);
          showChatWindow(player, 0);
        }
      }
View Full Code Here

        (!activeChar.isAllSkillsDisabled() || activeChar.isInDuel()) &&
        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

        {
          activeChar.sendPacket(new SystemMessage(SystemMessageId.NOTHING_HAPPENED));
          return false;
        }
        L2Character character = (L2Character)target;
        character.broadcastPacket(new SocialAction(target.getObjectId(),action));
      }
      else
        return false;
    }
    catch(Exception e)
View Full Code Here

       while(it.hasNext()){
           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

          if (Config.DEBUG) _log.info("Newbie character ended: " + getActiveChar().getCharId());
            }
          }

          getActiveChar().setCurrentCp(getMaxCp());
            getActiveChar().broadcastPacket(new SocialAction(getActiveChar().getObjectId(), 15));
            getActiveChar().sendPacket(new SystemMessage(SystemMessageId.YOU_INCREASED_YOUR_LEVEL));
        }

        getActiveChar().rewardSkills(); // Give Expertise skill of this level
        if (getActiveChar().getClan() != null)
View Full Code Here

     * Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance and create a new RandomAnimation Task.<BR><BR>
     */
    public void onRandomAnimation()
    {
        // Send a packet SocialAction to all L2PcInstance in the _KnownPlayers of the L2NpcInstance
        SocialAction sa = new SocialAction(getObjectId(), Rnd.get(2, 3));
        broadcastPacket(sa);
    }
View Full Code Here

    else _player.sendPacket(new ItemList(_player, false));

    // Refresh player stats
    _player.broadcastUserInfo();

    SocialAction atk = new SocialAction(_player.getObjectId(), 17);

    _player.broadcastPacket(atk);

    sm = new SystemMessage(SystemMessageId.THE_OWNER_OF_S2_HAS_APPEARED_IN_THE_S1_REGION);
    sm.addZoneName(_player.getX(), _player.getY(), _player.getZ()); // Region Name
View Full Code Here

                }
                else
                {
                    // Send a Server->Client packet SocialAction to the all L2PcInstance on the _knownPlayer of the L2NpcInstance
                    // to display a social action of the L2NpcInstance on their client
                    SocialAction sa = new SocialAction(getObjectId(), Rnd.get(8));
                    broadcastPacket(sa);

                    // Open a chat window on client with the text of the L2NpcInstance
                    if(isEventMob){ L2Event.showEventHtml(player, String.valueOf(getObjectId())); }
                    else
View Full Code Here

          }
            break;
        }
        if (Rnd.get(100) <= chestChance)
        {
          activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(),3));
            chest.setSpecialDrop();
            chest.setMustRewardExpSp(false);
            chest.setInteracted();
            chest.reduceCurrentHp(99999999, activeChar);
        }
        else
        {
            activeChar.broadcastPacket(new SocialAction(activeChar.getObjectId(),13));
            if (Rnd.get(100) < chestTrapLimit) chest.chestTrap(activeChar);
            chest.setInteracted();
            chest.addDamageHate(activeChar,0,1);
            chest.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, activeChar);
        }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.serverpackets.SocialAction

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.