Jump to content
Sign in to follow this  
UnknownWarrior

Boundary questions:

Recommended Posts

UnknownWarrior

Alright, I'll try my best to type this as professionally as possible so you will continue to read it.

My friend has asked me to make a small little bot for his game he plays (I have a level 1 character on the game to test the bot).

What he wants it to do is auto-jump around, while right clicking, but stay within a boundary. Also 1 other task he wants in it as 'icing on the cake' is it to pick up a Meteor (a decent priced item on the game that drops often from the mobs at this island).

I have found the colors and drew a diagram to show the boundary needed, I just need some guidance/help (I don't wish you to GIVE it to me, as I need to learn, so try just answering my questions but also in a way 'teach' me :P)

Below is the picture of the Diagram... If you cannot make-out what the words say

Red = Boundary to stay within

Pink = Area to jump within [ Jump = Ctrl + Mouse Click... ALSO (not in picture) area to search for the Meteor)

Blue = The minimaps little character of my lvl 1 noob (That little blue star represents characters on the minimap on the game)

So I have sort of 'ran the script in my head' but not sure where to start out:

If Man() 'touches' Red() Then Avoid()      ?
If Meteor() then 'ignore other tasks and MouseClick( *on meteor array*)
If Man NOT 'touching' Red() Then
       Send- Ctrl
       MouseClick- Random within pink area   ([{ Pink area will not be on the game screen, it will have to be designated with a box to search in or something... Like with PixelSearch coordinates of a box or something.
      MOUSE CLICK RIGHT (To attack)

End

I hope you guys can help me get started... I don't mind you giving me the scripts, but make it so I have to 'fill in the blank'. I would like help such as :

Func Man()

BlueMan$ = (Blue man on minimap)

If

EndIf

EndFunc

That is what I'm stuck on... WHAT coding to actually put in the functions for it to read the minimap only, and within reading the minimap, to have it detect if it touches the red.

I'm about to talk to a friend that also plays that senseless game and he knows how to change the minimap to actually have that red Boundary on it... With that being said, it should help out a lot instead of it just assigning certain points on the minimap to be the boundary, it will actually have a color to go by.

Thanks a bunch, I know I'm asking for a lot here, whatever can be answered, great, whatever can't, I'll try harder to scavenge through the entire AutoIt helpfile to find my complicated questions :). And I just re-read my post, and sorry, I sound a bit bossy throughout the entire thing... But I'll never learn anything if I keep getting programs handed to me, I want to get to the point where I can help other noobs on these forums, instead of the one always asking for help :(.

P.S. - Is there anyway to make it determine where it has been on the Island's boundary... Cause I don't want it to be randomly clicking on say JUST the left half side of the red boundary, because all the monsters will respawn to the right and will never be killed... Hope that is understandable enough :P

EDIT: My minimapping friend is not sure if he can make those red boundaries... He will work on it tonight he said after his homework is finished... Would this bot still be able to work if there were no ACTUAL red boundary lines on the minimap?... Could the Little blue star just navigate through the map and know when hes crossing the imaginary line?

2nd EDIT: I realise this would be very difficult to make and not many of you have the motivation to help a noob like me... But if this is the case could I ask a more simpler question?

If I cannot find anyone to help me with this I'll resort to bot #2 which will be based on lots of luck of not clicking on a monster and other players jumping by... But I was gonna make a bot that follows a certain path (easy to do), but what I don't know if it is possible or not, but could I have it search the screen for a meteor (BACKGROUND VIEW), click on it, and still somehow get back on that path? If I based the bot off of exact clicks I don't think this would be possible to do if it went off the path to get the meteor, as it wouldn't know where the exact path is again... That's why I wanted to do the random BOUNDARY thing because it wouldn't matter if it picked up a meteor or not, it would just continue on with its random jumping...

and my THIRD idea for a bot is: Would it be a little easier to make if you could have the character jump a certain diameter away from the starting point? Say on the minimap, you draw a pretend circle and the bot would jump randomly within that circle simply by knowing how far it can and can't go, rather than detecting if it ran over the 'red line'....?

So much to read, I know, but I'm trying to make it as easy as possible for you guys to help me. :idea:

post-10505-1225142353_thumb.jpg

Edited by UnknownWarrior

Share this post


Link to post
Share on other sites
jvanegmond

You're only going to need 2 AutoIt functions to do this: PixelGetColor and MouseClick. The rest of this is a lot of hard work.

This is such a complicated task to do, and requires so many knowledge in so many fields.. Artificial Intelligence and Optical Recognition just to say the least.

Edited by Manadar

Share this post


Link to post
Share on other sites
UnknownWarrior

You're only going to need 2 AutoIt functions to do this: PixelGetColor and MouseClick. The rest of this is a lot of hard work.

This is such a complicated task to do, and requires so many knowledge in so many fields.. Artificial Intelligence and Optical Recognition just to say the least.

In other words, I wouldn't be capable of doing this? :P

I just need somewhere to START, and I might be able to measle my way through it with some extra guidance... But I have no idea what to put and where to put it even >.<.

Share this post


Link to post
Share on other sites
dbzfanatic

My thoughts for the boundary would be use memory reading to get the player's position (usually a float) and then just check it against a value. Like

$Mem_Handle = _MemoryOpen($PID)

$player_pos = "0x00DBFA02";example address

$player_pos_read = _MemoryRead("0x00DBFDB8", $Mem_Handle, "ushort")

If $player_pos_read < 35 Or $player_pos_read > 365 Then
;move the player
Endif

Share this post


Link to post
Share on other sites
UnknownWarrior

My thoughts for the boundary would be use memory reading to get the player's position (usually a float) and then just check it against a value. Like

$Mem_Handle = _MemoryOpen($PID)

$player_pos = "0x00DBFA02";example address

$player_pos_read = _MemoryRead("0x00DBFDB8", $Mem_Handle, "ushort")

If $player_pos_read < 35 Or $player_pos_read > 365 Then
;move the player
Endif
Could it work to be like they Press say: Ctrl+P on the little blue man and instead of the memory stuff, it would make a pretend circle on the minimap of > or < the circle or something?

Share this post


Link to post
Share on other sites
dbzfanatic

Well you could but the best way to do that would be to use a transparent gui and draw the circle on the minimap or over it,then check the position of the player marker against that lil circle. Memory reading would be easier, (you'd have a square unless you wanted a billion points) but if the minimap moved then you'd have to code for the drawn circle to move with it which would be extra work. IMHO memory reading is the way to go,you only need 4 values to check against; xmin, xmax, ymin, ymax. As long as you're in that square you could tell it to randomly move around looking for the mobs/meteors.

Share this post


Link to post
Share on other sites
UnknownWarrior

Well you could but the best way to do that would be to use a transparent gui and draw the circle on the minimap or over it,then check the position of the player marker against that lil circle. Memory reading would be easier, (you'd have a square unless you wanted a billion points) but if the minimap moved then you'd have to code for the drawn circle to move with it which would be extra work. IMHO memory reading is the way to go,you only need 4 values to check against; xmin, xmax, ymin, ymax. As long as you're in that square you could tell it to randomly move around looking for the mobs/meteors.

Yea, but I have no idea how to read the memory for the game... Do I need a certain program to get the memory for the position I'm at... And I have no idea how to actually code that memory into a bot... :idea:

With that exact picture from above, how could I make a transparent GUI with a boundary such as it? :(

EDIT: Also the maps moves a tiny bit to the right as you jump to the left, but not hardly any at all, it won't be a big deal.

If you don't want to help me with memory or the transparent GUI thing I have a nooby way to do it... I could have my guy jump randomly until he hits the water (the blue)... But the mobs are only at the top half of the island, not any at the bottom half :P

Edited by UnknownWarrior

Share this post


Link to post
Share on other sites
dbzfanatic

Memory reading isn't that hard,just make sure the game isn't using a gameguard that may block it. Download Cheat Engine,go through the tutorials and find the value for position. To make your transparent GUI there are tutorials on that, just make it the same size as or a lil bigger than the mini-map and position it over the map.

Share this post


Link to post
Share on other sites
UnknownWarrior

Well I do have Cheat Engine, but I've read through its short tutorial, but I don't understand how I can find the value of my x, y coordinate on my game... I'm sure its right in front of me, but I don't have any idea which one it is :P

Share this post


Link to post
Share on other sites
dbzfanatic
UnknownWarrior

Just do an exact value 4byte search for float with that value. Should work.

Rock on, I found it with some help from the tutorial...

I found the X position, and once I find the y I'll be in business...

I've tried for ages to try and figure out memory, and now I finally have... :(

If theres any chance... Could you 'write' me a script that would not go out of say a 30 coordinate x and y RADIUS... (60 and 60)

Would this just be as easy: Making a real boundary (like the red out-line in my minimap image above) and have it do like:

$x = MemRead (or how do i do this part?) [Memory for x coord]

If $x < 200, 200 Then

Send Ctrl

MouseClick left

MouseClick right

EndIf

EDIT: Now When I re-try it... It isn't doing the same thing as before... I do:

Exact Value

4byte

And i Search for 200 in the search bar : First scan

Then I jump on the game to say 201

I type in Changed Value

And it comes up with 3 values that have 201... I don't know which value is the right one tho :P

(Also their all 3 options for 201... Two of the Values are in green lettering and 1 is normal-black)

Edited by UnknownWarrior

Share this post


Link to post
Share on other sites
dbzfanatic

The code I showed above should actually be workable,just change the values to what you want and change the mem address to what you found. You'll also need to download NomadMemory.au3

Share this post


Link to post
Share on other sites
UnknownWarrior

The code I showed above should actually be workable,just change the values to what you want and change the mem address to what you found. You'll also need to download NomadMemory.au3

Aight thats sweet!

As i posted in an edit (i don't know if you saw my edit or not) its not giving me 1 value anymore... ( Read my post above yours about my problem :P )

Also where do I get NomadMemory and how do I use and what do I use it for?

(I'm COMPLETELY new at this memory pro stuff, I appreciate your help with much much gratitude)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×