 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Tue May 08, 2007 11:14 pm Post subject: Pixel search & click [mmorpg] |
|
|
Im playing this mmorpg and I want to skill up my skills...
so what Im looking for is a macro who just search the screen for a color pixel and clickes it, then waits for 5sec and does it a again.
so I kinda know all the commands thats needed with searchpixel, mouseclick and loop. but I not a good programmer and cant get it to work.
could anyone be so nice to give me a hand.
Last edited by Astelle on Fri May 11, 2007 4:40 pm; edited 1 time in total |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Tue May 08, 2007 11:39 pm Post subject: |
|
|
| give me your code! |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Wed May 09, 2007 12:11 am Post subject: |
|
|
| Code: |
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
GetKeyState, NLS, NumLock, T
if NLS = D
{
Send {NumLock}
}
Loop
{
GetKeyState, NLS, NumLock, T
if NLS = D
{
PixelSearch, Px, Py, 100, 409, 920, 440, 0x1C4624, 5, Fast
if ErrorLevel = 0
{
sleep 300
MouseMove, Px, Py, 0
MouseClick, right
sleep 25
MouseMove, Px + 5, Py, 0
MouseClick, right
sleep 25
MouseMove, Px - 5, Py, 0
MouseClick, right
sleep 100
}
}
else
{
sleep 50
}
}
|
I didnt make this code myself, but I have tryed to edit it, so it works at some point but it lockes up alot.
I would also want the script to click key "1" after it clicks on the pixelcolor with the mouse, but with this script I have just jamed the key "1" go get it to work. |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Wed May 09, 2007 11:25 am Post subject: |
|
|
okey I`ll give it another try.. what I want to do is...
- Search for a monster (search pixel)
- Move to it (left click),
- press 1
- wait 5sec
- Repeat the action:
I found this code on the forum, can anyone tell me if it will work.
| Code: |
#z::
Loop
{
PixelSearch, OutputX, OutputY, 300, 200, 600, 500, 132113
If ErrorLevel = 0
{
MouseClick, left, %OutputX%, %OutputY%
Send, 1
ClipWait, 5
}
}
return
|
Also in the code I posted above I can turn the script on and off with numlock, how do I add that to this script. |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Wed May 09, 2007 9:27 pm Post subject: |
|
|
I have made this now:
| Code: |
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
GetKeyState, NLS, NumLock, T
if NLS = D
{
Send {NumLock}
}
Loop
{
GetKeyState, NLS, NumLock, T
if NLS = D
{
PixelSearch, Px, Py, 50, 50, 920, 700, 0x090f21, 5, Fast
if ErrorLevel = 0
{
sleep 900
MouseMove, Px, Py, 1
MouseClick, left
Send, 1
sleep 5000
}
}
else
{
sleep 50
}
}
|
My problem here is that it only hits the key "1" first time.
whats wrong here...? |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Thu May 10, 2007 10:10 am Post subject: |
|
|
| *bump* |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Thu May 10, 2007 10:45 am Post subject: |
|
|
TBH, there's no doubt that your subject line doesn't seem to attract much supporters. One reason might be that it's kinda stupid to specificaly point out to 'need help' at a forum section which is named 'Ask for Help'
But I might be wrong. Btw. Your issue is a FAQ, if you'd have searched the forum you've found a bunch of posts exactly dealing with this.
What about to edit the subject line like this: Pixel search & click [mmorpg] ?
Good luck.  |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Fri May 11, 2007 3:50 pm Post subject: |
|
|
| Quote: | | edit the subject line | ... means to edit the suject line of the current (this) thread.
Not to create a new/additional thread with the same topic. [Moderator's note: Removed...]
Thanks for listening. |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Fri May 11, 2007 4:40 pm Post subject: |
|
|
| okey thank you. |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Sun May 13, 2007 12:54 pm Post subject: |
|
|
| *bump* |
|
| Back to top |
|
 |
raven-gm
Joined: 25 Mar 2007 Posts: 24
|
Posted: Sun May 13, 2007 5:34 pm Post subject: |
|
|
| Astelle wrote: | I have made this now:
| Code: |
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
GetKeyState, NLS, NumLock, T
if NLS = D
{
Send {NumLock}
}
Loop
{
GetKeyState, NLS, NumLock, T
if NLS = D
{
PixelSearch, Px, Py, 50, 50, 920, 700, 0x090f21, 5, Fast
if ErrorLevel = 0
{
sleep 900
MouseMove, Px, Py, 1
MouseClick, left
Send, 1
sleep 5000
}
}
else
{
sleep 50
}
}
|
My problem here is that it only hits the key "1" first time.
whats wrong here...? |
So it finds the monster, but doesn't move the mouse to it, but only the first time it looks?
How big of a problem is that, anyways? _________________ I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn... |
|
| Back to top |
|
 |
Travley
Joined: 13 May 2007 Posts: 48
|
Posted: Sun May 13, 2007 5:40 pm Post subject: |
|
|
I'm guessing your trying to get some 'Glyder Action' going on here. So it'd definently be a problem if it does it once, and only once.
Cheers. |
|
| Back to top |
|
 |
raven-gm
Joined: 25 Mar 2007 Posts: 24
|
Posted: Sun May 13, 2007 7:06 pm Post subject: |
|
|
| Travley wrote: | I'm guessing your trying to get some 'Glyder Action' going on here. So it'd definently be a problem if it does it once, and only once.
Cheers. |
Oh, once and only once?
I read it differently...
try SendPlay. It might just be the game you're playing, but sendPlay usually works with most games... _________________ I would like to think that I know what I'm doing, but there's just to much stuff I've yet to learn... |
|
| Back to top |
|
 |
Astelle
Joined: 08 May 2007 Posts: 10
|
Posted: Mon May 14, 2007 12:28 pm Post subject: |
|
|
| raven-gm wrote: | | Travley wrote: | I'm guessing your trying to get some 'Glyder Action' going on here. So it'd definently be a problem if it does it once, and only once.
Cheers. |
Oh, once and only once?
I read it differently...
try SendPlay. It might just be the game you're playing, but sendPlay usually works with most games... |
so I swap "Send, 1" with "SendPlay, 1" ? |
|
| Back to top |
|
 |
BoBoĻ Guest
|
Posted: Mon May 14, 2007 12:53 pm Post subject: |
|
|
| Quote: | | so I swap "Send, 1" with "SendPlay, 1" | Nice to know. What's the outcome? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|