Results 1 to 10 of 10

Thread: Nq2 Auto -Work in progress -

Threaded View

  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)

Posting Permissions

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