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.
|
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
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.
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) { } }
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:
Here's a quick breakdown of the teleport code.Code://home teleports case 4171: //this is the ID of the Actionbutton. c.getPA().spellTeleport(2644, 9898, 0); //here's the teleport code break;
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
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)
Explain a little more about your problem i don't fully understand.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |