please help
|
Help Please!... i used this guide
http://www.rune-server.org/runescape...-teletabs.html
Everything worked fine and all until i saw that if i were clicking on the teletab to many times or fast it would just delete the teletab without teleporting
EXAMPLE: I were in magebank tryed out the teleports above level 20: it dident teleport but it did delete the teletab??? Please help guys!
please help
How about you convert it to this?
andCode:public boolean teleTabTeleport(int x, int y, int height, String teleportType){ if(c.inPits){ c.sendMessage("You can't teleport during Fight Pits."); } else if(c.getPA().inPitsWait()){ c.sendMessage("You can't teleport during Fight Pits."); } else if(c.duelStatus == 5){ c.sendMessage("You can't teleport during a duel!"); } else 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."); } else if(System.currentTimeMillis() - c.teleBlockDelay < c.teleBlockLength){ c.sendMessage("You are teleblocked and can't teleport."); } else if(!c.isDead && c.teleTimer == 0 && c.respawnTimer == -6){ if (c.playerIndex > 0 || c.npcIndex > 0) c.getCombat().resetPlayerAttack(); c.stopMovement(); removeAllWindows(); c.teleX = x; c.teleY = y; c.npcIndex = 0; c.playerIndex = 0; c.faceUpdate(0); c.teleHeight = height; if(teleportType.equalsIgnoreCase("teleTab")) { c.startAnimation(4731); c.teleEndAnimation = 0; c.teleTimer = 8; c.gfx0(678); } return true; } return false; }
Ofcourse you'll need to re-indent that code.Code:if(itemId == 8007) { if(c.getPA().teleTabTeleport(3214, 3425, 0, "teleTab")) c.getItems().deleteItem(8007,c.getItems().getItemSlot(8007),1); }
Instead of having the void return type (none), I have/had it return a boolean (true/false value) declaring whether the teleport is/was a success.
When it is (return true the item will be deleted.
thx will try
public boolean teleTabTeleport(int x, int y, int height, String teleportType){
if(c.inPits){
c.sendMessage("You can't teleport during Fight Pits.");
} else if(c.getPA().inPitsWait()){
c.sendMessage("You can't teleport during Fight Pits.");
} else if(c.duelStatus == 5){
c.sendMessage("You can't teleport during a duel!");
} else 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.");
} else if(System.currentTimeMillis() - c.teleBlockDelay < c.teleBlockLength){
c.sendMessage("You are teleblocked and can't teleport.");
} else if(!c.isDead && c.teleTimer == 0 && c.respawnTimer == -6){
if (c.playerIndex > 0 || c.npcIndex > 0)
c.getCombat().resetPlayerAttack();
c.stopMovement();
removeAllWindows();
c.teleX = x;
c.teleY = y;
c.npcIndex = 0;
c.playerIndex = 0;
c.faceUpdate(0);
c.teleHeight = height;
if(teleportType.equalsIgnoreCase("teleTab")) {
c.startAnimation(9597);
c.teleEndAnimation = 632;
c.teleTimer = 8;
c.gfx0(1680);
}
return true;
}
return false;
}
This is my teletab ATM but wat about if i want to add
if(c.Jail == true) {
c.sendMessage("You can't teleport out of Jail!");
return;
}
if(c.inJail() && c.Jail == true) {
c.sendMessage("You can't teleport out of Jail!");
return;
}
if(c.inFightCaves()) {
c.sendMessage("You can't teleport out of this minigame!");
return;
}
how do i add it then?? please i tried to add it in but im only getting errors please help
or wait figured it out
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |