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

Add option to drink antidote potions before Lilith in OrgTorch #2232

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
16 changes: 14 additions & 2 deletions d2bs/kolbot/libs/bots/OrgTorch.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function OrgTorch() {

// Do mini ubers or Tristram based on area we're already in
this.pandemoniumRun = function () {
var i, findLoc, skillBackup;
let i, findLoc, skillBackup;

switch (me.area) {
case 133: // Matron's Den
Expand Down Expand Up @@ -281,7 +281,7 @@ function OrgTorch() {
};

// Start
var i, portal, tkeys, hkeys, dkeys, brains, eyes, horns, timer, farmer, busy, busyTick,
let i, portal, tkeys, hkeys, dkeys, brains, eyes, horns, timer, farmer, busy, busyTick, chugs,
neededItems = {pk1: 0, pk2: 0, pk3: 0, rv: 0};

// Do town chores and quit if MakeTorch is true and we have a torch.
Expand Down Expand Up @@ -423,6 +423,18 @@ function OrgTorch() {
portal = this.openPortal(0);

if (portal) {
if (portal.objtype === 133 && Config.OrgTorch.AntidotesToChug) {
Town.buyAntidotes(Config.OrgTorch.AntidotesToChug);
for (chugs = 0; chugs < Config.OrgTorch.AntidotesToChug; chugs++) {
delay(500);
print("glug glug");
let antidote = me.getItem(514);
if (antidote) {
antidote.interact();
}
}
Town.move("stash");
}
Pather.usePortal(null, null, portal);
}

Expand Down
3 changes: 2 additions & 1 deletion d2bs/kolbot/libs/common/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ var Config = {
WaitTimeout: false,
UseSalvation: false,
GetFade: false,
MakeTorch: true
MakeTorch: true,
AntidotesToChug: 0,
},
Synch: {
WaitFor: []
Expand Down
28 changes: 28 additions & 0 deletions d2bs/kolbot/libs/common/Town.js
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,34 @@ CursorLoop:
return false;
},

buyAntidotes: function (quantity) {
let i,
antidote,
npc = this.initNPC("Shop", "buy Antidote");

if (!npc) {
return false;
}

antidote = npc.getItem("yps");

if (!antidote) {
return false;
}

try {
for (i = 0; i < quantity; i++) {
antidote.buy(false);
}
} catch (e) {
print(e.message);

return false;
}

return true;
},

buyKeys: function () {
if (!this.wantKeys()) {
return true;
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Amazon.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Assassin.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Barbarian.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Druid.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Necromancer.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Paladin.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down
1 change: 1 addition & 0 deletions d2bs/kolbot/libs/config/Sorceress.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function LoadConfig() {
Config.OrgTorch.WaitTimeout = 15; // Time in minutes to wait for keys before moving on
Config.OrgTorch.UseSalvation = true; // Use Salvation aura on Mephisto (if possible)
Config.OrgTorch.GetFade = false; // Get fade by standing in a fire. You MUST have Last Wish or Treachery on your character being worn.
Config.OrgTorch.AntidotesToChug = 0; // Chug x antidotes before Lilith. Each antidote gives +50 poison res and +10 max poison for 30 seconds. The duration stacks. 4 potions == 2 minutes
Scripts.Rusher = false; // Rush bot. For a list of commands, see Rusher.js
Config.Rusher.WaitPlayerCount = 0; // Wait until game has a certain number of players (0 - don't wait, 8 - wait for full game).
Config.Rusher.Radament = false; // Do Radament quest.
Expand Down