Thread: Telporting

Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1 Telporting 
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    For some reason when someone teleports either using tabs, home teleport, or anything else if another player is on a another floor it get rids of all the npcs.

    Example

    Edit: Fixed if anyone ever has this issue check this.

    Player.java make your heightLevel this.

    public int heightLevel;

    Special thanks to: Karma_K for the fix
    Reply With Quote  
     

  2. #2  
    Registered Member Keepin_Green's Avatar
    Join Date
    Oct 2012
    Posts
    225
    Thanks given
    12
    Thanks received
    19
    Rep Power
    13
    Check that the teleport is not sending them to a higher height.

    The usual height is 0 (obviously), then you can actually add new floors with the exact same area using 4, 8, 12 etc. Just make sue it's not sending them to a height of 4 or more.
    Reply With Quote  
     

  3. #3  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Code:
    	/**
    	* Teleporting
    	**/
    	public void spellTeleport(int x, int y, int height) {
    		c.getPA().sendFrame99(0);
    		c.getPA().startTeleport(x, y, height, c.playerMagicBook == 1 ? "ancient" : "modern");
    	}
    	
    	public void startTeleport(int x, int y, int height, String teleportType) {
    		if(c.inCyclops)
    			c.inCyclops = false;
    		if (c.inTrade) {
    			c.sendMessage("You can't teleport while trading other player.");
    		return;
    		}
    		if(c.duelStatus == 5) {
    			c.sendMessage("You can't teleport during a duel!");
    			return;
    		}
    		
    		if(c.inPits || inPitsWait()) {
    			c.sendMessage("You can't teleport in here!");
    			return;
    		}
    		
    		        if(c.duelStatus >= 1 && c.duelStatus <= 4) {
    					Client o = (Client) Server.playerHandler.players[c.duelingWith];
    					c.duelStatus = 0;
    					o.duelStatus = 0;
    					//c.sendMessage("@red@The challenge has been declined.");
    					//o.sendMessage("@red@Other player has declined the challenge.");
    					//Misc.println("trade reset");
    					o.getTradeAndDuel().declineDuel();
    					c.getTradeAndDuel().declineDuel();
    					//return;                    
                    }		
    		if(c.inWild() && c.wildLevel > Config.NO_TELEPORT_WILD_LEVEL) {
    			c.sendMessage("You can't teleport above level "+Config.NO_TELEPORT_WILD_LEVEL+" in the wilderness.");
    			return;
    		}
    		if(System.currentTimeMillis() - c.teleBlockDelay < c.teleBlockLength) {
    			c.sendMessage("You are teleblocked and can't teleport.");
    			return;
    		}
    		if(!c.isDead && c.teleTimer == 0 && c.respawnTimer == -6) {
    			if (c.playerIndex > 0 || c.npcIndex > 0)
    				c.getCombat().resetPlayerAttack();
    			c.stopMovement();
    			removeAllWindows();	
    			c.getPA().sendFrame99(0);
    			c.teleX = x;
    			c.teleY = y;
    			c.npcIndex = 0;
    			c.playerIndex = 0;
    			c.faceUpdate(0);
    			c.teleHeight = height;
    			if(teleportType.equalsIgnoreCase("modern")) {
    				c.startAnimation(714);
    				c.teleTimer = 11;
    				c.teleGfx = 308;
    				c.teleEndAnimation = 715;
    			} 
    			if(teleportType.equalsIgnoreCase("ancient")) {
    				c.startAnimation(1979);
    				c.teleGfx = 0;
    				c.teleTimer = 9;
    				c.teleEndAnimation = 0;
    				c.gfx0(392);
    			}
    			
    		}
    		}
    	
    	public void startTeleport2(int x, int y, int height) {
    		c.getPA().sendFrame99(0);
    		if(c.duelStatus == 5) {
    			c.sendMessage("You can't teleport during a duel!");
    			return;
    		}
    		        if(c.duelStatus >= 1 && c.duelStatus <= 4) {
    					Client o = (Client) Server.playerHandler.players[c.duelingWith];
    					c.duelStatus = 0;
    					o.duelStatus = 0;
    					//c.sendMessage("@red@The challange has been declined.");
    					//o.sendMessage("@red@Other player has declined the challange.");
    					//Misc.println("trade reset");
    					o.getTradeAndDuel().declineDuel();
    					c.getTradeAndDuel().declineDuel();
    					//return;                    
                    }		
    		if(System.currentTimeMillis() - c.teleBlockDelay < c.teleBlockLength) {
    			c.sendMessage("You are teleblocked and can't teleport.");
    			return;
    		}
    		if(!c.isDead && c.teleTimer == 0) {			
    			c.stopMovement();
    			removeAllWindows();	
    			c.getPA().sendFrame99(0);
    			c.teleX = x;
    			c.teleY = y;
    			c.npcIndex = 0;
    			c.playerIndex = 0;
    			c.faceUpdate(0);
    			c.teleHeight = height;
    			c.startAnimation(714);
    			c.teleTimer = 11;
    			c.teleGfx = 308;
    			c.teleEndAnimation = 715;
    			
    		}
    	} 
    
    	public void processTeleport() {
    		c.teleportToX = c.teleX;
    		c.teleportToY = c.teleY;
    		c.heightLevel = c.teleHeight;
    		if(c.teleEndAnimation > 0) {
    			c.startAnimation(c.teleEndAnimation);
    			c.getPA().sendFrame99(0);
    		}
    		if(c.teleGfx > 0) {
    
    		}
    	}
    Quote Originally Posted by Keepin_Green View Post
    Check that the teleport is not sending them to a higher height.

    The usual height is 0 (obviously), then you can actually add new floors with the exact same area using 4, 8, 12 etc. Just make sue it's not sending them to a height of 4 or more.


    Heres my teleporting from my PlayerAssistant.java

    Take a look at it for me I'm not even sure.
    Reply With Quote  
     

  4. #4  
    Registered Member Keepin_Green's Avatar
    Join Date
    Oct 2012
    Posts
    225
    Thanks given
    12
    Thanks received
    19
    Rep Power
    13
    Quote Originally Posted by kingsnake190 View Post
    Heres my teleporting from my PlayerAssistant.java

    Take a look at it for me I'm not even sure.
    It would be under Clickingbuttons.java

    Click the spell then look at your console, it should tell you an actionbutton code. Like this for example;



    As you can see, the actionbutton code for me is 4171, and that is for the home teleport.

    You then search that in your source, and clickingbuttons.java should come up. Open it and then search the actionbutton code you obtained above, remember, mine was 4171.

    And here's what I found:

    Code:
    			//home teleports
    			case 4171: //this is the ID of the Actionbutton.
    			c.getPA().spellTeleport(2644, 9898, 0); //here's the teleport code
                            break;
    Here's a quick breakdown of the teleport code.

    c.getPA().spellTeleport(xcoord, ycoord, height);

    Height should be 0, if the height of where you want to teleport is on the normal ground. Otherwise, it would be 4, 8, 12 or so on, so forth.

    Hope that helped. Haha
    Reply With Quote  
     

  5. #5  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Quote Originally Posted by Keepin_Green View Post
    It would be under Clickingbuttons.java

    Click the spell then look at your console, it should tell you an actionbutton code. Like this for example;



    As you can see, the actionbutton code for me is 4171, and that is for the home teleport.

    You then search that in your source, and clickingbuttons.java should come up. Open it and then search the actionbutton code you obtained above, remember, mine was 4171.

    And here's what I found:

    Code:
    			//home teleports
    			case 4171: //this is the ID of the Actionbutton.
    			c.getPA().spellTeleport(2644, 9898, 0); //here's the teleport code
                            break;
    Here's a quick breakdown of the teleport code.

    c.getPA().spellTeleport(xcoord, ycoord, height);

    Height should be 0, if the height of where you want to teleport is on the normal ground. Otherwise, it would be 4, 8, 12 or so on, so forth.

    Hope that helped. Haha
    case 117048:
    case 4171:
    case 50056:
    String type = c.playerMagicBook == 0 ? "modern" : "ancient";
    c.getPA().startTeleport(Config.LUMBY_X, Config.LUMBY_Y, 0, "modern");
    break;

    Theres mine, also it's with every teleport. Not just the home.
    Reply With Quote  
     

  6. #6  
    Registered Member Keepin_Green's Avatar
    Join Date
    Oct 2012
    Posts
    225
    Thanks given
    12
    Thanks received
    19
    Rep Power
    13
    Quote Originally Posted by kingsnake190 View Post
    case 117048:
    case 4171:
    case 50056:
    String type = c.playerMagicBook == 0 ? "modern" : "ancient";
    c.getPA().startTeleport(Config.LUMBY_X, Config.LUMBY_Y, 0, "modern");
    break;

    Theres mine, also it's with every teleport. Not just the home.
    That's strange, oh and also - your lumby teleport is in config.java that's where it's reading the teleport from, so go there and check. Otherwise you'd probably have to just put new telly codes in yourself. Not sure. :L
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Sep 2013
    Posts
    236
    Thanks given
    145
    Thanks received
    52
    Rep Power
    0
    stupid but important question, are you using eclipse? (not going to give you a lecture about using an IDE or not, its an honest no flame intended question)
    Reply With Quote  
     

  8. #8  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Quote Originally Posted by Keepin_Green View Post
    That's strange, oh and also - your lumby teleport is in config.java that's where it's reading the teleport from, so go there and check. Otherwise you'd probably have to just put new telly codes in yourself. Not sure. :L
    Like I said before its a problem with ALL teleports not just this teleport. Those are just a short cut to those coords. Instead of me having to search and type them out every time.
    Reply With Quote  
     

  9. #9  
    Kanketsu
    JacobiYounger's Avatar
    Join Date
    Aug 2009
    Posts
    723
    Thanks given
    49
    Thanks received
    31
    Rep Power
    31
    Quote Originally Posted by Kr4zyf4ken View Post
    stupid but important question, are you using eclipse? (not going to give you a lecture about using an IDE or not, its an honest no flame intended question)
    Yes, I am using eclipse.... There are no errors. It's just something in the code thats making it do this.
    Reply With Quote  
     

  10. #10  
    Registered Member
    rsnerd's Avatar
    Join Date
    Mar 2010
    Posts
    1,084
    Thanks given
    70
    Thanks received
    88
    Rep Power
    84
    Explain a little more about your problem i don't fully understand.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. [718] How to telport using a portal - help?
    By Judgement742 in forum Help
    Replies: 2
    Last Post: 04-12-2013, 10:33 PM
  2. [PI] Telport to me help
    By Wobblum in forum Help
    Replies: 2
    Last Post: 12-09-2012, 07:29 AM
  3. [PI] Making Mage Book Telports Glow
    By ItsGoml in forum Help
    Replies: 13
    Last Post: 07-15-2011, 06:08 PM
  4. Help with mage and telport
    By furypker in forum Help
    Replies: 7
    Last Post: 06-22-2010, 11:52 PM
  5. How to make a telport for z525?
    By YOUS-508 in forum Help
    Replies: 4
    Last Post: 11-25-2009, 04:27 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •