Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * @filename OrgTorch.js
- * @author kolton
- * @desc Convert keys to organs and organs to torches. It can work with TorchSystem to get keys from other characters
- * @notes Search for the word "Start" and follow the comments if you want to know what this script does and when.
- */
- function OrgTorch() {
- this.doneAreas = [];
- this.FadeTick = 0;
- this.PreBuffTick = 0;
- // Level 15 fade lasts for 288 seconds
- this.FadeDuration = 288000;
- // Identify & mule
- this.checkTorch = function () {
- var tkeys, hkeys, dkeys;
- if (me.area === 136) {
- Pather.moveTo(25105, 5140);
- Pather.usePortal(109);
- }
- Town.doChores();
- if (!Config.OrgTorch.MakeTorch) {
- return false;
- }
- var item = me.getItem("cm2");
- if (item) {
- print("checking for torch");
- do {
- if (item.quality === 7 && Pickit.checkItem(item).result === 1) {
- print("found torch, thinking about automule");
- D2Bot.printToConsole("Torch finish gold: " + me.gold);
- if (this.needComponents()) {
- D2Bot.setProfile("qsd2", "forquinton", "rioteer", "Normal", "Asia", "", "B:\\D2_2\\Game.exe");
- }
- if (AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("torchMuleInfo")) {
- print("trying to start muling");
- scriptBroadcast("muleTorch");
- //quit();
- scriptBroadcast("quit");
- //delay(10000);
- } else {
- print("not muling for some reason...");
- }
- // We are about to mule, let's check if we need to switch to normal mode
- // TODO: Switch profile based on keys and organs
- return true;
- }
- } while (item.getNext());
- } else {
- print("no medium charms, no need to check them");
- }
- return false;
- };
- // Check whether the killer is alone in the game
- this.aloneInGame = function () {
- var party = getParty();
- if (party) {
- do {
- if (party.name !== me.name) {
- return false;
- }
- } while (party.getNext());
- }
- return true;
- };
- // Try to lure a monster - wait until it's close enough
- this.lure = function (bossId) {
- var tick,
- unit = getUnit(1, bossId);
- if (unit) {
- tick = getTickCount();
- while (getTickCount() - tick < 2000) {
- if (getDistance(me, unit) <= 10) {
- return true;
- }
- delay(50);
- }
- }
- return false;
- };
- // Check if we have complete sets of organs
- this.completeSetCheck = function () {
- var horns = me.findItems("dhn"),
- brains = me.findItems("mbr"),
- eyes = me.findItems("bey");
- if (!horns || !brains || !eyes) {
- return false;
- }
- // We just need one set to make a torch
- if (Config.OrgTorch.MakeTorch) {
- return horns.length && brains.length && eyes.length;
- }
- return horns.length === brains.length && horns.length === eyes.length && brains.length === eyes.length;
- };
- this.checkRunewordItem = function(prefixId) {
- return getRunewordItem(prefixId).length > 0;
- };
- this.getRunewordItem = function(prefixId) {
- print("Checking for runeword " + prefixId);
- var item;
- var returnItems = [];
- item = me.getItem();
- if (item) {
- do {
- if(item.prefixnums.indexOf(prefixId) >= 0) {
- returnItems.push(copyUnit(item));
- print(prefixId + " found at " + item.location);
- }
- } while (item.getNext());
- }
- return returnItems;
- };
- // This is specifically for equipping an item from the stash
- // it assumes we already have the stash open
- this.equipFromStash = function(item, bodyLoc) {
- var cursorItem;
- for (i = 0; i < 3; i += 1) {
- if (item.toCursor()) {
- clickItem(0, bodyLoc);
- delay(me.ping * 2 + 500);
- if (item.bodylocation === bodyLoc) {
- if (getCursorType() === 3) {
- cursorItem = getUnit(100);
- if (cursorItem) {
- if (!Storage.Stash.CanFit(cursorItem) || !Storage.Stash.MoveTo(cursorItem)) {
- D2Bot.printToConsole("equipFromStash: Issue swapping armor. Stopping profile to protect gear.");
- D2Bot.stop();
- }
- }
- }
- return true;
- }
- }
- }
- return false;
- }
- this.equipFade = function(restoreArmor) {
- var treacheryArmor, foundArmor, originalArmor;
- print("Calling equip fade");
- Town.openStash();
- delay(me.ping * 2);
- treacheryArmor = this.getRunewordItem(20653);
- originalArmor = Item.getEquippedItem(3, true); // get a full copy of the item
- if (treacheryArmor) { treacheryArmor = treacheryArmor[0]; }
- delay(me.ping * 2);
- if (restoreArmor) {
- print("We were passed the original armor");
- // Item.equip has a REALLY bad habit of dropping things, and puts in inventory first
- // we will manually click the items
- this.equipFromStash(restoreArmor, 3);
- delay(me.ping * 2 + 500);
- } else if (treacheryArmor) {
- print("Found treachery, equipping...");
- this.equipFromStash(treacheryArmor, 3);
- print("Equipped");
- delay(me.ping * 2);
- } else {
- // This means we aren't restoring the restoreArmor
- // and we did not find a treachery armor
- print("No treachery found");
- }
- me.cancel();
- if (getUnit(100)) {
- // We have something on our cursor
- D2Bot.printToConsole("EquipFade: Issue swapping armor. Stopping profile to protect gear.");
- D2Bot.stop();
- } else {
- print("Nothing on cursor, seems good!");
- }
- return originalArmor;
- }
- // Get fade in River of Flames
- this.getFade = function (durationRequired = 0) {
- var originalArmor, endTime;
- if (Config.OrgTorch.GetFade && me.classid === 3) {
- // If we don' have fade, or the required duration is not met, get fade
- print("fade tick: " + this.FadeTick);
- print("fade duration: " + this.FadeDuration);
- endTime = this.FadeTick + this.FadeDuration;
- print("end time: " + endTime);
- if (me.getState(159) && (this.FadeTick == 0 || (endTime - durationRequired) > 0 && (endTime - durationRequired) <= getTickCount())) {
- D2Bot.printToConsole("Waiting " + (endTime - getTickCount()) / 1000 + " seconds for fade to lapse");
- }
- while (me.getState(159) && (this.FadeTick == 0 || (endTime - durationRequired) > 0 && (endTime - durationRequired) <= getTickCount())) {
- // we dont have enough time left... wait
- delay(1000);
- }
- if (!me.getState(159)) {
- print("Putting on Treachery");
- originalArmor = equipFade();
- print("Getting Fade");
- Pather.useWaypoint(107);
- Precast.doPrecast(true);
- Pather.moveTo(7811, 5872);
- // Turn on Salvation as Paladin to avoid damage
- if (me.classid === 3 && me.getSkill(125, 1)) {
- Skill.setSkill(125, 0);
- // If we can't do salvation, try Resist Fire instead
- } else if (me.classid === 3 && me.getSkill(100, 1)) {
- Skill.setSkill(100, 0);
- }
- while (!me.getState(159)) {
- delay(100);
- }
- print("Fade Achieved.");
- this.FadeTick = getTickCount();
- // Do pre-cast again before leaving
- Precast.doPrecast(true);
- print("Getting original Armor");
- // Go back to A5
- Town.goToTown(5);
- equipFade(originalArmor);
- Town.buyPotions(); // Buy potions again since we just used some to get fade
- }
- }
- return true;
- };
- // Open a red portal. Mode 0 = mini ubers, mode 1 = Tristram
- this.openPortal = function (mode) {
- var portal,
- item1 = mode === 0 ? me.findItem("pk1", 0) : me.findItem("dhn", 0),
- item2 = mode === 0 ? me.findItem("pk2", 0) : me.findItem("bey", 0),
- item3 = mode === 0 ? me.findItem("pk3", 0) : me.findItem("mbr", 0);
- Town.goToTown(5);
- Town.doChores();
- if (Town.openStash() && Cubing.emptyCube()) {
- if (!Storage.Cube.MoveTo(item1) || !Storage.Cube.MoveTo(item2) || !Storage.Cube.MoveTo(item3)) {
- return false;
- }
- if (!Cubing.openCube()) {
- return false;
- }
- transmute();
- delay(1000);
- portal = getUnit(2, "portal");
- if (portal) {
- do {
- switch (mode) {
- case 0:
- if ([133, 134, 135].indexOf(portal.objtype) > -1 && this.doneAreas.indexOf(portal.objtype) === -1) {
- return copyUnit(portal);
- }
- break;
- case 1:
- if (portal.objtype === 136) {
- return copyUnit(portal);
- }
- break;
- }
- } while (portal.getNext());
- }
- }
- return false;
- };
- // Performs a check before trying to kill to allow recovery mode
- // to continue on with the script
- this.recoverableKill = function (unit, recoveryMode = false) {
- if (getUnit(1, unit)) {
- Attack.kill(unit);
- return true;
- } else if (!recoveryMode) {
- // We are not in recovery mode and we didn't find the boss
- throw new Error(unit + " not found");
- } else {
- // No else needed, we will go back to town and then mark this area as cleared
- // but there was a Strict Warning from the compiler
- print(unit + " not found");
- return false;
- }
- }
- // Do mini ubers or Tristram based on area we're already in
- this.pandemoniumRun = function (recoveryMode = false) {
- var i, findLoc, skillBackup;
- switch (me.area) {
- case 133: // Matron's Den
- Precast.doPrecast(true);
- Pather.moveToPreset(133, 2, 397, 2, 2);
- // If Lilith is there and we have ED, go heal first
- // the minions may apply again, but if we caught on the way it should still help
- if (me.getState(9) && (getUnit(1, 707))) {
- D2Bot.printToConsole("We have ED! Getting Heals")
- // Get healing
- Town.initNPC("Heal", "heal");
- // move back to portal
- D2Bot.printToConsole("Going back for more")
- Town.move("portalspot");
- // Take portal 133, we just came from it
- D2Bot.printToConsole("Jumping in")
- Pather.usePortal(133);
- // Move to her again just to be sure
- Pather.moveToPreset(133, 2, 397, 2, 2);
- }
- this.recoverableKill(707, recoveryMode);
- Pickit.pickItems();
- Town.goToTown();
- break;
- case 134: // Forgotten Sands
- Precast.doPrecast(true);
- findLoc = [20196, 8694, 20308, 8588, 20187, 8639, 20100, 8550, 20103, 8688, 20144, 8709, 20263, 8811, 20247, 8665];
- for (i = 0; i < findLoc.length; i += 2) {
- Pather.moveTo(findLoc[i], findLoc[i + 1]);
- delay(500);
- if (getUnit(1, 708)) {
- break;
- }
- }
- this.recoverableKill(708, recoveryMode);
- Pickit.pickItems();
- Town.goToTown();
- break;
- case 135: // Furnace of Pain
- Precast.doPrecast(true);
- Pather.moveToPreset(135, 2, 397, 2, 2);
- this.recoverableKill(706, recoveryMode);
- Pickit.pickItems();
- Town.goToTown();
- break;
- case 136: // Tristram
- Pather.moveTo(25068, 5078);
- Precast.doPrecast(true);
- findLoc = [25040, 5101, 25040, 5166, 25122, 5170];
- for (i = 0; i < findLoc.length; i += 2) {
- Pather.moveTo(findLoc[i], findLoc[i + 1]);
- }
- var antiMephistoSpell = 0;
- if (Config.OrgTorch.UseSalvation && me.classid === 3 && me.getSkill(125, 1)) {
- antiMephistoSpell = 125;
- } else if (Config.OrgTorch.UseConviction && me.classid === 3 && me.getSkill(123, 1)) {
- antiMephistoSpell = 123;
- }
- Skill.setSkill(antiMephistoSpell, 0);
- this.lure(704);
- Pather.moveTo(25129, 5198);
- Skill.setSkill(antiMephistoSpell, 0);
- this.lure(704);
- if (!getUnit(1, 704)) {
- Pather.moveTo(25122, 5170);
- }
- if (antiMephistoSpell) {
- skillBackup = Config.AttackSkill[2];
- Config.AttackSkill[2] = antiMephistoSpell;
- Attack.init();
- }
- this.recoverableKill(704, recoveryMode);
- if (skillBackup && me.classid === 3 && me.getSkill(skillBackup, 1)) {
- Config.AttackSkill[2] = skillBackup;
- Attack.init();
- }
- Pather.moveTo(25162, 5141);
- // TODO: Change this to a loop to wait for baal. use 100ms loops
- delay(3250);
- if (!getUnit(1, 709)) {
- Pather.moveTo(25122, 5170);
- }
- this.recoverableKill(709, recoveryMode);
- if (!getUnit(1, 705)) {
- Pather.moveTo(25122, 5170);
- }
- this.recoverableKill(705, recoveryMode);
- Pickit.pickItems();
- this.checkTorch();
- break;
- }
- };
- this.juvCheck = function () {
- var i,
- needJuvs = 0,
- col = Town.checkColumns(Storage.BeltSize());
- for (i = 0; i < 4; i += 1) {
- if (Config.BeltColumn[i] === "rv") {
- needJuvs += col[i];
- }
- }
- // print("Need " + needJuvs + " juvs.");
- return needJuvs;
- };
- // Assumes we are in town. Moves to vendor, buys potions and drinks 1 at a time to save space
- // Parts copied from AutoSmurf
- this.vendorBuyAndDrink = function(vendorName, potionId, potionCount) {
- var i, vendor, vendorPotions, myPotions;
- Town.move(vendorName);
- print("Pre-buffing potion " + potionId + " x" + potionCount + " from " + vendorName);
- vendor = getUnit(1, vendorName);
- if (vendor) {
- //print("Starting trade");
- vendor.startTrade();
- // high ping delay
- delay(me.ping * 2);
- // print("finding drink");
- // Buy and drink Antidote potions
- vendorPotions = vendor.getItem(potionId);
- // high ping delay
- delay(me.ping * 2);
- for (i = 0 ; i < potionCount ; i += 1) {
- vendorPotions.buy();
- // print("buying drink");
- myPotions = me.findItems(potionId, -1, 3);
- if (myPotions.length) {
- // print("drinking drink");
- myPotions[0].interact();
- delay(me.ping * 2);
- }
- }
- me.cancel();
- }
- };
- // TODO: Improve this to use run time for configuration
- this.preBuffResistance = function(potionCount = 24) {
- this.vendorBuyAndDrink("malah", 514, potionCount);
- this.vendorBuyAndDrink("malah", 517, potionCount);
- this.PreBuffTick = getTickCount() + potionCount * 30000;
- return true;
- };
- this.needComponents = function() {
- var tkeys, hkeys, dkeys, brains, eyes, horns;
- tkeys = me.findItems("pk1", 0).length || 0;
- hkeys = me.findItems("pk2", 0).length || 0;
- dkeys = me.findItems("pk3", 0).length || 0;
- brains = me.findItems("mbr", 0).length || 0;
- eyes = me.findItems("bey", 0).length || 0;
- horns = me.findItems("dhn", 0).length || 0;
- if ((tkeys >= 3 && hkeys >= 3 && dkeys >= 3) ||
- (brains >= 1 && eyes >= 1 && horns >= 1)) {
- return false;
- } else {
- return true;
- }
- };
- this.getRecoverPortals = function() {
- var checkPortal, checkPortals;
- // Make sure we are in A5 by stash
- Town.goToTown(5);
- Town.move("stash");
- // Try to get a portal
- checkPortal = getUnit(2, "portal");
- checkPortals = [];
- if (checkPortal) {
- do {
- // Look for a pandemonium portal that is not in our list of done areas
- if ([133, 134, 135, 136].indexOf(checkPortal.objtype) > -1 && this.doneAreas.indexOf(checkPortal.objtype) === -1) {
- checkPortals.push(copyUnit(checkPortal));
- }
- } while (checkPortal.getNext());
- }
- if (checkPortals.length > 0) {
- // Sort the portals descending so we get Uber Tristram first if it's open
- checkPortals.sort(function(a,b) { return a.objtype <= b.objtype; });
- // If the first portal is uber tristram then drop the rest to avoid too many loops
- if (checkPortals[0].objtype == 136) {
- checkPortals = checkPortals.slice(0,1);
- }
- }
- return checkPortals;
- };
- this.recoverPortal = function(checkPortals) {
- var targetPortal;
- print("Attempting portal recovery");
- // Make sure we are in A5 by stash
- Town.goToTown(5);
- Town.move("stash");
- if (checkPortals.length > 0) {
- checkPortals.forEach((targetPortal) => {
- D2Bot.printToConsole("Recovering portal " + targetPortal.objtype);
- D2Bot.printToConsole("OrgTorch: Recovering portal " + targetPortal.objtype, 7);
- // We already did chores at the beginning of the script, so now we just need to pre-bufferDepth
- this.getFade();
- Town.move("stash");
- print("Done pre-buffing");
- Pather.usePortal(null, null, targetPortal);
- this.pandemoniumRun(true);
- this.doneAreas.push(targetPortal.objtype); // Don't count the area as done until we're complete
- });
- return true;
- } else {
- print("No portal to recover");
- return false;
- }
- };
- // Start
- var i, portal, recoverPortals, tkeys, hkeys, dkeys, neededKeys, brains, eyes, horns, timer, farmer, busy, busyTick,
- neededItems = {pk1: 0, pk2: 0, pk3: 0, rv: 0};
- // Do town chores and quit if MakeTorch is true and we have a torch.
- // This does not guarantee which act we are in
- print("Doing initial torch check");
- this.checkTorch();
- print("Done checking torch, moving on");
- if (me.diff == 2) {
- // we are in hell. let's see if there's any portals to recover
- var recoverPortals = this.getRecoverPortals();
- if (recoverPortals.length > 0) {
- this.preBuffResistance();
- // Try to recover an existing portal before running the check
- // TODO: Improve item check to count completed areas + remaining keysets
- while (this.recoverPortal(recoverPortals)) {
- // Run until all portals are checked
- }
- } else {
- print("No portals to recover");
- }
- }
- // Do an initial count so we can decide if we need to
- // do run, wait for keys, or close profile
- tkeys = me.findItems("pk1", 0).length || 0;
- hkeys = me.findItems("pk2", 0).length || 0;
- dkeys = me.findItems("pk3", 0).length || 0;
- // Get the number of needed keys
- neededItems = {pk1: 3 * Config.OrgTorch.WaitForKeys - tkeys, pk2: 3 * Config.OrgTorch.WaitForKeys - hkeys, pk3: 3 * Config.OrgTorch.WaitForKeys - dkeys, rv: this.juvCheck()};
- // We won't wait for keys until we don't have enough for a run
- if (this.needComponents() &&
- Config.OrgTorch.WaitForKeys) {
- // This means we don't have enough keys to do a run
- // but we are configured to wait for them
- // TODO: Make this a profile config to determine where to wait for keys
- if (me.diff == 2) {
- D2Bot.setProfile("qsd2", "forquinton", "rioteer", "Normal", "Asia", "", "B:\\D2_2\\Game.exe");
- D2Bot.restart(false);
- }
- D2Bot.printToConsole("Waiting for keys: " + neededItems.pk1 + "x T, " + neededItems.pk2 + "x H, " + neededItems.pk3 + "x D");
- timer = getTickCount();
- // Check if current character is the farmer
- farmer = TorchSystem.isFarmer();
- this.torchSystemEvent = function (mode, msg) {
- var obj, farmer;
- if (mode === 6) {
- farmer = TorchSystem.isFarmer();
- if (farmer) {
- obj = JSON.parse(msg);
- if (obj) {
- switch (obj.name) {
- case "gameCheck":
- if (busy) {
- break;
- }
- if (farmer.KeyFinderProfiles.indexOf(obj.profile) > -1) {
- print("Got game request from: " + obj.profile);
- sendCopyData(null, obj.profile, 6, JSON.stringify({name: "gameName", value: {gameName: me.gamename, password: me.gamepassword}}));
- busy = true;
- busyTick = getTickCount();
- }
- break;
- case "keyCheck":
- if (farmer.KeyFinderProfiles.indexOf(obj.profile) > -1) {
- print("Got key count request from: " + obj.profile);
- sendCopyData(null, obj.profile, 6, JSON.stringify({name: "neededItems", value: neededItems}));
- }
- break;
- }
- }
- }
- }
- };
- // Register event that will communicate with key hunters, go to Act 1 town and wait by stash
- addEventListener('copydata', this.torchSystemEvent);
- Town.goToTown(1);
- Town.move("stash");
- // clearing potions, need to optimize this
- Town.clearInventory();
- print("Starting to wait...");
- while (true) {
- // Abort if the current character is a farmer
- if (farmer) {
- break;
- }
- // Free up inventory
- if (Town.needStash()) {
- Town.stash();
- me.cancel();
- D2Bot.printToConsole("keys needed: " + neededItems.pk1 + "x T, " + neededItems.pk2 + "x H, " + neededItems.pk3 + "x D");
- }
- // Get the number keys
- tkeys = me.findItems("pk1", 0).length || 0;
- hkeys = me.findItems("pk2", 0).length || 0;
- dkeys = me.findItems("pk3", 0).length || 0;
- neededItems = {pk1: 3 * Config.OrgTorch.WaitForKeys - tkeys, pk2: 3 * Config.OrgTorch.WaitForKeys - hkeys, pk3: 3 * Config.OrgTorch.WaitForKeys - dkeys, rv: this.juvCheck()};
- // Stop the loop if we have enough keys or if wait time expired
- if (((neededItems.pk1 == 0 &&
- neededItems.pk2 == 0 &&
- neededItems.pk3 == 0) ||
- (Config.OrgTorch.WaitTimeout && (getTickCount() - timer > Config.OrgTorch.WaitTimeout * 1000 * 60))) && this.aloneInGame()) {
- removeEventListener('copydata', this.torchSystemEvent);
- break;
- }
- if (busy) {
- busyTick = getTickCount();
- while (getTickCount() - busyTick < 30000) {
- if (!this.aloneInGame()) {
- break;
- }
- delay(100);
- }
- if (getTickCount() - busyTick > 30000 || this.aloneInGame()) {
- busy = false;
- }
- }
- // Wait for other characters to leave
- while (!this.aloneInGame()) {
- delay(500);
- }
- delay(1000);
- // Pick the keys after the hunters drop them and leave the game
- Pickit.pickItems();
- }
- print("Done waiting...");
- }
- D2Bot.printToConsole("Finished with keys needed: " + neededItems.pk1 + "x T, " + neededItems.pk2 + "x H, " + neededItems.pk3 + "x D");
- // We are about to start our run script. Make sure we are in hell
- if (me.diff < 2) {
- D2Bot.printToConsole("OrgTorch: Ready to run, but we're not in Hell. Changing profile and returning");
- D2Bot.setProfile("qsd2", "forquinton", "rioteer", "Hell", "Asia", "", "B:\\D2_2\\Game.exe");
- D2Bot.restart(false);
- return true;
- }
- // Count keys and organs
- tkeys = me.findItems("pk1", 0).length || 0;
- hkeys = me.findItems("pk2", 0).length || 0;
- dkeys = me.findItems("pk3", 0).length || 0;
- brains = me.findItems("mbr", 0).length || 0;
- eyes = me.findItems("bey", 0).length || 0;
- horns = me.findItems("dhn", 0).length || 0;
- // We only need as many keys as unopened red portals
- // We assume we have recovered all portals or have the organs already
- neededKeys = 3 - this.doneAreas.length;
- // End the script if we don't have enough keys nor organs
- if ((tkeys < neededKeys || hkeys < neededKeys || dkeys < neededKeys) && (brains < 1 || eyes < 1 || horns < 1)) {
- D2Bot.printToConsole("Not enough keys or organs. Stopping Profile");
- D2Bot.stop();
- return true;
- }
- Config.UseMerc = false;
- // Todo - optimize this to only re-buff if we waited for keys
- this.preBuffResistance();
- // We have enough keys, do mini ubers
- if (tkeys >= neededKeys && hkeys >= neededKeys && dkeys >= neededKeys) {
- this.getFade(75000); // We need at least 75 seconds for the mini bosses
- print("Making organs.");
- D2Bot.printToConsole("OrgTorch: Making organs.", 7);
- for (i = 0; i < neededKeys; i += 1) {
- // Abort if we have a complete set of organs
- // If Config.OrgTorch.MakeTorch is false, check after at least one portal is made
- if ((Config.OrgTorch.MakeTorch || i > 0) && this.completeSetCheck()) {
- break;
- }
- portal = this.openPortal(0);
- if (portal) {
- Pather.usePortal(null, null, portal);
- }
- this.pandemoniumRun();
- this.doneAreas.push(portal.objtype); // Don't count the area as done until we're complete
- }
- }
- // Don't make torches if not configured to OR if the char already has one
- if (!Config.OrgTorch.MakeTorch || this.checkTorch()) {
- return true;
- }
- // Count organs
- brains = me.findItems("mbr", 0).length || 0;
- eyes = me.findItems("bey", 0).length || 0;
- horns = me.findItems("dhn", 0).length || 0;
- // We have enough organs, do Tristram
- if (brains && eyes && horns) {
- this.getFade(95000);
- print("Making torch");
- D2Bot.printToConsole("OrgTorch: Making torch.", 7);
- portal = this.openPortal(1);
- if (portal) {
- Pather.usePortal(null, null, portal);
- }
- this.pandemoniumRun();
- }
- D2Bot.printToConsole("Full Finish gold: " + me.gold);
- if (this.needComponents()) {
- D2Bot.setProfile("qsd2", "forquinton", "rioteer", "Normal", "West", "", "B:\\D2_1\\Game5.exe");
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement