More Human Than You Forums

Hello and welcome to the MHTY Script Series Forums. Please log in or register to post and download our scripts.

We do this to discourage people from downloading the script, thus keeping the amount of people who are using the MHTY series scripts down along with the chance of us getting banned. Sorry for the inconvenience.


    Path's and such

    Share

    BOOM BOOM

    Posts : 17
    Points : 45844
    Reputation : 0
    Join date : 2009-06-18
    Age : 107
    Location : World 1337

    Path's and such

    Post  BOOM BOOM on Sun Jun 21, 2009 5:38 pm

    I was wondering if anyone could help me with Path's(DDM already helped and told me to use this). Here is what I got.
    Code:
    ArrayList<RSTile> path = new PathFinder().generatePath(2741, 3448);

    AND

    walkPath(new PathFinder(), path, 3493, moveMouseRandomly(5));

    Please help.

    This is what I originally had.

    Code:
    walkPath(new PathFinder(), path, *a tile area for the destination*, *an antiban thread to be ran while walking*);
    ArrayList<RSTile> path = new PathFinder().generatePath(2741, 3493);

    ERRORS
    Code:
    Scripts\*Secret*.java:54: cannot find symbol
    symbol  : constructor PathFinder()
    location: class mhty.path.PathFinder
            ArrayList<RSTile> path = new PathFinder().generatePath(2741, 3448);
                                      ^
    Scripts\*Secret*.java:182: cannot find symbol
    symbol  : constructor PathFinder()
    location: class mhty.path.PathFinder
                    walkPath(new PathFinder(), path, 3493, moveMouseRandomly(5));
                            ^
    2 errors
    Compilation successful, click play or play-free to start!
    Press any key to continue . . .

    Durka Durka Mahn
    Admin

    Posts : 75
    Points : 46907
    Reputation : 29
    Join date : 2009-06-10

    Re: Path's and such

    Post  Durka Durka Mahn on Mon Jun 22, 2009 12:28 am

    Look at the TileArea class.

    Code:
    PathFinder pf = new PathFinder(); //This creates a PathFinder named pf and loads the map.
    TileArea destinationArea = new TileArea(5, 10, 10, 5); //Creates a tile area whose North Western point is 5, 10, and south eastern point is 10, 5.
    //This creates a path, starting at the player's location, to a random, reachable RSTile inside the destinationArea.
    ArrayList<RSTile> path = pf.generatePath(getMyPlayer().getLocation(), destinationArea.getRandomReachableTile());

    //Creates a Thread to be ran while walking, but does nothing:
    Thread antiban = new Thread() {
        public void run() {
              //Do nothing...
        }
    };

    //Walk the path:
    walkPath(pf, path, destinationArea, antiban);

    BOOM BOOM

    Posts : 17
    Points : 45844
    Reputation : 0
    Join date : 2009-06-18
    Age : 107
    Location : World 1337

    Re: Path's and such

    Post  BOOM BOOM on Wed Jun 24, 2009 8:17 pm

    Durka Durka Mahn wrote:Look at the TileArea class.

    Code:
    PathFinder pf = new PathFinder(); //This creates a PathFinder named pf and loads the map.
    TileArea destinationArea = new TileArea(5, 10, 10, 5); //Creates a tile area whose North Western point is 5, 10, and south eastern point is 10, 5.
    //This creates a path, starting at the player's location, to a random, reachable RSTile inside the destinationArea.
    ArrayList<RSTile> path = pf.generatePath(getMyPlayer().getLocation(), destinationArea.getRandomReachableTile());

    //Creates a Thread to be ran while walking, but does nothing:
    Thread antiban = new Thread() {
        public void run() {
              //Do nothing...
        }
    };

    //Walk the path:
    walkPath(pf, path, destinationArea, antiban);

    On this part
    TileArea destinationArea = new TileArea(5, 10, 10, 5); //Creates a tile area whose North Western point is 5, 10, and south eastern point is 10, 5.

    The 10 and 5 mean on the map it will chose a random location between those tiles from where your guy is at?(Haven't looked at tilearea yet.)

    Thanks again for your help.

    BOOM BOOM

    Posts : 17
    Points : 45844
    Reputation : 0
    Join date : 2009-06-18
    Age : 107
    Location : World 1337

    Re: Path's and such

    Post  BOOM BOOM on Thu Jun 25, 2009 2:23 am

    Ok well I pretty much have it down I just have these errors though.

    Code:
    walkPath(pf, myPath, spot, turnCameraRandom());
    walkPath(pf, toBankPath, bank, highlightRandomPlayer());

    ERROR

    Code:
    void type not allowed here

    Any help is appreciated.

    henry

    Posts : 9
    Points : 45647
    Reputation : 0
    Join date : 2009-07-02

    Re: Path's and such

    Post  henry on Thu Jul 02, 2009 3:47 pm

    I havn't looked at the code but it appears that you are calling a void in the last argument where you shouldn't be? You haven't given me much to look at and work with so thats all I can tell you.

    BOOM BOOM

    Posts : 17
    Points : 45844
    Reputation : 0
    Join date : 2009-06-18
    Age : 107
    Location : World 1337

    Re: Path's and such

    Post  BOOM BOOM on Fri Jul 03, 2009 2:09 am

    I fixed all that it just is not working right if you want it pm me.

    Sponsored content

    Re: Path's and such

    Post  Sponsored content


      Current date/time is Tue Oct 24, 2017 5:39 am