Logout when stopping script
This commit is contained in:
parent
17f2a005ca
commit
9de32663fb
@ -36,11 +36,11 @@ public class CShopper extends CTaskScript {
|
|||||||
buyTask = new Buy();
|
buyTask = new Buy();
|
||||||
|
|
||||||
addNodes(
|
addNodes(
|
||||||
|
new Stop(),
|
||||||
new Run(),
|
new Run(),
|
||||||
new Open(),
|
new Open(),
|
||||||
buyTask,
|
buyTask,
|
||||||
new Hop(),
|
new Hop()
|
||||||
new Stop()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ import io.reisub.dreambot.cshopper.CShopper;
|
|||||||
import io.reisub.dreambot.cshopper.ItemWrapper;
|
import io.reisub.dreambot.cshopper.ItemWrapper;
|
||||||
import org.dreambot.api.methods.MethodProvider;
|
import org.dreambot.api.methods.MethodProvider;
|
||||||
import org.dreambot.api.methods.container.impl.Inventory;
|
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.ScriptManager;
|
||||||
import org.dreambot.api.script.TaskNode;
|
import org.dreambot.api.script.TaskNode;
|
||||||
|
|
||||||
@ -25,8 +26,9 @@ public class Stop extends TaskNode {
|
|||||||
@Override
|
@Override
|
||||||
public int execute() {
|
public int execute() {
|
||||||
MethodProvider.log("Finished buying");
|
MethodProvider.log("Finished buying");
|
||||||
|
Tabs.logout();
|
||||||
ScriptManager.getScriptManager().stop();
|
ScriptManager.getScriptManager().stop();
|
||||||
|
|
||||||
return 0;
|
return 1000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user