Results 1 to 10 of 10

Thread: Nq2 Auto -Work in progress -

  1. #1

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m

    Nq2 Auto -Work in progress -

    The aim of this bot is to make nq2 client fully playable in vb.net. But also to add several scripting features to the bot to make possible flexable auto hunting.


    My first task was to build the gui window of the game , this seemed easy. Neopets use a 9X9 grid of images each 40X40px wide. So I made a function these images. However things where very distorted , I debugged my code and found that neopets was not using 9X9 images instead they would use sometimes 2-6 images on a single tile. These tiles would be layers ontop ofes one another using c.s.s tricks and transparent background images.

    So I had to build a function to take care of this , unfortunatly it was harder than it should of been due to there being no simple way of rendering transparent images in vb.net without graphics render functions that usually only games use. Eventually I did just that and got the map to render:



    The next part of my code was the navigation code , so we can walk about inside the game. To do this I used the following single image:
    (you need an account to see links)

    I then plotted squares behind each arrow of the image and made a sort of "invisable" button underneath each arrow to walk the different needed directions.

    Finally I could walk about inside the neoquest game! However movement was a little slow. I decided to instead map the entire neoqiest game to a file like so:

    25, 17:t/forg.gif:Tresten
    25, 18:t/forg.gif:Tresten

    In the above the format is as follows:
    Tile coordinate x/y : image name / city name

    To do this I made a function that mapped the game for me as I walked around , I then walked around tresten until the entire citys information was contained in my file. Also I made the function download images to the /images/ folder. The idea behind this is that once I have mapped the entire game there will be no need for a image download function to ever execute in my bot. All images will be stored in the programs /images/ folder instead witch will heavily improve movement speed. Also by having a local map I can verify each of my commands are successful and also know witch tiles are walkable and witch are not.
    This will be invaluable later.

    To give you some idea of the work behind this , this is Tresten map:
    (you need an account to see links)

    I have a load more citys to do yet!


    However my current task is to make the scripter work. I want to do this now as I do not want to have to alter loads of code later down the line.

    The next goal is to make the script seen here (bottem left) run inside my bot. This script simply hunts around the city of Tresten and returns to mother to heal at less than 10 percent health. Then the script go's back to hunt. I will update as I go I work on this nearly every day.




    23rd July 2012
    Added the following functions to the scripter so far:
    walkdirection(str Direction) - Walks a direction e.g "walkdir('east')"

    Added some basic stats


    Note , rohanne does not appear in the above image due to me debugging at the time of sshot. Do not worry , its not a bug and I can't be bothered to reupload.

    health/max health are important for scripting / healing. Player location is used to determined witch map to load. Maps are loaded into memory and to keep things fast , each map for each city is a separate part of the array. I will now work on getting at least some world map into my map files.
    Last edited by DarkByte; 07-23-2012 at 09:01 PM.

  2. The Following 6 Users Say Thank You to DarkByte For This Useful Post:

    Bryan (07-22-2012),Cody. (07-22-2012),Evelsaint (07-26-2012),j03 (07-22-2012),Kenshin (07-25-2012),Ryan~ (07-22-2012)

  3. #2
    Zachafer's Avatar
    Joined
    Dec 2011
    Posts
    1,235
    Userbars
    11
    Thanks
    769
    Thanked
    1,466/678
    DL/UL
    98/0
    Mentioned
    512 times
    Time Online
    24d 13h 9m
    Avg. Time Online
    8m
    Quote Originally Posted by raredaredevil View Post
    I then plotted squares behind each arrow of the image and made a sort of "invisable" button underneath each arrow to walk the different needed directions.
    Why do that when it's so much easier in VBNet than in VB6? You could save yourself a lot of extraneous code by omitting the buttons.

    (you need an account to see links)
    Code:
        Private Sub picNavigate_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picNavigate.MouseClick
            Dim directionClicked As String = CompassControl.HandleMouse(e.Location)
            If directionClicked.Length > 0 Then
                Debug.Print("Clicked {0} button.", directionClicked)
                'WalkDirection(directionClicked)
            Else
                Debug.Print("No button clicked.")
            End If
        End Sub

  4. #3
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,076/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 4h 55m
    Avg. Time Online
    3h 13m
    Quote Originally Posted by Zachafer View Post
    Why do that when it's so much easier in VBNet than in VB6? You could save yourself a lot of extraneous code by omitting the buttons.

    (you need an account to see links)
    Code:
        Private Sub picNavigate_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles picNavigate.MouseClick
            Dim directionClicked As String = CompassControl.HandleMouse(e.Location)
            If directionClicked.Length > 0 Then
                Debug.Print("Clicked {0} button.", directionClicked)
                'WalkDirection(directionClicked)
            Else
                Debug.Print("No button clicked.")
            End If
        End Sub
    It is in VB.NET you monkey.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  5. #4

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    ^ You always feel the need to respond with your code , its annoying. The code I was describing was exactly the same as the code you posted. Both our codes plot squares behind the images and detect the clicks inside them. We used the exact same functions to accomplish this. The reason you did not know is because I did not post any code. You just assumed I did things another way.

    If you have any other code improvement suggestions , keep them to yourself. I have not posted any code to this , so you have nothing to compare against except my words witch you always manage to nit pick the tiniest detail out of. Seriously I just made a scripting engine for neoquest and a engine to render the gui while mapping the entire world and all you respond with is a stupid comment about something so trivial it took me about 10 lines of code. Witch btw is more efficient than yours. /sigh
    Last edited by DarkByte; 07-24-2012 at 10:26 PM.

  6. The Following User Says Thank You to DarkByte For This Useful Post:

    j03 (07-24-2012)

  7. #5

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    It is annoying nothing else. I have an ego I know this and it is probably annoying. But put up with me and I will give you some kick ass programs. We all have our faults.

    I will continue to update this thread and stay out of everything else now. My only focus is my programs I will take a back seat while I work. How to release these without crippling the economy (deflating nq2 prizes) is something me and joe will discuss at the time of release. Check back to this thread every few days and see how its coming along.
    Last edited by DarkByte; 07-25-2012 at 07:00 PM.

  8. #6

    Joined
    Jan 2012
    Posts
    96
    Userbars
    1
    Thanks
    4
    Thanked
    10/8
    DL/UL
    26/0
    Mentioned
    16 times
    Time Online
    8h 17m
    Avg. Time Online
    N/A
    Quote Originally Posted by raredaredevil View Post
    It is annoying nothing else. I have an ego I know this and it is probably annoying. But put up with me and I will give you some kick ass programs. We all have our faults.

    I will continue to update this thread and stay out of everything else now. My only focus is my programs I will take a back seat while I work. How to release these without crippling the economy (deflating nq2 prizes) is something me and joe will discuss at the time of release. Check back to this thread every few days and see how its coming along.
    I don't think you have to worry about crippling the NQII economy, you need to go through the game three times to get prizes that are actually worth a substantial amount of NP. Not to mention the fact that there are already many NQII players out there.

  9. #7

    Joined
    Dec 2011
    Posts
    262
    Thanks
    22
    Thanked
    106/68
    DL/UL
    22/0
    Mentioned
    74 times
    Time Online
    N/A
    Avg. Time Online
    N/A
    Yea and the prizes aren't worth that much anyways.

  10. #8

    Joined
    Jun 2012
    Posts
    34
    Thanks
    0
    Thanked
    4/3
    DL/UL
    5/0
    Mentioned
    6 times
    Time Online
    N/A
    Avg. Time Online
    N/A
    And you can only get the insane prizes once per account
    so 3 times to have a 50% chance of a profitable prize seems like too much of a waste to do over and over

  11. #9
    Saiyan Race
    j03's Avatar
    Joined
    Dec 2011
    Posts
    13,720
    Userbars
    166
    Thanks
    5,906
    Thanked
    33,076/6,608
    DL/UL
    23/36
    Mentioned
    3,867 times
    Time Online
    563d 4h 55m
    Avg. Time Online
    3h 13m
    It's not really about the prizes you get for completing NQII, it's the time it takes to complete. There will probably be delays hard-coded into this program to stop the high scores from being infested with impossible times.
    (you need an account to see links)
    (you need an account to see links)(you need an account to see links)

    ------------------------
    [02/24/2013] Stealth CORE is made into the first standalone Neopets auto-player.
    ------------------------


  12. #10

    Joined
    Jun 2012
    Posts
    1,699
    Thanks
    876
    Thanked
    2,881/1,142
    DL/UL
    44/1
    Mentioned
    562 times
    Time Online
    118d 6h 45m
    Avg. Time Online
    40m
    This is but one class inside a larger project made up of literally hundreds of classes that perform different task. You could add neoquest as a task to run a hour a day for instance. Then the next hour train , do dailys auto buy. Then the next hour sell any items bought. ect

    You will be able to do this with a unlimited number of accounts at once. This bot would cripple the economy on release witch is why I have talked talked with Joe about it. He said to charge for it , witch I do not think will be possible inside this site as you charge for vip something as a programmer I would not see the money for. So I may just make it private on a site somewhere or just say fuck it and release it full public. We will see when the time comes.

  13. The Following 3 Users Say Thank You to DarkByte For This Useful Post:

    Cody. (07-26-2012),Frank12 (07-26-2012),Syccch (07-28-2012)

Posting Permissions

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