Sign in to follow this  
Followers 0
sherkas

Determine direction of image

3 posts in this topic

I have a problem I cant seem to find out how to tackle.

I have a game that im creating a helping autoit script for.

My problem is... I want to be able to determine what direction the character is facing via the minimap.

Heres an example of it: http://www.uoxcl.com/map.bmp

The yellow arrow in the middle rotates depending on the direction. I cant seem to figure out logically to determine via pixel searching and verification on what direction its facing.

The reason I want to know is so that ingame I can correct the characters posistion to say north. But the only way to tell what direction they are facing is the minimap and it seems that I cant find a way to determine what way the yellow arrow is facing.

Anyone have some insight?

the x/y coords for its location is always the same, (the arrow and background map rotates)

Nothing overlaps the yellow arrow either.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

wait , is the back map stationary? so that only the arrow moves? if so, you can find the coordinates of the tip of the arrow, and using that create a circle, and have autoituse PixelSearch to search that whole ring to fine where the yellow pixel is(representing the tip of the arrow), then that info can be used to tell which way your pointing... it might be a bit of work though....wait a minute.. this is the silkroad map isint it? well you can stop right there, gamegaurd doesnt allow autoit to run, and even if you get it past, the pixels of the game always return black...

Sorry for the bad news, dont you just hate the new gamegaurd update?

Edited by MethodZero

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Share this post


Link to post
Share on other sites

heh, ya gameguard is a pain, but not to say im hacking the game or creating a huge bot, im creating a personal bot (Because im really good at programming, just rather new to autoit) and im tired of all the cheats/keylogging fake bots. And gameguard wont be a issue for my bot.

So im creating a personal one for myself and ive got a crazy fast search and monster find on the screen, just need it to do it via the minimap now so it can run towards the mobs. So once it can direct itself towards the mob, the rest of the script can auto target it and run towards/kill it efficiently. Im just adding a feature all the autoit bots seem to lack, which is accurate mob finding.

But ya, I get what you said and that seems to be a very good way to do it. I will try and see how easy I can implement that, thanks for the logical insight.

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  
Followers 0