Thread: [TUT]How To Add Full TeleBlock To Your Server , Even Tabs And Commands

Results 1 to 3 of 3
  1. #1 [TUT]How To Add Full TeleBlock To Your Server , Even Tabs And Commands 
    Registered Member
    TheSniper 08's Avatar
    Join Date
    Jan 2008
    Age
    30
    Posts
    263
    Thanks given
    0
    Thanks received
    0
    Rep Power
    94
    Procedure: Learning how to add full teleblock and copy.

    Difficulty: 3.5 - May need some concentration.

    Reason: To add teleblock to commands and teleport tabs.

    Ever get annoyed when you teleblock someone and they just use a command like ::home, or use a tab

    Doing this tutorial will stop you from teleporting, like the following examples.

    Now to stop them from doing this, we need to add a teleblock boolean after each case. First of all we will search case 168, because that is normally the beginning to all the other teleport cases. So open up client.java and search:

    Code:
    case 168:
    Then you should see something like this:

    Code:
    				case 168: // bank emote
    				if(emotes == 0)
    				{
    					if(absY >= 3712 && absY <= 3970) 
         {
         sendMessage("You cannot bank above Y 3712 wildy.");
         }
         else
    	{
    		openUpBank();
    	}
    				}
    				else
    				{
    					emotes = 0;
    					pEmote = playerSE;
    					updateRequired = true; appearanceUpdateRequired = true;
    				}
    				break;
    We don't need to add anything to that because it is a bank emote. Now if you have a teleport tab next to it, search:

    Code:
    case 169:
    Replace the whole case with this:

    Code:
    case 169:
    if(teleblock == true){ //Made by Level-89
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("dummy"); //made by Musicmad441
    }
    break;
    Simple as that, that is telling the server to make sure they aren't teleblocked before they can teleport. Now in that case, it says this:

    Code:
    customCommand("dummy");
    That means that it will teleport you to the command :ummy. So add this with your commands:

    Code:
    else if (command.equalsIgnoreCase("dummy"))
    	{
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); //made by Musicmad441
    }
    else
    {
    		teleportToX = 3253;
    		teleportToY = 3431;
    	sendMessage("Welcome to Dummy's");
    }
          }
    as simple as that, we have now made a command disable if you are teleblocked and a tab disable if you are teleblocked!

    We will now move on to a new case, just incase you are a little confused. Search in client.java:

    Code:
    case 170:
    Without teleblocked added, it will look something like this:

    Code:
    	                                      case 170: // laugh emote
                                    startAnimation(1979);
    				break;
    That it without a teleport, that is just the animation, you can tell by this bit:

    Code:
    startAnimation(1979);
    So to make a teleport, we replace the whole case with:

    Code:
    case 170:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("Pkbox2");
    }
    break;
    But remember we must add the command for it to work. So add this with your commands

    Code:
    else if (command.equalsIgnoreCase("pkbox2")) 
                            { 
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    	sendMessage("welcome to the pkbox 2!"); 
    	teleportToX = 2509; 
    	teleportToY = 4729; 
                            }
    }
    But remember the 2:

    Code:
    } 
    }
    at the end of the command are very important or you will get errors.

    Now if you need to change the name of your teleport tabs, search:


    Code:
    update();
    You should see something like this:

    Code:
    		update();
    sendFrame126("@[email protected]", 180);//frist emote slot
    sendFrame126("@[email protected]",181);
    sendFrame126("@[email protected]", 178);
    sendFrame126("@[email protected]",175);
    sendFrame126("@[email protected]",177);
    sendFrame126("@[email protected]",182);
    sendFrame126("@[email protected]",170);
    }
    Replace it all with this:


    To show you what some of my cases look like, here is an example:

    Code:
    case 161:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("pkbox");
    }
    break;
    
    case 162:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("jad");
    }
    break;
    					case 168: // bank emote
    				if(emotes == 0)
    				{
    					if(absY >= 3712 && absY <= 3970) 
         {
         sendMessage("You cannot bank above Y 3712 wildy.");
         }
         else
    	{
    		openUpBank();
    	}
    				}
    				else
    				{
    					emotes = 0;
    					pEmote = playerSE;
    					updateRequired = true; appearanceUpdateRequired = true;
    				}
    				break;
    case 169:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("dummy");
    }
    break;
    
    case 164:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("mbank");
    }
    break;
    case 165:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("duelarena");
    }
    break;			        
    case 170:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("Pkbox2");
    }
    break;
    case 171:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("Pk");
    }
    break;
    case 163:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("Kq");
    }
    break;
    case 167:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("pits");
    }
    break;
    case 172:
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); 
    }
    else
    {
    customCommand("train");
    }
    break;
    				                            case 166: // dance emote
                                    startAnimation(0x362);
    				break;
    Thanks Post If You Get Any Errors
    I'll Try My Best To Help You :0

    Thanks

    ~ Level-89
    Removed -
     

  2. #2  
    Уважение и любовь Market Banned Market Banned

    R0cky 0wnz's Avatar
    Join Date
    Mar 2008
    Age
    28
    Posts
    2,569
    Thanks given
    642
    Thanks received
    511
    Rep Power
    1716
    public boolean teleblock = false;

    public void Teleblock() {
    sendMessage("A teleblock has been cast on you!");
    stillgfx(345, absY, absX);
    teleblock = true;
    }

    if (spellID == 12445) { // teleblock (lvl 85 spell)
    if(actionTimer == 0) {
    if (playerLevel[6] >= 85) {
    startAnimation(1819);

    castOnPlayer.Teleblock();
    castOnPlayer.inCombat();
    inCombat();
    actionTimer = 10;
    PkingDelay = 10;
    teleportToX = absX;
    teleportToY = absY;
    } else if (playerLevel[6] <= 85) {
    sendMessage(
    "You need a magic level of 85 to cast this spell.");
    }
    } else {
    }
    }


    For base sources.
    SELLING CREATIVESCAPE 2012 SOURCE

    [Only registered and activated users can see links. ]

    Snippets
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
     

  3. #3  
    Registered Member
    Join Date
    Apr 2008
    Posts
    99
    Thanks given
    1
    Thanks received
    1
    Rep Power
    7
    Man you got seriously leaching problems:
    [Only registered and activated users can see links. ]

    else if (command.equalsIgnoreCase("dummy"))
    {
    if(teleblock == true){
    sendMessage("A magical force stops you from teleporting."); //made by Musicmad441
    }
    else
    {
    teleportToX = 3253;
    teleportToY = 3431;
    sendMessage("Welcome to Dummy's");
    }
    }
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •