Jump to content
Sign in to follow this  
ecstatic

Get position, pixelclick, go back to position.

Recommended Posts

ecstatic

Ok guys, ill show you my idea/problem

Im making a simple clicker, this script im trying to make right now, is to buy supplies from a Vendor who has been modded Purple.

I need to be at the exact place i was before the bot pixelscans and clicks for the purple vendor

heres an image

Posted Image

And heres my code

***Here i need to find the position of the character****
$Malah = PixelSearch(0, 0, 800, 600, $npc)
If not @error Then
Mouseclick("Right", $Malah[0], $malah[1])
If @error <> 0 Then
MouseMove(365,219)
MouseDown("left")
MouseUp("left")
Send("{DOWN}{DOWN}{ENTER}")
MouseMove(439,478)
MouseDown("left")
MouseUp("left")
Sleep($ClickDelay)
MouseMove(441,480)
MouseDown("left")
MouseUp("left")
Sleep($Clickdelay)
*******
********* Right now i have the bot just leave game and recreate  I need it to go back to pos here.
*********
EndGame()

Share this post


Link to post
Share on other sites
ecstatic

I think you have a similar question to mine...

http://www.autoitscript.com/forum/index.php?showtopic=93469

MM.bot uses this function but im not sure how.

Someone please get back to us thanks.

And thanks for posting your question lmk if u get updated also

\

Edit: i think nomadMemory might be helpful for us, search that.

Any other ideas are welcome

Edited by ecstatic

Share this post


Link to post
Share on other sites
ecstatic

has anyone had experience with this kind of thing?

Share this post


Link to post
Share on other sites
Drew

Ya I did a ton of stuff using graphic editting on d2.

I'm not helping you build a bot , but I will give you a little hint.

You need to get the pixel just above and to the left of the d2 cursor , otherwise pixel search or whatever you use will be getting the tip of the finger of the cursor. I would also suggest mathmatically mapping out the screen using GetWinPos and working variables from there to allow specific area searching and allow a foundation for a error system later on.

Thats all I'm helping with.

Edit:

And that specific program does it through modding the Patch.MPQ of the game using various choices of graphic editors like PS or even MSPaint combined with a few files in the game.

Edited by Drew

Share this post


Link to post
Share on other sites
SwordHunter4Ever

Detect where Malah is, then click on her. Do whatever you need to do, then use Malah's cord backwards to put yourself back to where you were.

For example lets say cords are $M1, $M2 for Malah and your current position is $C1, $C2. To click on her and trade you would do MouseClick("left", $C1+$M1, $C2+$M2) then to get back to where you were when you are done you would do MouseClick("left", $C1-$M1, $C2-$M2).

Thats the concept, I'm not actually going to write the script for you.. if I did you wouldn't learn anything.

Share this post


Link to post
Share on other sites
Drew

The games 3d ( or atleast tries to be ) so reversing the coords would not help as the characters positioning is based on a much more complex graph than x and y. Give me a second and I'll see if I can find the map I drew up.

Eh , I couldn't find it. This one won't be in as much depth , but you'll get the general idea on what i mentioned earlier. If you can read this ( its written pseudo autoit... its just math. ) than you can use its formulaes to coordinate around the screen at various times.

Using that , and modding the patch to your liking ( I can give you a brief tutorial on how to mod d2 .. its not hard. ) than you could have a full-proof program to do whatever you like. And note: When getting the color of the green square or "tracker", I would suggest taking a screenie , and just a tip to have the mouse go back to a certain point ( on the screen , this won't always work in game )...

Just set MouseGetPos to a variable and call upon it as needed. ( Remember to update it when changing the base point you want. This is most useful in the inventory or stash. )

But other than that , ya. A game creator is very very simple to create , I think I still have a few from my d2 days. But anyhow... any other questions lmk.

Heres the link for the map I made.

http://img218.imageshack.us/img218/5015/coordsza5.png

If you need an explaination of the map, I'll give a brief one. But It was made for MY purposes , so I can understand if you don't understand it at first.

Edited by Drew

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.