D2Bot# mit Kolbot RELEASE - Ein neuer Bot für D2BS

07/26/2012 21:57 schwappi#571
Quote:
Originally Posted by Traycas View Post
May someone can help me with two points:

1. I get very often this error:
D2BS is not responding... starting profile
whats wrong with my system?

2. My Sorc should get bo
Code:
	// Battle orders script - Use this for 2+ characters (for example BO barb + sorc)
	Scripts.BattleOrders = true;
		Config.BattleOrders.Mode = 1; // 0 = give BO, 1 = get BO
		Config.BattleOrders.Wait = false; // Idle until the player that received BO leaves.
that works fine, but if she chicks in the privious game and starting the next one, she doesnt run to a healer first. She goes directly to the wp, is than out of town and chicks again because she still have not enough life. and again and again, and again, ...

What can i switch, that she checks her status before leaving town for bo?

thx in advance


PS. hope this thread is not dead allready ;)


to 2.:

if someone else have the problem, i solved it by editing BattleOrders.js

Code:
/**
*	@filename	BattleOrders.js
*	@author		kolton
*	@desc		give or receive Battle Orders buff
*/

function BattleOrders() {

	[B][COLOR="Red"]Town.doChores();[/COLOR][/B]
	
	try {
		Pather.useWaypoint(35); // catacombs
	} catch (wperror) {
		print(wperror);
		quit();
	}
...
1.: i get this errors with the new test-build too.. with an old one, its all ok.
i´m running the "kolton-d2bot-with-kolbot-cabe7cd" with some changes.

2.: i think, that is the easiest solution.
another change i have made:
Code:
if (count > 60) { // 30 seconds with no bo
	showConsole();
	print("ÿc1Failed to get BO");
	//quit();
	return true;
}
07/29/2012 15:40 njomnjomnjom#572
Quote:
What can i switch, that she checks her status before leaving town for bo?
There is a check option in your charconfig "go to a healer if under this % of life" --> set it to 90 :)

Quote:
1. I get very often this error:
D2BS is not responding... starting profile
whats wrong with my system?
This can have endless reasons and can not yet be fixed.
only things you can do a the moment:
1. - Don't use Delirium Runeword on merc etc.
2. - Don't use skillcharges from items. (For example you have enigma AND an amulet with teleport charges --> don't do that :D )
3. - Use as few events when creating scripts as possible. Events are not as stable as normal functions.
4. Always click "safe" and then fully exit d2Bot# Manager after changing Profiles and then restart it.
5. Turn off things that you don't need. Private games? Don't start Antihostile for example.
6. Avoid situations which the Game doesn't like, gigantic charfiles or ingame actions.
7. Don't move arround the D2 window when creating Games and don't fight against things the Bot is doing ingame, use pause button instead. Keep the inventory closed.

Try to figure out if it is related to a specific script.
There was a guy who had restarts only at eldrich shenk for NO reason - he then removed that Boss from his Runs and it works more stable now - there is no reason why, since i run eldrich shenk without problems.
--> Ah and make your char stronger, i always had the impression that restarts CAN be related to chickens but i can not proof it.
07/30/2012 16:55 schwappi#573
Hi kolton,

could you explane how the D2BotChannel.dbj works?

What i want to do:
if a counter, that counts game is full or game does not exist, reach 5 or something else -> bot should split the "lines"-array at the last line where the currentgamename appears and use the last part of the splitted array...
after that, the bot should check for new gamenames etc...
i tested some versions, but im not sure, where i have to wrote what...
i cant figure out, how the D2BotChannel is working...

in the moment i´m testing with this:

Code:
var gameName, gamePass, oldGame, error, keyswap, rdblocker, gameStart, ingame, muleTrigger, firstLogin, connectFail, chatActionsDone,
	lastGameStatus = "ready",
	gameCount = DataFile.getStats().runs + 1,
	channelTick = getTickCount(),
	retry = 0,
	isUp = "no",
	fListTick = 0,
	countFull = 0,
	countNExist = 0;
Code:
function splitLines(oldlines, gn) {	
	//D2Bot.printToConsole("splitLines: " + gn);
	var argh = oldlines.join("////").split(gn);
	if (argh.length > 0) {
		var str = argh[argh.length-1]; // string
		var arr = str.split("////"); // string -> array
	} else {
		var arr = oldlines;
	}
	/*
	FileTools.writeText(me.name + "_lines.txt", lines.join("////"));
	FileTools.writeText(me.name + "_gamename.txt", gameName);
	FileTools.writeText(me.name + "_split.txt", str);
	FileTools.writeText(me.name + "_split.txt", str);
	FileTools.writeText(me.name + "_arr1.txt", arr[0]);
	FileTools.writeText(me.name + "_arr2.txt", arr[arr.length-1]);
	*/
	return arr;
}

function getNewGame() {
	var i, n, string, text, regex, fullText, lines;
	lines = ControlAction.getText(4, 28, 410, 354, 298);

	if (lines) {
		lines = splitLines(lines, gameName);
		countFull = 0;
		countNExist = 0;
		fullText = lines.join(" ").replace(/\s+/g, " ");

MainLoop:
		for (n = 0; n < StarterConfig.Games.length; n += 1) {
			regex = new RegExp("\\W*" + StarterConfig.Games[n].toLowerCase() + "\\d*", "gi");
			gameName = fullText.match(regex);

			if (gameName) {
				gameName = gameName[gameName.length - 1].toString().replace(/^\W*/, ""); // use last match and trim it
				gamePass = StarterConfig.Passwords[n];
			}
		}
	}
}
Code:
function main() {
	addEventListener('copydata', ReceiveCopyData);
	addEventListener('scriptmsg', ScriptMsgEvent);
	delay(rand(1, 2) * 1000);
	D2Bot.requestGameInfo();

	if (error === "@error") {
		timeoutDelay("Crash Delay", StarterConfig.CrashDelay * 1e3);
		D2Bot.updateRuns();
	}

	while (true) {
		while (me.ingame) { // returns true before actually in game so we can't only use this check
			if (me.gameReady) { // returns false when switching acts so we can't use while
				isUp = "yes";

				if (!ingame) {
					if (me.gamepassword.toLowerCase() !== gamePass.toLowerCase()) {
						print("leaving game");
						quit();
					}

					print("Updating Status");
					D2Bot.updateStatus("Game: " + me.gamename);

					oldGame = me.gamename;
					lastGameStatus = "ingame";
					ingame = true;
					gameStart = getTickCount();
					countFull = 0;
					countNExist = 0;

					DataFile.updateStats("runs", gameCount);
				}
			}

			delay(1000);
		}

		isUp = "no";

		locationAction(getLocation());
		delay(1000);
	}
}
Code:
	case 28: // Lobby - Game Does Not Exist
		countNExist += 1;
		D2Bot.printToConsole("Game doesn't exist: " + gameName + " [" + countNExist + "]");
		//D2Bot.printToConsole("Game doesn't exist");
		lastGameStatus = "ready";
		
		if (countNExist > 2) {
			getNewGame();
		}
		if (!locationTimeout(StarterConfig.GameDoesNotExistTimeout * 1e3, location)) {
			ControlAction.click(6, 652, 469, 120, 20); // Join-Button
			ControlAction.click(6, 433, 433, 96, 32); // (type, xstart, ystart, +xdiff, -ydiff)
		}

		break;
and

Code:
	case 38: // Game is full
		//D2Bot.printToConsole("Game is full");
		countFull += 1;
		D2Bot.printToConsole("Game is full: " + gameName + " [" + countFull + "]");
		lastGameStatus = "ready";
			
		if (countFull > 2) {
			getNewGame();
		}
		
		delay(500);
		ControlAction.click(6, 652, 469, 120, 20); // Join-Button
		break;
07/30/2012 18:39 Zitrone1337#574
ich schaff nichtmal das updaten :>
07/31/2012 07:20 Traycas#575
Quote:
Originally Posted by njomnjomnjom View Post
There is a check option in your charconfig "go to a healer if under this % of life" --> set it to 90 :)
I saw that and set it to 80 already, but no effect in this case...
My solution works fine at the moment ;)



Quote:
Originally Posted by njomnjomnjom View Post
This can have endless reasons and can not yet be fixed.
only things you can do a the moment:
1. - Don't use Delirium Runeword on merc etc.
2. - Don't use skillcharges from items. (For example you have enigma AND an amulet with teleport charges --> don't do that :D )
3. - Use as few events when creating scripts as possible. Events are not as stable as normal functions.
4. Always click "safe" and then fully exit d2Bot# Manager after changing Profiles and then restart it.
5. Turn off things that you don't need. Private games? Don't start Antihostile for example.
6. Avoid situations which the Game doesn't like, gigantic charfiles or ingame actions.
7. Don't move arround the D2 window when creating Games and don't fight against things the Bot is doing ingame, use pause button instead. Keep the inventory closed.

Try to figure out if it is related to a specific script.
There was a guy who had restarts only at eldrich shenk for NO reason - he then removed that Boss from his Runs and it works more stable now - there is no reason why, since i run eldrich shenk without problems.
--> Ah and make your char stronger, i always had the impression that restarts CAN be related to chickens but i can not proof it.
1. not in use
2. not in use
3. what do you think of? dont know what you want to point out, may you have an example
4. i do
5. always only as much as needed...
6. use the things you implemented, not less, not more ;)
7. i like to do real life things when the bots are running... :D
8. i will have an eye on it
9. may you can increase the droprate of Ber's and one Jah on us east for some hours and i make my chars a bit stronger :p


thx so far
Traycas

if someone need Rivers of Flame-script:

CharConfig:
Scripts.RiversOfFlame = true;

RiversOfFlame.js (insert in "D2BS-Kolbot\trunk\d2bs\kolbot\libs\bots")
07/31/2012 17:42 onkelxlc#576
Jedesmal wenn der Bot auf create drückt passiert nix und dann kommt auch der Error "D2BS is not responding... starting profile".
08/03/2012 14:27 Nuttenpreller#577
Hi,

ich habe eine Frage bzgl Cubing.
Beim NT war es so, daß die Bestandteile der Rezepte mit aufgenommen und im Inventar verstaut wurden, bis alles Benötigte für das Rezept vorhanden war.
Hier ist es allerdings so, daß keine Amus/Ringe/Juwele usw aufgehoben werden. Die werden direkt verscheuert. Auch die makellosen Edelsteine nimmt er nicht mit. Wenn ich in der pickit einstelle, daß er sie mitnehmen soll, dann cubt er sie trotz aktivem gem Rezept nicht. Im Kommentar steht zwar, daß er alles mitnimmt, aber das ist bei mir nicht der Fall. Muß der Würfel iwo in der Truhe sein oder reicht es aus, wenn er im Inventar ist?
08/04/2012 15:21 kolton1#578
New testver update

Quote:
Aug 04 update

D2Bot#
lower mem use for Char Viewer
RDBlocker will let you restart after n keys
fixed some images
item viewer / char viewer fixed for + resolutions/dpi changes

d2bs
updated to latest rev - [Only registered and activated users can see links. Click Here To Register...]

D2M.dll
hopefully actually includes RDBlocker now

kolbot
D2BotChannel.dbj/D2BotFollow.dbj/D2BotLead.dbj - added ingame timer printing to d2bot#
D2BotLead.dbj - moved game number reset code to where it shouldn't interfere with game announcing
default.dbj - moved quitlist to ToolsThread.js, added global quit - it's possible to log experience on leechers now
MuleLogger.js - use new item.description, made account/name in img optional
NTItemParser.dbl - fixed error reporting, tweaked code, re-enabled inventory check for MaxQuantity, hopefully fixed limited items dropping from inventory now, improved item.getColor()
OOG.js - character name is no longer case sensitive for login (affects MuleLogger.js)
Baal.js - added throne announce and random precast
BaalHelper.js - added random precast and skip tp (teleport to throne directly)
Paladin.js - tweaked attack code, better teleport check
Config.js - made fastmod settings all uppercase, updated with latest config vars
Cubing.js - colored d2bot# console printing
Misc.js - improved logItem()
Pather.js - switched to a better teleport check, added packet based teleport
Precast.js - tweaked switchitem delay
Prototypes.js - tweaked openMenu delay
Town.js - moved a delay that was being called at the beginning of the game
AntiHostile.js - tweaks and changes, still work in progress. Added experimental hostile mode 3 for throne entrance spam (tested on a sorceress).
ToolsThread.js - added QuitList, wrapped main loop in try/catch to prevent a still mysterious error ("Config has no properties")

Added FlashThread to AntiHostile
Added OuterSteppes script
Updated character configs with latest changes

YOU MUST UPDATE CHARACTER CONFIGS!!
08/10/2012 23:19 Northern Light#579
warum geht in der TestVer. der manager bei mir nicht?

ich kann ihn starten und alles einstellen...
aber wenn ich den bot dann starte dann schließt sich alles... manager + d2 :o
08/11/2012 12:48 kolton1#580
run as admin
08/11/2012 16:58 Northern Light#581
btw cane some1 tell me how to set a auto mule up?

or is there anywhere a guide?
i have no idea how i let mule them automatic...
08/12/2012 20:47 kolton1#582
Mule runs on a separate profile which means you need another cdkey for it.

D2bot# part:
[Only registered and activated users can see links. Click Here To Register...]

As for kolbot part, open and configure AutoMule.js in libs folder. All options are described so it shouldn't be hard to configure.
08/13/2012 21:34 Northern Light#583
i also have a question about the rd's...

i put the hock @ enable rd's but i still get them.

i started the bots in the morning, went to work and now all have rd's
how cane this be? thought i wont get any rd's anymore...?
08/14/2012 16:45 Skaiz87#584
Moin,

hab da auch nochmal eine frage :)

Kann ich einstellen das die Follower mitfighten? Bei mir stehen sie quasi nur rum.
Damit meine ich bei Baal!

Danke
Grüße
08/14/2012 17:41 maximus_121#585
Quote:
Originally Posted by Skaiz87 View Post
Moin,

hab da auch nochmal eine frage :)

Kann ich einstellen das die Follower mitfighten? Bei mir stehen sie quasi nur rum.
Damit meine ich bei Baal!

Danke
Grüße
Scripts.AutoBaal = Nur doof rumstehen
Scripts.BaalHelper = Mitkämpfen :)