Logout when stopping script

This commit is contained in:
Yuri Moens 2021-10-20 14:41:20 +02:00
parent 17f2a005ca
commit 9de32663fb
Signed by: ymo
GPG Key ID: F6D51D6FE15BE924
2 changed files with 5 additions and 3 deletions

View File

@ -36,11 +36,11 @@ public class CShopper extends CTaskScript {
buyTask = new Buy();
addNodes(
new Stop(),
new Run(),
new Open(),
buyTask,
new Hop(),
new Stop()
new Hop()
);
}

View File

@ -4,6 +4,7 @@ import io.reisub.dreambot.cshopper.CShopper;
import io.reisub.dreambot.cshopper.ItemWrapper;
import org.dreambot.api.methods.MethodProvider;
import org.dreambot.api.methods.container.impl.Inventory;
import org.dreambot.api.methods.tabs.Tabs;
import org.dreambot.api.script.ScriptManager;
import org.dreambot.api.script.TaskNode;
@ -25,8 +26,9 @@ public class Stop extends TaskNode {
@Override
public int execute() {
MethodProvider.log("Finished buying");
Tabs.logout();
ScriptManager.getScriptManager().stop();
return 0;
return 1000;
}
}