public class PathWalker extends Script implements java.awt.event.ActionListener, java.awt.event.ItemListener
| Modifier and Type | Class and Description |
|---|---|
static class |
PathWalker.Location |
static class |
PathWalker.Path |
| Modifier and Type | Field and Description |
|---|---|
static PathWalker.Location[] |
locations |
BANKERS, BONES, DIR_EAST, DIR_NORTH, DIR_NORTHEAST, DIR_NORTHWEST, DIR_SOUTH, DIR_SOUTHEAST, DIR_SOUTHWEST, DIR_WEST, FIGHTMODES, MAX_INV_SIZE, SKILL, SPELL| Constructor and Description |
|---|
PathWalker() |
PathWalker(java.lang.String ex) |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
PathWalker.Path |
calcPath(int x,
int y)
Caclulate path to provided destination, defaults to radius 5 and start at current tile
|
PathWalker.Path |
calcPath(int x1,
int y1,
int x2,
int y2)
Calculate a path from current location to target destination.
|
PathWalker.Path |
calcPath(int x1,
int y1,
int x2,
int y2,
int radius)
Calculates a path from current location (or a point within the defined radius) to the fixed
target location.
|
PathWalker.Location |
getNearestBank(int x,
int y) |
void |
init(java.lang.String params)
Called when the Script is selected by the user - override it and use it to process the
parameters.
|
void |
itemStateChanged(java.awt.event.ItemEvent e) |
int |
main()
The bot will wait for the milliseconds main() returns before calling it again.
|
void |
paint()
Called when the game is re-drawn.
|
int |
pathLength(int x1,
int y1,
int x2,
int y2) |
void |
resetWait() |
void |
setPath(PathWalker.Path p) |
java.lang.String |
toString() |
boolean |
walkPath() |
acceptTrade, addFriend, addIgnore, answer, atObject, atObject2, attackNpc, attackPlayer, atWallObject, atWallObject2, autohop, bankCount, buyShopItem, canCastSpell, canLogout, castOnGroundItem, castOnItem, castOnSelf, closeBank, closeShop, confirmTrade, countNpcs, countPlayers, declineTrade, deposit, disableKeys, disablePrayer, distanceTo, distanceTo, distanceTo, drawBoxAlphaFill, drawBoxFill, drawBoxOutline, drawCircleFill, drawHLine, drawImage, drawString, drawVLine, dropItem, enablePrayer, followPlayer, getAccurateFatigue, getAccurateXpForLevel, getAllNpcById, getBankId, getBankSize, getBankStack, getCurrentLevel, getEmptySlots, getEquippedItemIds, getFatigue, getFightMode, getFriendCount, getFriendName, getGameHeight, getGameWidth, getGroundItemCount, getGroundItemId, getHpPercent, getIgnoredCount, getIgnoredName, getInventoryCount, getInventoryCount, getInventoryId, getInventoryIndex, getInventoryStack, getItemBasePrice, getItemBasePriceId, getItemById, getItemCommand, getItemCommandId, getItemDescription, getItemDescriptionId, getItemName, getItemNameId, getItemX, getItemY, getLevel, getLocalTradeItemCount, getLocalTradeItemId, getLocalTradeItemStack, getMenuIndex, getNpcById, getNpcByIdNotTalk, getNpcCombatLevel, getNpcCombatLevelId, getNpcDescription, getNpcDescriptionId, getNpcId, getNpcInExtendedRadius, getNpcInRadius, getNpcName, getNpcNameId, getNpcServerIndex, getNpcX, getNpcY, getObjectById, getObjectCount, getObjectDesc, getObjectId, getObjectIdFromCoords, getObjectName, getObjectX, getObjectY, getOurTradedItemCount, getPlayerByName, getPlayerByPid, getPlayerCombatLevel, getPlayerDirection, getPlayerName, getPlayerPID, getPlayerX, getPlayerY, getPrayerCount, getPrayerLevel, getPrayerName, getQuestCount, getQuestMenuOption, getQuestName, getQuestStage, getRemoteTradeItemCount, getRemoteTradeItemId, getRemoteTradeItemStack, getShopItemAmount, getShopItemById, getShopItemId, getSleepingFatigue, getTheirTradedItemCount, getWallObjectById, getWallObjectCount, getWallObjectDesc, getWallObjectId, getWallObjectIdFromCoords, getWallObjectName, getWallObjectX, getWallObjectY, getWorld, getX, getXpForLevel, getY, hasBankItem, hasInventoryItem, hasOtherTraded, hasRemoteAcceptedTrade, hop, inArray, inCombat, isAtApproxCoords, isAuthentic, isAutoLogin, isBanking, isBatching, isCastableOnGroundItem, isCastableOnInv, isCastableOnSelf, isCombatSpell, isControllerSet, isFriend, isHpBarShowing, isIgnored, isInTradeConfirm, isInTradeOffer, isItemAt, isItemEquipped, isItemIdEquipped, isItemStackable, isItemStackableId, isItemTradable, isItemTradableId, isLoggedIn, isNpcHpBarVisible, isNpcInCombat, isNpcTalking, isObjectAt, isPaintOverlay, isPlayerHpBarVisible, isPlayerInCombat, isPlayerTalking, isPlayerWalking, isPrayerEnabled, isQuestComplete, isQuestMenu, isReachable, isRendering, isShopOpen, isSkilling, isSkipLines, isSleeping, isTalking, isTricking, isWalking, isWithinArea, isWithinArea, isWithinArea, log, log, logout, mageNpc, magePlayer, next, offerItemTrade, onChatMessage, onKeyPress, onPrivateMessage, onServerMessage, onTradeRequest, pickupItem, print, questMenuCount, questMenuOptions, random, removeFriend, removeIgnore, removeItem, sellShopItem, sendPrivateMessage, sendTradeRequest, setAutoLogin, setController, setFightMode, setPaintOverlay, setPixel, setRendering, setSkipLines, setTrickMode, setTypeLine, sleep, stopScript, takeScreenshot, talkToNpc, thieveNpc, useItem, useItemOnGroundItem, useItemOnObject, useItemOnObject, useItemOnWallObject, useItemWithItem, useItemWithPlayer, useOnNpc, useSleepingBag, useSlotOnObject, walkTo, wearItem, withdraw, writeLinepublic static final PathWalker.Location[] locations
public void init(java.lang.String params)
Scriptpublic int main()
Scriptpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean walkPath()
public void resetWait()
public void setPath(PathWalker.Path p)
public final PathWalker.Path calcPath(int x, int y)
x - int - destination x coordinatey - int - destination y coordinatepublic PathWalker.Path calcPath(int x1, int y1, int x2, int y2)
x1 - Current X coordy1 - Current Y coordx2 - Target X coordy2 - Target Y coordpublic PathWalker.Path calcPath(int x1, int y1, int x2, int y2, int radius)
x1 - Starting X coordy1 - Starting Y coordx2 - Target X coordy2 - Target Y coordradius - Radius around us to set as starting pointpublic int pathLength(int x1,
int y1,
int x2,
int y2)
public final PathWalker.Location getNearestBank(int x, int y)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void itemStateChanged(java.awt.event.ItemEvent e)
itemStateChanged in interface java.awt.event.ItemListener