Fuhbdvdvkdf 1
Fuhbdvdvkdf 1
ResetCount)
{
gameCount = 1;
DataFile.updateStats("runs", gameCount);
}
}
break;
case 2: // Waiting In Line
D2Bot.updateStatus("Waiting...");
locationTimeout(StarterConfig.WaitInLineTimeout * 1e3, location);
delay(1000);
break;
case "pingquit":
pingQuit = true;
break;
unction main() {
debugLog(me.profile);
addEventListener('copydata', ReceiveCopyData);
f
}
DataFile.updateStats("handle", handle);
delay(500);
break;
case "muleTorch":
AutoMule.torchAnniCheck = 1;
break;
case "muleAnni":
AutoMule.torchAnniCheck = 2;
D2Bot.updateCount();
delay(1000);
ControlAction.click(6, 264, 366, 272, 35);
try {
login(me.profile);
} catch (e) {
}
delay(1000);
ControlAction.click(6, 33, 572, 128, 35);
}
function ScriptMsgEvent(msg) {
switch (msg) {
case "mule":
AutoMule.check = true;
break;
case "muleTorch":
AutoMule.torchAnniCheck = 1;
break;
ca
if (StarterConfig.ResetCount && gameCount >= StarterConfig.ResetCount)
{
gameCount = 1;
DataFile.updateStats("runs", gameCount);
}
}
break;
case 2: // Waiting In Line
D2Bot.updateStatus("Waiting...");
locationTimeout(StarterConfig.WaitInLineTimeout * 1e3, location);
break;
case "crafting":
CraftingSystem.check = true;
break;
case "getMuleMode":
if (AutoMule.torchAnniCheck === 2) {
scriptBroadcast("2");
} else if (AutoMule.torchAnniCheck === 1) {
scriptBroadcast("1");
} else if (AutoMule.check) {
scriptBroadcast("0");
}
addEventListener('scriptmsg', ScriptMsgEvent);
while (!handle) {
delay(100);
retur
}
}
D2Bot.init();
load("tools/heartbeat.js");
}
function ScriptMsgEvent(msg) {
switch (msg) {
case "mule":
AutoMule.check = true;
while (!gameInfo) {
D2Bot.requestGameInfo();
delay(500);
}
if (gameInfo.error) {
//D2Bot.retrieve();
delay(200);
if (!!DataFile.getStats().debugInfo) {
gameInfo.crashInfo = DataFile.getStats().debugInfo;
/*if (gameInfo.crashInfo) {
D2Bot.printToConsole("Crash Info: Script: " +
gameInfo.crashInfo.currScript + " Area: " + gameInfo.crashInfo.area +
(gameInfo.crashInfo.hasOwnProperty("lastAction") ? " " +
gameInfo.crashInfo.lastAction : ""), 10);
}*/
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) {
gameStart = getTickCount();
print("Updating Status");
//D2Bot.updateStatus("Game: " + me.gamename);
lastGameStatus = "ingame";
ControlAction.timeoutDelay("Ping Delay",
StarterConfig.PingQuitDelay * 1e3);
pingQuit = false;
}
break;
}
if (ingame || gameInfo.error) {
if (!gameStart) {
gameStart = DataFile.getStats().ingameTick;
}
if (ingame) {
//D2Bot.store(JSON.stringify({currScript: "none", area: "out of
game"}));
if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() ||
Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
break;
}
print("updating runs");
D2Bot.updateRuns();
gameCount += 1;
lastGameStatus = "ready";
ingame = false;
DataFile.updateStats("runs", gameCount);
}
}
break;
case 2: // Waiting In Line
D2Bot.updateStatus("Waiting...");
locationTimeout(StarterConfig.WaitInLineTimeout * 1e3, location);
ControlAction.click(6, 433, 433, 96, 32);
break;
case 3: // Lobby Chat
D2Bot.updateStatus("Lobby Chat");
if (ingame || gameInfo.error) {
if (!gameStart) {
gameStart = DataFile.getStats().ingameTick;
}
if (ingame) {
//D2Bot.store(JSON.stringify({currScript: "none", area: "out of
game"}));
if (AutoMule.outOfGameCheck() || TorchSystem.outOfGameCheck() ||
Gambling.outOfGameCheck() || CraftingSystem.outOfGameCheck()) {
break;
}
print("updating runs");
D2Bot.updateRuns();
gameCount += 1;
lastGameStatus = "ready";
ingame = false;
DataFile.updateStats("runs", gameCount);
}
if (ChannelConfig[me.profile] &&
ChannelConfig[me.profile].hasOwnProperty("AfterGameMessage")) {
chanInfo.afterMsg =
ChannelConfig[me.profile].AfterGameMessage;
} else {
chanInfo.afterMsg = StarterConfig.AfterGameMessage;
}
if (chanInfo.afterMsg) {
if (typeof chanInfo.afterMsg === "string") {
chanInfo.afterMsg = [chanInfo.afterMsg];
}