Open h0p3z opened 5 years ago
Pickit won't work in town and I believe it won't pick up items drop by a player (they have a different flag than the items just drop by monsters). Try to kill some mobs and see what happens.
- mapthread can not autopickit
- Config.AttackSkill[1] = 0; Config.AttackSkill[3] = 0;
Thx for the bad attack error solved.
Pickit won't work in town and I believe it won't pick up items drop by a player (they have a different flag than the items just drop by monsters). Try to kill some mobs and see what happens.
I know that wont pickup in town, tried today on mobs but this doesnt work too :(.
Anyone got the pickit working in manual mode?
I always forget exactly how this works, but I recall if you set user-addon=true you can get pickit working whilst playing (with map entry i think)
I always forget exactly how this works, but I recall if you set user-addon=true you can get pickit working whilst playing (with map entry i think)
Yea i have read all your old posts and tried it but same things happens :(.
Someone here have a pickit who pick every possible unique? like unique=all; so i can test more.
wait, so are you saying it doesn't pick at all or just no uniques? as you are asking for a broad unique pickit..
assuming you want to test the pickit is firing it would be easier to test with magics as they're common. so: [type] == amulet && [quality] == magic
and do the same for other types.
but if you're trying to see if your pickit is set right, it will if configured correctly. just know that the default kolton nip looks for top end items.
I have posted a link to a pickit source but not at pc now. someone else may help you out before I can but if not I'll do it later.
On Sat, 13 Apr 2019, 00:53 h0p3z, notifications@github.com wrote:
I always forget exactly how this works, but I recall if you set user-addon=true you can get pickit working whilst playing (with map entry i think)
Yea i have read all your old posts and tried it but same things happens :(.
Someone here have a pickit who pick every possible unique? like unique=all; so i can test more.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1445#issuecomment-482755628, or mute the thread https://github.com/notifications/unsubscribe-auth/An7F8QzoiJex6P2LjNONV0leVunDanffks5vgRyGgaJpZM4corx5 .
oh and I reread your post. please elaborate on what you mean by "it doesn't work" as that doesn't tell us anything.
Also share a link to your pickit.
these 2 things are the main things we need to know to help you, so you should always explain both from the start bro
I tried with d2botmap as you said i yourn previous post, but it doesnt load the pickit.
Im now on manual.js https://github.com/blizzhackers/documentation/blob/master/kolbot/ManualPlay.md/#manual-playing
I Followed exactly what it say.
I put the pickit magic.nip with your code in d2bs\kolbot\pickit edit the line in my charachter // Pickit config. Default folder is kolbot/pickit. Config.PickitFiles.push("magic.nip") Config.PickRange = 40; // Pick radius Config.FastPick = true; // Check and pick items between attacks
The pickit load but wont pickup :(.
My pickit is:
[type] == amulet && [quality] == magic [type] == ring && [quality] == magic [type] == helm && [quality] == magic [type] == boots && [quality] == magic [type] == armor && [quality] == magic
thx!
oh and I reread your post. please elaborate on what you mean by "it doesn't work" as that doesn't tell us anything.
Also share a link to your pickit.
these 2 things are the main things we need to know to help you, so you should always explain both from the start bro
Do you need something else?
I've got it.
Start with set entry script: D2BotBlank
Go to your character config and set useraddon to true.
Go to Kolbot/d2bs - there u'll find d2bs.ini, open that up
In Line 38 u'll find "UseGamePrint=false" - set it to true
"UseGamePrint= true" - and save the file.
Save it (all the files u've changed) and u'll be able to play with Maphack and Pickit :)
Default.dbj :
// default.dbj gets executed upon gamejoin js_strict(true);
include("json2.js"); include("NTItemParser.dbl"); include("OOG.js"); include("AutoMule.js"); include("Gambling.js"); include("CraftingSystem.js"); include("TorchSystem.js"); include("MuleLogger.js"); include("GameAction.js"); include("common/Attack.js"); include("common/Cubing.js"); include("common/CollMap.js"); include("common/Config.js"); include("common/Loader.js"); include("common/Misc.js"); include("common/Pickit.js"); include("common/Pather.js"); include("common/Precast.js"); include("common/Prototypes.js"); include("common/Runewords.js"); include("common/Storage.js"); include("common/Town.js");
function main() { D2Bot.init(); // Get D2Bot# handle D2Bot.ingame();
// wait until game is ready while (!me.gameReady) { delay(50); } if (getScript("tools/heartbeat.js")) { //load("tools/heartbeat.js"); } if (getScript("d2botblank.dbj")) { load("tools/mapthread.js"); } if (getScript("d2botmap.dbj")) { load("tools/mapthread.js"); load("tools/ToolsThread.js"); while (true) { delay(1000); } } // don't load default for mules if (getScript("D2BotMule.dbj")) { return true; } // MuleLogger handler if (MuleLogger.inGameCheck()) { return true; } var i, sojPause, stats, anni, sojCounter = 0, startTime = getTickCount(); this.itemEvent = function (gid, mode, code, global) { if (gid > 0 && mode === 0) { Pickit.gidList.push(gid); } }; this.scriptEvent = function (msg) { switch (msg) { case "soj": sojPause = true; sojCounter = 0; break; } }; this.copyDataEvent = function (mode, msg) { if (mode === 0 && msg === "mule") { // "Mule Profile" option from D2Bot# if (AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("muleInfo")) { if (AutoMule.getMuleItems().length > 0) { D2Bot.printToConsole("Mule triggered"); scriptBroadcast("mule"); scriptBroadcast("quit"); } else { D2Bot.printToConsole("No items to mule."); } } else { D2Bot.printToConsole("Profile not enabled for muling."); } } if (mode === 1638) { // getProfile GameAction.init(JSON.parse(msg).Tag); } }; // Initialize libs - load config variables, build pickit list, attacks, containers and cubing and runeword recipes Config.init(true); Pickit.init(true); Attack.init(); Storage.Init(); CraftingSystem.buildLists(); Runewords.init(); Cubing.init(); LocalChat.init(); // Load events addEventListener("scriptmsg", this.scriptEvent); addEventListener("copydata", this.copyDataEvent); // GameAction handler if (GameAction.inGameCheck()) { return true; } // AutoMule handler if (AutoMule.inGameCheck()) { return true; } // TorchSystem handler if (TorchSystem.inGameCheck()) { return true; } // Gambling System handler if (Gambling.inGameCheck()) { return true; } // Crafting System handler if (CraftingSystem.inGameCheck()) { return true; } me.maxgametime = Config.MaxGameTime * 1000; stats = DataFile.getStats(); // Check for experience decrease -> log death. Skip report if life chicken is disabled. if (stats.name === me.name && me.getStat(13) < stats.experience && Config.LifeChicken > 0) { D2Bot.printToConsole("You died in last game", 9); D2Bot.printToConsole("Experience decreased by " + (stats.experience - me.getStat(13)), 9); DataFile.updateStats("deaths"); D2Bot.updateDeaths(); } DataFile.updateStats(["experience", "name"]); // Load threads load("tools/ToolsThread.js"); if (Config.TownCheck || Config.TownHP || Config.TownMP) { load("tools/TownChicken.js"); } if (Config.PublicMode) { load("tools/Party.js"); } if (Config.AntiHostile) { load("tools/AntiHostile.js"); } if (Config.FastPick) { print("ÿc2Fast pickit active."); addEventListener("itemaction", this.itemEvent); } // One time maintenance - get corpse, clear leftover items, pick items in case anything important was dropped if (!Scripts.UserAddon && !Scripts.Test) { Town.getCorpse(); Town.clearBelt(); Town.clearInventory(); //Pickit.pickItems(); } me.automap = Config.AutoMap; // Next game = drop keys if (TorchSystem.keyCheck()) { scriptBroadcast("torch"); } // Auto skill and stat if (Config.AutoSkill.Enabled && include("common/AutoSkill.js")) { AutoSkill.init(Config.AutoSkill.Build, Config.AutoSkill.Save); } if (Config.AutoStat.Enabled && include("common/AutoStat.js")) { AutoStat.init(Config.AutoStat.Build, Config.AutoStat.Save, Config.AutoStat.BlockChance, Config.AutoStat.UseBulk); } // Go Loader.init(); if (Config.MinGameTime && getTickCount() - startTime < Config.MinGameTime * 1000) { try { Town.goToTown(); while (getTickCount() - startTime < Config.MinGameTime * 1000) { me.overhead("Stalling for " + Math.round(((startTime + (Config.MinGameTime * 1000)) - getTickCount()) / 1000) + " Seconds"); delay(1000); } } catch (e1) { print(e1); } } DataFile.updateStats("gold"); if (sojPause) { try { Town.goToTown(); Town.doChores(); me.maxgametime = 0; while (sojCounter < Config.SoJWaitTime) { me.overhead("Waiting for SoJ sales... " + (Config.SoJWaitTime - sojCounter) + " min"); delay(6e4); sojCounter += 1; } } catch (e2) { print(e2); } } if (Config.LastMessage) { switch (typeof Config.LastMessage) { case "string": say(Config.LastMessage.replace("$nextgame", DataFile.getStats().nextGame, "i")); break; case "object": for (i = 0; i < Config.LastMessage.length; i += 1) { say(Config.LastMessage[i].replace("$nextgame", DataFile.getStats().nextGame, "i")); } break; } } if (AutoMule.muleCheck()) { scriptBroadcast("mule"); } // Anni handler. Mule Anni if it's in unlocked space and profile is set to mule torch/anni. anni = me.findItem(603, 0, -1, 7); if (anni && !Storage.Inventory.IsLocked(anni, Config.Inventory) && AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("torchMuleInfo")) { scriptBroadcast("muleAnni"); } if (CraftingSystem.checkFullSets()) { scriptBroadcast("crafting"); } if (TorchSystem.keyCheck()) { scriptBroadcast("torch"); } scriptBroadcast("quit"); return true;
}
I've got it.
Start with set entry script: D2BotBlank
Go to your character config and set useraddon to true.
Then the last part, go to Kolbot/d2bs/Kolbot, there u'll find the default.dbj file, open that up.
At Line 40 u'll see this:
if (getScript("d2botmap.dbj")) { load("tools/mapthread.js"); load("tools/ToolsThread.js");
press enter so u can add something extra, add this somwhere around that line at a free space:
if (getScript("d2botblank.dbj")) { load("tools/mapthread.js");
save it, and u'll be able to play with maphack and pickitfile at the same time :)
Thank you, does it crash for you? It crash for me.
Are you based based on manual.js?
I've got it. Start with set entry script: D2BotBlank Go to your character config and set useraddon to true. Then the last part, go to Kolbot/d2bs/Kolbot, there u'll find the default.dbj file, open that up. At Line 40 u'll see this: if (getScript("d2botmap.dbj")) { load("tools/mapthread.js"); load("tools/ToolsThread.js"); press enter so u can add something extra, add this somwhere around that line at a free space: if (getScript("d2botblank.dbj")) { load("tools/mapthread.js"); save it, and u'll be able to play with maphack and pickitfile at the same time :)
Thank you, does it crash for you? It crash for me.
Are you based based on manual.js?
oh yes, forgot to say. Manual.js has to be false, or deleted. I think it should work then, it works for me like that so...
ok wait will try
And i'm not a coder or something, just a kid trying things out ;)
thats ok lol it keep crashing, it wokr for you? maybe i changed something else i dont remember. Your pickit config?
useraddon true maybe? i'll look, 1sec
paste your default.dbj here ;) and your config file
// User addon script. Read the description in libs/bots/UserAddon.js Scripts.UserAddon = true; // !!!YOU MUST SET THIS TO FALSE IF YOU WANT TO RUN BOSS/AREA SCRIPTS!!!
Like that?
ok wait
y but your full script
// default.dbj gets executed upon gamejoin js_strict(true);
include("json2.js"); include("NTItemParser.dbl"); include("OOG.js"); include("AutoMule.js"); include("Gambling.js"); include("CraftingSystem.js"); include("TorchSystem.js"); include("MuleLogger.js"); include("GameAction.js"); include("common/Attack.js"); include("common/Cubing.js"); include("common/CollMap.js"); include("common/Config.js"); include("common/Loader.js"); include("common/Misc.js"); include("common/Pickit.js"); include("common/Pather.js"); include("common/Precast.js"); include("common/Prototypes.js"); include("common/Runewords.js"); include("common/Storage.js"); include("common/Town.js");
function main() { D2Bot.init(); // Get D2Bot# handle D2Bot.ingame();
// wait until game is ready
while (!me.gameReady) {
delay(50);
}
if (!getScript("tools/heartbeat.js")) {
load("tools/heartbeat.js");
}
if (getScript("d2botmap.dbj")) {
load("tools/mapthread.js");
load("tools/ToolsThread.js")
if (getScript("d2botblank.dbj")) {
load("tools/mapthread.js");
while (true) {
delay(1000);
}
}
// don't load default for mules
if (getScript("D2BotMule.dbj")) {
return true;
}
// MuleLogger handler
if (MuleLogger.inGameCheck()) {
return true;
}
var i, sojPause, stats, anni,
sojCounter = 0,
startTime = getTickCount();
this.itemEvent = function (gid, mode, code, global) {
if (gid > 0 && mode === 0) {
Pickit.gidList.push(gid);
}
};
this.scriptEvent = function (msg) {
switch (msg) {
case "soj":
sojPause = true;
sojCounter = 0;
break;
}
};
this.copyDataEvent = function (mode, msg) {
if (mode === 0 && msg === "mule") { // "Mule Profile" option from D2Bot#
if (AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("muleInfo")) {
if (AutoMule.getMuleItems().length > 0) {
D2Bot.printToConsole("Mule triggered");
scriptBroadcast("mule");
scriptBroadcast("quit");
} else {
D2Bot.printToConsole("No items to mule.");
}
} else {
D2Bot.printToConsole("Profile not enabled for muling.");
}
}
if (mode === 1638) { // getProfile
msg = JSON.parse(msg);
if (msg.Tag) {
GameAction.init(msg.Tag);
}
}
};
// Initialize libs - load config variables, build pickit list, attacks, containers and cubing and runeword recipes
Config.init(true);
Pickit.init(true);
Attack.init();
Storage.Init();
CraftingSystem.buildLists();
Runewords.init();
Cubing.init();
LocalChat.init();
// Load events
addEventListener("scriptmsg", this.scriptEvent);
addEventListener("copydata", this.copyDataEvent);
// GameAction handler
if (GameAction.inGameCheck()) {
return true;
}
// AutoMule handler
if (AutoMule.inGameCheck()) {
return true;
}
// TorchSystem handler
if (TorchSystem.inGameCheck()) {
return true;
}
// Gambling System handler
if (Gambling.inGameCheck()) {
return true;
}
// Crafting System handler
if (CraftingSystem.inGameCheck()) {
return true;
}
me.maxgametime = Config.MaxGameTime * 1000;
stats = DataFile.getStats();
// Check for experience decrease -> log death. Skip report if life chicken is disabled.
if (stats.name === me.name && me.getStat(13) < stats.experience && Config.LifeChicken > 0) {
D2Bot.printToConsole("You died in last game", 9);
D2Bot.printToConsole("Experience decreased by " + (stats.experience - me.getStat(13)), 9);
DataFile.updateStats("deaths");
D2Bot.updateDeaths();
}
DataFile.updateStats(["experience", "name"]);
// Load threads
load("tools/ToolsThread.js");
if (Config.TownCheck || Config.TownHP || Config.TownMP) {
load("tools/TownChicken.js");
}
if (Config.PublicMode) {
load("tools/Party.js");
}
if (Config.AntiHostile) {
load("tools/AntiHostile.js");
}
if (Config.FastPick) {
print("ÿc2Fast pickit active.");
addEventListener("itemaction", this.itemEvent);
}
// One time maintenance - get corpse, clear leftover items, pick items in case anything important was dropped
if (!Scripts.UserAddon && !Scripts.Test) {
Town.getCorpse();
Town.clearBelt();
Town.clearInventory();
//Pickit.pickItems();
}
me.automap = Config.AutoMap;
// Next game = drop keys
if (TorchSystem.keyCheck()) {
scriptBroadcast("torch");
}
// Auto skill and stat
if (Config.AutoSkill.Enabled && include("common/AutoSkill.js")) {
AutoSkill.init(Config.AutoSkill.Build, Config.AutoSkill.Save);
}
if (Config.AutoStat.Enabled && include("common/AutoStat.js")) {
AutoStat.init(Config.AutoStat.Build, Config.AutoStat.Save, Config.AutoStat.BlockChance, Config.AutoStat.UseBulk);
}
// Go
Loader.init();
if (Config.MinGameTime && getTickCount() - startTime < Config.MinGameTime * 1000) {
try {
Town.goToTown();
while (getTickCount() - startTime < Config.MinGameTime * 1000) {
me.overhead("Stalling for " + Math.round(((startTime + (Config.MinGameTime * 1000)) - getTickCount()) / 1000) + " Seconds");
delay(1000);
}
} catch (e1) {
print(e1);
}
}
DataFile.updateStats("gold");
if (sojPause) {
try {
Town.goToTown();
Town.doChores();
me.maxgametime = 0;
while (sojCounter < Config.SoJWaitTime) {
me.overhead("Waiting for SoJ sales... " + (Config.SoJWaitTime - sojCounter) + " min");
delay(6e4);
sojCounter += 1;
}
} catch (e2) {
print(e2);
}
}
if (Config.LastMessage) {
switch (typeof Config.LastMessage) {
case "string":
say(Config.LastMessage.replace("$nextgame", DataFile.getStats().nextGame, "i"));
break;
case "object":
for (i = 0; i < Config.LastMessage.length; i += 1) {
say(Config.LastMessage[i].replace("$nextgame", DataFile.getStats().nextGame, "i"));
}
break;
}
}
if (AutoMule.muleCheck()) {
scriptBroadcast("mule");
}
// Anni handler. Mule Anni if it's in unlocked space and profile is set to mule torch/anni.
anni = me.findItem(603, 0, -1, 7);
if (anni && !Storage.Inventory.IsLocked(anni, Config.Inventory) && AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("torchMuleInfo")) {
scriptBroadcast("muleAnni");
}
if (CraftingSystem.checkFullSets()) {
scriptBroadcast("crafting");
}
if (TorchSystem.keyCheck()) {
scriptBroadcast("torch");
}
scriptBroadcast("quit");
return true;
}
I enable UseGamePrint=true ?
Ahh found it, the 1000 delay has to be at the d2botmap section. Copy this one and replace it with yours, it should work then.
// wait until game is ready while (!me.gameReady) { delay(50); }
if (getScript("tools/heartbeat.js")) {
//load("tools/heartbeat.js");
}
if (getScript("d2botblank.dbj")) {
load("tools/mapthread.js");
}
if (getScript("d2botmap.dbj")) {
load("tools/mapthread.js");
load("tools/ToolsThread.js");
while (true) {
delay(1000);
}
}
ok wait
I enable UseGamePrint=true ?
yes true, that one as wel... sorry forgot that, as i said i'm not a coder XD i dont remember that things... ;)
in which file is gameprint? ;) i add it to my answer
was already true thats good :), in d2bs.ini. Im trying give me 5min
is your manual.js is added or deleted? If i drop an item on the ground does it pickup?
Is this what i supposed to see?
Is this what i supposed to see?
Yes this is it, try it for yourself with andariel run. Kill him when u have a little bit distance, then u can check if pickit works.
Modify your pickit files to your own wish ;)
Also set pickit to true and change how far u will pickit, this is in your character config. I've set it to 65 myself, but higher and lower it doesn't care.
humm i made someting wrong, doesnt working :(, can you upload me your default.dbj lol
is your manual.js is added or deleted? If i drop an item on the ground does it pickup?
Manual is added in my config, but like this:
// User addon script. Read the description in libs/bots/UserAddon.js Scripts.UserAddon = true; // !!!YOU MUST SET THIS TO FALSE IF YOU WANT TO RUN BOSS/AREA SCRIPTS!!! Scripts.Manual = false; // Manual script
first few lines of your character config.
humm i made someting wrong, doesnt working :(, can you upload me your default.dbj lol
i upload all my files okay? except the config, your config is good i think.
// default.dbj gets executed upon gamejoin js_strict(true);
include("json2.js"); include("NTItemParser.dbl"); include("OOG.js"); include("AutoMule.js"); include("Gambling.js"); include("CraftingSystem.js"); include("TorchSystem.js"); include("MuleLogger.js"); include("GameAction.js"); include("common/Attack.js"); include("common/Cubing.js"); include("common/CollMap.js"); include("common/Config.js"); include("common/Loader.js"); include("common/Misc.js"); include("common/Pickit.js"); include("common/Pather.js"); include("common/Precast.js"); include("common/Prototypes.js"); include("common/Runewords.js"); include("common/Storage.js"); include("common/Town.js");
function main() { D2Bot.init(); // Get D2Bot# handle D2Bot.ingame();
// wait until game is ready
while (!me.gameReady) {
delay(50);
}
if (getScript("tools/heartbeat.js")) {
//load("tools/heartbeat.js");
}
if (getScript("d2botblank.dbj")) {
load("tools/mapthread.js");
}
if (getScript("d2botmap.dbj")) {
load("tools/mapthread.js");
load("tools/ToolsThread.js");
while (true) {
delay(1000);
}
}
// don't load default for mules
if (getScript("D2BotMule.dbj")) {
return true;
}
// MuleLogger handler
if (MuleLogger.inGameCheck()) {
return true;
}
var i, sojPause, stats, anni,
sojCounter = 0,
startTime = getTickCount();
this.itemEvent = function (gid, mode, code, global) {
if (gid > 0 && mode === 0) {
Pickit.gidList.push(gid);
}
};
this.scriptEvent = function (msg) {
switch (msg) {
case "soj":
sojPause = true;
sojCounter = 0;
break;
}
};
this.copyDataEvent = function (mode, msg) {
if (mode === 0 && msg === "mule") { // "Mule Profile" option from D2Bot#
if (AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("muleInfo")) {
if (AutoMule.getMuleItems().length > 0) {
D2Bot.printToConsole("Mule triggered");
scriptBroadcast("mule");
scriptBroadcast("quit");
} else {
D2Bot.printToConsole("No items to mule.");
}
} else {
D2Bot.printToConsole("Profile not enabled for muling.");
}
}
if (mode === 1638) { // getProfile
GameAction.init(JSON.parse(msg).Tag);
}
};
// Initialize libs - load config variables, build pickit list, attacks, containers and cubing and runeword recipes
Config.init(true);
Pickit.init(true);
Attack.init();
Storage.Init();
CraftingSystem.buildLists();
Runewords.init();
Cubing.init();
LocalChat.init();
// Load events
addEventListener("scriptmsg", this.scriptEvent);
addEventListener("copydata", this.copyDataEvent);
// GameAction handler
if (GameAction.inGameCheck()) {
return true;
}
// AutoMule handler
if (AutoMule.inGameCheck()) {
return true;
}
// TorchSystem handler
if (TorchSystem.inGameCheck()) {
return true;
}
// Gambling System handler
if (Gambling.inGameCheck()) {
return true;
}
// Crafting System handler
if (CraftingSystem.inGameCheck()) {
return true;
}
me.maxgametime = Config.MaxGameTime * 1000;
stats = DataFile.getStats();
// Check for experience decrease -> log death. Skip report if life chicken is disabled.
if (stats.name === me.name && me.getStat(13) < stats.experience && Config.LifeChicken > 0) {
D2Bot.printToConsole("You died in last game", 9);
D2Bot.printToConsole("Experience decreased by " + (stats.experience - me.getStat(13)), 9);
DataFile.updateStats("deaths");
D2Bot.updateDeaths();
}
DataFile.updateStats(["experience", "name"]);
// Load threads
load("tools/ToolsThread.js");
if (Config.TownCheck || Config.TownHP || Config.TownMP) {
load("tools/TownChicken.js");
}
if (Config.PublicMode) {
load("tools/Party.js");
}
if (Config.AntiHostile) {
load("tools/AntiHostile.js");
}
if (Config.FastPick) {
print("ÿc2Fast pickit active.");
addEventListener("itemaction", this.itemEvent);
}
// One time maintenance - get corpse, clear leftover items, pick items in case anything important was dropped
if (!Scripts.UserAddon && !Scripts.Test) {
Town.getCorpse();
Town.clearBelt();
Town.clearInventory();
//Pickit.pickItems();
}
me.automap = Config.AutoMap;
// Next game = drop keys
if (TorchSystem.keyCheck()) {
scriptBroadcast("torch");
}
// Auto skill and stat
if (Config.AutoSkill.Enabled && include("common/AutoSkill.js")) {
AutoSkill.init(Config.AutoSkill.Build, Config.AutoSkill.Save);
}
if (Config.AutoStat.Enabled && include("common/AutoStat.js")) {
AutoStat.init(Config.AutoStat.Build, Config.AutoStat.Save, Config.AutoStat.BlockChance, Config.AutoStat.UseBulk);
}
// Go
Loader.init();
if (Config.MinGameTime && getTickCount() - startTime < Config.MinGameTime * 1000) {
try {
Town.goToTown();
while (getTickCount() - startTime < Config.MinGameTime * 1000) {
me.overhead("Stalling for " + Math.round(((startTime + (Config.MinGameTime * 1000)) - getTickCount()) / 1000) + " Seconds");
delay(1000);
}
} catch (e1) {
print(e1);
}
}
DataFile.updateStats("gold");
if (sojPause) {
try {
Town.goToTown();
Town.doChores();
me.maxgametime = 0;
while (sojCounter < Config.SoJWaitTime) {
me.overhead("Waiting for SoJ sales... " + (Config.SoJWaitTime - sojCounter) + " min");
delay(6e4);
sojCounter += 1;
}
} catch (e2) {
print(e2);
}
}
if (Config.LastMessage) {
switch (typeof Config.LastMessage) {
case "string":
say(Config.LastMessage.replace("$nextgame", DataFile.getStats().nextGame, "i"));
break;
case "object":
for (i = 0; i < Config.LastMessage.length; i += 1) {
say(Config.LastMessage[i].replace("$nextgame", DataFile.getStats().nextGame, "i"));
}
break;
}
}
if (AutoMule.muleCheck()) {
scriptBroadcast("mule");
}
// Anni handler. Mule Anni if it's in unlocked space and profile is set to mule torch/anni.
anni = me.findItem(603, 0, -1, 7);
if (anni && !Storage.Inventory.IsLocked(anni, Config.Inventory) && AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("torchMuleInfo")) {
scriptBroadcast("muleAnni");
}
if (CraftingSystem.checkFullSets()) {
scriptBroadcast("crafting");
}
if (TorchSystem.keyCheck()) {
scriptBroadcast("torch");
}
scriptBroadcast("quit");
return true;
}
My Toolsthread (Kolbot/d2bs/Kolbot/Tools - there u find Toolsthread.js) :
/**
js_strict(true);
include("json2.js"); include("NTItemParser.dbl"); include("OOG.js"); include("AutoMule.js"); include("Gambling.js"); include("CraftingSystem.js"); include("TorchSystem.js"); include("MuleLogger.js"); include("common/Attack.js"); include("common/Cubing.js"); include("common/CollMap.js"); include("common/Config.js"); include("common/Loader.js"); include("common/Misc.js"); include("common/Pickit.js"); include("common/Pather.js"); include("common/Precast.js"); include("common/Prototypes.js"); include("common/Runewords.js"); include("common/Storage.js"); include("common/Town.js");
function main() { var i, mercHP, ironGolem, tick, merc, debugInfo = {area: 0, currScript: "no entry"}, pingTimer = [], quitFlag = false, cloneWalked = false, canQuit = true, timerLastDrink = [];
print("ÿc3Start ToolsThread script");
D2Bot.init();
Config.init(false);
Pickit.init(false);
Attack.init();
Storage.Init();
CraftingSystem.buildLists();
Runewords.init();
Cubing.init();
for (i = 0; i < 5; i += 1) {
timerLastDrink[i] = 0;
}
// Reset core chicken
me.chickenhp = -1;
me.chickenmp = -1;
// General functions
this.checkPing = function (print) {
// Quit after at least 5 seconds in game
if (getTickCount() - me.gamestarttime < 5000) {
return false;
}
var i;
for (i = 0; i < Config.PingQuit.length; i += 1) {
if (Config.PingQuit[i].Ping > 0) {
if (me.ping >= Config.PingQuit[i].Ping) {
me.overhead("High Ping");
if (pingTimer[i] === undefined || pingTimer[i] === 0) {
pingTimer[i] = getTickCount();
}
if (getTickCount() - pingTimer[i] >= Config.PingQuit[i].Duration * 1000) {
if (print) {
D2Bot.printToConsole("High ping (" + me.ping + "/" + Config.PingQuit[i].Ping + ") - leaving game.", 9);
}
scriptBroadcast("pingquit");
return true;
}
} else {
pingTimer[i] = 0;
}
}
}
return false;
};
this.initQuitList = function () {
var i, string, obj,
temp = [];
for (i = 0; i < Config.QuitList.length; i += 1) {
if (FileTools.exists("data/" + Config.QuitList[i] + ".json")) {
string = Misc.fileAction("data/" + Config.QuitList[i] + ".json", 0);
if (string) {
obj = JSON.parse(string);
if (obj && obj.hasOwnProperty("name")) {
temp.push(obj.name);
}
}
}
}
Config.QuitList = temp.slice(0);
};
this.getPotion = function (pottype, type) {
var i,
items = me.getItems();
if (!items || items.length === 0) {
return false;
}
// Get highest id = highest potion first
items.sort(function (a, b) {
return b.classid - a.classid;
});
for (i = 0; i < items.length; i += 1) {
if (type < 3 && items[i].mode === 0 && items[i].location === 3 && items[i].itemType === pottype) {
print("ÿc2Drinking potion from inventory.");
return copyUnit(items[i]);
}
if (items[i].mode === 2 && items[i].itemType === pottype) {
return copyUnit(items[i]);
}
}
return false;
};
this.togglePause = function () {
var i, script,
scripts = ["default.dbj", "tools/townchicken.js", "tools/antihostile.js", "tools/party.js", "tools/rushthread.js"];
for (i = 0; i < scripts.length; i += 1) {
script = getScript(scripts[i]);
if (script) {
if (script.running) {
if (i === 0) { // default.dbj
print("ÿc1Pausing.");
}
// don't pause townchicken during clone walk
if (scripts[i] !== "tools/townchicken.js" || !cloneWalked) {
script.pause();
}
} else {
if (i === 0) { // default.dbj
print("ÿc2Resuming.");
}
script.resume();
}
}
}
return true;
};
this.stopDefault = function () {
var script = getScript("default.dbj");
if (script && script.running) {
script.stop();
}
return true;
};
this.exit = function () {
this.stopDefault();
quit();
};
this.drinkPotion = function (type) {
var pottype, potion,
tNow = getTickCount();
switch (type) {
case 0:
case 1:
if ((timerLastDrink[type] && (tNow - timerLastDrink[type] < 1000)) || me.getState(type === 0 ? 100 : 106)) {
return false;
}
break;
case 2:
if (timerLastDrink[type] && (tNow - timerLastDrink[type] < 300)) { // small delay for juvs just to prevent using more at once
return false;
}
break;
case 4:
if (timerLastDrink[type] && (tNow - timerLastDrink[type] < 2000)) { // larger delay for juvs just to prevent using more at once, considering merc update rate
return false;
}
break;
default:
if (timerLastDrink[type] && (tNow - timerLastDrink[type] < 8000)) {
return false;
}
break;
}
if (me.mode === 0 || me.mode === 17 || me.mode === 18) { // mode 18 - can't drink while leaping/whirling etc.
return false;
}
switch (type) {
case 0:
case 3:
pottype = 76;
break;
case 1:
pottype = 77;
break;
default:
pottype = 78;
break;
}
potion = this.getPotion(pottype, type);
if (potion) {
if (me.mode === 0 || me.mode === 17) {
return false;
}
if (type < 3) {
potion.interact();
} else {
try {
clickItem(2, potion);
} catch (e) {
print("Couldn't give the potion to merc.");
}
}
timerLastDrink[type] = getTickCount();
return true;
}
return false;
};
this.getNearestMonster = function () {
var gid, distance,
monster = getUnit(1),
range = 30;
if (monster) {
do {
if (monster.hp > 0 && Attack.checkMonster(monster) && !monster.getParent()) {
distance = getDistance(me, monster);
if (distance < range) {
range = distance;
gid = monster.gid;
}
}
} while (monster.getNext());
}
if (gid) {
monster = getUnit(1, -1, -1, gid);
} else {
monster = false;
}
if (monster) {
return " to " + monster.name;
}
return "";
};
this.checkVipers = function () {
var owner,
monster = getUnit(1, 597);
if (monster) {
do {
if (monster.getState(96)) {
owner = monster.getParent();
if (owner && owner.name !== me.name) {
return true;
}
}
} while (monster.getNext());
}
return false;
};
this.getIronGolem = function () {
var owner,
golem = getUnit(1, 291);
if (golem) {
do {
owner = golem.getParent();
if (owner && owner.name === me.name) {
return copyUnit(golem);
}
} while (golem.getNext());
}
return false;
};
this.getNearestPreset = function () {
var i, unit, dist, id;
unit = getPresetUnits(me.area);
dist = 99;
for (i = 0; i < unit.length; i += 1) {
if (getDistance(me, unit[i].roomx * 5 + unit[i].x, unit[i].roomy * 5 + unit[i].y) < dist) {
dist = getDistance(me, unit[i].roomx * 5 + unit[i].x, unit[i].roomy * 5 + unit[i].y);
id = unit[i].type + " " + unit[i].id;
}
}
return id || "";
};
// Event functions
this.keyEvent = function (key) {
switch (key) {
case 19: // Pause/Break key
this.togglePause();
break;
case 102: // Numpad 6
me.overhead("Revealing " + Pather.getAreaName(me.area));
revealLevel(true);
break;
case 107: // Numpad +
showConsole();
// me.getStat(105) will return real FCR from gear + Config.FCR from char cfg
var realFCR = me.getStat(105) - Config.FCR;
var realIAS = me.getStat(93) - Config.IAS;
var realFBR = me.getStat(102) - Config.FBR;
var realFHR = me.getStat(99) - Config.FHR;
print("ÿc4MF: ÿc0" + me.getStat(80) + " ÿc4GF: ÿc0" + me.getStat(79) + " ÿc1FR: ÿc0" + me.getStat(39) +
" ÿc3CR: ÿc0" + me.getStat(43) + " ÿc9LR: ÿc0" + me.getStat(41) + " ÿc2PR: ÿc0" + me.getStat(45) +
"\n" +
"FCR: " + realFCR + " IAS: " + realIAS + " FBR: " + realFBR +
" FHR: " + realFHR + " FRW: " + me.getStat(96) +
"\n" +
"CB: " + me.getStat(136) + " DS: " + me.getStat(141) + " OW: " + me.getStat(135) +
" ÿc1LL: ÿc0" + me.getStat(60) + " ÿc3ML: ÿc0" + me.getStat(62) +
" DR: " + me.getStat(36) + "% + " + me.getStat(34) + " MDR: " + me.getStat(37) + "% + " + me.getStat(35) +
"\n" +
(me.getStat(153) > 0 ? "ÿc3Cannot be Frozenÿc1" : "" ));
break;
case 101: // numpad 5
if (AutoMule.getInfo() && AutoMule.getInfo().hasOwnProperty("muleInfo")) {
if (AutoMule.getMuleItems().length > 0) {
print("ÿc2Mule triggered");
scriptBroadcast("mule");
this.exit();
} else {
me.overhead("No items to mule.");
}
} else {
me.overhead("Profile not enabled for muling.");
}
break;
case 46: // Delete
MuleLogger.logChar();
me.overhead("Logged char: " + me.name);
break;
case 109: // Numpad -
Misc.spy(me.name);
break;
case 110: // decimal point
say("/fps");
break;
case 105: // numpad 9 - get nearest preset unit id
print(this.getNearestPreset());
break;
case 106: // numpad * - precast
Precast.doPrecast(true);
break;
}
};
this.gameEvent = function (mode, param1, param2, name1, name2) {
switch (mode) {
case 0x00: // "%Name1(%Name2) dropped due to time out."
case 0x01: // "%Name1(%Name2) dropped due to errors."
case 0x03: // "%Name1(%Name2) left our world. Diablo's minions weaken."
if ((typeof Config.QuitList === "string" && Config.QuitList.toLowerCase() === "any") ||
(Config.QuitList instanceof Array && Config.QuitList.indexOf(name1) > -1)) {
print(name1 + (mode === 0 ? " timed out" : " left"));
quitFlag = true;
}
if (Config.AntiHostile) {
scriptBroadcast("remove " + name1);
}
break;
case 0x06: // "%Name1 was Slain by %Name2"
if (Config.AntiHostile && param2 === 0x00 && name2 === me.name) {
scriptBroadcast("mugshot " + name1);
}
break;
case 0x07:
if (Config.AntiHostile && param2 === 0x03) { // "%Player has declared hostility towards you."
scriptBroadcast("findHostiles");
}
break;
case 0x11: // "%Param1 Stones of Jordan Sold to Merchants"
if (Config.DCloneQuit === 2) {
D2Bot.printToConsole("SoJ sold in game. Leaving.");
quitFlag = true;
break;
}
if (Config.SoJWaitTime && me.gametype === 1) { // only do this in expansion
D2Bot.printToConsole(param1 + " Stones of Jordan Sold to Merchants on IP " + me.gameserverip.split(".")[3], 7);
Messaging.sendToScript("default.dbj", "soj");
}
break;
case 0x12: // "Diablo Walks the Earth"
if (Config.DCloneQuit > 0) {
D2Bot.printToConsole("Diablo walked in game. Leaving.");
quitFlag = true;
break;
}
if (Config.StopOnDClone && me.gametype === 1) { // only do this in expansion
D2Bot.printToConsole("Diablo Walks the Earth", 7);
cloneWalked = true;
this.togglePause();
Town.goToTown();
showConsole();
print("ÿc4Diablo Walks the Earth");
me.maxgametime = 0;
if (Config.KillDclone) {
load("tools/clonekilla.js");
}
}
break;
}
};
this.scriptEvent = function (msg) {
var obj;
switch (msg) {
case "toggleQuitlist":
canQuit = !canQuit;
break;
case "quit":
quitFlag = true;
break;
default:
try {
obj = JSON.parse(msg);
} catch (e) {
return;
}
if (obj) {
if (obj.hasOwnProperty("currScript")) {
debugInfo.currScript = obj.currScript;
}
if (obj.hasOwnProperty("lastAction")) {
debugInfo.lastAction = obj.lastAction;
}
//D2Bot.store(JSON.stringify(debugInfo));
DataFile.updateStats("debugInfo", JSON.stringify(debugInfo));
}
break;
}
};
// Cache variables to prevent a bug where d2bs loses the reference to Config object
Config = Misc.copy(Config);
tick = getTickCount();
addEventListener("keyup", this.keyEvent);
addEventListener("gameevent", this.gameEvent);
addEventListener("scriptmsg", this.scriptEvent);
//addEventListener("gamepacket", Events.gamePacket);
// Load Fastmod
Packet.changeStat(105, Config.FCR);
Packet.changeStat(99, Config.FHR);
Packet.changeStat(102, Config.FBR);
Packet.changeStat(93, Config.IAS);
if (Config.QuitListMode > 0) {
this.initQuitList();
}
// Start
while (true) {
try {
if (me.gameReady && !me.inTown) {
if (Config.UseHP > 0 && me.hp < Math.floor(me.hpmax * Config.UseHP / 100)) {
this.drinkPotion(0);
}
if (Config.UseRejuvHP > 0 && me.hp < Math.floor(me.hpmax * Config.UseRejuvHP / 100)) {
this.drinkPotion(2);
}
if (Config.LifeChicken > 0 && me.hp <= Math.floor(me.hpmax * Config.LifeChicken / 100)) {
D2Bot.printToConsole("Life Chicken (" + me.hp + "/" + me.hpmax + ")" + this.getNearestMonster() + " in " + Pather.getAreaName(me.area) + ". Ping: " + me.ping, 9);
D2Bot.updateChickens();
this.exit();
break;
}
if (Config.UseMP > 0 && me.mp < Math.floor(me.mpmax * Config.UseMP / 100)) {
this.drinkPotion(1);
}
if (Config.UseRejuvMP > 0 && me.mp < Math.floor(me.mpmax * Config.UseRejuvMP / 100)) {
this.drinkPotion(2);
}
if (Config.ManaChicken > 0 && me.mp <= Math.floor(me.mpmax * Config.ManaChicken / 100)) {
D2Bot.printToConsole("Mana Chicken: (" + me.mp + "/" + me.mpmax + ") in " + Pather.getAreaName(me.area), 9);
D2Bot.updateChickens();
this.exit();
break;
}
if (Config.IronGolemChicken > 0 && me.classid === 2) {
if (!ironGolem || copyUnit(ironGolem).x === undefined) {
ironGolem = this.getIronGolem();
}
if (ironGolem) {
if (ironGolem.hp <= Math.floor(128 * Config.IronGolemChicken / 100)) { // ironGolem.hpmax is bugged with BO
D2Bot.printToConsole("Irom Golem Chicken in " + Pather.getAreaName(me.area), 9);
D2Bot.updateChickens();
this.exit();
break;
}
}
}
if (Config.UseMerc) {
mercHP = getMercHP();
merc = me.getMerc();
if (mercHP > 0 && merc && merc.mode !== 12) {
if (mercHP < Config.MercChicken) {
D2Bot.printToConsole("Merc Chicken in " + Pather.getAreaName(me.area), 9);
D2Bot.updateChickens();
this.exit();
break;
}
if (mercHP < Config.UseMercHP) {
this.drinkPotion(3);
}
if (mercHP < Config.UseMercRejuv) {
this.drinkPotion(4);
}
}
}
if (Config.ViperCheck && getTickCount() - tick >= 250) {
if (this.checkVipers()) {
D2Bot.printToConsole("Revived Tomb Vipers found. Leaving game.", 9);
quitFlag = true;
}
tick = getTickCount();
}
if (this.checkPing(true)) {
quitFlag = true;
}
}
} catch (e) {
Misc.errorReport(e, "ToolsThread");
quitFlag = true;
}
if (quitFlag && canQuit) {
print("ÿc8Run duration ÿc2" + ((getTickCount() - me.gamestarttime) / 1000));
if (Config.LogExperience) {
Experience.log();
}
this.checkPing(false); // In case of quitlist triggering first
this.exit();
break;
}
if (debugInfo.area !== Pather.getAreaName(me.area)) {
debugInfo.area = Pather.getAreaName(me.area);
//D2Bot.store(JSON.stringify(debugInfo));
DataFile.updateStats("debugInfo", JSON.stringify(debugInfo));
}
delay(20);
}
return true;
}
I set to pickiup all magic item but doesnt pickup, kids are coming, i have to leave but i will comeback My pickit is [type] == amulet && [quality] == magic [type] == ring && [quality] == magic [type] == helm && [quality] == magic [type] == boots && [quality] == magic [type] == armor && [quality] == magic
I set to pickiup all magic item but doesnt pickup, kids are coming, i have to leave but i will comeback My pickit is [type] == amulet && [quality] == magic [type] == ring && [quality] == magic [type] == helm && [quality] == magic [type] == boots && [quality] == magic [type] == armor && [quality] == magic
send your character config, i'll look for u. i message u tomorrow then :)
Sent lol
Working bro with your default.dbj!! THK! Your a god man! i have to go but thk again.
Working bro with your default.dbj!! THK! Your a god man! i have to go but thk again.
Nice to hear, gl en hf with it :) this wasn't difficult at all XD
Thx again for your help! i found nothing on the forum that worked. It pickup great.
Envoyé depuis mon téléphone intelligent Samsung Galaxy.
-------- Message d'origine -------- De : Kippievdb notifications@github.com Date : 19-04-20 6:11 PM (GMT-05:00) À : kolton/d2bot-with-kolbot d2bot-with-kolbot@noreply.github.com Cc : h0p3z h0p3z@hotmail.com, Author author@noreply.github.com Objet : Re: [kolton/d2bot-with-kolbot] Manual Pickit Trouble Question (#1445)
Working bro with your default.dbj!! THK! Your a god man! i have to go but thk again.
Nice to hear, gl en hf with it :) this wasn't difficult at all XD
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/kolton/d2bot-with-kolbot/issues/1445#issuecomment-485183045, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALZWRBNRYMBM2JD3QA6B3S3PROII7ANCNFSM4HFCXR4Q.
Thank you! Found this, tried it also, WORKS. I only wish it displayed in game with text what items are dropping from the pickit list as they drop.
Anyone might know why my script isn't loading? https://i.gyazo.com/4ffd54d8f31d69b4c689778e98561286.png
@Kippievdb
I followed this thread and I got it to work! thanks guys!
But i was wondering if what i should "//" to remove the display box but keep everything else working the exact same. That box is just too distracting, thanks
Nevermind! I got it to work, I started over and the config file was able to be generated this time and that fixed it
Followed the thread and got it to partially work. Sometimes the bot will say I need potions and go to town to buy them, and when it reuses the TP it will loot like normal picking up gold and the like. And after that it just stops and doesn't try to pick up anything, be it gold more pots runes ect. Any idea what to do?
Followed the thread and got it to partially work. Sometimes the bot will say I need potions and go to town to buy them, and when it reuses the TP it will loot like normal picking up gold and the like. And after that it just stops and doesn't try to pick up anything, be it gold more pots runes ect. Any idea what to do?
i think the problem is gold, if my bot has not got enough gold, it will leave the game.
@Kippievdb i followed exactly your instructions https://github.com/kolton/d2bot-with-kolbot/issues/1445#issuecomment-485129123 but i cant get it to work. i've set to pickup gold greater than 5, but it doesnt pickup any gold. am i missing something? [name] == gold # [gold] >= 5 // this will pick up 5 gold or anything greater
Does your config file point to the .nip file you edited for gold?
On Sat, Dec 5, 2020, 1:44 PM nordxONE notifications@github.com wrote:
@Kippievdb https://github.com/Kippievdb i followed exactly your instructions #1445 (comment) https://github.com/kolton/d2bot-with-kolbot/issues/1445#issuecomment-485129123 but i cant get it to work. i've set to pickup gold greater than 5, but it doesnt pickup any gold. am i missing something? [name] == gold # [gold] >= 5 // this will pick up 5 gold or anything greater
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kolton/d2bot-with-kolbot/issues/1445#issuecomment-739413639, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFN3U42R6TAMJQ42QD7DRTSTKLTVANCNFSM4HFCXR4Q .
yes, the part in the config looks like this: // Pickit config. Default folder is kolbot/pickit. Config.PickitFiles.push("kolton.nip"); Config.PickitFiles.push("MEINE.nip"); Config.PickitFiles.push("LLD.nip"); Config.PickRange = 65; // Pick radius Config.FastPick = true; // Check and pick items between attacks Config.ManualPlayPick = true; // If set to true and D2BotMap entry script is used, will enable picking in manual play.
in MEINE.nip the gold line is inserted. the only other change in the config file is: // User addon script. Read the description in libs/bots/UserAddon.js Scripts.UserAddon = true; // !!!YOU MUST SET THIS TO FALSE IF YOU WANT TO RUN BOSS/AREA SCRIPTS!!! Scripts.Manual = false; // Manual script^
everything else is standard. didnt change anything.
Hi, I need help :(, I bang my head on this.
I cant make my pickit work with my sorc, I followed the manual.js step by step: https://github.com/blizzhackers/documentation/blob/master/kolbot/ManualPlay.md/#manual-playing
I load the game, it load my script.nip, i drop a whatever unique on the ground and wont pickit up. If i click "pick to inventory" she teleport pick it but she took anything when i click on it lol even white and blue items.
Do i forget to activate something in a script somewhere for manual pickit? I dont want to make a bot, just playing manual.
Thank You