Register for your free account! | Forgot your password?

Go Back   elitepvpers > Other Online Games > Diablo 2 > Diablo 2 Programming
You last visited: Today at 03:59

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



trying to get auto bo to work

Discussion on trying to get auto bo to work within the Diablo 2 Programming forum part of the Diablo 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2013
Posts: 39
Received Thanks: 0
trying to get auto bo to work



if I remove this stuff
Code:
							//	get BO-skill-lvl
	if (Config.BOSwitch) Precast.weaponSwitch(Config.BOSwitch);
	var BODur = (20 + me.getSkill(149, 1) * 10 + (me.getSkill(138, 0) + me.getSkill(155, 0)) * 5);
	if (me.getSkill(155, 0)) BODur = BODur + 10;
	if (debug) say(" This Barbs compl. BO time  --> " + BODur + " secs.");
	if (Config.BOSwitch) Precast.weaponSwitch(Math.abs(Config.BOSwitch - 1));

	var command, hostile, nick, execComms, execCommand, tick, act, myact, checkall, gameStart, requestedWPs = -1,
		BoTime = BODur*1000,	//  <<<---  set total BoTime of u're BoBab in secs*1000 here !!!
		selfBoTime = BoTime/2,		// time between self-BO-intervalls while waiting in catacombs2 act1 .. based on BoTime
		minBOreqTime = BoTime/5,		// time between BO requests .. based on BoTime
		minWPchainTime = BoTime/5,	// time between wp calls for a complete act .. based on BoTime
		maxWPchainreq = 5,			// max requests for all wps of one act per player..  every1 gets 1 compl. chance  HAHA
		minGameTime = 240000,		// min gametime before the ng command will work..  in secs*1000
		minTimeXwp = BoTime/10,		// time between single WP calls per player .. based on BoTime
		shitList = [],
		guestNicks = {},
		greet = [],
		reqWpList = [],
I then get errors on the "nick" part of the code
gtoilet is offline  
Old 01/23/2015, 10:23   #2
 
elite*gold: 0
Join Date: Dec 2013
Posts: 39
Received Thanks: 0
still trying to work it out on my own now
it DID go and bo once at cata 2

the guestnicks is not a function is what im stuck on

I changed
[unit.name]
to
(unit.name)
which helped a lot of the errors
gtoilet is offline  
Old 01/26/2015, 02:08   #3
 
elite*gold: 0
Join Date: Dec 2013
Posts: 39
Received Thanks: 0
ive taken some things out that were not needed like the wp giving and the cow making , since the chanter can do that and still get there errors


Code:
// Barbarian config file

/* Brief instructions:
 * Notepad++ is HIGHLY recommended to use for editing these files. Visit http://notepad-plus-plus.org/
 * To comment out something, put // in front of that line
 * !!!Never comment out something you're not sure about, set it to false or disable as noted in description if you don't want to use it.
 * true and false are case sensitive. Good: Config.SomeVar = true; Bad: Config.SomeVar = True;
 */

function LoadConfig() {

	// Battle orders script - Use this for 2+ characters (for example BO barb + sorc)
	//Scripts.BattleOrders = true;
		Config.BattleOrders.Mode = 0; // 0 = give BO, 1 = get BO
		Config.BattleOrders.Wait = true; // Idle until the player that received BO leaves.
		Config.BattleOrders.Getters = ["gtoiletz"]; // List of players to wait for before casting Battle Orders (mode 0). All players must be in the same area as the BOer.
Scripts.autoBO = true;
Config.autoBO.Triggers = ["BOtime"]
		Config.BOtime = true;

	//Config.Leader = "des_nuts"; // Leader's ingame character name. Leave blank to try auto-detection (works in AutoBaal, Wakka, MFHelper)
	Config.QuitList = ["gtoiletz"]; // List of character names to quit with. Example: Config.QuitList = ["MySorc", "MyDin"];

	Scripts.DiabloHelper = false; // Chaos helper, kills monsters and doesn't open seals on its own.
		Config.DiabloHelper.Wait = 120; // Seconds to wait for a runner to be in Chaos
		Config.DiabloHelper.Entrance = true; // Start from entrance

		Scripts.ShopBot = false; // Fast waypoint-based shopbot
		Config.ShopBot.ShopNPC = "ormus"; // Supported NPCs: Fara, Ormus, Anya, Elzix
		// Scan only selected classids for maximum speed. See libs/config/templates/ShopBot.txt
		Config.ShopBot.ScanIDs = [17 , 16 , 15 , 108 , 109 , 115 , 63 , 64 , 65 , 66 , 67 , 29 , 4];

	// Town settings
	Config.HealHP = 50; // Go to a healer if under designated percent of life.
	Config.HealMP = 0; // Go to a healer if under designated percent of mana.
	Config.HealStatus = false; // Go to a healer if poisoned or cursed
	Config.UseMerc = true; // Use merc. This is ignored and always false in d2classic.
	Config.MercWatch = false; // Instant merc revive during battle.

	// Potion settings
	Config.UseHP = 75; // Drink a healing potion if life is under designated percent.
	Config.UseRejuvHP = 40;  // Drink a rejuvenation potion if life is under designated percent.
	Config.UseMP = 30; // Drink a mana potion if mana is under designated percent.
	Config.UseRejuvMP = 0; // Drink a rejuvenation potion if mana is under designated percent.
	Config.RejuvBuffer = 0; // Number of rejuvenation potions to keep in inventory.

	// Chicken settings
	Config.LifeChicken = 40; // Exit game if life is less or equal to designated percent.
	Config.ManaChicken = 0; // Exit game if mana is less or equal to designated percent.
	Config.MercChicken = 0; // Exit game if merc's life is less or equal to designated percent.
	Config.TownHP = 0; // Go to town if life is under designated percent.
	Config.TownMP = 0; // Go to town if mana is under designated percent.

	/* Inventory lock configuration. !!!READ CAREFULLY!!!
	 * 0 = item is locked and won't be moved. If item occupies more than one slot, ALL of those slots must be set to 0 to lock it in place.
	 * Put 0s where your torch, annihilus and everything else you want to KEEP is.
	 * 1 = item is unlocked and will be dropped, stashed or sold.
	 * If you don't change the default values, the bot won't stash items.
	 */
	Config.Inventory[0] = [0,0,0,0,0,0,0,0,0,0];
	Config.Inventory[1] = [0,0,0,0,0,0,0,0,0,0];
	Config.Inventory[2] = [0,0,0,0,0,0,0,0,0,0];
	Config.Inventory[3] = [0,0,0,0,0,0,0,0,0,0];

	Config.StashGold = 100000; // Minimum amount of gold to stash.

	/* Potion types for belt columns from left to right.
	 * Rejuvenation potions must always be rightmost.
	 * Supported potions - Healing ("hp"), Mana ("mp") and Rejuvenation ("rv")
	 */
	Config.BeltColumn[0] = "hp";
	Config.BeltColumn[1] = "mp";
	Config.BeltColumn[2] = "rv";
	Config.BeltColumn[3] = "rv";

	/* Minimum amount of potions. If we have less, go to vendor to purchase more.
	 * Set rejuvenation columns to 0, because they can't be bought.
	 */
	Config.MinColumn[0] = 3;
	Config.MinColumn[1] = 3;
	Config.MinColumn[2] = 0;
	Config.MinColumn[3] = 0;



	// Public game options

	// If Config.Leader is set, the bot will only accept invites from leader. If Config.PublicMode is not 0, Baal and Diablo script will open Town Portals.
	Config.PublicMode = 2; // 1 = invite and accept, 2 = accept only, 3 = invite only, 0 = disable

	// General config
	Config.LastMessage = ""; // Message or array of messages to say at the end of the run. Use $nextgame to say next game - "Next game: $nextgame" (works with lead entry point)
	Config.MinGameTime = 60; // Min game time in seconds. Bot will TP to town and stay in game if the run is completed before.
	Config.MaxGameTime = 600; // Maximum game time in seconds. Quit game when limit is reached.
	Config.TeleSwitch = false; // Switch to slot II when teleporting more than 1 node.
	Config.OpenChests = false; // Open chests. Controls key buying.
	Config.MiniShopBot = true; // Scan items in NPC shops.
	Config.PacketShopping = false; // Use packets to shop. Imporves shopping speed.
	Config.TownCheck = false; // Go to town if out of potions
	Config.LogExperience = false; // Print experience statistics in the manager.
	Config.PingQuit = [{Ping: 0, Duration: 0}]; // Quit if ping is over the given value for over the given time period in seconds.

	// Shrine Scanner - scan for shrines while moving.
	// Put the shrine types in order of priority (from highest to lowest). For a list of types, see sdk/shrines.txt
	Config.ScanShrines = [];

	// Anti-hostile config
	Config.AntiHostile = false; // Enable anti-hostile
	Config.HostileAction = 0; // 0 - quit immediately, 1 - quit when hostile player is sighted, 2 - attack hostile
	Config.TownOnHostile = false; // Go to town instead of quitting when HostileAction is 0 or 1
	Config.RandomPrecast = false; // Anti-PK measure, only supported in Baal and BaalHelper and BaalAssisstant at the moment.
	Config.ViperCheck = false; // Quit if revived Tomb Vipers are sighted

	// DClone config
	Config.StopOnDClone = true; // Go to town and idle as soon as Diablo walks the Earth
	Config.SoJWaitTime = 5; // Time in minutes to wait for another SoJ sale before leaving game. 0 = disabled
	Config.KillDclone = false; // Go to Palace Cellar 3 and try to kill Diablo Clone. Pointless if you already have Annihilus.
	Config.DCloneQuit = false; // 1 = quit when Diablo walks, 2 = quit on soj sales, 0 = disabled

	// Monster skip config
	// Skip immune monsters. Possible options: "fire", "cold", "lightning", "poison", "physical", "magic".
	// You can combine multiple resists with "and", for example - "fire and cold", "physical and cold and poison"
	Config.SkipImmune = [];
	// Skip enchanted monsters. Possible options: "extra strong", "extra fast", "cursed", "magic resistant", "fire enchanted", "lightning enchanted", "cold enchanted", "mana burn", "teleportation", "spectral hit", "stone skin", "multiple shots".
	// You can combine multiple enchantments with "and", for example - "cursed and extra fast", "mana burn and extra strong and lightning enchanted"
	Config.SkipEnchant = [];
	// Skip monsters with auras. Possible options: "fanaticism", "might", "holy fire", "blessed aim", "holy freeze", "holy shock". Conviction is bugged, don't use it.
	Config.SkipAura = [];

	/* Attack config
	 * To disable an attack, set it to -1
	 * Skills MUST be POSITIVE numbers. For reference see http://pastebin.com/baShRwWM
	 */
	Config.AttackSkill[0] = 0; // Preattack skill.
	Config.AttackSkill[1] = 0; // Primary skill for bosses.
	Config.AttackSkill[2] = 0; // Backup/Immune skill for bosses.
	Config.AttackSkill[3] = 0; // Primary skill for others.
	Config.AttackSkill[4] = 0; // Backup/Immune skill for others.

	// Low mana skills - these will be used if main skills can't be cast.
	Config.LowManaSkill[0] = -1; // Low mana skill.


	Config.BossPriority = false; // Set to true to attack Unique/SuperUnique monsters first when clearing
	Config.ClearType = 0xF; // Monster spectype to kill in level clear scripts (ie. Mausoleum). 0xF = skip normal, 0x7 = champions/bosses, 0 = all

	// Wereform setup. Make sure you read Templates/Attacks.txt for attack skill format.
	Config.Wereform = false; // 0 / false - don't shapeshift, 1 / "Werewolf" - change to werewolf, 2 / "Werebear" - change to werebear

	// Class specific config
	Config.BOSwitch = 0; // Precast weapon slot - 0 = slot I, 1 = slot II
	Config.FindItem = false; // Use Find Item skill on corpses after clearing.
	Config.FindItemSwitch = 0; // Find Item weapon slot - 0 = slot I, 1 = slot II

}

the script ive modded so far
Code:
/**
*   @filename   autoBO.js
*   @author      kolton ripped off by Boo
*   @desc      Bo other players on command
*/

function autoBO() {
                     //   get BO-skill-lvl
   var debug = true;
   if (Config.BOSwitch) Precast.weaponSwitch(Config.BOSwitch);
   var BODur = (20 + me.getSkill(149, 1) * 10 + (me.getSkill(138, 0) + me.getSkill(155, 0)) * 5);
   if (me.getSkill(155, 0)) BODur = BODur + 10;
   if (debug) say(" This Barbs BO time  --> " + BODur + " secs.");
   if (Config.BOSwitch) Precast.weaponSwitch(Math.abs(Config.BOSwitch - 1));

   var command, hostile, nick, execComms, execCommand, tick, act, myact, checkall, gameStart, requestedWPs = -1,
      BoTime = BODur*1000,   //  <<<---  set total BoTime of u're BoBab in secs*1000 here !!!
      selfBoTime = BoTime/2,      // time between self-BO-intervalls while waiting in catacombs2 act1 .. based on BoTime
      minBOreqTime = BoTime/3,      // time between BO requests .. based on BoTime
      minTimeXwp = BoTime/10,      // time between single WP calls per player .. based on BoTime
      shitList = [],
      guestNicks = [],
      greet = [],
      wpsact1List = [3, 4, 5, 6, 27, 29, 32, 35],
      wpsact2List = [48, 42, 57, 43, 44, 52, 74, 46],
      wpsact3List = [76, 77, 78, 79, 80, 81, 83, 101],
      wpsact4List = [106, 107];

   this.initGuestNick = function (nick) {
      guestNicks[nick] = {botimer: -1, warned: false, silent: false, depleted: false, wpstimer: 0, wpxtimer: 0, requests: 0};
   };

   this.checkHostiles = function () {
      var rval = false,
         party = getParty();
         
      myact = this.getPlayerAct(me.charname);

      if (party) {
         do {
            if (party.name != me.name && getPlayerFlag(me.gid, party.gid, 8)) {
               rval = true;
               if (!me.inTown) {
                  Town.goToTown(myact);
                  say("Hostile spotted..  go to town..");
                  Town.doChores();
                  // Town.move("portalspot");
               }
               if (Config.ShitList && shitList.indexOf(party.name) == -1) {
                  shitList.push(party.name);
               }
            }
         } while (party.getNext());
      }
      
      return rval;
   };

   this.aBO = function () {
      if (me.area !== 35) {
         try {
            Pather.useWaypoint(35, true); // catacombs
         } catch (wperror) {
         showConsole();
         print("ÿc1Failed to take waypoint.");
         quit();
         }
         Pather.moveTo(me.x + 6, me.y + 6);
         Precast.doPrecast(true);
         guestNicks[me.name].botimer = getTickCount();
      } else {
         if (guestNicks[me.name].botimer >= 0 && getTickCount() - guestNicks[me.name].botimer >= selfBoTime) {
            Precast.doPrecast(true);
            guestNicks[me.name].botimer = getTickCount();
         }
      }
      
      // beep()
      var unit, allunits,
      justBOed = [];

      // Player
      unit = getUnit(0);

      if (unit) {
         do {
            
            if (unit.name != me.name && !unit.dead && shitList.indexOf(unit.name) == -1 && Misc.inMyParty(unit.name) &&  getTickCount() - guestNicks[(unit.name)].botimer >= 60000 && getDistance(me, unit) <= 40) {
               if (debug && guestNicks[unit.name].botimer == -1) Misc.spy(unit.name);
               if (debug) say(" (in aBo).. player bo-request-loop just b4 precasting");      
               Precast.doPrecast(true);
               guestNicks[unit.name].botimer = getTickCount();
               guestNicks[unit.name].warned = false;
               guestNicks[unit.name].depleted = false;
               delay(500);
               justBOed.push(unit.name);
               
               allunits = getUnit(0);
               do {
                  if (allunits.name != me.name && !allunits.dead && shitList.indexOf(allunits.name) == -1 && Misc.inMyParty(allunits.name) && getDistance(me, allunits) <= 40) {
                     if (debug) say(" (in aBo).. player-bo-check-loop.. " + (allunits.name) + " was just BO'ed..");      
                     guestNicks[allunits.name].botimer = getTickCount();               
                     guestNicks[allunits.name].warned = false;
                     guestNicks[allunits.name].depleted = false;
                     justBOed.push(allunits.name);
                  }
               } while (allunits.getNext());
            }
         } while (unit.getNext());
      }

      // Minion
      unit = getUnit(1);

      if (unit) {
         do {
            if (unit.getParent() && justBOed.indexOf(unit.getParent().name) > -1 && !unit.getState(32) && getDistance(me, unit) <= 40) {
               if (debug) say(" (in aBo).. minion bo-request-loop just b4 precasting");      
               Precast.doPrecast(true);
               if (debug) say(" (in aBo).. minion of " + (unit.getParent().name) + " just BO'ed..");      
               delay(500);
            }
         } while (unit.getNext());
      }

      return true;
   };

   this.getBoNick = function (nick) {
      if (guestNicks.hasOwnProperty(nick)) {
      
         if (getTickCount() - guestNicks[nick].botimer < minBOreqTime) {
            return "mintime";
         }

         return true;
      }

      return false;
   };

   this.getPlayerAct = function (name) {
      var unit = getParty();

      if (unit) {
         do {
            if (unit.name == name) {
               if (unit.area <= 39) {
                  return 1;
               }

               if (unit.area >= 40 && unit.area <= 74) {
                  return 2;
               }

               if (unit.area >= 75 && unit.area <= 102) {
                  return 3;
               }

               if (unit.area >= 103 && unit.area <= 108) {
                  return 4;
               }

               return 5;
            }
         } while (unit.getNext());
      }

      return false;
   };

   this.BO = function (nick) {

      if (!Misc.inMyParty(nick)) {
         say("/w " + nick + " You have to accept my party invite first, noob!");
         return false;
      }
      
      switch (this.getBoNick(nick)) {
      case "mintime":
         say("/w " + nick + " ... you may request BO every " + parseInt((minBOreqTime/1000)) + " seconds. .. " + parseInt((minBOreqTime-(getTickCount() - guestNicks[nick].botimer))/1000) + " to wait");

         return false;
      case false:
         break;
      }
      
      act = this.getPlayerAct(nick);
      checkall = getParty();
      if (checkall) {
         do {
            if (checkall.name == nick) {
               if (checkall.area == 39) {
                  say("/w " + nick + " .. I will not come into Cow-lvl..  ..pls come to me @ Catacombs 2.");
               return false;                  
               }
            }
         } while (checkall.getNext());
      }

      hostile = this.checkHostiles();
      do {
         if (hostile) {
            say("Command disabled because of hostiles.");
         break;
         }
      } while (hostile);
         
      say("/w " + nick + " On my way..");
      say("/w " + nick + " ..make sure u have a TP open near your position!");
      Town.goToTown(act);
      Town.doChores();
      Town.move("portalspot");
            
      for (i = 5; i > 0; i -= 1) {
      
         hostile = this.checkHostiles();            
         if (hostile) {
            say("Command aborted because of hostiles.");
         break;
         }         

         var i,
         portal = Pather.getPortal("", nick);

         if (portal) {
            Pather.usePortal(null, null, portal);
            break;
         } else {
            say("/w " + nick + " ..waiting for your TP.. " + i );
            delay(1000);
         }
         
         delay(500);
      }

      if (!portal) {
         say("/w " + nick + " BO-requester-portal not found! aborted..");
         return false;
      }
      
      var unit = getUnit(0, nick);

      if (!unit || getDistance(me, unit) > 40) {
         say("/w " + nick + " You are too far away from your portal.");
         Town.goToTown(act);
         return false;
      }

      if (unit) {
            if (debug && guestNicks[unit.name].botimer == -1) Misc.spy(unit.name);
            Precast.doPrecast(true);
               var allunits = getUnit(0);
               do {
                  if (!allunits.dead && shitList.indexOf(allunits.name) == -1 && Misc.inMyParty(allunits.name) && getDistance(me, allunits) <= 40) {
                     if (debug) say(" (in BO).. bo-check-loop.. " + (allunits.name) + " was just BO'ed ..");      
                     guestNicks[allunits.name].botimer = getTickCount();
                     guestNicks[allunits.name].warned = false;
                     guestNicks[allunits.name].depleted = false;
                  }
                  this.checkHostiles();            
                  if (hostile) {
                     say("Command aborted because of hostiles.");
                  break;
                  }         
               } while (allunits.getNext());               
            delay(500);
            Town.goToTown(act);
      }

      return true;
   };

   this.getLeg = function () {
      var i, portal, wirt, leg, gid, wrongLeg;

      if (me.getItem(88)) {
         return me.getItem(88);
      }

      leg = getUnit(4, 88);

      if (leg) {
         do {
            if (leg.name.indexOf("ÿc1") > -1) {
               wrongLeg = true;
            } else { // For idiots trying to give leg from another difficulty
               gid = leg.gid;
               
               Pickit.pickItem(leg);

               return me.getItem(-1, -1, gid);
            }
         } while (leg.getNext());
      }
      say("Bring the leg " + (wrongLeg ? "from this difficulty" : "") + " to me.");
      return false;
   };
   
   this.getTome = function () {
      var tome,
         myTome = me.findItem("tbk", 0, 3),
         akara = Town.initNPC("Shop");

      tome = me.getItem("tbk");

      if (tome) {
         do {
            if (!myTome || tome.gid !== myTome.gid) {
               return copyUnit(tome);
            }
         } while (tome.getNext());
      }

      if (!akara) {
         throw new Error("Failed to buy tome");
      }

      tome = akara.getItem("tbk");

      if (tome.buy()) {
         tome = me.getItem("tbk");

         if (tome) {
            do {
               if (!myTome || tome.gid !== myTome.gid) {
                  return copyUnit(tome);
               }
            } while (tome.getNext());
         }
      }

      return false;
   };

   this.openPortal = function (nick) {
      if (!Misc.inMyParty(nick)) {
         say("Accept party invite, noob!");

         return true;
      }

      if (Pather.getPortal(39)) {
         say("Cow portal already open.");

         return true;
      }

      if (me.getQuest(4, 10)) { // king dead or cain not saved
         say("Can't open the portal because I killed Cow King.");

         return false;
      }

      switch (me.gametype) {
      case 0: // classic
         if (!me.getQuest(26, 0)) { // diablo not completed
            say("I don't have Diablo quest.");

            return false;
         }

         break;
      case 1: // expansion
         if (!me.getQuest(40, 0)) { // baal not completed
            say("I don't have Baal quest.");

            return false;
         }

         break;
      }

      var i, leg, tome;

      leg = this.getLeg();

      if (!leg) {
         return false;
      }
      if (!me.inTown) {
         Town.goToTown(1);
      }
      tome = this.getTome();

      if (!tome) {
         return false;
      }

      if (!Town.openStash() || !Cubing.emptyCube() || !Storage.Cube.MoveTo(leg) || !Storage.Cube.MoveTo(tome) || !Cubing.openCube()) {
         return false;
      }

      transmute();
      delay(500);

      for (i = 0; i < 10; i += 1) {
         if (Pather.getPortal(39)) {
            return true;
         }

         delay(200);
      }

      say("Failed to open cow portal.");

      return false;
   };

   this.execComms = function (cmd) {

      execCommand = cmd[0];
      nick = cmd[1];
      
      // hidden and testing command
      if (debug) {
         if (execCommand == "I apologise!") {         // after gettin shitlisted u can apologise for this one game  HAHA
            if (shitList.indexOf(nick) > -1) {
               say("/w " + nick + " hmmmm...");
               say("/w " + nick + " OK, apology accepted.");               
               shitList.pop(nick);                  // delete from local (!!!) shitlist, only!
               this.initGuestNick(nick);
               var sinner = getParty();            // invite sinner into party, again
               if (sinner) {
                  do {
                     if (sinner.name == nick) {
                        if (sinner.partyflag !== 4 && (Config.PublicMode === 1 || sinner.partyflag !== 2) && sinner.partyid === 65535) {
                           clickParty(sinner, 2);
                           delay(100);
                        }
                     }
                  } while (sinner.getNext());
               }   
            }
         }
      }
                                       
      execCommand = execCommand.toLowerCase()         // from here on testing is not case sensitive anymore
         

      // so far 'featured' commands  ..  eg listed in config and help
                        
      switch (execCommand) {
      
      case "help":
         this.checkHostiles();

         if (shitList.indexOf(nick) > -1) {
            say("No help for the shitlisted.");
            break;
         }
            
         guestNicks[nick].silent = true;

         say("/w " + nick + " Commands:");
         if (Config.autoBO.BOonDemand) {
            say("/w " + nick + " 'BO on Demand' is ON !!");
         }
               //  give help on listed features in config ..  if in conf replaced with "" ..  no help will be displayed
         say(Config.autoBO.Triggers[1] ? "/w " + nick + " >> ask 4 BO-status ::  " + Config.autoBO.Triggers[5] + "  .. will tell you the remaining time you're BO'ed in seconds." : "" );
         say(Config.autoBO.Triggers[2] ? "/w " + nick + " >> silent mode ::  " + Config.autoBO.Triggers[6] + "  ..stop the warning messages when your BO is off." : "" );
                        
         break;

            
         
            //  >>>  'BOtime' command  (trigger 6 in config-list)
      case Config.autoBO.Triggers[1]:               // ask for BO status
         this.checkHostiles();
         if (shitList.indexOf(nick) > -1) {
            say("No BOtime command for the shitlisted.");
            break;
         }
         if (guestNicks[nick].depleted == true || guestNicks[nick].botimer <= 0) {
            say("/w " + nick + " ..seems you're in need to get BO'ed.  ;) ");               
         } else {
            say("/w " + nick + " ..remaining BO'ed time :  ..approx.  " + parseInt(((BoTime - (getTickCount() - guestNicks[nick].botimer))/1000)) + "  seconds.");
         }            
         break;
         
         
            //  >>>    stop BO-expire msgs from bot (trigger 7 'shutup')
      case Config.autoBO.Triggers[2]:            // ask for no warning messages
         this.checkHostiles();
         if (shitList.indexOf(nick) > -1) {
            say("No silent command for the shitlisted.");
            break;
         }
         say("/w " + nick + " I will not give any further warning messages unless you talk to me again via 'help'.");               
         guestNicks[nick].silent = true;
         break;
      }

      
               //  >>> request single WP out of the act 'guest' is just in..  eg.:  wpx4 to request 4th WP  ( 0 is town ) <<<
      var strXwp = execCommand.substring(0, 3)
      switch (strXwp) {      // ask for single WP in actual act
      case Config.autoBO.Triggers[3]:
      if (debug) say(" in execComms case wpx ");                     
      hostile = this.checkHostiles();

         if (shitList.indexOf(nick) > -1) {
            say("No waypoints for the shitlisted.");

            break;
         }

         if (hostile) {
            say("Command disabled because of hostiles.");

            break;
         }
         requestedWPs = parseInt(execCommand.substring(3,4));
         if (!requestedWPs) {
            say("/w " + nick + " .. that is for sure no valid WP ..  aborted! ");
            
            break;
         }   
         if (debug) say(" (in execComms case wpx)..requested wp: " + requestedWPs);      
         this.giveWps(nick, requestedWPs);

         break;
      }      
   };

   this.getWpNick = function (nick, requestedWPs) {
      if (guestNicks.hasOwnProperty(nick)) {
         if (requestedWPs == 0 && guestNicks[nick].requests > maxWPchainreq) {
            return "maxrequests";
         }

         if (requestedWPs == 0 && getTickCount() - guestNicks[nick].wpstimer < minWPchainTime) {
            return "mintime";
         }

         if (requestedWPs != 0 && getTickCount() - guestNicks[nick].wpxtimer < minTimeXwp) {
            return "mintime";
         }

         return true;
      }

      return false;
   };

   this.giveWps = function (nick, requestedWPs) {
      if (!Misc.inMyParty(nick)) {
         say("/w " + nick + " ..You have to accept my party invite first, noob!");

         return false;
      }

      var i, timeout;

      switch (this.getWpNick(nick, requestedWPs)) {
      case "mintime":
         if (requestedWPs == 0) {
            say("/w " + nick + " ..You may request waypoints every " + parseInt((minWPchainTime/1000)) + " seconds.  .. " + parseInt((minWPchainTime-(getTickCount() - guestNicks[nick].wpstimer))/1000) + " to wait");
            return false;
         }   
         if (requestedWPs != 0) {
            say("/w " + nick + " ..You may request single waypoints every " + parseInt((minTimeXwp/1000)) + " seconds.  .. " + parseInt((minTimeXwp-(getTickCount() - guestNicks[nick].wpxtimer))/1000) + " to wait");
            return false;
         }
         return false;
      case "maxrequests":
         if (requestedWPs == 0) {
            say("/w " + nick + " ..You have reached the maxRequests limit.  You should have all WPs already..");
            return false;
         }   
         return false;
      case false:
         break;
      }

      act = this.getPlayerAct(nick);

      switch (act) {
      case 1:
         var reqWpList = wpsact1List.slice(0);

         break;
      case 2:
         var reqWpList = wpsact2List.slice(0);

         break;
      case 3:
         var reqWpList = wpsact3List.slice(0);

         break;
      case 4:
         var reqWpList = wpsact4List.slice(0);

         break;
      case 5:
         var reqWpList = wpsact5List.slice(0);

         break;
      }
      
      if(requestedWPs != 0) {
         reqWpList[0] = reqWpList[(requestedWPs - 1)];
      }

      if(requestedWPs == 0) {
         say(" ..going to give all WPs of act " + act + " ..  be prepaired!");      
      }
      
      if (debug) {
         say(" (in givewps)..requested wps: " + requestedWPs);      
         say(" ..act: " + act + " ..wpList: ");      

         if(requestedWPs != 0) {
            say(reqWpList[0]);
         } else {
            for (i = 0; i < reqWpList.length; i += 1) {
               say(reqWpList[i]);
            }
         }
      }

      if(requestedWPs == 0 && act == 5 && !Config.autoBO.giveNihlaWP) say("/w " + nick + " ..I will not give Nihla-WP.. ..srry");
      
MainLoop:      
      for (i = 0; i < reqWpList.length; i += 1) {
         if (this.checkHostiles()) {
            break;
         }
         
         if(requestedWPs != 0 && requestedWPs > reqWpList.length) {
            say("/w " + nick + " ..cant find such a WP in my list for act " + act + " ");
            say("/w " + nick + " .. have " + reqWpList.length + " WPs in my list for act " + act + " .");
            if (act == 5 && !Config.autoBO.giveNihlaWP) say("/w " + nick + " ..I will not give Nihla-WP.. ..so the last 3 WPs in act5 are 'wrong' numbered as 5, 6 and 7");
            return false;
         }
         
         if(requestedWPs != 0 && act == 5 && !Config.autoBO.giveNihlaWP && requestedWPs > 4 && requestedWPs <= reqWpList.length) say("/w " + nick + " ..I will not give Nihla-WP.. ..so the last 3 WPs in act5 are 'wrong' numbered as 5, 6 and 7");

         try {
            Pather.useWaypoint(reqWpList[i], true);
            Pather.makePortal();
            say(getArea().name + " TP up");

            if(requestedWPs != 0) {
               break;
            }
            
            for (timeout = 0; timeout < 20; timeout += 1) {
               if (getUnit(0, nick)) {
                  break;
               }
               delay(1000);
               if (this.checkHostiles()) {
                  break;
               }
            }

            if (timeout >= 20) {
               say("Aborting wp giving.");

               break MainLoop;
            }

            delay(5000);
         } catch (error) {

         }
      }

      Town.goToTown(1);
      Town.doChores();
      //Town.move("portalspot");

      guestNicks[nick].requests += 1;
      if(requestedWPs == 0) {
         guestNicks[nick].wpstimer = getTickCount();
      } else {
         guestNicks[nick].wpxtimer = getTickCount();      
      }
      return true;
   };
   
   function ChatEvent(nick, msg) {
      command = [msg, nick];
   };

   function GreetEvent(mode, param1, param2, name1, name2) {
      switch (mode) {
      case 0x02:
         greet.push(name1);
         break;
      }
   };

   if (Config.ShitList) {               // start main-prog
      shitList = ShitList.read();
   }

   addEventListener("chatmsg", ChatEvent);   
   addEventListener("gameevent", GreetEvent);
   Town.goToTown(1);
   Town.doChores();
   gameStart = getTickCount();

   this.initGuestNick(me.name);

   while (true) {         //   start mainloop  <<<
      while (greet.length > 0) {
         nick  = greet.shift();
            

         if (nick != me.name && shitList.indexOf(nick) == -1) {
            say("Welcome, " + nick + "! For a list of commands say 'help'");
            this.initGuestNick(nick);
         }
      }

      hostile = this.checkHostiles()
      if (!hostile) {
         this.aBO();      //  >>  exec the normal 'main' autoBo function..  boba goes catacombs2 act1 and waits there
      }   

      if(command) {
         this.execComms(command);
      }
      
      //  >> all chat commands processed, or even no chatevents at all at this point <<      
      command = "BOtime";      // just in case

      checkall = getParty();         // check BO-time-stamps and display warning messages
      if (checkall) {
         do {
            if (guestNicks.hasOwnProperty(checkall.name)) {
               if (checkall.name !== me.name ) {

                  if (!guestNicks[checkall.name].silent && shitList.indexOf(checkall.name) == -1 && guestNicks[checkall.name].botimer >= 0 && getTickCount() - guestNicks[checkall.name].botimer >= (BoTime - 90 * 1000) && !guestNicks[checkall.name].warned) {
                     tick = getTickCount();
                     say("/w " + checkall.name + " Reminder: .. your BO should vanish any minute now!!");
                     guestNicks[checkall.name].warned = true;
                  }
                           
                  if (!guestNicks[checkall.name].silent && shitList.indexOf(checkall.name) == -1 && guestNicks[checkall.name].botimer >= 0 && getTickCount() - guestNicks[checkall.name].botimer > BoTime && guestNicks[checkall.name].warned && getTickCount() - tick >= 60 * 1000) {
                     tick = getTickCount();
                     say("/w " + checkall.name + " Warning: .. your BO should be off by now!!");
                     guestNicks[checkall.name].depleted = true;
                  }
               }
            }
         } while (checkall.getNext());
      }
            
      delay(200);
   }
      
   return true;
}

things I have added to libs/common/config.js
autoBO: {
Triggers: ["BOtime"],
gtoilet is offline  
Old 02/14/2015, 02:20   #4
 
elite*gold: 1
Join Date: Sep 2012
Posts: 314
Received Thanks: 31
I just changed BoTime time and had no problems
user11a is offline  
Old 02/14/2015, 16:32   #5
 
elite*gold: 0
Join Date: Dec 2013
Posts: 39
Received Thanks: 0
dam really ... guess ill retry to work this script

which botime did you change tho?


I got stuck on that last post and couldn't get anywhere
so I just stuck it in the INWORK folder

@user11a thanks for trying this and letting me know results
gtoilet is offline  
Reply


Similar Threads Similar Threads
[No Spam] Auto Like - Auto Follow - Auto Comment - AutoLike Fanspage [WORK]
12/30/2013 - Facebook - 1 Replies
LINK Links removed PROOF SEE MY FACEBOOK http://facebook.com/jailbreakpuresharing
[11.07] Kazbah Public [Auto Medic/Auto Medic Team(work on CQC), Vehicle 0 Delay etc]
07/11/2012 - WarRock Hacks, Bots, Cheats & Exploits - 3 Replies
#removed new version later
[06.07] Kazbah Public D3D [Auto Medic(work on CQC), Auto Ammo,STW,WTW,Boneshot etc..]
07/07/2012 - WarRock Hacks, Bots, Cheats & Exploits - 9 Replies
Changes: 06.07 || > Added some VIP functions to public hack 05.07 || > New Design 05.07 || < Removed some functions for Public users 05.07 || > Updated 25.06 || > VIP Public for 2 Days! 25.06 || > Changed Menu Style -> Inspired by NoName 25.06 || > Fixed laggs!? Feedback pls 24.06 || > Added AirBreak (Numpad 7,9 up&down ←4,8↑,6→,2↓) -> Thanks to xx120xx 20.06 || > Changed Menu Colors
WarHead D3D 1.4 (Prem Cross,Auto Medic,Auto Ammo,Bullets,NoReload,CPTC) Work A Update
10/19/2011 - WarRock Hacks, Bots, Cheats & Exploits - 17 Replies
2131231231
does 5bot work?/i need working auto leveler and auto loot
09/01/2009 - Conquer Online 2 - 5 Replies
hey i need a good auto loot bot and auto level bot for conquer i understand 5bot you need to pay, but does it still work? is it worth it? anyone have a good working bot that they can share? please post here! :{



All times are GMT +1. The time now is 04:00.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.