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 |
---|
OgreRanger(java.lang.String e) |
Modifier and Type | Method and Description |
---|---|
int |
distanceTo2(int x1,
int y1,
int x2,
int y2) |
int[] |
getNpcById(int... ids)
Locates the nearest NPC with the given id(s).
|
java.lang.String |
getPlayerName(int local_index)
Returns the display name of the given player.
|
void |
init(java.lang.String s)
Called when the Script is selected by the user - override it and use it to process the
parameters.
|
int |
main()
The bot will wait for the milliseconds main() returns before calling it again.
|
void |
onChatMessage(java.lang.String msg,
java.lang.String name,
boolean pmod,
boolean jmod)
Called when a player speaks in public chat.
|
void |
onPrivateMessage(java.lang.String msg,
java.lang.String name,
boolean pmod,
boolean jmod)
Called when a player speaks in private chat.
|
void |
onServerMessage(java.lang.String s)
Called when a server message is sent, i.e "Welcome to RuneScape!".
|
void |
onTradeRequest(java.lang.String name)
Called when a trade request is recieved by your player.
|
void |
paint()
Called when the game is re-drawn.
|
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, 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, 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, onKeyPress, 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, writeLine
public void init(java.lang.String s)
Script
public int main()
Script
public void paint()
Script
public int[] getNpcById(int... ids)
Script
getNpcById
in class Script
ids
- the NPC id(s) to search for.Script.getAllNpcById(int...)
,
Script.getNpcByIdNotTalk(int...)
,
Script.getNpcInExtendedRadius(int, int, int, int, int)
,
Script.getNpcInRadius(int, int, int, int)
public int distanceTo2(int x1, int y1, int x2, int y2)
public void onTradeRequest(java.lang.String name)
Script
onTradeRequest
in interface IScript
onTradeRequest
in class Script
name
- the display name of the player who sent the request.public void onServerMessage(java.lang.String s)
Script
onServerMessage
in interface IScript
onServerMessage
in class Script
s
- the message.public void onChatMessage(java.lang.String msg, java.lang.String name, boolean pmod, boolean jmod)
Script
onChatMessage
in interface IScript
onChatMessage
in class Script
msg
- the message.name
- the display name of the player who sent the message.pmod
- true if the sender is a player moderator (silver crown).jmod
- true if the sender is a Jagex moderator (gold crown).public void onPrivateMessage(java.lang.String msg, java.lang.String name, boolean pmod, boolean jmod)
Script
onPrivateMessage
in interface IScript
onPrivateMessage
in class Script
msg
- the message.name
- the display name of the player who sent the message.pmod
- true if the sender is a player moderator (silver crown).jmod
- true if the sender is a jagex moderator (gold crown).public java.lang.String getPlayerName(int local_index)
Script
getPlayerName
in class Script
local_index
- the player's local index.Script.countPlayers()