Jump to content
  • 0

[L2J GRACIA FINAL] Skill + Recall clan


Question

Posted

That its possible ?

Create one skill for recall all clan online or who use one item . Type : Ring.

Who use ring in moment is teleported near clan leader.

 

Cheers

1 answer to this question

Recommended Posts

  • 0
Posted

From vago's .cl command get this

           if (activeChar.getClan() == null)
             {
                return false;
             }
      
           L2PcInstance leader;
           leader = (L2PcInstance)L2World.getInstance().findObject(activeChar.getClan().getLeaderId());

           if(leader == null)
           {
               activeChar.sendMessage("Your partner is not online.");
               return false;
           }
           else if(leader.isInJail())
           {
               activeChar.sendMessage("Your leader is in Jail.");
               return false;
           }
           else if(leader.isInOlympiadMode())
           {
               activeChar.sendMessage("Your leader is in the Olympiad now.");
               return false;
           }
           else if(leader.atEvent)
           {
               activeChar.sendMessage("Your leader is in an event.");
               return false;
           }
           else  if (leader.isInDuel())
           {
               activeChar.sendMessage("Your leader is in a duel.");
               return false;
           }
           else if (leader.isFestivalParticipant())
           {
               activeChar.sendMessage("Your leader is in a festival.");
               return false;
           }
           else if (leader.isInParty() && leader.getParty().isInDimensionalRift())
           {
               activeChar.sendMessage("Your leader is in dimensional rift.");
               return false;
           }
           else if (leader.inObserverMode())
           {
              activeChar.sendMessage("Your leader is in the observation.");
           }
           else if(leader.getClan() != null
                 && CastleManager.getInstance().getCastleByOwner(leader.getClan()) != null
                 && CastleManager.getInstance().getCastleByOwner(leader.getClan()).getSiege().getIsInProgress())
           {
              activeChar.sendMessage("Your leader is in siege, you can't go to your leader.");
              return false;
           }

           else if(activeChar.isInJail())
           {
               activeChar.sendMessage("You are in Jail!");
               return false;
           }
           else if(activeChar.isInOlympiadMode())
           {
               activeChar.sendMessage("You are in the Olympiad now.");
               return false;
           }
                   else if(activeChar._inEventVIP)
                    {
                         activeChar.sendPacket(SystemMessage.sendString("Your leader is in a VIP event."));
                       return false;
                    }
           else if(activeChar.atEvent)
           {
               activeChar.sendMessage("You are in an event.");
               return false;
           }
           else  if (activeChar.isInDuel())
           {
               activeChar.sendMessage("You are in a duel!");
               return false;
           }
           else if (activeChar.inObserverMode())
           {
              activeChar.sendMessage("You are in the observation.");
           }
           else if(activeChar.getClan() != null
                 && CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null
                 && CastleManager.getInstance().getCastleByOwner(activeChar.getClan()).getSiege().getIsInProgress())
           {
              activeChar.sendMessage("You are in siege, you can't go to your leader.");
              return false;
           }
           else if (activeChar.isFestivalParticipant())
           {
               activeChar.sendMessage("You are in a festival.");
               return false;
           }
           else if (activeChar.isInParty() && activeChar.getParty().isInDimensionalRift())
           {
               activeChar.sendMessage("You are in the dimensional rift.");
               return false;
           }
           else if (activeChar == leader)
           {
               activeChar.sendMessage("You cannot teleport to yourself.");
               return false;
           }
              int leaderx;
              int leadery;
              int leaderz;
              
              leaderx = leader.getX();
              leadery = leader.getY();
              leaderz = leader.getZ();
              
              activeChar.teleToLocation(leaderx, leadery, leaderz);
    activeChar.sendMessage("You have been teleported to your leader!");
   activeChar.getInventory().destroyItemByItemId("RessSystem", 3470, 1, activeChar, activeChar.getTarget());
   activeChar.sendMessage("One GoldBar has dissapeared! Thank you!");
       }
       return true;
   }

 

Register it in itemhandlers ,modify the code a bit to fit the itemhandler and it should be okay.

 

P.S. i didnt code it all so you can learn ,not only getting ready-to-copy things ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...