L337z0n3
Would you like to react to this message? Create an account in a few clicks or log in to continue.


l337zone.no-ip.org
 
HomePortalLatest imagesSearchRegisterLog in

 

 Spell Book Help

Go down 
2 posters
AuthorMessage
L337-h4x0r
Owner
Owner



Posts : 54
Join date : 2008-10-05
Age : 30
Location : USA

Spell Book Help Empty
PostSubject: Spell Book Help   Spell Book Help I_icon_minitime28th November 2008, 1:41 pm

~~~~~~~~~~~~~~~~~~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.
Back to top Go down
http://l337-scape.gekinzuku.com
kutie pie
Mod
Mod
kutie pie


Posts : 98
Join date : 2008-10-05
Age : 32
Location : U S A! U S A! go team :)

Spell Book Help Empty
PostSubject: Re: Spell Book Help   Spell Book Help I_icon_minitime29th November 2008, 5:30 pm

ok for one.. that is a very messy code :l


Code:
case 29031: //home teleport   
                if (playerLevel[6] >= 75)
         {//open 1

            if ((playerHasItemAmount(554, 2) == true) && (playerHasItemAmount(563, 2) == true))
               {//have runes open

                  if(teleblock == true)
                     { //only teleblock
                     sendMessage("A magical force stops you from teleporting.");
                     }//close only teleblock

                              if (actionTimer == 0)
                     {//action tele
                                      setAnimation(714); 
                                         stillgfx(308, absY, absX);
                                         actionTimer = 20;
                                      teleportToX = 2853;
                                      teleportToY = 3591;
                                      deleteItem(563, getItemSlot(563), 2);
                                      deleteItem(554, getItemSlot(554), 2);
                                      sendMessage("You teleport to the L337-scape home.");
                                      }//close action tele

                  else if (actionTimer >= 1)
                     {
                     sendMessage("You need to wait longer before you can teleport");
                     }

                                 }//have runes close
                     else
                     {
                        sendMessage("You do not have enough runes to cast this spell.");
                     }
      
         }//close1
else    {//open under lv
            sendMessage("You need a magic level of 75 to cast this spell.");
         }//close under lv
                  break;

this is much cleaner. i also moved stuff around and named the parens so u can see what they are for Smile it works fully. the thing im gona work on now is the actual tele gfx
Back to top Go down
 
Spell Book Help
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
L337z0n3 :: L337 Needs Help!!-
Jump to: