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/Plane"

From A Tale in the Desert
Jump to navigationJump to search
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
+
==Multiple Carpentry Benches - Plane Boards (Autohotkey)==
;Ctrl+Alt+W to start macro.
+
<B>Instructions:</b>
;Ctrl+P to pause script (ie to click Water icon) and Ctrl+P again to resume
+
Zoom in about half way (in F5 or F6) and lock your screen (Alt + L) to prevent your screen from moving around.
;The AHK icon in system tray will turn red while paused.
 
  
^p::Pause
+
*Start script with Ctrl+Alt+W
^!w::
+
*It will walk you through the setup process with GUI Menus.
 +
*Takes about 45 seconds per 100 boards (based on using 20 carpentry benches)
  
  
 +
<B>Note:</b> Due to lag or clicking too soon/late, on my 1.8Ghz/1Gb Ram machine, I find adding about 10 boards per 100 will make sure all your boards get planed. ie If you are planing 500 boards, tell it to plane 550 boards. The counter rarely aligns perfectly, it seems to lose 5-10 boards per 100.
 +
------
  
IfWinExist eGenesis Client
+
If you use multiple carpentry benches to make boards, then this is for you!  It will now ask how many boards you want plane. Next a popup will tell you to middle click (click mouse wheel) all your carpentry benches.  When done click OK.  It will wait 7 seconds before the script begins. During this time, drag the status bar out of the way so it doesn't cover up any of the benches.  Then it will start hovering all your benches and clicking the P key (equivalent to [P]lane Board), faster than you can. The more benches you have the faster you will plane a full inventory of wood.
{
 
WinActivate
 
WinGetPos,,, winWidth, winHeight
 
widthOffset := winWidth - 40
 
  
Gui, +AlwaysOnTop +ToolWindow
 
Gui, Font, bold
 
Gui, Add, Text, vMineNumText, Recording mouse position
 
Gui, Font, norm
 
Gui, Add, Text,,
 
( LTrim
 
Hover and middle-click (Click mouse-wheel) on each wheat bed, one by one,
 
until you've clicked on all the beds you want to use. Then click the OK button.
 
(Drag this box out of the way if any beds are hidden)
 
)
 
  
Gui, Add, Button, default gMineSetLoops, OK
+
<b>Important:</b> You MUST minimize chat for this to work correctly.  If you dont, you will see the letter P appear in your chat bar over and over. It wont send it to chat if you forget, but you will notice it.
Gui, Show
 
  
MineNum = 0
 
MineCycle = 0
 
NumPulls = 1000
 
  
WinGet, GameWinHandle, ID, eGenesis Client
+
<b>Update Notes:</b>
loop
+
*Update: 4/17/2010
{
+
**Added more comments in script in case you dont have at least 20 benches like this was tested on.  Less than 20 will make the script go through each bench too fast and try to make another board before the last one was complete. The comments in the script will explain how to slow the script down to compensate for that.
 +
**Script will now pause (instead of exit) when the last board is made.  This is in case the counter doesn't match up to the boards you have in inventory. This could be due to broken blades or lag.  By doing this, you can now hit Ctrl+P to resume the script and keep planing boards (without having to set the postions of all the benches again). But, you will have to manually stop the script afterwards (Ctrl+P/Pause or Ctrl+R/Reload)
  
WinActivate
+
*Update: 10/02/2010
CoordMode, Mouse, Relative
+
**The resume feature will now plane another 50 boards (can be configured in script) and then stop again. You will then be given an opportunity to resume another 50 boards.  Previously it would resume non stop and sometimes was difficult to make the script pause or reload, manually with the hotkeys
KeyWait, MButton, D
 
KeyWait, MButton
 
MouseGetPos, TestX, TestY, WinHandle
 
if (WinHandle = GameWinHandle)
 
{
 
Gosub, MineRecord
 
}
 
else
 
{
 
Gui, Destroy
 
break
 
}
 
}
 
return
 
  
MineRecord:
+
*Update: 11/14/2010
MineNum++
+
**Made all GUI's appear on upper left corner, so you do not need to drag out of way, anymore.
MouseGetPos, MineX%MineNum%, MineY%MineNum%
 
GuiControl, Text, MineNumText, %MineNum% benches captured
 
TotalBeds := MineNum
 
return
 
  
 +
*Last Update: 1/19/2012
 +
**Speeded it up and added delay variable so you can change if needed.
 +
**Now starts up automatically in GUI mode (doesn't required Ctrl+Alt+W anymore)
  
MineSetLoops:
 
Gui, Submit
 
Gui, Destroy
 
Gui, +AlwaysOnTop +ToolWindow
 
Gui, Font, bold
 
Gui, Add, Text, vMineCycleText, Cycle %NumPulls% of %NumPulls%
 
Gui, Font, norm
 
Gui, Show
 
GuiControl, Text, MineCycleText, Cycle %MineCycle% of %NumPulls%
 
  
;You got 7 seconds to drag the status bar out of the way
+
[[User:Cegaiel/Macros/Plane/Code | Get Code!]]
Sleep 7000
 
 
 
loop, %NumPulls%
 
{
 
 
 
;Sleep, 500
 
 
 
MineNum = 1
 
MineCycle++
 
MouseGetPos, OldMX, OldMY
 
 
 
loop, %TotalBeds% {
 
 
 
 
 
 
 
WinActivate, eGenesis Client
 
 
 
;BlockInput, MouseMove
 
 
 
GuiControl, Text, MineCycleText, Cycle %MineCycle%  Bench %MineNum%
 
MinePosX := MineX%MineNum%
 
MinePosY := MineY%MineNum%
 
MouseMove, %MinePosX%, %MinePosY%, 0
 
Sleep, 300
 
 
 
Send {P}
 
;Sleep, 250
 
MineNum++
 
}
 
 
 
;GuiControl, Text, MineCycleText, Cycle %MineCycle%  Pausing
 
MouseMove, %OldMX%, %OldMY%, 0
 
;BlockInput, MouseMoveOff
 
 
 
 
 
 
 
}
 
Gui, Destroy
 
Gui, Add, Text,, Middle-click on this window to end the script.
 
Gui, Show
 
return
 
}
 
</pre>
 

Latest revision as of 04:18, 20 January 2012

Multiple Carpentry Benches - Plane Boards (Autohotkey)

Instructions: Zoom in about half way (in F5 or F6) and lock your screen (Alt + L) to prevent your screen from moving around.

  • Start script with Ctrl+Alt+W
  • It will walk you through the setup process with GUI Menus.
  • Takes about 45 seconds per 100 boards (based on using 20 carpentry benches)


Note: Due to lag or clicking too soon/late, on my 1.8Ghz/1Gb Ram machine, I find adding about 10 boards per 100 will make sure all your boards get planed. ie If you are planing 500 boards, tell it to plane 550 boards. The counter rarely aligns perfectly, it seems to lose 5-10 boards per 100.


If you use multiple carpentry benches to make boards, then this is for you! It will now ask how many boards you want plane. Next a popup will tell you to middle click (click mouse wheel) all your carpentry benches. When done click OK. It will wait 7 seconds before the script begins. During this time, drag the status bar out of the way so it doesn't cover up any of the benches. Then it will start hovering all your benches and clicking the P key (equivalent to [P]lane Board), faster than you can. The more benches you have the faster you will plane a full inventory of wood.


Important: You MUST minimize chat for this to work correctly. If you dont, you will see the letter P appear in your chat bar over and over. It wont send it to chat if you forget, but you will notice it.


Update Notes:

  • Update: 4/17/2010
    • Added more comments in script in case you dont have at least 20 benches like this was tested on. Less than 20 will make the script go through each bench too fast and try to make another board before the last one was complete. The comments in the script will explain how to slow the script down to compensate for that.
    • Script will now pause (instead of exit) when the last board is made. This is in case the counter doesn't match up to the boards you have in inventory. This could be due to broken blades or lag. By doing this, you can now hit Ctrl+P to resume the script and keep planing boards (without having to set the postions of all the benches again). But, you will have to manually stop the script afterwards (Ctrl+P/Pause or Ctrl+R/Reload)
  • Update: 10/02/2010
    • The resume feature will now plane another 50 boards (can be configured in script) and then stop again. You will then be given an opportunity to resume another 50 boards. Previously it would resume non stop and sometimes was difficult to make the script pause or reload, manually with the hotkeys
  • Update: 11/14/2010
    • Made all GUI's appear on upper left corner, so you do not need to drag out of way, anymore.
  • Last Update: 1/19/2012
    • Speeded it up and added delay variable so you can change if needed.
    • Now starts up automatically in GUI mode (doesn't required Ctrl+Alt+W anymore)


Get Code!