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

From A Tale in the Desert
Jump to navigationJump to search
(New page: <pre> ;Have this in your inventory: ;4 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel ;Metal: Iron or Copper ;Hotkeys: ;F2: Set Location, make blade ;Right Ctrl: ...)
 
 
(28 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
+
==Carpentry Blade 1680x1050 (Autohotkey)==
;Have this in your inventory:
 
;4 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel
 
;Metal: Iron or Copper
 
  
;Hotkeys:
+
<font color=maroon><b>CREDIT:</b></font> Full credit for the actual carp blade making portion goes to [http://www.atitd.org/wiki/tale5/User:Oni/Macros/CarpBladeWide Oni's Carpentry Blade Macro 1680x1050] script, based off his ACTools macro.  I simply converted it to Autohotkey and added some very useful features/hotkeys for more ease and flexiblity. 
;F2: Set Location, make blade
 
;Right Ctrl: Use last F2 location, make blade
 
;Right Shift Show location in memory
 
;Left Click Show current mouse location
 
  
;Left Ctrl: Approve an unload the blade from anvil (and make another blade if you uncomment (see next paragraph).
 
;Spacebar: Discard the blade and recover metal.
 
  
 +
[[User:Cegaiel/Macros/CarpBlade/Code |Get Code!]]
  
;Note the next to the last line in this script: Gosub, Load .
 
;If you uncomment this, then everytime you Approve/unload a blade (with Left Ctrl key) then it will automatically start a
 
;new project immediately (same as if you had pressed Right Ctrl), after unloading.
 
;This can save you a few seconds when doing multiple blades.
 
  
  
WinGetActiveStats, Title, Width, Height, WinX, WinY
+
<b>Last Update:</b>
  
IfWinExist eGenesis Client
+
*<b>9/26/2010:</b> Fixed code, now produces 7.1k quality blades instead of 6.5k quality (Thanks Taketu on helping me discover that error).
{
+
*<b>10/09/2010:</b>
 +
**Very minor adjustment on load anvil coords to be more laptop friendly.
 +
**Changed the NumPad + key to the "N" key on keyboard to engage Non Stop mode (Again, laptop friendly)
 +
**Added several error checks; will not allow non stop mode with blank qty or qty of 1. Must be 2 or more
 +
**Added more info in some of the popup boxes to be more clearer about what to do next, once Non stop mode is engaged.
 +
**New menu that asks if you have Advanced Blacksmithing 1 or 2.  The reason for this, is that you have more projects that become available once you acquire Adv BS 2.  This will adjust the locations accordingly and click the carp blade project correctly.
 +
*<B>12/10/2010:</b>
 +
**Changed click positions to work on guilded or public anvils. Previously would only work on private anvils.  Note to use on private anvils, you will need to temporarily change to public.
  
  
Gui, Add, Text,, Metal Type:
 
Gui, Add, DropDownList, vMetal Choose1, Copper|Iron
 
Gui, Add, Button, gStart, MAKE
 
Gui, Show
 
}
 
else
 
{
 
MsgBox, eGenesis Client not running, aborting...
 
Exit
 
}
 
return
 
  
  
  
 +
*Make 7.1k - 7.2k carpentry blades in about 10 seconds (Single keyboard click to repeat previously sucessful blades).
 +
*Works only in 1680x1050 screen resolution
 +
*Asks if you're using Copper or Iron metal
 +
*Double F8 View zoom all the way in (script will do this automatically for you, so ignore this).
 +
*Place mouse on starting position (while hovering red dot, bottom image).
 +
*Press F2 to start making a blade (or Right Ctrl to make blade from a previously successful location - no need to move mouse with this option, position is irrelevent since it uses coords from memory)
  
  
Start:
 
WinActivate, eGenesis Client
 
WinGet, GameWinHandle, ID, eGenesis Client
 
StartX = 0
 
StartY = 0
 
  
Gui, Submit
 
  
 +
<font color=maroon><b>Hotkeys (That works after script is started, but while idle)</b></font>:
 +
*Note the script runs in continuous loop  - Always running, waiting for you to press a hotkey, even if its not clicking...
 +
*<font color=blue>F1</font> Help Screen
 +
*<font color=blue>F2</font> Make a blade and store coordinates into script memory AND clipboard
 +
**<B>Note:</b> The only purpose of putting into clipboard is in case you're about to log out of the game. Next time you log on (assuming you didn't move your avatar, you can just click the same coords you were using your previous session (this is where Left Shift comes into play). You can paste your last coords with Ctrl+V into notepad at anytime for later reference. If your avatar moves even a half of a step, then those coords will not be valid anymore.
  
Gosub, HELP
 
;Msgbox, Make Blade: Hover mouse at starting position (image in wiki) and click F2`n`n`nHOTKEYS (works at anytime while script is idle):`n`nF1: This Help Screen`n`nF2: Make a blade and lock coordinates into memory and clipboard`nRight Ctrl: Make another blade from last F2 coordinates (memory)`n`nLeft Shift: Show current mouse position`nRight Shift: Show last F2 coordinates (memory)`n`nRight Ctrl: Approve and Unload a blade into your inventory, after making.`nSPACEBAR: Discard project`n`n`nNote: Copper and Iron produce the same quality blades, so use whatever you have the most of.
 
  
 +
*<font color=blue>Right Alt</font>: Make another blade from last F2 coordinates (memory)
 +
*<font color=blue><Hold> Left Shift</font>: Show current mouse position
 +
*<font color=blue>Right Shift</font>: Show last F2 coordinates (memory)
 +
*<font color=blue>"N" key</font> (on keyboard): Enable/Disable <b>Non Stop mode</b> (New feature added: 9/25/2010)
 +
<b>Non Stop Mode:</b> Once you get a 7.1k quality blade, then hit "N" key, on keyboard, to enable non stop mode.<BR>
 +
Then accept the current project with Left Alt and it will continue nonstop, creating/accepting blades.<BR>
 +
There is a 2 second pause after the quality is shown on screen for you to pause script (Ctrl+P). Do that when you have used your last  metal. If you do not enable non stop mode, then it will make one blade at a time (with the hotkeys for each step).
  
if (Metal = "Iron")
 
{
 
MetalX = 75
 
MetalY = 73
 
}else{
 
MetalX = 75
 
MetalY = 87
 
}
 
  
MsgBox, Step 1: Your camera angle will now automatically be adjusted to F8 mode and zoomed in to maximum.`n`nThis will take 10 seconds, do not move mouse while this occurs!`n`nNote: If you screen does not zoom in, then you already have your screen locked, press ALT+L to unlock and then reload this script to try again!`n`nPress OK to proceed...
+
<font color=maroon><b>Hotkeys you use after making a blade:</b></font>
 +
*<font color=blue>Left Alt</font>: Approve and unload a blade into your inventory (Automatically clicks Complete Project on menu).
 +
*<font color=blue>SPACEBAR</font>: Discard project and recover metal (Automatically clicks Discard on menu)
  
WinActivate, eGenesis Client
 
  
;Now Zoom in all the way with F8
 
WinActivate, eGenesis Client
 
Sleep 1000
 
MouseGetPos, OldMX, OldMY
 
Send {F5}{F8}{F8}
 
MouseMove, 0,0
 
Sleep 5000
 
MouseMove, 0, 0
 
Sleep 5000
 
MouseMove, %OldMX%, %OldMY%, 0
 
  
  
MsgBox, Step 2: Lock your screen (Alt+L) so the screen doesn't move (after clicking OK)`n`nStep 3: Then hover mouse on the anvil starting position (image in wiki) and hit F2 to make a blade.`n`nIf your starting position doesn't produce a quality of blade that you desire, then repeat Step 3.`nIf your starting position is satisfactory, then make your subsequent blades by clicking the Right Ctrl Key.`n`nMetal: %Metal%
+
<font color=maroon><b>Your Anvil MUST be aligned North to South. When loaded, the cutting edge of the blade must face East.</b></font><BR>Why: When you Double F8, the screen automatically changes to have North at top of screen, South at bottom of screen.
  
WinActivate, eGenesis Client
+
By default (I believe) when you build an Anvil in your compound, it will automatically be in the correct position. If should be facing North to South and the flat edge part will be on the east (right). If you build your anvil as is (don't rotate) then it should be in the correct position (I believe). There are no markings, on anvil, to confirm which way the blade will face until you build it and actually load a piece of metal into it.
  
#Persistent
 
SetTimer, GetStartPos, 100
 
return
 
  
 +
[[Image:Ceg_Carp1.jpg]]
  
GetStartPos:
 
  
GetKeyState, state, F2
 
if state = D
 
{
 
MouseGetPos, StartX, StartY
 
Clipboard = Last Project: %StartX%, %StartY%`n
 
Gosub, Load
 
}
 
  
GetKeyState, state, RCtrl
+
<font color=maroon><b>Starting Position (hover mouse here) to begin macro (F2 key) at:</b></font>
if state = D
+
*Yes, I do find it to be better to be standing on right side, around where I am.
{
+
*If you stand on left side, there will be a shadow (black vertical strip) around the starting position which makes it more difficult to pinpoint.
Gosub, Load
+
*You basically want to hover at the exact edge of the left side of starting point.
}
+
*And about 2 coordinates south of the top edge.
 +
*<B>MAKE SURE CHAT IS MINIMIZED</b> (As the script sends hotkeys which will appear in chat if unminimized)
 +
*<B>YOU MUST USE THIS ON PUBLIC OR GUILDED ANVILS!!!</b> Otherwise it will misclick when it loads or unloads the metal. For private anvils, temporarily set to Public.
  
GetKeyState, state, RShift
 
if state = D
 
{
 
  
if ((StartX == 0) && (StartY == 0))
+
[[Image:Ceg_Carp2.jpg]]
{
 
Msgbox, No coordinates in memory, Start a project with F2, first...
 
}else{
 
Msgbox, Position in memory: %StartX%, %StartY%`n`nPress Right Ctrl to make another blade at these coordinates`n`nThe coordinates are also located in clipboard, Ctrl+V to paste.
 
}
 
}
 
  
GetKeyState, state, LShift
 
if state = D
 
{
 
MouseGetPos, xpos, ypos
 
Msgbox, Current Mouse Position:`n`n%xpos%, %ypos%`n`nPress <SPACEBAR> to close this popup, without moving mouse!`n`nPress F2, after popup is closed, to start project at these coordinates...
 
}
 
  
GetKeyState, state, LCtrl
+
<font color=maroon><b>Or Click here for:</b></font>
if state = D
+
[http://www.atitd.org/wiki/tale5/User:Oni/Macros/CarpBladeWide Screenshot of staring position on Oni's T5 Macro page]
{
 
Gosub, ACCEPT
 
}
 
 
 
GetKeyState, state, Space
 
if state = D
 
{
 
Gosub, DISCARD
 
}
 
 
 
GetKeyState, state, F1
 
if state = D
 
{
 
Gosub, HELP
 
}
 
return
 
 
 
 
 
 
 
Load:
 
WinActivate, eGenesis Client
 
 
 
;Mousemove 574, 369
 
;MouseGetPos, StartX, StartY
 
 
 
 
 
if StartX = 0
 
{
 
MsgBox, You must set the start position by hovering mouse over anvil and clicking F2, first!
 
return
 
}
 
 
 
 
 
;Load Anvil
 
Click right %StartX%, %StartY%
 
sleep 100
 
NewX := StartX + 45
 
NewY := StartY - 10
 
Click %NewX%, %NewY% ;Left
 
 
 
sleep 100
 
 
 
 
 
;Choose Metal
 
NewX := StartX + MetalX
 
NewY := StartY - MetalY
 
Click %NewX%, %NewY% ;Left
 
sleep 100
 
 
 
 
 
 
 
;Metal Click
 
TempX := NewX + 20
 
Click %TempX%, %NewY% ;Left
 
sleep 100
 
 
 
;Msgbox, Last chance to abort (by right clicking and Reload/Exit script from system tray icon`n`nAre you sure you have your chat minimized?`n`nIf so, click OK to proceed...
 
 
 
 
 
;Shaping Mallet
 
Mousemove %StartX%, %StartY%
 
Send {S}
 
Send {8}
 
;end Shaping mallet
 
sleep 100
 
 
 
 
 
;round 1 front edge
 
NewX := StartX - 8
 
NewY := StartY + 16
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 40
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 64
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 88
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 112
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 136
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 160
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 182
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
;end 1
 
 
 
sleep 100
 
 
 
 
 
;// Wide Chisel //
 
Mousemove %StartX%, %StartY%
 
sleep 100
 
Send {C}
 
Send {9}
 
;// end Wide Chisel //
 
 
 
sleep 100
 
 
 
;// start round 2 //
 
; // 2 edges //
 
NewX := StartX - 7
 
NewY := StartY + 16
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 7
 
NewY := StartY + 182
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
; // end 2 edges //
 
 
 
 
 
NewX := StartX - 8
 
NewY := StartY + 71
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
NewX := StartX - 8
 
NewY := StartY + 127
 
sleep 100
 
Click right %NewX%, %NewY%
 
 
 
; // end center 2 front
 
;// end Round 2
 
 
 
 
 
 
 
 
 
;// Wide Chisel //
 
Mousemove %StartX%, %StartY%
 
sleep 100
 
Send {C}
 
Send {4}
 
;// end Wide Chisel //
 
 
 
sleep 100
 
 
 
;// Center
 
NewX := StartX + 43
 
NewY := StartY + 70
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
NewX := StartX + 43
 
NewY := StartY + 98
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
NewX := StartX + 43
 
NewY := StartY + 126
 
Click right %NewX%, %NewY%
 
sleep 100
 
;// end Center
 
 
 
 
 
;// Ball Peen //
 
Send {B}
 
Send {9}
 
;// end Ball Peen //
 
 
 
 
 
;// middle points
 
NewX := StartX + 55
 
NewY := StartY + 32
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
 
 
NewX := StartX + 55
 
NewY := StartY + 162
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
// END middle points
 
 
 
// Edge points
 
NewX := StartX + 107
 
NewY := StartY + 28
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
 
 
NewX := StartX + 107
 
NewY := StartY + 167
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
//
 
 
 
NewX := StartX + 99
 
NewY := StartY + 38
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
 
 
NewX := StartX + 99
 
NewY := StartY + 157
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
//
 
 
 
NewX := StartX + 106
 
NewY := StartY + 48
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
 
 
NewX := StartX + 106
 
NewY := StartY + 147
 
Click right %NewX%, %NewY%
 
sleep 100
 
 
 
// End Edge Points
 
//
 
Mousemove %StartX%, %StartY%
 
sleep 100
 
Send {Q}
 
Send {Q}
 
;// END Blade //
 
Sleep 200
 
 
 
MsgBox, Press <Left Ctrl> to Unload and put blade into your inventory.`n`n Press <SPACEBAR> to Discard Project, keep your %Metal%, try again (F2)...`n`nIf this blade was of satisfactory quality, then after Unloading,  press Right Ctrl to make a blade from the current anvil position.`n`nDon't forget to press F1 for Help Screen for Hotkeys/Shortcuts at anytime!
 
 
 
return
 
 
 
 
 
 
 
HELP:
 
Msgbox, Make Blade: Hover mouse at starting position (image in wiki) and click F2`n`n`nHOTKEYS (works at anytime while script is idle):`n`nF1: This Help Screen`n`nF2: Make a blade and lock coordinates into memory and clipboard`nRight Ctrl: Make another blade from last F2 coordinates (memory)`n`nLeft Shift: Show current mouse position`nRight Shift: Show last F2 coordinates (memory)`n`nRight Ctrl: Approve and Unload a blade into your inventory, after making.`nSPACEBAR: Discard project and recover metal`n`n`nNote: Copper and Iron produce the same quality blades, so use whatever you have the most of.
 
return
 
 
 
 
 
DISCARD:
 
WinActivate, eGenesis Client
 
 
 
Click right %StartX%, %StartY%
 
NewX := StartX + 68 ;// Discard
 
NewY := StartY - 8  ;// Discard
 
Sleep 100
 
Click %NewX%, %NewY% ;Left
 
sleep 100
 
MouseGetPos, OldMX, OldMY
 
Click 476, 433 ;Left
 
MouseMove, %OldMX%, %OldMY%, 0
 
return
 
 
 
ACCEPT:
 
WinActivate, eGenesis Client
 
Click right %StartX%, %StartY%
 
NewX := StartX + 68 ;// Complete
 
NewY := StartY - 24 ;// Complete
 
Sleep 100
 
Click %NewX%, %NewY% ;Left
 
sleep 100
 
MouseGetPos, OldMX, OldMY
 
;ClickX := Width - 558
 
;ClickY := Height - 311
 
;Click, %ClickX%, %ClickY%
 
Click 476, 433 ;Left
 
MouseMove, %OldMX%, %OldMY%, 0
 
 
 
 
 
;Uncomment below line to make auto repeat. ie When you accept a project, it will immediately start another (same as Right Ctrl)
 
;Gosub, Load
 
 
 
return
 
</pre>
 

Latest revision as of 01:52, 19 December 2010

Carpentry Blade 1680x1050 (Autohotkey)

CREDIT: Full credit for the actual carp blade making portion goes to Oni's Carpentry Blade Macro 1680x1050 script, based off his ACTools macro. I simply converted it to Autohotkey and added some very useful features/hotkeys for more ease and flexiblity.


Get Code!


Last Update:

  • 9/26/2010: Fixed code, now produces 7.1k quality blades instead of 6.5k quality (Thanks Taketu on helping me discover that error).
  • 10/09/2010:
    • Very minor adjustment on load anvil coords to be more laptop friendly.
    • Changed the NumPad + key to the "N" key on keyboard to engage Non Stop mode (Again, laptop friendly)
    • Added several error checks; will not allow non stop mode with blank qty or qty of 1. Must be 2 or more
    • Added more info in some of the popup boxes to be more clearer about what to do next, once Non stop mode is engaged.
    • New menu that asks if you have Advanced Blacksmithing 1 or 2. The reason for this, is that you have more projects that become available once you acquire Adv BS 2. This will adjust the locations accordingly and click the carp blade project correctly.
  • 12/10/2010:
    • Changed click positions to work on guilded or public anvils. Previously would only work on private anvils. Note to use on private anvils, you will need to temporarily change to public.



  • Make 7.1k - 7.2k carpentry blades in about 10 seconds (Single keyboard click to repeat previously sucessful blades).
  • Works only in 1680x1050 screen resolution
  • Asks if you're using Copper or Iron metal
  • Double F8 View zoom all the way in (script will do this automatically for you, so ignore this).
  • Place mouse on starting position (while hovering red dot, bottom image).
  • Press F2 to start making a blade (or Right Ctrl to make blade from a previously successful location - no need to move mouse with this option, position is irrelevent since it uses coords from memory)



Hotkeys (That works after script is started, but while idle):

  • Note the script runs in continuous loop - Always running, waiting for you to press a hotkey, even if its not clicking...
  • F1 Help Screen
  • F2 Make a blade and store coordinates into script memory AND clipboard
    • Note: The only purpose of putting into clipboard is in case you're about to log out of the game. Next time you log on (assuming you didn't move your avatar, you can just click the same coords you were using your previous session (this is where Left Shift comes into play). You can paste your last coords with Ctrl+V into notepad at anytime for later reference. If your avatar moves even a half of a step, then those coords will not be valid anymore.


  • Right Alt: Make another blade from last F2 coordinates (memory)
  • <Hold> Left Shift: Show current mouse position
  • Right Shift: Show last F2 coordinates (memory)
  • "N" key (on keyboard): Enable/Disable Non Stop mode (New feature added: 9/25/2010)

Non Stop Mode: Once you get a 7.1k quality blade, then hit "N" key, on keyboard, to enable non stop mode.
Then accept the current project with Left Alt and it will continue nonstop, creating/accepting blades.
There is a 2 second pause after the quality is shown on screen for you to pause script (Ctrl+P). Do that when you have used your last metal. If you do not enable non stop mode, then it will make one blade at a time (with the hotkeys for each step).


Hotkeys you use after making a blade:

  • Left Alt: Approve and unload a blade into your inventory (Automatically clicks Complete Project on menu).
  • SPACEBAR: Discard project and recover metal (Automatically clicks Discard on menu)



Your Anvil MUST be aligned North to South. When loaded, the cutting edge of the blade must face East.
Why: When you Double F8, the screen automatically changes to have North at top of screen, South at bottom of screen.

By default (I believe) when you build an Anvil in your compound, it will automatically be in the correct position. If should be facing North to South and the flat edge part will be on the east (right). If you build your anvil as is (don't rotate) then it should be in the correct position (I believe). There are no markings, on anvil, to confirm which way the blade will face until you build it and actually load a piece of metal into it.


Ceg Carp1.jpg


Starting Position (hover mouse here) to begin macro (F2 key) at:

  • Yes, I do find it to be better to be standing on right side, around where I am.
  • If you stand on left side, there will be a shadow (black vertical strip) around the starting position which makes it more difficult to pinpoint.
  • You basically want to hover at the exact edge of the left side of starting point.
  • And about 2 coordinates south of the top edge.
  • MAKE SURE CHAT IS MINIMIZED (As the script sends hotkeys which will appear in chat if unminimized)
  • YOU MUST USE THIS ON PUBLIC OR GUILDED ANVILS!!! Otherwise it will misclick when it loads or unloads the metal. For private anvils, temporarily set to Public.


Ceg Carp2.jpg


Or Click here for: Screenshot of staring position on Oni's T5 Macro page