Skip to content

Commit

Permalink
Exposed another npc interaction delay (and greatly lowered it)
Browse files Browse the repository at this point in the history
  • Loading branch information
nooperation committed May 3, 2021
1 parent 321559f commit 12cd489
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion D2Hackit/Core/Resources/D2HackIt.ini
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ TickRate=10

[Vendor]
MenuTimeout=200
InteractTimeout=200
InteractTimeout=150
ItemTimeout=200
WalkToTimeout=100

;
;====================================================================
Expand Down
1 change: 1 addition & 0 deletions D2Hackit/Core/ServerStartStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ BOOL PRIVATE ServerStart(HANDLE hModule)
psi->VendorItemTimeout = GetPrivateProfileInt("Vendor", "ItemTimeout", 150, psi->IniFile);
psi->VendorMenuTimeout = GetPrivateProfileInt("Vendor", "MenuTimeout", 300, psi->IniFile);
psi->VendorInteractTimeout = GetPrivateProfileInt("Vendor", "InteractTimeout", 100, psi->IniFile);
psi->VendorWalkToTimeout = GetPrivateProfileInt("Vendor", "WalkToTimeout", 100, psi->IniFile);


// -- B
Expand Down
1 change: 1 addition & 0 deletions D2Hackit/Core/ServerStructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ typedef struct privateserverinfo_t
int VendorItemTimeout;
int VendorMenuTimeout;
int VendorInteractTimeout;
int VendorWalkToTimeout;
// -- B

// Tick thread
Expand Down
2 changes: 1 addition & 1 deletion D2Hackit/Core/me.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ void DoNpcProc()
}
else
{
g_npcState.Update(NPC_INTERACT, 2000);
g_npcState.Update(NPC_INTERACT, psi->VendorWalkToTimeout);
}
}
else
Expand Down
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(customPath.size() == 0)
if(customPath.size() <= 1)
{
switch(me->GetCurrentMapID())
{
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 @@ -92,6 +92,12 @@ bool ShopBot::Start(const std::vector<MAPPOS> &customPath, const std::string &me
currentTeleportIndex = 1;
ticksSinceLastTeleport = 0;

if (customPath.size() <= 1)
{
server->GameStringf("ÿc:Shopbotÿc0: Min prefix: Invalid path, please mark a path using '.shopbot mark' leading out of town.", minPrefix, minSuffix);
return false;
}

if(!ReadConfig(".\\plugin\\goodPrefix_shopbot.txt", goodPrefix))
return false;

Expand Down

0 comments on commit 12cd489

Please sign in to comment.