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

From A Tale in the Desert
Jump to navigationJump to search
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<pre>
 
<pre>
;1680x1050 Resolution ONLY!
+
; 1680x1050 Resolution ONLY!
  
;Have this in your inventory:
+
; Have this in your inventory:
;3 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel  
+
; 3 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel  
;Metal: Iron or Copper
+
; Metal: Iron or Copper
  
;Hotkeys:
+
;YOU MUST USE THIS ON GUILDED OR PUBLIC ANVILS.
;F2: Set Location, make blade
 
;Right Alt: Use last F2 location, make blade
 
;Right Shift: Show current coordinates locked into memory
 
;Left Click: Show current mouse location
 
  
;Left Alt: Approve and unload the blade from anvil (and make another blade if you uncomment (see next paragraph).
+
;If you do not, then it will misclick. If you are using this on a private anvil,
;Spacebar: Discard the blade and recover metal.
+
;then temporarily set to Public
  
;Ctrl+P to pause script and Ctrl+P again to resume
 
;The AHK icon in system tray will turn red while paused.
 
;Ctrl+R to reload script
 
;Date: 9/24/2010
 
  
;Author: Cegaiel
 
;Full Credit to Oni , this macro is based off his hard work for getting the hit locations. We appreciate your hard work :)
 
  
 +
; Last Update: 12/10/2010
  
;------------------------------
+
; ------------------------------------------------
  
;Note the next to the last line (very bottom) in this script is this line: Gosub, Load
 
;If you uncomment this, then everytime you Approve/unload a blade (with Left Alt key) then it will automatically start a
 
;new project immediately, after unloading (same as if you had pressed Right Alt, after unloading).
 
;This can save you a few seconds when doing multiple blades.
 
  
;------------------------------
+
; Ctrl+P to pause script and Ctrl+P again to resume
 +
; The AHK icon in system tray will turn red while paused.
 +
; Ctrl+R to reload script
 +
 
 +
; Author: Cegaiel
 +
; Full Credit to Oni , this macro is based off his hard work for getting the hit locations. We appreciate your hard work
 +
 
 +
:)
 +
 
 +
; Original Creation Date: 9/24/2010
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
; --------------- HOTKEYS --------------------------
 +
; Note this script is always running. Even when its not "clicking".
 +
; The hotkeys work anytime when the script is NOT clicking and sitting idle
 +
 
 +
 
 +
; F2: Set Location, make blade, copy coords into clipboard (in case you want to Paste for future reference)
 +
; Right Alt: Use last F2 location, make blade
 +
; Right Shift: Show current coordinates locked into memory
 +
; <Hold> Left Click: Show current mouse location
 +
 
 +
; Left Alt: Approve and unload the blade from anvil
 +
; Spacebar: Discard the blade and recover metal
 +
 
 +
 
 +
; "N" on keyboard: Turn ON or OFF Non Stop mode.
 +
 
 +
; How Non Stop Mode works:
 +
; Once you find your perfect starting location and get a high quality blade (6.5k) then turn on Non Stop mode, by pressing
 +
 
 +
"N" key.
 +
; Hit Left Alt (as usual) to Accept that 6.5 quality blade. But after making subsequent (future) blades, it will
 +
 
 +
automatically
 +
 
 +
; Accept and keep making more blades, non stop.  There will be a 2 second pause after the blade is made (when you see
 +
 
 +
blade quality show on screen)
 +
; You will want to do this (Ctrl+P to pause), manually, when you on your last metal.
 +
;------------------------------------------------------
 +
 
 +
 
 +
displayMsg = 0
 +
NonStop = 0
 +
BladesCreated = 0
 +
 
  
 
WinActivate, eGenesis Client
 
WinActivate, eGenesis Client
 
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
 
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos
  
 
if (Xmax = 1688) && (Ymax = 1028)
 
{
 
nothing = 0
 
} else {
 
Msgbox, You are not in 1680x1050 resolution`n`nExiting...
 
EXIT
 
}
 
  
  
Line 51: Line 81:
  
  
 +
Gui, Font, bold
 
Gui, Add, Text,, Metal Type:
 
Gui, Add, Text,, Metal Type:
 +
Gui, Font, normal
 +
 
Gui, Add, DropDownList, vMetal Choose1, Copper|Iron
 
Gui, Add, DropDownList, vMetal Choose1, Copper|Iron
Gui, Add, Button, gStart, MAKE
+
 
 +
 
 +
 
 +
 
 +
Gui, Font, bold
 +
Gui, Add, Text,, `nAdjust Camera/Zoom Level?
 +
Gui, Font, normal
 +
Gui, Add, Text,, Choose Yes if this is the first time running.`nChoose No if you already performed this step and
 +
 
 +
locked screen.
 +
Gui, Add, DropDownList, vZoom Choose2, Yes|No
 +
 
 +
 
 +
 
 +
Gui, Font, bold
 +
Gui, Add, Text,, `nAdv Blacksmithing Skill Level:
 +
Gui, Font, normal
 +
 
 +
Gui, Add, DropDownList, vSkill Choose2, 1|2
 +
 
 +
Gui, Font, bold
 +
 
 +
Gui, Add, Text,, `nQuantity Blades (optional)
 +
Gui, Font, normal
 +
 
 +
Gui, Add, Edit, vQty wp number
 +
 
 +
Gui, Add, Text,, `nYou only need to enter a Qty if you plan on using Non stop mode (Automatic mode).`nThis can be
 +
 
 +
activated by clicking the "N" button on keyboard, later.
 +
Gui, Add, Text,, If you do not enter a Qty now, then you will have to make each blade manually with the
 +
 
 +
hotkeys.`nDon't forget, press F1 at anytime to see what the hotkeys are.`n
 +
 
 +
 
 +
Gui, Add, Button, gStart, START
 
Gui, Show
 
Gui, Show
 
}
 
}
Line 78: Line 146:
  
  
 +
MetalX = 63
  
 
if (Metal = "Iron")
 
if (Metal = "Iron")
 
{
 
{
MetalX = 63
+
MetalY = 84 ;Iron
MetalY = 84
 
 
}else{
 
}else{
MetalX = 63
+
MetalY = 101 ;Copper
MetalY = 101
 
 
}
 
}
  
MsgBox, Step 1: Your camera angle will now automatically be adjusted to double 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...
+
 
 +
 
 +
 
 +
if (ZOOM == "Yes")
 +
{
 +
 
 +
MsgBox, Step 1: Your camera angle will now automatically be adjusted to double 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...
  
 
WinActivate, eGenesis Client
 
WinActivate, eGenesis Client
Line 102: Line 179:
 
Sleep 5000
 
Sleep 5000
 
MouseMove, %OldMX%, %OldMY%, 0
 
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 Alt Key.`n`nMetal: %Metal%
+
 
 +
 
 +
MsgBox, Now hover mouse on the anvil starting position (image in wiki) and hit F2 to make a blade.`n`nMetal: %Metal%`nQty:
 +
 
 +
%Qty%
  
 
WinActivate, eGenesis Client
 
WinActivate, eGenesis Client
Line 123: Line 205:
 
Gosub, Load
 
Gosub, Load
 
}
 
}
 +
 +
 +
if (NonStop = 0)
 +
{
 +
GetKeyState, state, N
 +
 +
if state = D
 +
{
 +
 +
 +
if (qty = 0) | (qty == "") | (qty = 1)
 +
{
 +
Msgbox, Non stop mode requires a quantity of 2 or more!
 +
 +
 +
} else if ((StartX == 0) && (StartY == 0)) {
 +
Msgbox, Can not set Non Stop mode...`n`nMake a blade first with F2 key!
 +
 +
 +
} else {
 +
NonStop := 1
 +
Msgbox, Non Stop mode: ENABLED!`n`nIf you have a blade on the anvil, then click Left Alt.`n`nIt will unload the metal and
 +
 +
make all future blades automatically.`n`nOtherwise, hit Left Alt key to repeat your last successful blade and it will
 +
 +
begin making the blades, uninterupted.
 +
}
 +
 +
 +
}
 +
 +
}
 +
 +
  
 
GetKeyState, state, RAlt
 
GetKeyState, state, RAlt
Line 138: Line 254:
 
Msgbox, No coordinates in memory, Start a project with F2, first...
 
Msgbox, No coordinates in memory, Start a project with F2, first...
 
}else{
 
}else{
Msgbox, Position in memory: %StartX%, %StartY%`n`nPress Right Alt to make another blade at these coordinates`n`nThe coordinates are also located in clipboard, Ctrl+V to paste.
+
Msgbox, Position in memory: %StartX%, %StartY%`n`nPress Right Alt to make another blade at these coordinates`n`nThe  
 +
 
 +
coordinates are also located in clipboard, Ctrl+V to paste.
 
}
 
}
 
}
 
}
Line 147: Line 265:
 
MouseGetPos, xpos, ypos  
 
MouseGetPos, xpos, ypos  
 
ToolTip, Coordinates: %xpos%`, %ypos%`n`nPress F2 to start project.
 
ToolTip, Coordinates: %xpos%`, %ypos%`n`nPress F2 to start project.
 +
}
  
 
;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, LAlt
 
GetKeyState, state, LAlt
 
if state = D
 
if state = D
 
{
 
{
Gosub, ACCEPT
+
 
 +
if ((StartX == 0) && (StartY == 0))
 +
{
 +
Msgbox, Can not Approve blade, no blade has been made yet!
 +
} else {
 +
 
 +
Gosub, ACCEPT
 +
}
 +
 
 
}
 
}
  
Line 173: Line 297:
  
  
Load:
+
LOAD:
 
WinActivate, eGenesis Client
 
WinActivate, eGenesis Client
  
Line 187: Line 311:
 
sleep 100
 
sleep 100
 
NewX := StartX + 29
 
NewX := StartX + 29
NewY := StartY - 19
+
NewY := StartY - 15
 
Click %NewX%, %NewY% ;Left
 
Click %NewX%, %NewY% ;Left
  
 
sleep 100
 
sleep 100
 
  
  
Line 201: Line 324:
  
  
 +
 +
;Click Carp Blade from Project menu
 +
TempX := NewX + 10
 +
TempY := NewY - 17
 +
 +
;If you have Adv Blacksmithing 1 Skill, then Carp blade will be where the mouse currently is
 +
;If you have Adv BS 2 Skill, then there are new options in menu, such as Archaeologist Shovel which throws the location
 +
 +
off..
 +
;This was the purpose of asking what your skill level is at begining.
  
  
;Metal Click
+
if Skill = 1
TempX := NewX + 10
+
{
 
Click %TempX%, %NewY% ;Left
 
Click %TempX%, %NewY% ;Left
 +
} else {
 +
Click %TempX%, %TempY% ;Left
 +
 +
}
 +
 
Sleep 100
 
Sleep 100
  
;Msgbox, Last chance to abort (Ctrl+R to reload script)`n`nAre you sure you have your chat minimized?`n`nIf so, click OK to proceed...
 
  
 
+
if (displayMsg = 0)
;BEGIN SLEEP CHANGE
+
Msgbox, Are you sure you have your chat minimized?`n`nIf so, click OK to proceed...`n`n`nYou will only be asked this once.
  
  
  
 
;Set Tool: Shaping Mallet
 
;Set Tool: Shaping Mallet
;NewX := StartX + 22
 
;NewY := StartY - 38
 
  
 
Mousemove %StartX%, %StartY%
 
Mousemove %StartX%, %StartY%
Line 248: Line 383:
 
;Hit 4
 
;Hit 4
 
NewX := StartX + 77
 
NewX := StartX + 77
NewY := StartY + 119
+
NewY := StartY + 157
 
Click right %NewX%, %NewY%
 
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Line 254: Line 389:
 
;Hit 5
 
;Hit 5
 
NewX := StartX + 77
 
NewX := StartX + 77
NewY := StartY + 157
+
NewY := StartY + 196
 
Click right %NewX%, %NewY%
 
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Line 260: Line 395:
 
;Hit 6
 
;Hit 6
 
NewX := StartX + 77
 
NewX := StartX + 77
NewY := StartY + 196
+
NewY := StartY + 234
 
Click right %NewX%, %NewY%
 
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Line 266: Line 401:
 
;Hit 7
 
;Hit 7
 
NewX := StartX + 77
 
NewX := StartX + 77
NewY := StartY + 234
+
NewY := StartY + 273
 
Click right %NewX%, %NewY%
 
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Line 272: Line 407:
 
;Hit 8
 
;Hit 8
 
NewX := StartX + 77
 
NewX := StartX + 77
NewY := StartY + 273
+
NewY := StartY + 312
 
Click right %NewX%, %NewY%
 
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Line 283: Line 418:
  
 
Mousemove %StartX%, %StartY%
 
Mousemove %StartX%, %StartY%
sleep 100
 
 
Send {C}
 
Send {C}
 
Send {9}
 
Send {9}
Line 295: Line 429:
 
NewX := StartX + 77
 
NewX := StartX + 77
 
NewY := StartY + 43
 
NewY := StartY + 43
 +
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Click right %NewX%, %NewY%
+
 
  
 
NewX := StartX + 77
 
NewX := StartX + 77
 
NewY := StartY + 311
 
NewY := StartY + 311
 +
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Click right %NewX%, %NewY%
 
  
 
;//// END HIT TOP + BOTTOM w/ CHISEL \\\
 
;//// END HIT TOP + BOTTOM w/ CHISEL \\\
Line 311: Line 446:
 
NewX := StartX + 77
 
NewX := StartX + 77
 
NewY := StartY + 124
 
NewY := StartY + 124
 +
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Click right %NewX%, %NewY%
+
 
  
 
NewX := StartX + 77
 
NewX := StartX + 77
 
NewY := StartY + 229
 
NewY := StartY + 229
 +
Click right %NewX%, %NewY%
 
Sleep 100
 
Sleep 100
Click right %NewX%, %NewY%
 
  
 
;//// End HIT MID POINTS w/ CHISEL \\\\
 
;//// End HIT MID POINTS w/ CHISEL \\\\
Line 330: Line 466:
 
sleep 100
 
sleep 100
 
;// end Wide Chisel change //
 
;// end Wide Chisel change //
 
 
  
  
Line 426: Line 560:
  
  
 +
if (displayMsg = 0)
 +
{
 +
MsgBox, Press <Left Alt> to Unload and put blade into your inventory.`n`n Press <SPACEBAR> to Discard Project, keep your
  
MsgBox, Press <Left Alt> 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 Alt> to make a blade from the current anvil position.`n`nDon't forget to press F1 for Help Screen for Hotkeys/Shortcuts at anytime!
+
%Metal%, try again (F2)...`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 Alt
 +
 
 +
Key.`n`nInstead of using Right Alt, you can also engage Non Stop mode (N on keyboard). Then click Left Alt to accept. Then
 +
 
 +
it will continue non stop`n`nDon't forget to press F1 for Help Screen for Hotkeys/Shortcuts at anytime!`n`nThis message
 +
 
 +
will not be displayed again!
 +
displayMsg =: 1
 +
}
 +
 
 +
 
 +
if (NonStop = 1)
 +
{
 +
;Pause 2 seconds to give you a chance to pause script with Ctrl+P in case you need to stop for something.
 +
;The 2 second pause begins as soon as you see the blade quality appear on the screen
 +
Sleep 2000
 +
GoSub, Accept ; Unload blade and begin a new blade
 +
}
  
 
return
 
return
Line 434: Line 590:
  
 
HELP:
 
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`n`nRight Alt: Make another blade from last F2 coordinates (memory)`nLeft Alt: Approve and Unload a blade into your inventory, after making.`n`nLeft Shift: Show current mouse position`nRight Shift: Show last F2 coordinates (memory)`n`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.
+
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`n`nRight Alt:  
 +
 
 +
Make another blade from last F2 coordinates (memory)`nLeft Alt: Approve and Unload a blade into your inventory, after  
 +
 
 +
making.`n`n<Hold> Left Shift: Show current mouse position`nRight Shift: Show last F2 coordinates (memory)`n`nSPACEBAR:  
 +
 
 +
Discard project and recover metal`n`n"N" key on keyboard: Enable Non Stop Mode`n`nNote: Copper and Iron produce the same  
 +
 
 +
quality blades, so use whatever you have the most of.
 
return
 
return
  
Line 445: Line 611:
 
NewX := StartX + 31 ;// Discard
 
NewX := StartX + 31 ;// Discard
 
NewY := StartY - 9  ;// Discard
 
NewY := StartY - 9  ;// Discard
Sleep 100
 
 
Click %NewX%, %NewY% ;Left
 
Click %NewX%, %NewY% ;Left
Sleep 100
+
Sleep 150
Click 804, 574 ;Left
+
Click 806, 577 ;Left
Sleep 100
+
Sleep 150
MouseMove, %StartX%, %StartY%, 0
 
 
return
 
return
  
 
ACCEPT:
 
ACCEPT:
 
WinActivate, eGenesis Client
 
WinActivate, eGenesis Client
 +
 +
BladesCreated ++
 +
  
 
Click right %StartX%, %StartY%
 
Click right %StartX%, %StartY%
 
NewX := StartX + 37 ;// Complete
 
NewX := StartX + 37 ;// Complete
NewY := StartY - 25 ;// Complete
+
NewY := StartY - 21 ;// Complete
Sleep 100
 
 
Click %NewX%, %NewY% ;Left
 
Click %NewX%, %NewY% ;Left
Sleep 100
+
Sleep 150
Click 804, 574 ;Left
+
Click 806, 577 ;Left
Sleep 100
+
Sleep 150
;MouseMove, %StartX%, %StartY%, 0
+
 
 +
 
 +
 
 +
if (BladesCreated = Qty)
 +
{
 +
Msgbox, %BladesCreated% of %Qty% blades have been created, Done!`n`nPausing script.`n`nIf you wish to continue
  
 +
with more, then Ctrl+P to resume.`nCtrl+R to reload script and input a new quantity.
 +
PAUSE
 +
}
  
 +
if (NonStop = 1)
 +
Gosub, Load
  
;Uncomment below line to make auto repeat. ie When you accept a project, it will immediately start another (same as Right Alt)
 
;Gosub, Load
 
  
 
return
 
return

Latest revision as of 04:07, 11 December 2010

; 1680x1050 Resolution ONLY!

; Have this in your inventory:
; 3 main tools: Ball Peen Hammer, Shaping Mallet, and Wide Tungsten Chisel 
; Metal: Iron or Copper

;YOU MUST USE THIS ON GUILDED OR PUBLIC ANVILS.

;If you do not, then it will misclick. If you are using this on a private anvil,
;then temporarily set to Public



; Last Update: 12/10/2010

; ------------------------------------------------


; Ctrl+P to pause script and Ctrl+P again to resume
; The AHK icon in system tray will turn red while paused.
; Ctrl+R to reload script

; Author: Cegaiel
; Full Credit to Oni , this macro is based off his hard work for getting the hit locations. We appreciate your hard work 

:)

; Original Creation Date: 9/24/2010







; --------------- HOTKEYS --------------------------
; Note this script is always running. Even when its not "clicking".
; The hotkeys work anytime when the script is NOT clicking and sitting idle


; F2: Set Location, make blade, copy coords into clipboard (in case you want to Paste for future reference)
; Right Alt: Use last F2 location, make blade
; Right Shift: Show current coordinates locked into memory
; <Hold> Left Click: Show current mouse location

; Left Alt: Approve and unload the blade from anvil 
; Spacebar: Discard the blade and recover metal


; "N" on keyboard: Turn ON or OFF Non Stop mode.

; How Non Stop Mode works:
; Once you find your perfect starting location and get a high quality blade (6.5k) then turn on Non Stop mode, by pressing 

"N" key.
; Hit Left Alt (as usual) to Accept that 6.5 quality blade. But after making subsequent (future) blades, it will 

automatically

; Accept and keep making more blades, non stop.  There will be a 2 second pause after the blade is made (when you see 

blade quality show on screen)
; You will want to do this (Ctrl+P to pause), manually, when you on your last metal.
;------------------------------------------------------


displayMsg = 0
NonStop = 0
BladesCreated = 0


WinActivate, eGenesis Client
WinGetActiveStats, win_Title, Xmax, Ymax, win_Xpos, win_Ypos




IfWinExist eGenesis Client
{


	Gui, Font, bold
	Gui, Add, Text,, Metal Type:
	Gui, Font, normal

	Gui, Add, DropDownList, vMetal Choose1, Copper|Iron




	Gui, Font, bold
	Gui, Add, Text,, `nAdjust Camera/Zoom Level?
	Gui, Font, normal
	Gui, Add, Text,, Choose Yes if this is the first time running.`nChoose No if you already performed this step and 

locked screen.
	Gui, Add, DropDownList, vZoom Choose2, Yes|No



	Gui, Font, bold
	Gui, Add, Text,, `nAdv Blacksmithing Skill Level:
	Gui, Font, normal

	Gui, Add, DropDownList, vSkill Choose2, 1|2

	Gui, Font, bold

	Gui, Add, Text,, `nQuantity Blades (optional)
	Gui, Font, normal

	Gui, Add, Edit, vQty wp number

	Gui, Add, Text,, `nYou only need to enter a Qty if you plan on using Non stop mode (Automatic mode).`nThis can be 

activated by clicking the "N" button on keyboard, later.
	Gui, Add, Text,, If you do not enter a Qty now, then you will have to make each blade manually with the 

hotkeys.`nDon't forget, press F1 at anytime to see what the hotkeys are.`n


	Gui, Add, Button, gStart, START
	Gui, Show
		}
		else
		{
	MsgBox, eGenesis Client not running, aborting...
	Exit
		}
		return





Start:
	WinActivate, eGenesis Client
	WinGet, GameWinHandle, ID, eGenesis Client
	StartX = 0
	StartY = 0
	Gui, Submit


Gosub, HELP


MetalX = 63

if (Metal = "Iron")
{
MetalY = 84 ;Iron
}else{
MetalY = 101 ;Copper
}




if (ZOOM == "Yes")
{

MsgBox, Step 1: Your camera angle will now automatically be adjusted to double 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...

	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, Now hover mouse on the anvil starting position (image in wiki) and hit F2 to make a blade.`n`nMetal: %Metal%`nQty: 

%Qty%

	WinActivate, eGenesis Client

#Persistent
SetTimer, GetStartPos, 100
return


GetStartPos:

GetKeyState, state, F2
if state = D 
{
MouseGetPos, StartX, StartY 
Tooltip
Clipboard = Last Project: %StartX%, %StartY%`n
Gosub, Load
}


if (NonStop = 0)
{
GetKeyState, state, N

if state = D
{


if (qty = 0) | (qty == "") | (qty = 1)
{
Msgbox, Non stop mode requires a quantity of 2 or more!


} else if ((StartX == 0) && (StartY == 0)) {
Msgbox, Can not set Non Stop mode...`n`nMake a blade first with F2 key!


} else {
NonStop := 1
Msgbox, Non Stop mode: ENABLED!`n`nIf you have a blade on the anvil, then click Left Alt.`n`nIt will unload the metal and 

make all future blades automatically.`n`nOtherwise, hit Left Alt key to repeat your last successful blade and it will 

begin making the blades, uninterupted.
}


}

}



GetKeyState, state, RAlt
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 Alt 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 
ToolTip, Coordinates: %xpos%`, %ypos%`n`nPress F2 to start project.
}


GetKeyState, state, LAlt
if state = D
{

	if ((StartX == 0) && (StartY == 0))
	{
	Msgbox, Can not Approve blade, no blade has been made yet!
	} else {

	Gosub, ACCEPT
	}

}

GetKeyState, state, Space
if state = D
{
Gosub, DISCARD
}

GetKeyState, state, F1
if state = D
{
Gosub, HELP
}
return



LOAD:
	WinActivate, eGenesis Client

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 + 29
NewY := StartY - 15 
Click %NewX%, %NewY% ;Left

sleep 100


;Choose Metal
NewX := StartX + MetalX
NewY := StartY - MetalY
Click %NewX%, %NewY% ;Left
sleep 100



;Click Carp Blade from Project menu
TempX := NewX + 10
TempY := NewY - 17

;If you have Adv Blacksmithing 1 Skill, then Carp blade will be where the mouse currently is
;If you have Adv BS 2 Skill, then there are new options in menu, such as Archaeologist Shovel which throws the location 

off..
;This was the purpose of asking what your skill level is at begining.


if Skill = 1
{
Click %TempX%, %NewY% ;Left
} else {
Click %TempX%, %TempY% ;Left

}

Sleep 100


if (displayMsg = 0)
Msgbox, Are you sure you have your chat minimized?`n`nIf so, click OK to proceed...`n`n`nYou will only be asked this once.



;Set Tool: Shaping Mallet

Mousemove %StartX%, %StartY%
Send {S}
Send {8}
;end Set Tool: Shaping mallet
sleep 100

;/// FRONT EDGE \\\

;Hit 1
NewX := StartX + 77
NewY := StartY + 42
Click right %NewX%, %NewY%
Sleep 100


;Hit 2
NewX := StartX + 77
NewY := StartY + 80
Click right %NewX%, %NewY%
Sleep 100

;Hit 3
NewX := StartX + 77
NewY := StartY + 119
Click right %NewX%, %NewY%
Sleep 100

;Hit 4
NewX := StartX + 77
NewY := StartY + 157
Click right %NewX%, %NewY%
Sleep 100

;Hit 5
NewX := StartX + 77
NewY := StartY + 196
Click right %NewX%, %NewY%
Sleep 100

;Hit 6
NewX := StartX + 77
NewY := StartY + 234
Click right %NewX%, %NewY%
Sleep 100

;Hit 7
NewX := StartX + 77
NewY := StartY + 273
Click right %NewX%, %NewY%
Sleep 100

;Hit 8
NewX := StartX + 77
NewY := StartY + 312
Click right %NewX%, %NewY%
Sleep 100

;//// END 8 HITS \\\\



;// Wide Chisel Force 9//

Mousemove %StartX%, %StartY%
Send {C}
Send {9}
sleep 100

;// end Wide Chisel Tool Change//


;//// HIT TOP + BOTTOM w/ CHISEL \\\

NewX := StartX + 77
NewY := StartY + 43
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX + 77
NewY := StartY + 311
Click right %NewX%, %NewY%
Sleep 100

;//// END HIT TOP + BOTTOM w/ CHISEL \\\



;//// HIT MID POINTS w/ CHISEL \\\\

NewX := StartX + 77
NewY := StartY + 124
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX + 77
NewY := StartY + 229
Click right %NewX%, %NewY%
Sleep 100

;//// End HIT MID POINTS w/ CHISEL \\\\



;// Wide Chisel Force 4 //
Mousemove %StartX%, %StartY%
sleep 100
Send {C}
Send {4}
sleep 100
;// end Wide Chisel change //



;//// HIT 3 MID DOTS \\\\
NewX := StartX - 1
NewY := StartY + 130
Click right %NewX%, %NewY%
Sleep 100

NewX := StartX - 1
NewY := StartY + 178
Click right %NewX%, %NewY%
Sleep 100

NewX := StartX - 1
NewY := StartY + 226
Click right %NewX%, %NewY%
Sleep 100
;//// End HIT 3 MID DOTS \\\\


;// Ball Peen Force 9 //
Mousemove %StartX%, %StartY%
sleep 100
Send {B}
Send {9}
sleep 100
;// end Ball Peen //


;//// HIT 2 MID TIPS/EDGES \\
NewX := StartX - 26
NewY := StartY + 65
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX - 26
NewY := StartY + 283
Click right %NewX%, %NewY%
Sleep 100

;//// END 2 MID TIPS/EDGES \\



;//// BACK EDGE 6 HITS, Same Tool/Force \\\\

NewX := StartX - 112
NewY := StartY + 65
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX - 112
NewY := StartY + 283
Click right %NewX%, %NewY%
Sleep 100



NewX := StartX - 97
NewY := StartY + 75
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX - 97
NewY := StartY + 273
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX - 111
NewY := StartY + 85
Click right %NewX%, %NewY%
Sleep 100


NewX := StartX - 111
NewY := StartY + 262
Click right %NewX%, %NewY%
Sleep 100

;//// END BACK EDGE 6 HITS \\\\

Mousemove %StartX%, %StartY%
Sleep 100
Send {Q}
Send {Q}
;// END Blade //
sleep 100


if (displayMsg = 0)
{
MsgBox, Press <Left Alt> to Unload and put blade into your inventory.`n`n Press <SPACEBAR> to Discard Project, keep your 

%Metal%, try again (F2)...`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 Alt 

Key.`n`nInstead of using Right Alt, you can also engage Non Stop mode (N on keyboard). Then click Left Alt to accept. Then 

it will continue non stop`n`nDon't forget to press F1 for Help Screen for Hotkeys/Shortcuts at anytime!`n`nThis message 

will not be displayed again!
displayMsg =: 1
}


if (NonStop = 1)
{
;Pause 2 seconds to give you a chance to pause script with Ctrl+P in case you need to stop for something.
;The 2 second pause begins as soon as you see the blade quality appear on the screen
Sleep 2000
GoSub, Accept ; Unload blade and begin a new blade
}

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`n`nRight Alt: 

Make another blade from last F2 coordinates (memory)`nLeft Alt: Approve and Unload a blade into your inventory, after 

making.`n`n<Hold> Left Shift: Show current mouse position`nRight Shift: Show last F2 coordinates (memory)`n`nSPACEBAR: 

Discard project and recover metal`n`n"N" key on keyboard: Enable Non Stop Mode`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 + 31 ;// Discard
NewY := StartY - 9  ;// Discard
Click %NewX%, %NewY% ;Left
Sleep 150
Click 806, 577 ;Left
Sleep 150
return

ACCEPT:
	WinActivate, eGenesis Client

BladesCreated ++


Click right %StartX%, %StartY%
NewX := StartX + 37 ;// Complete
NewY := StartY - 21 ;// Complete
Click %NewX%, %NewY% ;Left
Sleep 150
Click 806, 577 ;Left
Sleep 150



	if (BladesCreated = Qty)
	{
	Msgbox, %BladesCreated% of %Qty% blades have been created, Done!`n`nPausing script.`n`nIf you wish to continue 

with more, then Ctrl+P to resume.`nCtrl+R to reload script and input a new quantity.
	PAUSE
	}

	if (NonStop = 1)
	Gosub, Load


return


^r::reload
^p::Pause