Jump to content

 

Need help editing Macro for "Hail to the King" Jump Rope Achievement


Jawmuncher
 Share

Recommended Posts

Got the script to work! Made it up to 1269.

 

It would fail at certain intervals (first was 50, then 100 then it failed several times at random times near the beginning), but it eventually cleared 200 then just went on until it popped. Just let it run a bunch and it should eventually work if you've got the coordinates and colors right.

 

Thanks!

Link to comment
Share on other sites

Alright, I think I got it, but I definitely need people to test this out. I only have one computer I can try this on. Credit goes to QueueTip over at PlayStation Trophies for figuring this script out, I just adjusted it so hopefully we can use it on our side.

 

First thing, follow these steps to get AHK setup on your machine (adapted from https://www.playstationtrophies.org/forum/6083888-post158.html):

 

1. Download AutoHotKey https://autohotkey.com/, and SciTE4AutoHotkey https://fincs.ahk4.net/scite4ahk/.

 

2. Copy and paste every part of the script (below) into a new file on SciTE4AutoHotkey, then save the file (preferably on the desktop for easy access).

 

3. Open up FFIX, take the game out of full screen and into windowed mode, and go to the jump rope game. Press Enter on your keyboard until the game shows "0 times" and Vivi has a white ! above his head.

 

4. Find the file and double click to start the script.

 

At this point, we need to find where Vivi's shadow is at the beginning of the jump rope game. This is the hard part so try to be patient. Find where the script is running in the bottom right of your screen (usually under hidden icons near the clock in Windows 10). You should see a green H symbol. Right click that symbol and select Window Spy. A new window will pop up similar to this: https://imgur.com/9q8IL0d

 

Select the check box Follow Mouse if it isn't already checked. Also, make sure under your mouse settings you turn on “Show location of pointer when I press the CTRL key”. That way when you press the control key a circle shows you where your mouse pointer is. One catch is that when your mouse is within the FFIX window, it disappears. Press the control key until you get an idea of where your mouse is and get it under Vivi's shadow where the color value (in the mouse position section of Window Spy next to color) doesn't change. This part isn't super easy so take your time. You'll want to either snap a picture of the Window Spy window with your phone or jot down the coordinates and color. The relevant information for us is in the mouse position section. Referencing the above picture, we need to know the coordinates next to "Client:" (yours will definitely be different, this is only an example). So, according to the picture, we would note 1825, 841, and the color value CCA053.

 

Alright, first step complete. Take this information and plug your values into line number 43 (always leave 0x before putting your color value):

PixelSearch, x, y, 1825, 841, 1825,841, 0xCCA053, 50, Fast RGB

 

Next, we need to get Vivi's shadow after he has failed the jump rope game so we can automatically restart the script. Go ahead and manually fail the game until you get to where the girl says, "Come play with us again!". At this point, redo the step above getting Vivi's shadow location using Window Spy. Then place these numbers and the color value just as above but this time on line number 61. Here is an example (same idea as shown above, the numbers will not be the same):

; Detect if failed and back at the start to retry
PixelSearch, x, y, 1272, 1179, 1272, 1179, 0x2E2208, 50, Fast RGB

 

Now, you are well on your way. Don't resize the FFIX window or you will have to find Vivi's coordinates again!

 

Save the script and press "R" on your keyboard to reload the script. Get Vivi back into the position where he has a ! above his head and he is outside of the jump rope. Press the "A" key to run the script. There will be tooltips noting each jump and a number you can disregard. Make sure the in game jumps and the tooltip jump numbers are in sync. If not, you have other issues we may can work out. If you are failing on the first jump and are seeing a tooltip stating "Not detected, check coordinates and/or color" you will need to redo the above steps to find Vivi's shadow. Again, that part can be frustrating so try to be patient. If Vivi fails a jump, the script should automatically restart for you so leave it running. If it doesn't, recheck your pixel coordinates after Vivi has failed.

 

Here are a few disclaimers/notes:

I definitely have had some issues getting this to work. One day it worked great, then I had to make some significant logic changes to make it work the next day. I hope this will work for at least some people. If you get the pixel detection working right and it doesn't constantly fail on 20 or the same exact number each time, it should eventually work, so let it do its thing. I've had success running this script at different window sizes on my computer using the above steps.

 

Since I had so many issues between days, I wasn't going to adapt this to share, but then I read about how some physically can't do this achievement and I wanted to hopefully help at least someone.

 

Let me know if it works for anyone and if you have any questions, I will try to help. Good luck!

 

Full script:

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
i = 1

; jump intervals
a = 667
b = 532
c = 467
d = 433
e = 383
f = 400

delay = 100
balancer = 0
currentInterval := a
extraTime = 0

ToolTip, start, 400, 400

; Initiate steps to begin
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 2000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 3000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.

; Detect position
	Loop 
 	{
	PixelSearch, x, y, 793, 977, 793, 977, 0x452400, 50, Fast RGB
 			If (ErrorLevel = 0) 
 			{
 				;sleep, 100
 				tooltip % "Detected shadow"
 				break
 			}
		else
		{
			tooltip % "Not detected, check coordinates and/or color"
		}
 	}

start := A_TickCount + 50

loop
{
	; Detect if failed and back at the start to retry
	PixelSearch, x, y, 1272, 1179, 1272, 1179, 0x2E2208, 50, Fast RGB
		If (ErrorLevel = 0) 
		{ 
			; reset
			tooltip % "Restarting"
			sleep, 3000
			Send {Enter down}  ; Press down the Enter key.
			DllCall("Sleep", "Uint", 100)
			Send {Enter up}  ; Release Enter key.
			sleep, 2000
			break
		}
	
	; Manual override
	GetKeystate, state, Enter
	if (state = "D" and stop = 0)
	{
		break
	}

	timer := A_TickCount - start

	if (i = 1) 
	{
		currentInterval := a
	} 
	else if (i = 20) 
	{
		currentInterval := b
		balancer = 0
	} 
	else if (i = 50) 
	{
		currentInterval := c
		balancer = 0
	} 
	else if (i = 100) 
	{
		currentInterval := d
		balancer = 0
	} 
	else if (i = 200) 
	{
		extraTime = 50
		delay = 70
		currentInterval := e
		balancer = 0
	} 
	else if (i = 260) 
	{
		extraTime = 20
		balancer = 0
	} 
	else if (i = 301) 
	{
		currentInterval := f
		balancer = 0
	}

	; If jumps are too late remove the = below
	if(i >= 1) 
	{
		DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
	}
	Gosub, jump
}
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return

 

One thing to add to this, I set my resolution on my screen lower (1366x768) so that it was easier to find Vivi's shadow, and I also had to tweak the #s for jumps 50/100 a bit (line 15/16) otherwise it would just hit 50/100 and die. I also changed all the i integers to be the x1 instead of x0 ie. 51 instead of 50, 101 instead of 100 etc.

Link to comment
Share on other sites

Sorry about all of the edits, I was on my phone.

 

In your first picture, we don't need to detect the shadow at that point. We need to get Vivi into position where the game says 0 jumps and then check his shadow. This position looks like where Vivi is in your second picture.

 

So, in that case on line 43 in your script it should look like this:

PixelSearch, x, y, 416, 468, 416, 468, 0x462A00, 50, Fast RGB

 

For the second pixel detection, you need to have failed the jump rope game and check Vivi's shadow again when the girl says "Come play with us again!".

 

You should see a small message show up if the first detection doesn't work. If the script can't see it, then a small box will appear where you actual mouse pointer is stating "Not detected, check coordinates and/or color". If you see a small message stating "Detected shadow" then it worked, but that message doesn't stay on the screen for long.

 

Hope that helps.

 

It worked! My fingers going to appreciate this!:D

It was at my fifth try, first last 100 jumps, then 20, then 50, then 50 and finally I stop it at 1200 , seems like in the jumps when the speed changes get messy sometimes but eventually works!

Great JOB! an thanks!

Link to comment
Share on other sites

Mine keeps failing out just before the 20th jump. It made it to 21 one time, then back to 20. They key part is that the tooltip shows it at 45 jumps every time vivian crashes on his 19th/20th. Is there a string I could manipulate to compensate for the apparent difference?

 

 

Something else I've noticed is that its insanely slow, like the whole game is in slow motion. Almost as if it's running as an app and not an actually installed game.

Edited by Raiziell
Link to comment
Share on other sites

Mine keeps failing out just before the 20th jump. It made it to 21 one time, then back to 20. They key part is that the tooltip shows it at 45 jumps every time vivian crashes on his 19th/20th. Is there a string I could manipulate to compensate for the apparent difference?

 

 

Something else I've noticed is that its insanely slow, like the whole game is in slow motion. Almost as if it's running as an app and not an actually installed game.

 

Is this happening when the script isn’t running or only when it is running?

Link to comment
Share on other sites

Mine keeps failing out just before the 20th jump. It made it to 21 one time, then back to 20. They key part is that the tooltip shows it at 45 jumps every time vivian crashes on his 19th/20th. Is there a string I could manipulate to compensate for the apparent difference?

 

 

Something else I've noticed is that its insanely slow, like the whole game is in slow motion. Almost as if it's running as an app and not an actually installed game.

 

I have the same issue when playing in full screen. Try playing in windowed mode, and making the screen a bit smaller. By the time I got mine to work, my screen was probably about half size.

 

If you can't get it to run smoothly in windowed mode, you could also go full nuclear and set your computer's resolution to 800X600. That should clear up most frame rate issues.

 

Just remember that any changes to the screen size will require you to refind the coordinates and color.

Link to comment
Share on other sites

It's happening before the script as well. I've been doing it in windowed mode. Just lowered res all the way and shrunk the window. Still runs as if slow motion. Since it's running like it's a built in app, I cant even check for an exe to see if it's running off of my graphics card v the built in. Pretty frustrating.

Edited by Raiziell
Link to comment
Share on other sites

One thing I don't understand is the latency portion. How do I find what my latency is and where does that get edited?

 

If you get the one I posted working, you don’t need that.

 

The other script has a line labeled “Your latency” so that’s the number you’d change in that one.

Link to comment
Share on other sites

I have been trying to get the script working for the past few days but seem to have come to a stop. At first I could only hit 20 then trip, then 50 and trip, and now I either get 50 54 or 62. Once it hit 72 and 102. Tried what another user said by changing the intervals and times but that just made it worse. I also double checked my coordinates by taking a screenshot win+prntscrn and viewed it full screen put the pointer in position then alt+tab back to ffix window then pressed ctrl to verify pointer location. Any help or advice would be greatly appreciated.

Edited by JoDo0715
Link to comment
Share on other sites

I have been trying to get the script working for the past few days but seem to have come to a stop. At first I could only hit 20 then trip, then 50 and trip, and now I either get 50 54 or 62. Once it hit 72 and 102. Tried what another user said by changing the intervals and times but that just made it worse. I also double checked my coordinates by taking a screenshot win+prntscrn and viewed it full screen put the pointer in position then alt+tab back to ffix window then pressed ctrl to verify pointer location. Any help or advice would be greatly appreciated.

 

Hmm that is strange. I recommend running the game in windowed mode (not in full screen). Is the script restarting by itself? If so and if you haven’t let it retry by itself, let it run for a while.

 

Are the tool tip jump numbers in sync with the in game jump numbers? There should be a little tool tip pop up for each jump.

 

Upload a picture of your Window Spy screen with the coordinates for the reset position and I can try to recreate it.

Link to comment
Share on other sites

Hmm that is strange. I recommend running the game in windowed mode (not in full screen). Is the script restarting by itself? If so and if you haven’t let it retry by itself, let it run for a while.

 

Are the tool tip jump numbers in sync with the in game jump numbers? There should be a little tool tip pop up for each jump.

 

Upload a picture of your Window Spy screen with the coordinates for the reset position and I can try to recreate it.

 

Thanks for the quick reply. Im not sure what changed but I ran it this morning for about 4 hours and its starting and restarting itself and detecting the shadow. Still hasnt gotten above 62 and usually fails around 54. The jumps are in sync woth each other.

Link to comment
Share on other sites

Hmm that is strange. I recommend running the game in windowed mode (not in full screen). Is the script restarting by itself? If so and if you haven’t let it retry by itself, let it run for a while.

 

Are the tool tip jump numbers in sync with the in game jump numbers? There should be a little tool tip pop up for each jump.

 

Upload a picture of your Window Spy screen with the coordinates for the reset position and I can try to recreate it.

 

Sorry for hijacking this post a bit...I've been trying fro about 12 hours on and off and left the script running overnight and it runs perfectly 9 times out of 10 until it gets around the 150-190 mark.

 

I've noticed that the speech bubble above Vivi's head stops turning black and stays white just before it fails. I don't know whether that means the jumps are going too quickly or slowly and I tried messing with the interval for the 100 jumps and it just made me fail on 100 consistently.

 

Any help would be awesome.

Link to comment
Share on other sites

Sorry for hijacking this post a bit...I've been trying fro about 12 hours on and off and left the script running overnight and it runs perfectly 9 times out of 10 until it gets around the 150-190 mark.

 

I've noticed that the speech bubble above Vivi's head stops turning black and stays white just before it fails. I don't know whether that means the jumps are going too quickly or slowly and I tried messing with the interval for the 100 jumps and it just made me fail on 100 consistently.

 

Any help would be awesome.

 

If you’re changing values change it only slightly. If it gets worse change it the other direction. If you went up and it was worse go below what it was. This is really weird though, for sure.

Link to comment
Share on other sites

Thanks for the quick reply. Im not sure what changed but I ran it this morning for about 4 hours and its starting and restarting itself and detecting the shadow. Still hasnt gotten above 62 and usually fails around 54. The jumps are in sync woth each other.

 

If you can, upload a picture of your Window Spy window so I can see the coordinates information.

Link to comment
Share on other sites

So, after a few days of searching around, it seems that nobody really can figure out my "slow motion" issue. I've reduced my resolution all the way down, shrunk my window a ton, nothing makes a difference. I put it in fast forward mode and it makes it the correct fast speed, turn it off and back to slow motion. there is no middle ground.

 

 

 

I made a quick crude recording of it. (This is without the script running)

 

 

 

Link to comment
Share on other sites

I was able to get the script up to 201, but haven't had any luck since. When it misses it starts over, but the count continues. I think I must have bad coordinates for when Vivi isn't jumpng rope. I'm finding it very hard to find good coordinates, it just seems like theres so much variance that half the time I can't even get the script to detect a shadow to start. Any ideas for how to make it easier? Where should be looking for the coordinates? Right in the middle underneath him near his body?

Link to comment
Share on other sites

I was able to get the script up to 201, but haven't had any luck since. When it misses it starts over, but the count continues. I think I must have bad coordinates for when Vivi isn't jumpng rope. I'm finding it very hard to find good coordinates, it just seems like theres so much variance that half the time I can't even get the script to detect a shadow to start. Any ideas for how to make it easier? Where should be looking for the coordinates? Right in the middle underneath him near his body?

 

Yeah that means it’s not actually starting over it’s just continuing like you’re still jumping.

 

It definitely isn’t super easy. Make sure the game isn’t full screen and make sure your control key shows your mouse. Try to get it right between his feet where his shadow is. It’s more important to get the second shadow right. Once you have something you think is right, don’t resize your FFIX window or you’ll have to do it again. Feel free to upload a Window Spy screenshot and I can take a look.

Link to comment
Share on other sites

Huge thanks to Link2430 for the script, I've finally unlocked it after a bit of tinkering. I had to add 1 to some of the values and for some reason I couldn't get passed 450, so I added a value to increase the interval by 1 after 400. I tried just adding to the 300 interval by 1 but I then couldn't get to 400.

 

Anyway, here is my code, slightly altered from Link's original, hope it helps someone.

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
i = 1

; jump intervals
a = 667
b = 532
c = 467
d = 434
e = 384
f = 400
g = 401

delay = 100
balancer = 0
currentInterval := a
extraTime = 0

ToolTip, start, 400, 400

; Initiate steps to begin
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 2000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 3000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.

; Detect position
	Loop 
 	{
	PixelSearch, x, y, 405, 479, 405, 479, 0x3F2000, 50, Fast RGB
 			If (ErrorLevel = 0) 
 			{
 				;sleep, 100
 				tooltip % "Detected shadow"
 				break
 			}
		else
		{
			tooltip % "Not detected, check coordinates and/or color"
		}
 	}

start := A_TickCount + 50

loop
{
	; Detect if failed and back at the start to retry
	PixelSearch, x, y, 452, 488, 452, 488, 0x4F310A, 50, Fast RGB
		If (ErrorLevel = 0) 
		{ 
			; reset
			tooltip % "Restarting"
			sleep, 3000
			Send {Enter down}  ; Press down the Enter key.
			DllCall("Sleep", "Uint", 100)
			Send {Enter up}  ; Release Enter key.
			sleep, 2000
			break
		}
	
	; Manual override
	GetKeystate, state, Enter
	if (state = "D" and stop = 0)
	{
		break
	}

	timer := A_TickCount - start

	if (i = 1) 
	{
		currentInterval := a
	} 
	else if (i = 20) 
	{
		currentInterval := b
		balancer = 0
	} 
	else if (i = 50) 
	{
		currentInterval := c
		balancer = 0
	} 
	else if (i = 100) 
	{
		currentInterval := d
		balancer = 0
	} 
	else if (i = 200) 
	{
		extraTime = 50
		delay = 70
		currentInterval := e
		balancer = 0
	} 
	else if (i = 260) 
	{
		extraTime = 20
		balancer = 0
	} 
	else if (i = 301) 
	{
		currentInterval := f
		balancer = 0
	}
	else if (i = 401) 
	{
		currentInterval := g
		balancer = 0
	}

	; If jumps are too late remove the = below
	if(i >= 1) 
	{
		DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
	}
	Gosub, jump
}
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return

Link to comment
Share on other sites

Huge thanks to Link2430 for the script, I've finally unlocked it after a bit of tinkering. I had to add 1 to some of the values and for some reason I couldn't get passed 450, so I added a value to increase the interval by 1 after 400. I tried just adding to the 300 interval by 1 but I then couldn't get to 400.

 

Anyway, here is my code, slightly altered from Link's original, hope it helps someone.

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
i = 1

; jump intervals
a = 667
b = 532
c = 467
d = 434
e = 384
f = 400
g = 401

delay = 100
balancer = 0
currentInterval := a
extraTime = 0

ToolTip, start, 400, 400

; Initiate steps to begin
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 2000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.
Sleep, 3000
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", 100)
Send {Enter up}  ; Release Enter key.

; Detect position
	Loop 
 	{
	PixelSearch, x, y, 405, 479, 405, 479, 0x3F2000, 50, Fast RGB
 			If (ErrorLevel = 0) 
 			{
 				;sleep, 100
 				tooltip % "Detected shadow"
 				break
 			}
		else
		{
			tooltip % "Not detected, check coordinates and/or color"
		}
 	}

start := A_TickCount + 50

loop
{
	; Detect if failed and back at the start to retry
	PixelSearch, x, y, 452, 488, 452, 488, 0x4F310A, 50, Fast RGB
		If (ErrorLevel = 0) 
		{ 
			; reset
			tooltip % "Restarting"
			sleep, 3000
			Send {Enter down}  ; Press down the Enter key.
			DllCall("Sleep", "Uint", 100)
			Send {Enter up}  ; Release Enter key.
			sleep, 2000
			break
		}
	
	; Manual override
	GetKeystate, state, Enter
	if (state = "D" and stop = 0)
	{
		break
	}

	timer := A_TickCount - start

	if (i = 1) 
	{
		currentInterval := a
	} 
	else if (i = 20) 
	{
		currentInterval := b
		balancer = 0
	} 
	else if (i = 50) 
	{
		currentInterval := c
		balancer = 0
	} 
	else if (i = 100) 
	{
		currentInterval := d
		balancer = 0
	} 
	else if (i = 200) 
	{
		extraTime = 50
		delay = 70
		currentInterval := e
		balancer = 0
	} 
	else if (i = 260) 
	{
		extraTime = 20
		balancer = 0
	} 
	else if (i = 301) 
	{
		currentInterval := f
		balancer = 0
	}
	else if (i = 401) 
	{
		currentInterval := g
		balancer = 0
	}

	; If jumps are too late remove the = below
	if(i >= 1) 
	{
		DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
	}
	Gosub, jump
}
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return

 

Awesome! Great work!

Link to comment
Share on other sites

Yeah that means it’s not actually starting over it’s just continuing like you’re still jumping.

 

It definitely isn’t super easy. Make sure the game isn’t full screen and make sure your control key shows your mouse. Try to get it right between his feet where his shadow is. It’s more important to get the second shadow right. Once you have something you think is right, don’t resize your FFIX window or you’ll have to do it again. Feel free to upload a Window Spy screenshot and I can take a look.

 

 

Thanks Link, I was able to correct the issue and get it to start restarting properly. I let it run overnight, but it seems like I can't seem to get past the 500s. I've maxed out at 586, the script consistently gets into the 400s and 500s with a few random fails before that on occasion. Played with the script a little bit and this is the best I've been able to pull off so far. Also tried Chunkeh's script, but for some reason I can't get that one to pass 200 for the most part. It seems to fail much earlier than the one I was trying previously, but I had hoped using Chunkeh's with the extra interval would assist with my issue of getting past the 500s. Here is the code I've been most successful with so far, any ideas on how to improve?

 

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
   i = 1

   ; jump intervals
   a = 667
   b = 532
   c = 467
   d = 433
   e = 383
   f = 400

   delay = 100
   balancer = 0
   currentInterval := a
   extraTime = 0

   ToolTip, start, 400, 400

   ; Initiate steps to begin
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 2000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 3000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.

   ; Detect position
    Loop 
     {
       PixelSearch, x, y, 306, 379, 306, 379, 0x452400, 50, Fast RGB
             If (ErrorLevel = 0) 
             {
                 ;sleep, 100
                 tooltip % "Detected shadow"
                 break
             }
           else
           {
               tooltip % "Not detected, check coordinates and/or color"
           }
     }

   start := A_TickCount + 50

   loop
   {
       ; Detect if failed and back at the start to retry
       PixelSearch, x, y, 341, 387, 341, 387, 0x402808, 50, Fast RGB
           If (ErrorLevel = 0) 
           { 
               ; reset
               tooltip % "Restarting"
               sleep, 3000
               Send {Enter down}  ; Press down the Enter key.
               DllCall("Sleep", "Uint", 100)
               Send {Enter up}  ; Release Enter key.
               sleep, 2000
               break
           }
       
       ; Manual override
       GetKeystate, state, Enter
       if (state = "D" and stop = 0)
       {
           break
       }

       timer := A_TickCount - start

       if (i = 1) 
       {
           currentInterval := a
       } 
       else if (i = 20) 
       {
           currentInterval := b
           balancer = 0
       } 
       else if (i = 51) 
       {
           currentInterval := c
           balancer = 0
       } 
       else if (i = 101) 
       {
           currentInterval := d
           balancer = 0
       } 
       else if (i = 201) 
       {
           extraTime = 50
           delay = 70
           currentInterval := e
           balancer = 0
       } 
       else if (i = 260) 
       {
           extraTime = 20
           balancer = 0
       } 
       else if (i = 301) 
       {
           currentInterval := f
           balancer = 0
       }

       ; If jumps are too late remove the = below
       if(i >= 1) 
       {
           DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
       }
       Gosub, jump
   }
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
   balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return

Link to comment
Share on other sites

Thanks Link, I was able to correct the issue and get it to start restarting properly. I let it run overnight, but it seems like I can't seem to get past the 500s. I've maxed out at 586, the script consistently gets into the 400s and 500s with a few random fails before that on occasion. Played with the script a little bit and this is the best I've been able to pull off so far. Also tried Chunkeh's script, but for some reason I can't get that one to pass 200 for the most part. It seems to fail much earlier than the one I was trying previously, but I had hoped using Chunkeh's with the extra interval would assist with my issue of getting past the 500s. Here is the code I've been most successful with so far, any ideas on how to improve?

 

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
   i = 1

   ; jump intervals
   a = 667
   b = 532
   c = 467
   d = 433
   e = 383
   f = 400

   delay = 100
   balancer = 0
   currentInterval := a
   extraTime = 0

   ToolTip, start, 400, 400

   ; Initiate steps to begin
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 2000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 3000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.

   ; Detect position
    Loop 
     {
       PixelSearch, x, y, 306, 379, 306, 379, 0x452400, 50, Fast RGB
             If (ErrorLevel = 0) 
             {
                 ;sleep, 100
                 tooltip % "Detected shadow"
                 break
             }
           else
           {
               tooltip % "Not detected, check coordinates and/or color"
           }
     }

   start := A_TickCount + 50

   loop
   {
       ; Detect if failed and back at the start to retry
       PixelSearch, x, y, 341, 387, 341, 387, 0x402808, 50, Fast RGB
           If (ErrorLevel = 0) 
           { 
               ; reset
               tooltip % "Restarting"
               sleep, 3000
               Send {Enter down}  ; Press down the Enter key.
               DllCall("Sleep", "Uint", 100)
               Send {Enter up}  ; Release Enter key.
               sleep, 2000
               break
           }
       
       ; Manual override
       GetKeystate, state, Enter
       if (state = "D" and stop = 0)
       {
           break
       }

       timer := A_TickCount - start

       if (i = 1) 
       {
           currentInterval := a
       } 
       else if (i = 20) 
       {
           currentInterval := b
           balancer = 0
       } 
       else if (i = 51) 
       {
           currentInterval := c
           balancer = 0
       } 
       else if (i = 101) 
       {
           currentInterval := d
           balancer = 0
       } 
       else if (i = 201) 
       {
           extraTime = 50
           delay = 70
           currentInterval := e
           balancer = 0
       } 
       else if (i = 260) 
       {
           extraTime = 20
           balancer = 0
       } 
       else if (i = 301) 
       {
           currentInterval := f
           balancer = 0
       }

       ; If jumps are too late remove the = below
       if(i >= 1) 
       {
           DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
       }
       Gosub, jump
   }
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
   balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return

 

Well, that's good news. I think you are on your way.

 

I would change line 18 from 400 to 401 or 399 depending on how far it goes. I know that's not super easy since it takes several minutes to get up to 500, but I think it may help. I would try 401 first and let it restart on its own and see what happens.

Link to comment
Share on other sites

Well, that's good news. I think you are on your way.

 

I would change line 18 from 400 to 401 or 399 depending on how far it goes. I know that's not super easy since it takes several minutes to get up to 500, but I think it may help. I would try 401 first and let it restart on its own and see what happens.

 

 

Wow so I finally got it to 1000. What worked for me was adding additional intervals like Chunkeh suggested. Every time I added one it added about 200+ jumps to my total before he failed. Here's the final script I used in case anyone can make use of it. Thanks for all your help!

 

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
   i = 1

   ; jump intervals
   a = 667
   b = 532
   c = 467
   d = 433
   e = 383
   f = 400
   g = 401
   h = 400
   j = 401

   delay = 100
   balancer = 0
   currentInterval := a
   extraTime = 0

   ToolTip, start, 400, 400

   ; Initiate steps to begin
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 2000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 3000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.

   ; Detect position
    Loop 
     {
       PixelSearch, x, y, 306, 379, 306, 379, 0x452400, 50, Fast RGB
             If (ErrorLevel = 0) 
             {
                 ;sleep, 100
                 tooltip % "Detected shadow"
                 break
             }
           else
           {
               tooltip % "Not detected, check coordinates and/or color"
           }
     }

   start := A_TickCount + 50

   loop
   {
       ; Detect if failed and back at the start to retry
       PixelSearch, x, y, 341, 387, 341, 387, 0x402808, 50, Fast RGB
           If (ErrorLevel = 0) 
           { 
               ; reset
               tooltip % "Restarting"
               sleep, 3000
               Send {Enter down}  ; Press down the Enter key.
               DllCall("Sleep", "Uint", 100)
               Send {Enter up}  ; Release Enter key.
               sleep, 2000
               break
           }
       
       ; Manual override
       GetKeystate, state, Enter
       if (state = "D" and stop = 0)
       {
           break
       }

       timer := A_TickCount - start

       if (i = 1) 
       {
           currentInterval := a
       } 
       else if (i = 20) 
       {
           currentInterval := b
           balancer = 0
       } 
       else if (i = 51) 
       {
           currentInterval := c
           balancer = 0
       } 
       else if (i = 101) 
       {
           currentInterval := d
           balancer = 0
       } 
       else if (i = 201) 
       {
           extraTime = 50
           delay = 70
           currentInterval := e
           balancer = 0
       } 
       else if (i = 260) 
       {
           extraTime = 20
           balancer = 0
       } 
       else if (i = 301) 
       {
           currentInterval := f
           balancer = 0
       }
       else if (i = 401) 
       {
           currentInterval := g
           balancer = 0
       }
       else if (i = 550) 
       {
           currentInterval := h
           balancer = 0
       }
       else if (i = 800) 
       {
           currentInterval := j
           balancer = 0
       }

       ; If jumps are too late remove the = below
       if(i >= 1) 
       {
           DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
       }
       Gosub, jump
   }
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
   balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return  

Link to comment
Share on other sites

Wow so I finally got it to 1000. What worked for me was adding additional intervals like Chunkeh suggested. Every time I added one it added about 200+ jumps to my total before he failed. Here's the final script I used in case anyone can make use of it. Thanks for all your help!

 

 

Esc::ExitApp
r::Reload
CoordMode, Pixel, Relative

a::
Process, priority, , High

loop 
{
   i = 1

   ; jump intervals
   a = 667
   b = 532
   c = 467
   d = 433
   e = 383
   f = 400
   g = 401
   h = 400
   j = 401

   delay = 100
   balancer = 0
   currentInterval := a
   extraTime = 0

   ToolTip, start, 400, 400

   ; Initiate steps to begin
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 2000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.
   Sleep, 3000
   Send {Enter down}  ; Press down the Enter key.
   DllCall("Sleep", "Uint", 100)
   Send {Enter up}  ; Release Enter key.

   ; Detect position
    Loop 
     {
       PixelSearch, x, y, 306, 379, 306, 379, 0x452400, 50, Fast RGB
             If (ErrorLevel = 0) 
             {
                 ;sleep, 100
                 tooltip % "Detected shadow"
                 break
             }
           else
           {
               tooltip % "Not detected, check coordinates and/or color"
           }
     }

   start := A_TickCount + 50

   loop
   {
       ; Detect if failed and back at the start to retry
       PixelSearch, x, y, 341, 387, 341, 387, 0x402808, 50, Fast RGB
           If (ErrorLevel = 0) 
           { 
               ; reset
               tooltip % "Restarting"
               sleep, 3000
               Send {Enter down}  ; Press down the Enter key.
               DllCall("Sleep", "Uint", 100)
               Send {Enter up}  ; Release Enter key.
               sleep, 2000
               break
           }
       
       ; Manual override
       GetKeystate, state, Enter
       if (state = "D" and stop = 0)
       {
           break
       }

       timer := A_TickCount - start

       if (i = 1) 
       {
           currentInterval := a
       } 
       else if (i = 20) 
       {
           currentInterval := b
           balancer = 0
       } 
       else if (i = 51) 
       {
           currentInterval := c
           balancer = 0
       } 
       else if (i = 101) 
       {
           currentInterval := d
           balancer = 0
       } 
       else if (i = 201) 
       {
           extraTime = 50
           delay = 70
           currentInterval := e
           balancer = 0
       } 
       else if (i = 260) 
       {
           extraTime = 20
           balancer = 0
       } 
       else if (i = 301) 
       {
           currentInterval := f
           balancer = 0
       }
       else if (i = 401) 
       {
           currentInterval := g
           balancer = 0
       }
       else if (i = 550) 
       {
           currentInterval := h
           balancer = 0
       }
       else if (i = 800) 
       {
           currentInterval := j
           balancer = 0
       }

       ; If jumps are too late remove the = below
       if(i >= 1) 
       {
           DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))
       }
       Gosub, jump
   }
}
return 

jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) 
{
   balancer += currentInterval - fullTime
} 
ToolTip, Jump %i% - %fullTime%, 400, 400
Send {Enter down}  ; Press down the Enter key.
DllCall("Sleep", "Uint", delay)
Send {Enter up}  ; Release Enter key.
ToolTip
i += 1
extraTime = 0
return  

 

Used this script and got 940 once, so close.

 

What resolution did you use? Wifi or cable internet? Windowed mode?

Link to comment
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
 Share

×
  • Create New...