Thread: How To Make Randoms Tele You Back To Where You Were!

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 How To Make Randoms Tele You Back To Where You Were! 
    Registered Member
    Join Date
    May 2007
    Posts
    213
    Thanks given
    0
    Thanks received
    0
    Rep Power
    37
    Purpose: So you'll be teled back to where you where before you started the random.
    Difficulty: Aslong as you know what an int is, we'll be ok.
    Works On: Untested, should work on all. If you want it to be 100%, you need to make the myCoordX and myCoordY to save in character file, otherwise it'll be lost if they logout or something. I'll post an improved version.
    I'm not going to spoonfeed, I got a random on rs and how it worked ran through my mind for some odd reason.

    declare these
    Code:
    public int myCoordX = 0000;
    public int myCoordY = 0000;
    add this method
    Code:
    public void saveMyCoords() {
    myCoordX = absX;
    myCoordY = absY;
    }
    At the begining of your random, before he teles you away, add this.
    Code:
    saveMyCoords();
    at the end, when you've done what your supposed to.

    Code:
    toX = myCoordX;
    toY = myCoordY;

    If you get an error that says

    Cannot Find Symbol, and it points to toX or toY, and you don't know how to figure it out, just give up, you shouldn't even be looking on this site.


     

  2. #2  
    Registered Member
    netzo's Avatar
    Join Date
    Feb 2008
    Age
    28
    Posts
    1,226
    Thanks given
    402
    Thanks received
    135
    Rep Power
    185
    good job, thx
    [Only registered and activated users can see links. ]
     

  3. #3  
    Fuckin PRO

    Tyler's Avatar
    Join Date
    Jan 2008
    Age
    30
    Posts
    6,023
    Thanks given
    46
    Thanks received
    507
    Rep Power
    3330
    Why tyhe hell do people want randoms..there nothing but a nuisance
    Free Filehost Premium Accounts
    [Only registered and activated users can see links. ]
     

  4. #4  
    Banned

    Join Date
    Aug 2008
    Posts
    1,171
    Thanks given
    21
    Thanks received
    44
    Rep Power
    0
    Nice, and this also can be used for other things then random...
    cant think of any but im sure there is something
     

  5. #5  
    Aj
    Aj is offline
    Ex Administrator
    Aj's Avatar
    Join Date
    Dec 2007
    Age
    30
    Posts
    4,352
    Thanks given
    17
    Thanks received
    3,365
    Rep Power
    5000
    If you logout, or server restarts, co-ords are gone. Might be better just to save them in the char file, or no point.
    Please do not contact me about RSPS related issues, if you require assistance related to Rune-Server you can send me a private message.




    I use
    <code>[Only registered and activated users can see links. ]</code>
     

  6. #6  
    I'm unique


    Join Date
    Oct 2006
    Age
    29
    Posts
    708
    Thanks given
    0
    Thanks received
    1
    Rep Power
    82
    Whoa, actually a nice code.
    Sincerly yours,
    Simox.
     

  7. #7  
    Registered Member
    Join Date
    May 2007
    Posts
    213
    Thanks given
    0
    Thanks received
    0
    Rep Power
    37
    Thanks guys, I would have added how to save the coords but basically, I didn't want alot of noobs using it.

    I might edit it in.


     

  8. #8  
    Registered Member

    Join Date
    Sep 2008
    Posts
    1,801
    Thanks given
    4
    Thanks received
    50
    Rep Power
    636
    Quote Originally Posted by Aj View Post
    If you logout, or server restarts, co-ords are gone. Might be better just to save them in the char file, or no point.
    or you could have it tele to the coords when you log out
     

  9. #9  
    Donator

    tj007razor's Avatar
    Join Date
    Feb 2007
    Posts
    895
    Thanks given
    2
    Thanks received
    9
    Rep Power
    210
    lol?
    Code:
    public int myCoordX = 0000;
    public int myCoordY = 0000;
    Why not = 0? If you think you need it to save to a certain number of digits you are wrong, the int will save whatever value you tell it to as long as it is a valid integer.

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ] | [Only registered and activated users can see links. ]
     

  10. #10  
    Registered Member
    Join Date
    May 2007
    Posts
    213
    Thanks given
    0
    Thanks received
    0
    Rep Power
    37
    I already knew that, I don't know why, I'm just a neat freak.


     

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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •