Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Huge blacksmith contracts #13

Merged
merged 1 commit into from
Jun 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions IdleCombos.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ global CurrentTinyBS := ""
global CurrentSmBS := ""
global CurrentMdBS := ""
global CurrentLgBS := ""
global CurrentHgBS := ""
global AvailableBSLvs := ""
;Loot globals
global EpicGearCount := 0
Expand Down Expand Up @@ -296,6 +297,7 @@ class MyGui {
Menu, BlacksmithSubmenu, Add, Use Small Contracts, Sm_Blacksmith
Menu, BlacksmithSubmenu, Add, Use Medium Contracts, Med_Blacksmith
Menu, BlacksmithSubmenu, Add, Use Large Contracts, Lg_Blacksmith
Menu, BlacksmithSubmenu, Add, Use Huge Contracts, Hg_Blacksmith
Menu, BlacksmithSubmenu, Add, Item Level Report, GearReport
Menu, BlacksmithSubmenu, Add, Active Patron Feats, PatronFeats
Menu, ToolsSubmenu, Add, &Blacksmith, :BlacksmithSubmenu
Expand Down Expand Up @@ -337,7 +339,7 @@ class MyGui {
Gui, MyWindow:Add, Button, x%col2_x% y%row_y% w60 gReload_Clicked, Reload
Gui, MyWindow:Add, Button, x%col3_x% y%row_y% w60 gExit_Clicked, Exit

Gui, MyWindow:Add, Tab3, x%col1_x% y%row_y% w400 h230, Summary|Adventures|Inventory||Patrons|Champions|Settings|Log|
Gui, MyWindow:Add, Tab3, x%col1_x% y%row_y% w400 h250, Summary|Adventures|Inventory||Patrons|Champions|Settings|Log|
Gui, Tab

row_y := row_y + 25
Expand Down Expand Up @@ -418,6 +420,8 @@ class MyGui {
Gui, MyWindow:Add, Text, vCurrentMdBS x+2 w35 right, % CurrentMdBS
Gui, MyWindow:Add, Text, x15 y+p w110, Large Blacksmiths:
Gui, MyWindow:Add, Text, vCurrentLgBS x+2 w35 right, % CurrentLgBS
Gui, MyWindow:Add, Text, x15 y+p w110, Huge Blacksmiths:
Gui, MyWindow:Add, Text, vCurrentHgBS x+2 w35 right, % CurrentHgBS

Gui, Tab, Patrons
Gui, MyWindow:Add, Text, x15 y33 w75, Mirt Variants:
Expand Down Expand Up @@ -535,6 +539,7 @@ class MyGui {
GuiControl, MyWindow:, CurrentSmBS, % CurrentSmBS, w250 h210
GuiControl, MyWindow:, CurrentMdBS, % CurrentMdBS, w250 h210
GuiControl, MyWindow:, CurrentLgBS, % CurrentLgBS, w250 h210
GuiControl, MyWindow:, CurrentHgBS, % CurrentHgBS, w250 h210
GuiControl, MyWindow:, AvailableBSLvs, % AvailableBSLvs, w250 h210
;patrons
GuiControl, MyWindow:, MirtVariants, % MirtVariants, w250 h210
Expand Down Expand Up @@ -1261,6 +1266,12 @@ Lg_Blacksmith:
return
}

Hg_Blacksmith:
{
UseBlacksmith(1797)
return
}

UseBlacksmith(buffid) {
if !UserID {
MsgBox % "Need User ID & Hash."
Expand All @@ -1272,6 +1283,7 @@ Lg_Blacksmith:
case 32: currentcontracts := CurrentSmBS
case 33: currentcontracts := CurrentMdBS
case 34: currentcontracts := CurrentLgBS
case 1797: currentcontracts := CurrentHgBS
}
if !(currentcontracts) {
MsgBox, 4, , No Blacksmith Contracts of that size detected. Check server for user details?
Expand Down Expand Up @@ -1347,6 +1359,7 @@ Lg_Blacksmith:
case 32: contractsused := (CurrentSmBS - blacksmithresults.buffs_remaining)
case 33: contractsused := (CurrentMdBS - blacksmithresults.buffs_remaining)
case 34: contractsused := (CurrentLgBS - blacksmithresults.buffs_remaining)
case 1797: contractsused := (CurrentHgBS - blacksmithresults.buffs_remaining)
}
UpdateLogTime()
FileAppend, % "(" CurrentTime ") Contracts Used: " Floor(contractsused) "`n", %OutputLogFile%
Expand Down Expand Up @@ -1378,6 +1391,7 @@ Lg_Blacksmith:
case 32: contractsused := (CurrentSmBS - blacksmithresults.buffs_remaining)
case 33: contractsused := (CurrentMdBS - blacksmithresults.buffs_remaining)
case 34: contractsused := (CurrentLgBS - blacksmithresults.buffs_remaining)
case 1797: contractsused := (CurrentHgBS - blacksmithresults.buffs_remaining)
}
UpdateLogTime()
FileAppend, % "(" CurrentTime ") Contracts used on " ChampFromID(heroid) ": " Floor(contractsused) "`n", %OutputLogFile%
Expand Down Expand Up @@ -1753,6 +1767,7 @@ Lg_Blacksmith:
case 32: CurrentSmBS := v.inventory_amount
case 33: CurrentMdBS := v.inventory_amount
case 34: CurrentLgBS := v.inventory_amount
case 1797: CurrentHgBS := v.inventory_amount
}
AvailableChests := "= " Floor(CurrentGems/50) " Silver Chests"
tokencount := (CurrentTinyBounties*12)+(CurrentSmBounties*72)+(CurrentMdBounties*576)+(CurrentLgBounties*1152)
Expand All @@ -1766,7 +1781,7 @@ Lg_Blacksmith:
AvailableTokens := "= " tokencount " Tokens"
CurrentTokens := "(" Round(tokencount/2500, 2) " Free Plays)"
}
AvailableBSLvs := "= " CurrentTinyBS+(CurrentSmBS*2)+(CurrentMdBS*6)+(CurrentLgBS*24) " Item Levels"
AvailableBSLvs := "= " CurrentTinyBS+(CurrentSmBS*2)+(CurrentMdBS*6)+(CurrentLgBS*24)+(CurrentHgBS*120) " Item Levels"
}

ParsePatronData() {
Expand Down