Skip to content

Commit

Permalink
Shopbot falls back to using shopbotItems.txt when no item code is spe…
Browse files Browse the repository at this point in the history
…cified. It will also output the items its shopping for when it starts
  • Loading branch information
nooperation committed Feb 19, 2024
1 parent 8f7b2b9 commit fa51a0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion D2Hackit/Modules/shopbot/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ std::vector<MAPPOS> customPath;

BOOL PRIVATE Shop(char** argv, int argc)
{
if (argc < 3)
if (argc < 2)
{
return FALSE;
}
Expand Down
6 changes: 6 additions & 0 deletions D2Hackit/Modules/shopbot/shopbot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ bool ShopBot::Start(const std::vector<MAPPOS> &customPath, const std::vector<std
}
}

std::string itemList = "";
for (const auto& iter : targetItems) {
itemList += " " + iter.first;
}
server->GameStringf("ÿc:Shopbotÿc0: Shopping for:%s", itemList.c_str());

minPrefix = GetPrivateProfileInt("ShopBot", "PrefixCount", 1, CONFIG_PATH);
minSuffix = GetPrivateProfileInt("ShopBot", "SuffixCount", 0, CONFIG_PATH);
leftClickTeleport = GetPrivateProfileInt("ShopBot", "LeftClickTeleport", 1, CONFIG_PATH);
Expand Down

0 comments on commit fa51a0c

Please sign in to comment.