Fix bug with FINALSTEP count for quick craft (80 durability) rotation, and fixed bug with standard touch costing 18CP instead of 32

master
Joshua Sigona 5 years ago
parent 642dcbe4a1
commit 10b65cc061
  1. 40
      autocraft.ahk
  2. BIN
      autocraft.exe

@ -125,7 +125,7 @@ WaitForCraftingWindow() {
send, {Numpad0} send, {Numpad0}
sleep, 50 sleep, 50
send, {Numpad0} send, {Numpad0}
sleep, 150 sleep, 1000
if (!CraftingWindowOpen()) { if (!CraftingWindowOpen()) {
return true return true
} else { } else {
@ -288,14 +288,14 @@ QuickCraftRotation(ByRef STEP) {
StrongCraft60(ByRef STEP) { StrongCraft60(ByRef STEP) {
global toggle, GREATSTRIDES, INNOVATION, CP, RECIPEDONE global toggle, GREATSTRIDES, INNOVATION, CP, RECIPEDONE
FINALSTEP = 2 FINALSTEP = 3
SIDESTEPS = 0 SIDESTEPS = 0
ACTIVATESIDESTEP := false ACTIVATESIDESTEP := false
DURABILITY := 80 DURABILITY := 80
loop { loop {
if (IsMaxQuality()) { if (IsMaxQuality() or DURABILITY <= 20) {
Veneration(STEP,CP,DURABILITY,0) Veneration(STEP,CP,DURABILITY,0)
BasicSynthesis(STEP,CP,DURABILITY,0) BasicSynthesis(STEP,CP,DURABILITY,0)
BasicSynthesis(STEP,CP,DURABILITY) BasicSynthesis(STEP,CP,DURABILITY)
@ -307,22 +307,22 @@ StrongCraft60(ByRef STEP) {
Case 1: Case 1:
InnerQuiet(STEP,CP,DURABILITY) InnerQuiet(STEP,CP,DURABILITY)
Case 2: Case 2:
if (DURABILITY >= 20) { if (GREATSTRIDES = 0) {
if (GREATSTRIDES = 0) { TricksOfTheTrade(CP)
TricksOfTheTrade(CP) GreatStrides(STEP,CP,DURABILITY,0)
GreatStrides(STEP,CP,DURABILITY,0) }
} if (IsGood() or IsExcellent()) {
if (IsGood() or IsExcellent()) {
ChooseBestProgressStep(STEP,CP,DURABILITY,0)
}
if (INNOVATION = 0) {
Innovation(STEP,CP,DURABILITY,0)
}
ChooseBestProgressStep(STEP,CP,DURABILITY,0) ChooseBestProgressStep(STEP,CP,DURABILITY,0)
} else {
BasicSynthesis(STEP,CP,DURABILITY,0)
BasicSynthesis(STEP,CP,DURABILITY)
} }
STEP := 3
Case 3:
if (INNOVATION = 0) {
Innovation(STEP,CP,DURABILITY,0)
}
if (GREATSTRIDES > 0 or CP <= 32) {
ChooseBestProgressStep(STEP,CP,DURABILITY,0)
}
STEP := 2
} }
Stdout(DisplayInfo(STEP,CP,DURABILITY)) Stdout(DisplayInfo(STEP,CP,DURABILITY))
} until (STEP >= FINALSTEP + 1 or !toggle) } until (STEP >= FINALSTEP + 1 or !toggle)
@ -504,7 +504,7 @@ GreatStrides(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) {
HastyTouch(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) { HastyTouch(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) {
global GREATSTRIDES global GREATSTRIDES
CPCOST := ModDurability(0) ;CP Cost goes here. CPCOST := 0 ;CP Cost goes here.
DURABILITYCOST := ModDurability(10) ;Durability Cost goes here. DURABILITYCOST := ModDurability(10) ;Durability Cost goes here.
if (CP >= CPCOST and DURABILITY > DURABILITYCOST and KeyPressAllowed()) { if (CP >= CPCOST and DURABILITY > DURABILITYCOST and KeyPressAllowed()) {
PressKeyWithModifier("Ctrl","3") ;Use PressKeyWithModifier("Ctrl","1") for modifiers. PressKeyWithModifier("Ctrl","3") ;Use PressKeyWithModifier("Ctrl","1") for modifiers.
@ -619,7 +619,7 @@ RapidSynthesis(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) {
StandardTouch(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) { StandardTouch(ByRef STEP,ByRef CP,ByRef DURABILITY,stepcount=1) {
global GREATSTRIDES global GREATSTRIDES
CPCOST := 18 ;CP Cost goes here. CPCOST := 32 ;CP Cost goes here.
DURABILITYCOST := ModDurability(10) ;Durability Cost goes here. DURABILITYCOST := ModDurability(10) ;Durability Cost goes here.
Stdout(CPCOST . "/" . DURABILITYCOST . "/" . CP . "/" . DURABILITY) Stdout(CPCOST . "/" . DURABILITYCOST . "/" . CP . "/" . DURABILITY)
if (CP >= CPCOST and DURABILITY > DURABILITYCOST and KeyPressAllowed()) { if (CP >= CPCOST and DURABILITY > DURABILITYCOST and KeyPressAllowed()) {
@ -730,7 +730,7 @@ PressKeyWithModifier(modifier,key) {
TricksOfTheTrade(ByRef cp) { TricksOfTheTrade(ByRef cp) {
if (IsGood() and KeyPressAllowed()) { if (IsGood() and KeyPressAllowed()) {
PressKeyWithModifier("Ctrl","2") PressKeyWithModifier("Ctrl","2")
cp += 20 cp := cp + 20
loop { loop {
sleep, 250 sleep, 250
} until ActionReady() } until ActionReady()

Binary file not shown.
Loading…
Cancel
Save