~~~~~~~~~~~~~~~~~~Less important~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hey Ok So i have two questions. The first one, this one isnt as important but, right now I am working on making
the spell book teleports work, i have them so that it requires runes, gives you experience , you cant mass click it, teleports you, and deletes the runes, also takes into account if you are teleblocked or not. The only problem though
is that you teleport before the teleport gfx is done so you teleport and dont really see the gfx, it appears where you
where. What i want is for it to show the gfx and the teleport you, and only after the gfx is done do u teleport.
like in deltascape u shrink and get that purple sphere around u then teleport. on mine u teleport and the sphere appears where u were...
~~~~~~~~~~~~~~~~~~~~~MORE IMPORTANT~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i have heard that cfg files can help your server run faster because they allow the client.java file to
be shorter. Now what i was wondering is if it is possible to make all the spell book teleports into a cfg file.
otherwise my client.java file will increase by about 100 lines because my current code for one teleport is:
also sometimes you will get stuck small and wont appear bigger when u tele...
- Code:
-
case 29031: //home teleport
if (playerLevel[6] >= 75) {
if ((playerHasItemAmount(554, 2) == false)
|| (playerHasItemAmount(563, 2) == false)) {
sendMessage(
"You do not have enough runes to cast this spell.");
} else if ((playerHasItemAmount(554, 2) == true)
|| (playerHasItemAmount(563, 2) == true)) {
if(teleblock == true){ //this stops them if ther teleblocked
sendMessage("A magical force stops you from teleporting.");
}
else if (actionTimer == 0)
{
setAnimation(714);
stillgfx(308, absY, absX);
if (playerLevel[6] >= 75)
actionTimer = 20;
teleportToX = 2853;
teleportToY = 3591;
deleteItem(563, getItemSlot(563), 2);
deleteItem(554, getItemSlot(554), 2);
sendMessage("You teleport to the L337-scape home.");
}
}
} else if (playerLevel[6] <= 74) {
sendMessage(
"You need a magic level of 75 to cast this spell.");
}
break;
i do have this but i dont know how to implement it in the code...
- Code:
-
//-----TeleName-RTID----MLvl----Runes---Rune1---Rune2---Rune3---Item----TeleX---TeleY---Height--XP------R1Amt---R2Amt---R3Amt---ItmAmt
Tele = Varrock 0 25 3 556 554 563 -1 3213 3425 0 5 3 1 1 -1
Tele = Lumby 0 31 3 556 557 563 -1 3218 3218 0 7 3 1 1 -1
Tele = Falador 0 37 3 556 555 563 -1 2965 3380 0 12 3 1 1 -1
Tele = Camelot 0 45 2 556 563 -1 -1 2757 3480 0 17 5 1 -1 -1
Tele = Ardy 0 51 2 555 563 -1 -1 2661 3305 0 20 2 2 -1 -1
Tele = WTower 0 58 2 557 563 -1 -1 2550 3112 2 23 2 2 -1 -1
Tele = THeim 0 61 2 554 563 -1 -1 2480 5174 0 26 2 2 -1 -1
Tele = AAtoll 0 64 3 554 555 563 1963 2761 2784 1 30 2 2 2 1
[ENDOFTELELIST]
also as far as i know the teleother works BUT you can not accept or decline the action here is the code:
- Code:
-
/* TELEOTHER*/
public int teleReq = 0;
public String teleLoc = "";
public boolean teleOtherScreen = false;
public void teleOtherRequest(String teleLocation, int player) {
String telePlayer = server.playerHandler.players[player].playerName;
sendQuest(telePlayer, 12558);
sendQuest(teleLocation, 12560);
showInterface(12468);
teleReq = player;
teleLoc = teleLocation;
teleOtherScreen = true;
}
i would set case for the accept and decline buttons but idk how because the buttons have the same id for all teleother request screens
if you can help me with any of these problems it would be greatly appreciated.