Thread Rating:
  • 25 Vote(s) - 2.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My choco racing loop AHK
#31
(03-31-2015, 06:22 PM)lantus Wrote:  I can't even get it to start lol, I installed AHK, copy and paste the code into a .ahk file, ran it, and nothing happens :(

Did you hit CTRL + S
Reply
#32
(03-31-2015, 04:28 PM)Cichard Wrote:  i cant get this to work could it be because im running multiple bots(though only 1 bot using the AHK script)

http://www.autohotkey.com/board/topic/82...e-windows/
Reply
#33
(03-31-2015, 08:53 PM)Tru14 Wrote:  
(03-31-2015, 06:22 PM)lantus Wrote:  I can't even get it to start lol, I installed AHK, copy and paste the code into a .ahk file, ran it, and nothing happens :(

Did you hit CTRL + S

Yes, nothing happens, or can I not run this when minion is running?
Reply
#34
I can't figure out the Stamina portion of the script. Could someone inform me which color value is which?
Code:
if (color = 0x181410 or color=0x181410)

Also what location should I be looking for for the following:
Code:
PixelGetColor, color, 1102, 1052
Reply
#35
(03-31-2015, 04:28 PM)Cichard Wrote:  i cant get this to work could it be because im running multiple bots(though only 1 bot using the AHK script)

Likely due to the window name. There would then be more than FFXIV process. Might have to change the initial detection part of the process.

WinGet, programid, List, FINAL FANTASY
Basically says get a list of all windows that contain final fantasy and store the result in programid variable. (http://www.autohotkey.com/docs/commands/WinGet.htm)

So you could in theory change FINAL FANTASY to something like the CHAR NAME if you are using multiple windows to determine which one you want it to run on. This is likely why its not working where you want it to. Similar to minion. All PID's show up in a list.


(04-01-2015, 05:06 AM)duo424 Wrote:  I can't figure out the Stamina portion of the script. Could someone inform me which color value is which?
Code:
if (color = 0x181410 or color=0x181410)

Also what location should I be looking for for the following:
Code:
PixelGetColor, color, 1102, 1052

For the stamina you look at coords where you want to stop pushing the W key.
For me it was the stamina bar at 15-20%. Once you get the coordinate right then you can watch and see when that % changes. I will say I don't end up finishing with 20%+ stamina so I don't really hit the OR and didn't try to figure it out. When my chocobo ends a race with more than 20% then I will worry about getting the 000000 color correct.

As for which color they shouldn't be the same. It should have been something like
if (color = 0x101418 or color=0x000000)
Reply
#36
(04-01-2015, 11:20 AM)edb6377 Wrote:  
(03-31-2015, 04:28 PM)Cichard Wrote:  i cant get this to work could it be because im running multiple bots(though only 1 bot using the AHK script)

Likely due to the window name. There would then be more than FFXIV process. Might have to change the initial detection part of the process.

WinGet, programid, List, FINAL FANTASY
Basically says get a list of all windows that contain final fantasy and store the result in programid variable. (http://www.autohotkey.com/docs/commands/WinGet.htm)

So you could in theory change FINAL FANTASY to something like the CHAR NAME if you are using multiple windows to determine which one you want it to run on. This is likely why its not working where you want it to. Similar to minion. All PID's show up in a list.


(04-01-2015, 05:06 AM)duo424 Wrote:  I can't figure out the Stamina portion of the script. Could someone inform me which color value is which?
Code:
if (color = 0x181410 or color=0x181410)

Also what location should I be looking for for the following:
Code:
PixelGetColor, color, 1102, 1052

For the stamina you look at coords where you want to stop pushing the W key.
For me it was the stamina bar at 15-20%. Once you get the coordinate right then you can watch and see when that % changes. I will say I don't end up finishing with 20%+ stamina so I don't really hit the OR and didn't try to figure it out. When my chocobo ends a race with more than 20% then I will worry about getting the 000000 color correct.

As for which color they shouldn't be the same. It should have been something like
if (color = 0x101418 or color=0x000000)

thas just it it will start to talking to the NPC but no matter what i do for coords and color for the pop up window it never accepts;.
Reply
#37
(04-01-2015, 05:54 PM)Cichard Wrote:  thas just it it will start to talking to the NPC but no matter what i do for coords and color for the pop up window it never accepts;.

Just use a 35 second sleep between when you talk to the NPC and accept the race.

the max the game will wait before pop us is 30 seconds, 15 seconds is possible and so is instant queue pop. 35 second sleep will satisfy all 3 situations (as low as 32 will work). a 30 second wait before queue pop is most common (when I raced it occured about 90% of the time).

Do other getpixelcolour functions work? some people have issues on windows 8 with pixel related functions (image search functions wont work on 8).

There are also paramaters you can use like ALT and SLOW
-- PixelGetColor, OutputVar, X, Y [, Alt|Slow|RGB] --
Both can be used if normal getpixelcolor fails to work.

Window must be active and not covered for pixel related functions.
Reply
#38
(04-01-2015, 11:20 AM)edb6377 Wrote:  
(03-31-2015, 04:28 PM)Cichard Wrote:  i cant get this to work could it be because im running multiple bots(though only 1 bot using the AHK script)

Likely due to the window name. There would then be more than FFXIV process. Might have to change the initial detection part of the process.

WinGet, programid, List, FINAL FANTASY
Basically says get a list of all windows that contain final fantasy and store the result in programid variable. (http://www.autohotkey.com/docs/commands/WinGet.htm)

So you could in theory change FINAL FANTASY to something like the CHAR NAME if you are using multiple windows to determine which one you want it to run on. This is likely why its not working where you want it to. Similar to minion. All PID's show up in a list.


(04-01-2015, 05:06 AM)duo424 Wrote:  I can't figure out the Stamina portion of the script. Could someone inform me which color value is which?
Code:
if (color = 0x181410 or color=0x181410)

Also what location should I be looking for for the following:
Code:
PixelGetColor, color, 1102, 1052

For the stamina you look at coords where you want to stop pushing the W key.
For me it was the stamina bar at 15-20%. Once you get the coordinate right then you can watch and see when that % changes. I will say I don't end up finishing with 20%+ stamina so I don't really hit the OR and didn't try to figure it out. When my chocobo ends a race with more than 20% then I will worry about getting the 000000 color correct.

As for which color they shouldn't be the same. It should have been something like
if (color = 0x101418 or color=0x000000)

Hmm i used the purple balloon for color. and made sure when the window popped it matched what was in the tooltip. you could do as suggested and just use a wait instead but there is no reason it shouldn't work. Maybe I will add the COORD Indicator.

That is assuming you redid the window the right way. The keys just go to the active window but the pixels go to the named process window. You might just try with only one active first until you figure it out and then open additional windows after and see if you have the same problem.
Reply
#39
(04-02-2015, 03:45 PM)Rustyclippers Wrote:  
(04-01-2015, 05:54 PM)Cichard Wrote:  thas just it it will start to talking to the NPC but no matter what i do for coords and color for the pop up window it never accepts;.

Just use a 35 second sleep between when you talk to the NPC and accept the race.

the max the game will wait before pop us is 30 seconds, 15 seconds is possible and so is instant queue pop. 35 second sleep will satisfy all 3 situations (as low as 32 will work). a 30 second wait before queue pop is most common (when I raced it occured about 90% of the time).

Do other getpixelcolour functions work? some people have issues on windows 8 with pixel related functions (image search functions wont work on 8).

There are also paramaters you can use like ALT and SLOW
-- PixelGetColor, OutputVar, X, Y [, Alt|Slow|RGB] --
Both can be used if normal getpixelcolor fails to work.

Window must be active and not covered for pixel related functions.

can you give me an example that uses timers instead of pixel
Reply
#40
http://www.mmominion.com/Thread-Gold-Saucer?page=9

I made a few different scripts trying different things. There is an example script I made in that link, just to show how to handle races being full (pixel reading).

A few pages prior someone made a script that Sprints during the race (without pixel reading, however if the races are full... or there is a timing issue at some point you would run into a wall and would no longer Q)


Below is a very basic Q and leave AHK script

Code:
CoordMode, ToolTip, Screen

^s::
WinGet, programid, List, FINAL FANTASY

Loop
    {
    Sleep 1200
tooltip, `n Race # : %A_Index%`n, 0, 0
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad2}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad6}, ahk_id %programid1%
    Sleep 1200
    ControlSend,,{Numpad0}, ahk_id %programid1% ;Queue
    Sleep 35000 ;universal wait timer (Q pops at 0,15,30 seconds)
    ControlSend,,{Numpad0}, ahk_id %programid1% ; accept Queue
    Sleep 190000 ;race duration
    ControlSend,,{Numpad0}, ahk_id %programid1% ; double hit numpad 0 to exit
    Sleep 500
    ControlSend,,{Numpad0}, ahk_id %programid1%
    Sleep 12000
    }
    INS::pause
Return

This script has tons of extra delay in it. The 190000 sleep value needs to roughly be the time from when you accept Q + longest possible race time + 10 seconds. This was my day 1 shitty ahk script. I ran a seperate script to sprint, but it works off pixel reading.


Do you use windows 8? I shared a few scripts with people who use windows 8 and they all failed (image / pixel reading). AutoIt may have better pixel reading functionality. I have never used AutoIT but it appears to be more robust

With the hit to 8th place finishes in the last patch a Sprint is necessary for decent chocobo leveling time / mgp
Reply
 


Forum Jump:


Users browsing this thread: 1 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products