Package org.dreambot.api.script.impl
Class TaskScript
- java.lang.Object
-
- org.dreambot.api.methods.MethodProvider
-
- org.dreambot.api.methods.MethodContext
-
- org.dreambot.api.script.AbstractScript
-
- org.dreambot.api.script.impl.TaskScript
-
- All Implemented Interfaces:
java.lang.Runnable
,java.util.EventListener
,PaintListener
public abstract class TaskScript extends AbstractScript
New replacement for NodeScript. More appropriately named thanks to Harold.Created with IntelliJ IDEA. User: NotoriousPP Date: 11/25/2014 Time: 5:05 PM
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.dreambot.api.methods.MethodProvider
MethodProvider.LogType
-
-
Constructor Summary
Constructors Constructor Description TaskScript()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNodes(TaskNode... nodes)
Add nodes to task list.TaskNode
getLastTaskNode()
TaskNode[]
getNodes()
Get task list nodes as an array.int
onLoop()
Called in cycles.void
removeNodes(TaskNode... nodes)
Remove select nodes from task list.void
setFailLimit(int failLimit)
Sets the amount the node selector is allowed to fail without stopping the script.-
Methods inherited from class org.dreambot.api.script.AbstractScript
getCurrentState, getManifest, getRandomManager, getRandomThread, getSDNName, getSDNParameters, getStartTile, getStoreId, getThreadURL, getVersion, isPaused, onExit, onGameState, onPaint, onPaint, onPause, onResume, onSolverStart, onStart, onStart, registerMethodContext, run, setState, stop
-
Methods inherited from class org.dreambot.api.methods.MethodContext
getBank, getCamera, getClan, getClientSettings, getColorPicker, getCombat, getDepositBox, getDialogues, getEmotes, getEquipment, getFairyRings, getFriends, getGameObjects, getGrandExchange, getGroundItems, getInventory, getKeyboard, getLoader, getLoginUtility, getMagic, getMap, getMenu, getMouse, getMouseKeys, getNpcs, getPlayers, getPlayerSettings, getPrayer, getQuests, getShop, getSkills, getSkillTracker, getTabs, getTrade, getWalking, getWidgets, getWorldHopper, getWorlds, registerContext
-
Methods inherited from class org.dreambot.api.methods.MethodProvider
addAccount, bulkImportAccounts, containsAccount, containsAccountWithEmail, deleteAccount, getClient, getLocalPlayer, isUserSponsor, isUserVIP, log, log, log, log, logError, logError, logInfo, logInfo, setRandomThread, sleep, sleep, sleepUntil, sleepUntil, sleepUntil, sleepWhile, sleepWhile, sleepWhile
-
-
-
-
Method Detail
-
addNodes
public void addNodes(TaskNode... nodes)
Add nodes to task list.- Parameters:
nodes
- the nodes
-
removeNodes
public void removeNodes(TaskNode... nodes)
Remove select nodes from task list.- Parameters:
nodes
- the nodes
-
getNodes
public TaskNode[] getNodes()
Get task list nodes as an array.- Returns:
- the task node [ ]
-
onLoop
public final int onLoop()
Description copied from class:AbstractScript
Called in cycles.- Specified by:
onLoop
in classAbstractScript
-
getLastTaskNode
public TaskNode getLastTaskNode()
-
setFailLimit
public void setFailLimit(int failLimit)
Sets the amount the node selector is allowed to fail without stopping the script.Any value less than 0 is considered unlimited.
- Parameters:
failLimit
- the amount allowed to fail
-
-