The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:Cegaiel/Macros/SkillsTimer"

From A Tale in the Desert
Jump to navigationJump to search
 
(11 intermediate revisions by the same user not shown)
Line 8: Line 8:
  
  
*<b>BE CAREFUL WITH SAND MINES:</b>
+
----
 
 
The repair mine is on the exact same line as the Work this Mine on menu. So as long as you have the materials to repair a mine in your inventory, it will repair automatically.  If you watch the screen closely, you will actually see your mine disappear for a second or two and then reappear. Thats the mine getting repaired automatically from a click, while the mine is being worked.
 
 
 
If you work a sand mine from brand new until the first repair then it works perfectly.  Once the 1st repair comes and you repair, then the click position will be wrong.  Due to how the Label menu appears in the mine menu (Repaired X times)... This will cause an extra line in the label and cause your Work Mine click position to lower down. You will need to reload/reset (Ctrl+R) the script and set the new click coordinates after 1st repair. Once you set the coordinates again, after 1st one, then any future repairs wont require you to reset the script/positions.
 
 
 
A trick I use, to see the first repair happen, is to drop one of the stack of materials needed to repair (ie drop all bricks).  Then when it comes time to repair, a popup box will appear, alerting  you that you can't repair mine. Then pick them back up, reset script/reset click positions and continue. Otherwise, it will repair automatically and keep clicking the wrong position until you notice it.
 
 
 
  
  
 
<B>Updated: 2/23/2010</b>
 
<B>Updated: 2/23/2010</b>
 
*It now will ask you to enter the amount of clicks. Leave blank for Unlimited clicks (but you will need to stop manually, as in the first version). This is idea if you know how many clicks you need to complete your task (ie you have 600 twine, which requires 10 clicks to convert into 10 canvas on your loom).
 
*It now will ask you to enter the amount of clicks. Leave blank for Unlimited clicks (but you will need to stop manually, as in the first version). This is idea if you know how many clicks you need to complete your task (ie you have 600 twine, which requires 10 clicks to convert into 10 canvas on your loom).
 
 
 
<B>Updated: 3/05/2010</b>
 
<B>Updated: 3/05/2010</b>
 
*Speeded up the mouse movements.
 
*Speeded up the mouse movements.
 
*It will now also ask, during setup menu, if you have grilled food. If you answer yes, then it will also ask you to set the Eat grilled food click position (pin this menu up). Once the script starts, it will first eat a grilled food and then eat a grilled food every 10 Teppy mins (11:00 real time).
 
*It will now also ask, during setup menu, if you have grilled food. If you answer yes, then it will also ask you to set the Eat grilled food click position (pin this menu up). Once the script starts, it will first eat a grilled food and then eat a grilled food every 10 Teppy mins (11:00 real time).
 
 
 
<B>Updated: 3/06/2010</b>
 
<B>Updated: 3/06/2010</b>
 
*New GUI/Status bar - showing the Click # (idea to keep track of pulls on Sand Mines)
 
*New GUI/Status bar - showing the Click # (idea to keep track of pulls on Sand Mines)
 
*In addition, if you choose the option to eat grilled foods, it will visually countdown (in seconds) until the next time you will automatically eat.
 
*In addition, if you choose the option to eat grilled foods, it will visually countdown (in seconds) until the next time you will automatically eat.
 
 
<B>Updated: 3/11/2010</b>
 
<B>Updated: 3/11/2010</b>
 
*Added a F2 hotkey: While the script is running hold the F2 key down for a second or two.
 
*Added a F2 hotkey: While the script is running hold the F2 key down for a second or two.
Line 36: Line 24:
  
 
:<B>Idea where this comes handy:</b> When building/tearing down sand mines until you get the good drop rate (ie 6-8 pulls to 1 gem ratio). Heres how I do it. First, pin your sand mine position in the upper left or right corner. This way, your Work Mine click position will be in the same spot everytime you pin up the new sand mine menu. Set click positions and skill timer position as normal. Let it run about 100 clicks and do a sample. Now hit the F2 hotkey to pause the script and reset the counter. Divide number of sand in the sand mine by the total number of gems. If its a bad rate (10 or higher) then tear it down and rebuild a new one. Pinup the new sand mine menu in upper right or left corner (previous click/skill position is still remembered, no need to set those again). Now hit Ctrl+P to resume/restart the script. It will begin again, starting counting from zero. Do another sample.  So by using the F2 hotkey, you saved a few steps of having to set the click positions again.
 
:<B>Idea where this comes handy:</b> When building/tearing down sand mines until you get the good drop rate (ie 6-8 pulls to 1 gem ratio). Heres how I do it. First, pin your sand mine position in the upper left or right corner. This way, your Work Mine click position will be in the same spot everytime you pin up the new sand mine menu. Set click positions and skill timer position as normal. Let it run about 100 clicks and do a sample. Now hit the F2 hotkey to pause the script and reset the counter. Divide number of sand in the sand mine by the total number of gems. If its a bad rate (10 or higher) then tear it down and rebuild a new one. Pinup the new sand mine menu in upper right or left corner (previous click/skill position is still remembered, no need to set those again). Now hit Ctrl+P to resume/restart the script. It will begin again, starting counting from zero. Do another sample.  So by using the F2 hotkey, you saved a few steps of having to set the click positions again.
 
 
 
<B>Updated: 3/24/2010</b>
 
<B>Updated: 3/24/2010</b>
 
*Added routine to check for ingame popup boxes (errors).
 
*Added routine to check for ingame popup boxes (errors).
 
**Anytime a popup box is detected, script will pause/halt and a windows error sound will be made. Just figure out what caused the popup and resume the script where it left of at (Ctrl+P). The current click# and recorded positions will still remain intact.
 
**Anytime a popup box is detected, script will pause/halt and a windows error sound will be made. Just figure out what caused the popup and resume the script where it left of at (Ctrl+P). The current click# and recorded positions will still remain intact.
*See more info, below, for <B>POPUP DETECTION</b>
+
<B>Updated: 6/20/2010</b>
 
 
 
 
<B>Updated: 6/14/2010</b>
 
 
*Tweaked some of the code to run more smoothly.
 
*Tweaked some of the code to run more smoothly.
   
+
<B>Updated: 12/04/2010</b>
 +
*Updated to search for the included file, ok.png. Popup box detection now searches for the word OK, so this will stop false popup alerts on sand terrains.
 +
<B>Updated: 12/06/2010</b>
 +
*Bored, wanted to update my old favorite macro, 'Old Betsy' , with some bells and whistles. Also update some logic/efficiency.
 +
**New hotkeys Numpad - or + to subtract/add click numbers off GUI menu. F1 to force eat/reset eat timer.
 +
**Eat Timer is now shown in minutes and seconds (instead of seconds only)
 +
**Updated GUI to show more information, stats, help tips
 +
**Food timer is now 10:50 real time, instead of 11:00. Better early than late. Found that most food now expires at 10:50 real time.
 +
*Now detects popup boxes using the included OK.PNG file instead of pixel color searching. Stops false alarms when using on all sand terrain.
 +
<B>Updated: 12/15/2010</b>
 +
*Added a new line in GUI. Now shows seconds since last click "Last Click: #s ago"
 +
<B>Updated: 12/19/2010</b>
 +
*Added a new line in GUI. If you do not select unlimited clicks, then it will now show the estimated time to completion. It only updates once per click. It multiples the 'Clicks remaining' times how many seconds ago, the 'Last Click' occured. So don't expect absolute accuracy. The first 1-3 clicks are faster than normal, until YOUR skills timer catches up. So beginning on the 4th click, is when it should be fairly accurate.
 +
<b>Updated: 12/29/2010</b>
 +
*Now blocks mouse input (manual clicking and moving) for 1/2 second prior to and after a macro click. I found this to be helpful in the situation of doing a dig (digging and collecting the stones at same time).  Sometimes when clicking on a stone, it would click the "Dig Hole Deeper" pinup at exact same moment. This caused it to double click, thus causing a popup (You're too tired...) and causing the script to pause.  I feel its better to misclick a stone, than the 'dig deeper' option.
 +
<B>Updated: 3/11/2010</b>
 +
*Commented out the mouse block area (you can uncomment to enable again). Sometimes I like to pause the script for various reasons and many times the mouse was still disabled, frustrating if I wanted to click something else manually.  Also added a slight delay during click times. The ETA timer was showing 0 the entire time when using high quality food (clicking too fast to register the times correctly.
 +
<b>Updated: 12/28/2010</b>
 +
*Added a new line in the status window. It now show the elapsed time that has passed, since you started the macro. In case you curious how long you been sitting at the limestone pit :P
  
<B>POPUP DETECTION:</b>
 
*Popups can occur from a few things including, but not limited to:
 
**You dont have enough materials in inventory to repair mine or you set it to watch the wrong red text in one skill and you got tired (ie 19 str and 17 perception - you should be monitoring perception, but if you monitored Strength, then a popup will eventually occur that you got too tired)
 
  
 +
----
  
<B>How to configure popup box detection:</b>
 
Towards the top of the script you will see:
 
PopX = 530
 
PopY = 479
 
 
This is the x,y position of the OK button on a popup box at 1024x768 resolution. If you dont use that resolution, then you will need to manually configure the coordinates. Don't worry, you can skip this step if you dont care about popup detection. The script will still function correctly with the wrong coordinates or wrong resolution.
 
 
You need to find the coordinates of any yellowish portion of the OK button on an ingame popup box. Just be careful not to get the coordinates of the black text of the word "OK". Make sure you get coordinates of the yellowish background.  To find the coordinates it would be easiest to use the small free program called Magnify, which is on my main Macros page. The link to download off wiki is: http://www.atitd.org/wiki/tale4/images/f/f4/Magnify.zip . If you are using IE and get a corrupt file error when trying to open, then download original executable from here: http://sharpnetwork.net/atitd/macros/magnify.exe
 
  
Easiest way to make a popup box occur, so you can record location, is to try to make bricks on a rack without ingredients in inventory.  Once the popup box occurs (Saying you need blah blah) then use that to record the x,y position you need.
 
 
----
 
  
 
<B>Instructions:</b><BR>
 
<B>Instructions:</b><BR>
*Press Ctrl+Alt+W to start script
 
 
*Upon starting the script, it will ask you to enter the amount of clicks (leave blank for unlimited) and if you are eating grilled foods.
 
*Upon starting the script, it will ask you to enter the amount of clicks (leave blank for unlimited) and if you are eating grilled foods.
 
:Note it will eat food when the script begins (so dont eat manually first). Then it will eat every 10 Teppy Mins (11:00 real time)
 
:Note it will eat food when the script begins (so dont eat manually first). Then it will eat every 10 Teppy Mins (11:00 real time)
Line 74: Line 61:
 
**If you chose the Grilled Food option, then it will then ask you to set the click position of your Consume pinup menu. Hover and hit F2 to set that location.
 
**If you chose the Grilled Food option, then it will then ask you to set the click position of your Consume pinup menu. Hover and hit F2 to set that location.
 
*At anytime the script is running hold the F2 key a second and it will reset the click number to zero (but will still remember the previously set skill timer monitor location and the click position.
 
*At anytime the script is running hold the F2 key a second and it will reset the click number to zero (but will still remember the previously set skill timer monitor location and the click position.
*<b>Optional:</b> If you want the script to pause/halt whenever an ingame popup box error occurs, then view the instructions "How to configure popup box detection" under the 3/24/2010 update notes. Otherwise, disregard, the script will work correctly without it or even with incorrect info :)
+
 
  
  
Line 80: Line 67:
  
  
[[User:Cegaiel/Macros/SkillsTimer/Code | Get Code!]]
+
 
 +
.zip file includes .ahk, .exe and ok.png files. Make sure the ok.png is in the same folder as the scripts.
 +
 
 +
 
 +
[http://www.atitd.org/wiki/tale4/images/4/4a/Skillstimer.zip Download .zip file from Wiki] Note wiki will produce a corrupt .zip file if downloaded with IE. Download with Firefox or Chrome.
 +
 
 +
[http://sharpnetwork.net/atitd/macros/skillstimer.zip Download .zip file from Mirror Site] - No corrupt errors when downloaded with IE. Firefox/Chrome is fine too, of course.
 +
 
 +
[http://www.atitd.org/wiki/tale4/Image:Skillstimer.zip Verify] the last upload date (Current), for the EXE. Make sure the latest update, matches the Last Update date, at top.

Latest revision as of 09:59, 28 December 2011

Digging and Skills Timer

  • It will walk you through the setup process via GUI menus
  • Monitors the black/red text in skills tab and only clicks when they are black (no longer tired)
  • Option to stop at a certain number of clicks or let run continuously
  • Option to eat grilled foods at the correct time, repeatedly
  • This script was created for dig sites and digging limestone/dirt, primarily. However, it would work with anything that uses a skills timer (ie the popup box that says "you are too tired to do something")
  • Idea Uses: Dig sites, Limestone, Dirt, Sand Mines, Pumping Acqueduct, Carving, Barrel Grinder, Deep Well, Kitchen (ie Seperating Coconuts), Loom, Clinker Vat, Hookah more...




Updated: 2/23/2010

  • It now will ask you to enter the amount of clicks. Leave blank for Unlimited clicks (but you will need to stop manually, as in the first version). This is idea if you know how many clicks you need to complete your task (ie you have 600 twine, which requires 10 clicks to convert into 10 canvas on your loom).

Updated: 3/05/2010

  • Speeded up the mouse movements.
  • It will now also ask, during setup menu, if you have grilled food. If you answer yes, then it will also ask you to set the Eat grilled food click position (pin this menu up). Once the script starts, it will first eat a grilled food and then eat a grilled food every 10 Teppy mins (11:00 real time).

Updated: 3/06/2010

  • New GUI/Status bar - showing the Click # (idea to keep track of pulls on Sand Mines)
  • In addition, if you choose the option to eat grilled foods, it will visually countdown (in seconds) until the next time you will automatically eat.

Updated: 3/11/2010

  • Added a F2 hotkey: While the script is running hold the F2 key down for a second or two.
It will pause the script and reset the click # to zero. While paused you still can see the last click number (in case you need it). Hit Ctrl+P to unpause/resume the script and it will begin at 0 clicks again. It will still remember your recorded click positions, so you will not need to set those again.
Idea where this comes handy: When building/tearing down sand mines until you get the good drop rate (ie 6-8 pulls to 1 gem ratio). Heres how I do it. First, pin your sand mine position in the upper left or right corner. This way, your Work Mine click position will be in the same spot everytime you pin up the new sand mine menu. Set click positions and skill timer position as normal. Let it run about 100 clicks and do a sample. Now hit the F2 hotkey to pause the script and reset the counter. Divide number of sand in the sand mine by the total number of gems. If its a bad rate (10 or higher) then tear it down and rebuild a new one. Pinup the new sand mine menu in upper right or left corner (previous click/skill position is still remembered, no need to set those again). Now hit Ctrl+P to resume/restart the script. It will begin again, starting counting from zero. Do another sample. So by using the F2 hotkey, you saved a few steps of having to set the click positions again.

Updated: 3/24/2010

  • Added routine to check for ingame popup boxes (errors).
    • Anytime a popup box is detected, script will pause/halt and a windows error sound will be made. Just figure out what caused the popup and resume the script where it left of at (Ctrl+P). The current click# and recorded positions will still remain intact.

Updated: 6/20/2010

  • Tweaked some of the code to run more smoothly.

Updated: 12/04/2010

  • Updated to search for the included file, ok.png. Popup box detection now searches for the word OK, so this will stop false popup alerts on sand terrains.

Updated: 12/06/2010

  • Bored, wanted to update my old favorite macro, 'Old Betsy' , with some bells and whistles. Also update some logic/efficiency.
    • New hotkeys Numpad - or + to subtract/add click numbers off GUI menu. F1 to force eat/reset eat timer.
    • Eat Timer is now shown in minutes and seconds (instead of seconds only)
    • Updated GUI to show more information, stats, help tips
    • Food timer is now 10:50 real time, instead of 11:00. Better early than late. Found that most food now expires at 10:50 real time.
  • Now detects popup boxes using the included OK.PNG file instead of pixel color searching. Stops false alarms when using on all sand terrain.

Updated: 12/15/2010

  • Added a new line in GUI. Now shows seconds since last click "Last Click: #s ago"

Updated: 12/19/2010

  • Added a new line in GUI. If you do not select unlimited clicks, then it will now show the estimated time to completion. It only updates once per click. It multiples the 'Clicks remaining' times how many seconds ago, the 'Last Click' occured. So don't expect absolute accuracy. The first 1-3 clicks are faster than normal, until YOUR skills timer catches up. So beginning on the 4th click, is when it should be fairly accurate.

Updated: 12/29/2010

  • Now blocks mouse input (manual clicking and moving) for 1/2 second prior to and after a macro click. I found this to be helpful in the situation of doing a dig (digging and collecting the stones at same time). Sometimes when clicking on a stone, it would click the "Dig Hole Deeper" pinup at exact same moment. This caused it to double click, thus causing a popup (You're too tired...) and causing the script to pause. I feel its better to misclick a stone, than the 'dig deeper' option.

Updated: 3/11/2010

  • Commented out the mouse block area (you can uncomment to enable again). Sometimes I like to pause the script for various reasons and many times the mouse was still disabled, frustrating if I wanted to click something else manually. Also added a slight delay during click times. The ETA timer was showing 0 the entire time when using high quality food (clicking too fast to register the times correctly.

Updated: 12/28/2010

  • Added a new line in the status window. It now show the elapsed time that has passed, since you started the macro. In case you curious how long you been sitting at the limestone pit :P




Instructions:

  • Upon starting the script, it will ask you to enter the amount of clicks (leave blank for unlimited) and if you are eating grilled foods.
Note it will eat food when the script begins (so dont eat manually first). Then it will eat every 10 Teppy Mins (11:00 real time)
  • It will then ask you to hover a black letter (ie a black letter in the word Endurance, in skills tab). A tooltip will display while you are moving mouse around and confirm when you are hovering a black letter. Then press F2 to set this position.
  • Next it will tell you to hover, where you want it to click (Pinup menu or an icon), and press F2 again to set.
    • If you chose the Grilled Food option, then it will then ask you to set the click position of your Consume pinup menu. Hover and hit F2 to set that location.
  • At anytime the script is running hold the F2 key a second and it will reset the click number to zero (but will still remember the previously set skill timer monitor location and the click position.


It will now go to work by monitoring the black letters in skills tab. When it is black (no longer tired) it will click. While it is red (tired), it will not click and continue monitoring until the letters turn black for another click, repeat.


.zip file includes .ahk, .exe and ok.png files. Make sure the ok.png is in the same folder as the scripts.


Download .zip file from Wiki Note wiki will produce a corrupt .zip file if downloaded with IE. Download with Firefox or Chrome.

Download .zip file from Mirror Site - No corrupt errors when downloaded with IE. Firefox/Chrome is fine too, of course.

Verify the last upload date (Current), for the EXE. Make sure the latest update, matches the Last Update date, at top.