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
Line 1: Line 1:
<pre>
+
==Carpentry Blade 1024x768 (Autohotkey)==
;Have this in your inventory:
 
;4 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel
 
;Metal: Iron or Copper
 
  
;Hotkeys:
+
<b>CREDIT:</b> Full credit for the actual carp blade making portion goes to [[User:Oni/CarpBlade1024|Oni's Carp Blade]] script, based off his ACTools macro.  I simply converted it to Autohotkey and added some very useful features/hotkeys for more ease and flexiblity.  I'm not a big Actools fan and I dont trust it to make more than 1 blade at a time (batches).  Theres no way to tell if the blade you are about to start making is even in the right position or at what coords.  And if you do get a good quality blade, you have to blindly hope you are pointing your mouse at the same spot when you make your next blade.  The features I added to this script addresses all my issues.
;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.
 
  
 +
*Make 7.1k - 7.2k carpentry blades in about 10 seconds (Single keyboard click to repeat previously sucessful blades).<BR>View last image below to see the consistency.
 +
*Works only in 1024x768 screen resolution
 +
*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, in image 1 & 2, below).
 +
*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)
  
WinGetActiveStats, Title, Width, Height, WinX, WinY
 
  
IfWinExist eGenesis Client
 
{
 
  
 +
<b>Hotkeys:</b> (That work while the script is active/idle)
 +
*F1 Help Screen
 +
*F2 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.
 +
*Right Ctrl: Make another blade from last F2 coordinates (memory)
 +
*Left Shift: Show current mouse position
 +
*Right Shift: Show last F2 coordinates (memory)
  
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
 
  
 +
<b>Hotkeys you use after making a blade:</b>
 +
*Left Ctrl: Approve and unload a blade into your inventory (Automatically clicks Complete Project on menu).<br><b>Note:</b> If you uncomment the next to last line: <b>Gosub, Load</b> (uncomment meaning remove the comment/ignore tag <b>;</b>) then pressing Left Ctrl will not only unload the blade, but will execute RCtrl automatically after unloading. This means it will start another blade immediately (based on last valid F2 mouse position). Expedites making large quantities of blades. After you are comfortable with the script, I recommend you use this.
 +
*SPACEBAR: Discard project and recover metal (Automatically clicks Discard on menu)
  
  
  
  
Start:
+
<b>Your Anvil MUST be aligned North to South. When loaded, the cutting edge of the blade must face West.</b><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
 
WinGet, GameWinHandle, ID, eGenesis Client
 
StartX = 0
 
StartY = 0
 
  
Gui, Submit
 
  
 +
[[Image:Cegaiel_carp1.jpg]]
  
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.
 
  
 +
<b>Tips:</b>
 +
*If you keep getting 6800 quality blades no matter where you start blade/set coords with F2, then try to reposition your body a half a step or two. I found the best response to the script is to stand around where I am in screenshot, towards the bottom left corner. But standing at no higher (North) than the middle of the anvil.
 +
*It has been reported to me that someone using a flat screen monitor (which is wide screen) doesn't get the correct results as I do (I use an old style square shaped CRT monitor) when using the starting position that is recommended (the red dot in the F2 starting position images, below). I believe the script would still make the blade correctly, but you might need to find a new starting position to get the desired results. But I can not confirm this since I dont have a flat screen monitor. Basically, you want to find a starting position that will make the first click on the most upper, left corner of the loaded metal (see image directly below). If your first click hits that spot, then I believe it will finish the blade correctly.
  
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...
+
First blow should hit about here:
 +
[[Image:Cegaiel_carp5.jpg]]
  
WinActivate, eGenesis Client
 
  
;Now Zoom in all the way with F8
+
<B>Starting position (Hit F2 here):</b>
WinActivate, eGenesis Client
+
{| cellpadding="2" border="1" cellspacing="0" width="180%"
Sleep 1000
+
[[Image:Cegaiel_carp2.jpg]]
MouseGetPos, OldMX, OldMY
+
|-
Send {F5}{F8}{F8}
+
[[Image:Cegaiel_carp3.jpg]]
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%
+
<b>Look at the consistency:</b>
  
WinActivate, eGenesis Client
+
[[Image:Cegaiel_carp4.jpg]]
 
 
#Persistent
 
SetTimer, GetStartPos, 100
 
return
 
 
 
 
 
GetStartPos:
 
 
 
GetKeyState, state, F2
 
if state = D
 
{
 
MouseGetPos, StartX, StartY
 
Clipboard = Last Project: %StartX%, %StartY%`n
 
Gosub, Load
 
}
 
 
 
GetKeyState, state, RCtrl
 
if state = D
 
{
 
Gosub, Load
 
}
 
 
 
GetKeyState, state, RShift
 
if state = D
 
{
 
 
 
if ((StartX == 0) && (StartY == 0))
 
{
 
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
 
if state = D
 
{
 
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`nLeft 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
 
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>
 

Revision as of 19:15, 14 January 2010

Carpentry Blade 1024x768 (Autohotkey)

CREDIT: Full credit for the actual carp blade making portion goes to Oni's Carp Blade script, based off his ACTools macro. I simply converted it to Autohotkey and added some very useful features/hotkeys for more ease and flexiblity. I'm not a big Actools fan and I dont trust it to make more than 1 blade at a time (batches). Theres no way to tell if the blade you are about to start making is even in the right position or at what coords. And if you do get a good quality blade, you have to blindly hope you are pointing your mouse at the same spot when you make your next blade. The features I added to this script addresses all my issues.


Get Code!


  • Make 7.1k - 7.2k carpentry blades in about 10 seconds (Single keyboard click to repeat previously sucessful blades).
    View last image below to see the consistency.
  • Works only in 1024x768 screen resolution
  • 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, in image 1 & 2, below).
  • 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 work while the script is active/idle)

  • 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 Ctrl: Make another blade from last F2 coordinates (memory)
  • Left Shift: Show current mouse position
  • Right Shift: Show last F2 coordinates (memory)


Hotkeys you use after making a blade:

  • Left Ctrl: Approve and unload a blade into your inventory (Automatically clicks Complete Project on menu).
    Note: If you uncomment the next to last line: Gosub, Load (uncomment meaning remove the comment/ignore tag ;) then pressing Left Ctrl will not only unload the blade, but will execute RCtrl automatically after unloading. This means it will start another blade immediately (based on last valid F2 mouse position). Expedites making large quantities of blades. After you are comfortable with the script, I recommend you use this.
  • 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 West.
Why: When you Double F8, the screen automatically changes to have North at top of screen, South at bottom of screen.


Cegaiel carp1.jpg


Tips:

  • If you keep getting 6800 quality blades no matter where you start blade/set coords with F2, then try to reposition your body a half a step or two. I found the best response to the script is to stand around where I am in screenshot, towards the bottom left corner. But standing at no higher (North) than the middle of the anvil.
  • It has been reported to me that someone using a flat screen monitor (which is wide screen) doesn't get the correct results as I do (I use an old style square shaped CRT monitor) when using the starting position that is recommended (the red dot in the F2 starting position images, below). I believe the script would still make the blade correctly, but you might need to find a new starting position to get the desired results. But I can not confirm this since I dont have a flat screen monitor. Basically, you want to find a starting position that will make the first click on the most upper, left corner of the loaded metal (see image directly below). If your first click hits that spot, then I believe it will finish the blade correctly.


First blow should hit about here: Cegaiel carp5.jpg


Starting position (Hit F2 here):

Cegaiel carp2.jpgCegaiel carp3.jpg


Look at the consistency:

Cegaiel carp4.jpg