Check out a great software site, CLICK HERE!
AutoRune Manual
Table Of Contents
Warning: This information applies to the old versions mostly, but you can read it anyway to get an idea.
When you launch AutoRune you will be asked for username and password. Everyone has his own unique username/password, if you don't have one, you won't be able to use it, until Jason gives you your username and password.
Update: Last time The Company was detecting AutoRune for a month and then banned all who ever used AutoRune in one day. It's recommended to keep your valuables on another account, make a special character for AutoRuning.
NOTE:
AutoRune has an "anti logout"-feature, means as soon as you start a script, AutoRune automatically moves after some time to a new spot and back again, so "RS" won't log you out because of inactivity.
Coins collector script
--- Money Collector
OnItemAppeared(@NewItem,%ID,%x,%y)
--- Main Loop
@LookForCoins:
Wait(50)
GoTo(@LookForCoins)
--- End
@NewItem:
GoToIfVarEqualNum(@GoodItem1,%ID,10)
ERet()
@GoodItem1:
SetVarNum(%d,3)
SetVar(%x1,%x)
SetVar(%y1,%y)
SetVar(%x2,%x)
SetVar(%y2,%y)
SubVar(%x1,%d)
SubVar(%y1,%d)
AddVar(%x2,%d)
AddVar(%y2,%d)
GoToIfCoordsInVars(@GoodItem2,%x1,%y1,%x2,%y2)
ERet()
@GoodItem2:
ActionVarVar(%x,%y)
TakeItemVarVarVar(%x,%y,%ID)
ERet()
--- End
All this script does is wait for coins to appear nearby and collect them. The best place to use it
is in bank vault. If you want, you can transform it in air-rune collector or something else, you just
have to modify 3 values marked in red. Change them... to what? It's item ID, for money it's 10, for
other items it's different. When you take item in RS manually, you will get something like:
TakeItem(65,557,20) in your Log box. "20" - that's the number you're looking for. Change the red
10 to your number (20 in my sample which means bones) and you will have a script collecting something
that is not coins :). So let's try it: Drop an Air-Rune and
pick it up again. You will see the Air-Rune ID behind the last ',' .
This script will pick up all coins appearing in distance "3" or closer, to change that, modify
the green 3. If you change it to 0 then it will collect items only right below feet.
Warning! The script below is an old script, it won't work anymore,
just look at it to see what the scripting looks like.
Iron miner/smelter/smither script
----- Automine iron script
<- comments, they describe the script for the user, they
don't affect the script
-- 1st rock
GoToIfBagFull(15)
<- When the bag is full, it jumps 15 lines. Good style is to use labels instead, this is an old script.
ResetLastItemGained()
<- The bot notices every item you get while the bot is
running. this command resets the last item you gained.
Action(27,544)
<- This command does a action at an object. the red
coordinates may change, with moving objects. In this case it mines the rock
AtObject(28,544)
<- same as above
Wait(20)
<- this one "waits" 2 seconds.Means, the bot waits 2
seconds. to find the right wait number take the seconds and add one "0"
GoToIfLastItem(2,151)
<- this is an advanced command. When you got an item(in
this case iron ore= ID = 151) it jumps 2 lines(to
-- 2nd rock)
GoTo(-7)
<- goes 7 lines back, to start mining the rock again
-- 2nd rock
GoToIfBagFull(7)
ResetLastItemGained()
Action(27,544)
AtObject(27,543)
Wait(20)
GoToIfLastItem(-14,151)
GoTo(-7)
---- Leave iron mine
<- now the bot leaves the iron mine and walks to
varrok bank
MoveTo(24,544)
<- MoveTo means, to walk to the specified
coordiante
MoveTo(24,545)
MoveTo(19,545)
MoveTo(19,549)
MoveTo(22,552)
MoveTo(22,565)
MoveTo(29,573)
MoveTo(44,573)
MoveTo(44,577)
MoveTo(46,580)
MoveTo(52,580)
MoveTo(58,585)
MoveTo(58,595)
MoveTo(65,602)
MoveTo(65,613)
MoveTo(63,615)
MoveTo(63,619)
MoveTo(61,619)
MoveTo(61,625)
MoveTo(73,625)
MoveTo(86,625)
MoveToRandomly(86,628,87,628) <- Because varrok bank is usually very crowded, 2 MoveTo
coordinates are specified. in this case blue+red
-- Walk through door
MoveToRandomly(85,628,84,628)
-- smelt
SmeltOre(84,627,82,626,151) <- Advanced
command. I will explain it later
Wait(35)
GoToIfInInventory(-3,151)
MoveToRandomly(85,628,84,628)
-- Exit
MoveToRandomly(86,628,87,628)
MoveTo(86,625)
MoveTo(75,625)
MoveTo(61,625)
MoveTo(61,618)
MoveTo(61,616)
MoveTo(65,611)
MoveTo(65,602)
MoveTo(59,595)
MoveTo(59,585)
MoveTo(53,579)
MoveTo(45,579)
MoveTo(45,577)
MoveTo(43,576)
MoveTo(43,573)
MoveTo(49,573)
MoveToRandomly(53,571,53,572)
MoveTo(64,571)
MoveTo(67,568)
MoveTo(67,562)
MoveTo(69,560)
MoveTo(78,560)
MoveTo(78,546)
MoveTo(83,541)
MoveTo(83,519)
MoveToRandomly(83,513,83,512)
MoveToRandomly(88,508,89,508)
MoveToRandomly(98,507,97,507)
MoveToRandomly(98,509,98,508)
-- Enter blacksmith
MoveToRandomly(98,510,98,511)
@Kal:
ForgeBar(97,511,97,512,170)
GoToIfCountInInventoryGreater(@MakePlate,4,170)
<- this command goes to the "label" @MakePlate when
there are at least 4 bars
in your iventory.
WaitForQuestMenu(50) <- This command waits for the menu, what you wanna smith.
50 = 5 seconds, that's the timeout.
Answer(0) <- now it tells Autorune which answer to
choose. In this case the 3 answers 0 1 0 are the
plate
WaitForQuestMenu(50)
Answer(1)
WaitForQuestMenu(50)
Answer(0)
GoTo(@BeidzKalt)
@MakePlate:
WaitForQuestMenu(50)
Answer(1)
WaitForQuestMenu(50)
Answer(2)
WaitForQuestMenu(50)
Answer(1)
@BeidzKalt:
Wait(15)
GoToIfInInventory(@Kal,170)
MoveToRandomly(98,510,98,511)
-- Exit blacksmith
MoveToRandomly(98,509,98,508)
MoveToRandomly(102,507,103,507)
-- Enter bank
MoveToRandomly(103,506,102,506)
--- talk to banker <- here comes the bank run, means it deposits everything I will explain it later
RepeatNextCommandUntilQuestMenu(50,3)
MoveToRandomly(103,506,102,506,99,506)
Action(102,505)
TalkToNPC(556,557,559)
Answer(0)
WaitForBankWindow(50)
DepositEverything()
Wait(10)
CloseBank()
Wait(20)
MoveToRandomly(103,506,102,505,102,506)
--- Exit bank
MoveToRandomly(103,509,103,508)
MoveToRandomly(100,509,100,508)
MoveToRandomly(85,508,85,510,85,509)
MoveTo(64,510)
MoveTo(61,507)
MoveTo(40,507)
MoveTo(25,519)
MoveTo(25,537)
MoveTo(25,544)
This script should be started at Varrock East mines.
What it does is following:
Here is a bit more complex:
Mining from 2 rocks
@Rock1:
ResetLastItemGained()
Action(27,544)
AtObject(28,544)
Wait(20)
GoToIfLastItem(@Rock2,151)
GoTo(@Rock1)
@Rock2:
ResetLastItemGained()
Action(27,544)
AtObject(27,543)
Wait(20)
GoToIfLastItem(@Rock1,151)
GoTo(@Rock2)
This one mines from 2 rocks. When you look at it really carefully, it's not
complex at all. You should change the coords for Action and AtObject commands.
As soon as you get iron ore (green) it will jump to
the "label" called "@Rock2". What is a
label?
GoTo(@fishing)
What the hell is that, you may think now. But labels are really easy to understand and very, very useful. For example you want it to fish at the same place (think without fatigue ;) over and over again. First solution:
Action(27,544)...
The ... means you do that again and again and again...and again... means, for a night of pure fishing you need to copy it "some" times :D. This example script only fishes 4 times at the same place. Second solution:
@fishing:Now , this one is shorter, isn't it? It fishes 1 times, waits 2 seconds and then it "GoesTo" the "label" @fishing again. Make sure, when you use labels, there is a ':' behind the start of a label and no one at the GoTo***-command. Also take care of your spelling.
Bank Run - leave rocks
To make it leave mine when hands are full, just add few lines:
@Rock1:
GoToIfBagFull(@HandsFull)
ResetLastItemGained()
Action(27,544)
AtObject(28,544)
Wait(20)
GoToIfLastItem(@Rock2,151)
GoTo(@Rock1)
@Rock2:
GoToIfBagFull(@HandsFull)
ResetLastItemGained()
Action(27,544)
AtObject(27,543)
Wait(20)
GoToIfLastItem(@Rock1,151)
GoTo(@Rock2)
@HandsFull:
--- Leave mine
--- ...
--- ...
You could make it go to furnace and smelt all ores then or simply put them in bank.
It's up to you but when hands will be full bot will start executing lines after
the label @HandsFull:
Smelting
Take a look at the sample:
@Smelt:
SmeltOre(27,544,28,544,151)
Wait(35)
GoToIfInInventory(@Smelt,151)
-- End of smelting
-- ...
Use this command to smelt the ore to bars (you can also use it for cooking
lobbies
;]). When you smelt an ore, you will see something
like:
Action(27,544)
AtObject(28,544)
Use this Log to complete your "SmeltOre"
command. Check the colours to see what to put in. Only put in the
ore ID.
Smithing
This sample makes short swords from iron bars. It will make the swords until there
are no iron bars left in hands.
@Kal:
ForgeBar(97,511,97,512,170)
WaitForQuestMenu(50)
Answer(0)
WaitForQuestMenu(50)
Answer(1)
WaitForQuestMenu(50)
Answer(0)
Wait(15)
GoToIfInInventory(@Kal,170)
-- End of smithing
-- ...
Again: 97,511 = your coords when you're forging,
97,512 = anvils coords, 170 - iron bar ID.
If you want to make it more advanced, you can make it check if your char has 5 iron bars
then make plate mail, otherwise short swords or something, you will need variable commands
for that.
Bank
The next script deposits everything in the bank. Important:
Only the items that are
visible by the bot get deposited. The bot won't see items that you already had before logging
in unless you drop them and take again.
RepeatNextCommandUntilQuestMenu(50,2)
Action(55,511)
TalkToNPC(532,528,527)
Answer(0)
WaitForBankWindow(50)
DepositEverything()
Wait(10)
CloseBank()
Wait(10)
The
RepeatNextCommandUntilQuestMenu(50,2)
command will wait for the text, to choose if you want to bank or not ("I'd
like to access to my bank account please."). The
Action(55,511)
command doesn't matter very much, it should be in bank middle. in the next
command you have to put in all banker IDs from your bank (before running a script
you should always check NPC-IDs), you get them by
clicking each of them once. After that it waits 5 seconds
for the bank window.
DepositEverything()
means it deposits everything, the bot can see. After that it just waits a bit
and finally closes the bank.
AutoFight
Making autofight is not too hard, but it's also not at all as easy as it was in RuneBot.
The first thing you need to do is to find out NPC types. NPC type is a number, all bankers
have 1 type, dwarves another, lvl2 rats another, lvl13 rats another etc... To find out
type of NPC that interests you, open a script called NPCTest. It will show types of all NPCs
that appear on your sight in The Game, like:
A NPC appears. ID, X, Y, Type.
398 228 435 66
The first 2 numbers are coordinates, the 3rd is ID and then the number you're looking for - NPC type.
Type 66 stands for a black knight.
Now you can make a simple AutoFight script:
@Start:
Wait(30)
GoToIfNPCNear(@Attack,66)
GoTo(@Start)
@Attack:
SetVarsNearestNPC(%x,%y,%ID,66)
ActionVarVar(%x,%y)
AttackNPCVar(%ID)
This script attacks black knights every 3 seconds. It attacks all guards it sees no matter
if it's behind wall or other obstacles. Also it will attack even if your hit points are 0 or close
to that.
Good thing would be if we could make it attack in a specified area, like a room or otherwise.
Actually, we can do it!
@Start:
Wait(30)
GoToIfNPCNearIn(@Attack,100,200,110,210,66)
GoTo(@Start)
@Attack:
SetVarsNearestNPCIn(%x,%y,%ID,100,200,110,210,66)
ActionVarVar(%x,%y)
AttackNPCVar(%ID)
Numbers in green - the coordinates of box to look the NPCs for.
Also it would be good to add lines to check if you are too low on health to attack.
Advanced scripters can add item collection, auto healing, Jageks protection and other
features. For further reference use AutoRune forums.
If you make cool, universal scripts, please send them to aivars@sos.lv
and share it with AR-Groups
and I might include them with next versions.
* All labels and variables are case sensitive
* Labels are defined by @LabelName: and jumped GoTo(@LabelName). You should make sure there are no
duplicate
labels or jumping to non-existing labels, bot doesn't check it.
* There are totally 101 variables to use numbered 0..100. Variables are usually addressed through %variablename
(with percent in front), like this SetVarNum(%a,10).
* All scripts loop automatically - after last line return to line 0.
* Every coordinate is represented by 2 parameters - X and Y coordinate.
* When making loops, make sure there is Moving or Waiting command included. Otherwise in case of infinite loops
the bot will freeze.
* When using string parameters, they must be in quotes, like Debug("test")
Hex (HexText) - send raw data to server.
MoveTo(x1,y1[,x2,y2,...]) - if it has 2 params, then it moves to the coordinate specified by the params,
otherwise it will take every next pair of params as relative coordinate to move to. For an example
MoveTo(100,200,0,1) will move to coordinate 100,200 and then go 1 square to south.
MoveToVarVar(var1,var2) - 2 params, variable numbers. Will go to coords specified by those variables.
MoveToRandomly(x1,y1[,x2,y2,...]) - at least 1 pair of parameters specifying coords. Works as MoveTo, but it will
choose destination randomly from the given pairs. For an example MoveToRandomly(100,200,101,200) will
go to either 100,200 or 101,200 and if one of them is occupied by a player or NPC (non playing character)
then it will go to the other one.
Action(x,y) - 2 params, coords. This function is used together with a number of other functions right
before them, like AtObject, AtObjectWithItem, TalkToNPC, TakeItem.
ActionVarVar(var1,var2) - 2 params, variable numbers containing coords. Works like Action but with variables.
AtObject(x,y) - 2 params, coords. Use in pair Action + AtObject. AtObject is called when mining for
an example.
AtObject2(x,y) - 2 params, coords. Use in pair Action + AtObject2. AtObject2 is called when caging lobsters for
an example.
AtObjectWithItem(x,y,num) - 3 params, coords and item number in the backpack. Used together with Action.
AtObjectWithItemByID(x,y,ID) - 3 params, coords and item in the backpack ID. Used together with Action.
MineNearest(type[,type2,..]) - type of rocks to mine. This command will only work if WatchObjects is turned on.
FarActionAtObject(x,y) - Finds path through visible objects to object at x,y. Only works if WatchObjects is turned on.
TalkToNPC(ID1[,ID2,...]) - at least 1 param representing ID of NPC. Talks to non playing character (NPC). If more
than 1 parameters are given, it will talk to any of them randomly. Used together with Action.
TalkToNPCVar(var1[,var2,...]) - Like TalkToNPC but uses variables.
AttackNPC(ID1[,ID2,...]) - attack one of NPCs ID given as params.
AttackNPCVar(ID1[,ID2,...]) - Like AttackNPC but uses variables.
ThieveNPC(ID1[,ID2,...]) - pickpocket one of NPCs ID given as params.
ThieveNPCVar(ID1[,ID2,...]) - Like ThieveNPC but uses variables.
MagicNPC(ID,num) - Cast on NPC with ID spell number num.
MagicNPCVar(ID,num) - Like MagicNPC but uses variable for ID.
Deposit(ID,count) - 2 params, item ID and amount to deposit. Bank window must be open.
Withdraw(ID,count) - 2 params, item ID and amount to withdraw. Bank window must be open.
Answer(choice) - 1 param, choice number starting from 0. When talking to NPCs a quest menu sometimes appears
giving you choices of what to say or do. This command selects one of the choices.
UseItem(number) - 1 param, item number in backpack. Used to burry bones, eat food etc.
UseItemByID(ID) - 1 param, item ID. The same as UsedItem but uses item ID instead of number in backpack.
UseItemWithItem(Pos1,Pos2) - 2 params, first item's position and second item's position in inventory.
UseItemWithItemByID(ID1,ID2) - 2 params, first item's ID and second item's ID. Both items must be in
inventory and visible to bot.
Say(HexText) - use this command exactly as it appears in debug box, for an example Say(01 ). You don't see what you're
saying yourself, but others will see.
CloseShop() - no params, closes shop window.
CloseBank() - no params, closes bank window.
LogOut() - no params, log out from RS.
DropItem(number) - 1 param, item number in backpack. Drops the item on ground.
DropItemByID(ID) - 1 param, item ID, item must be in inventory and visible.
TakeItem(x,y,ID) - 3 params, coords and item ID. Tries to take item ID at given coordinates. Used together
with Action.
TakeItemVarVar(var1,var2,ID) - 3 params, 2 variable numbers containing coords and item ID. Works like TakeItem
but coords are read from variables.
TakeItemVarVarVar(var1,var2,var3) - 3 params, 3 variables containing coords and item ID. Works like TakeItem
but coords and id are read from variables.
SmeltOre, ForgeBar, Cook(X,Y,oX,oY,ID) - 5 params, your coordinates while smelting/smithing, object (furnace, anvil)
coordinates and item ID (ore or bar ID). These commands are no longer supported. Use Action and
AtObjectWithItemByID instead.
DepositEverything() - deposits every item the bot knows of. It will only see those items you gained
while playing through AutoRune, everything that you had before logging in won't be deposited.
SellItem(ID,base,inc,div) - 4 params, item ID, base price, step increaser, step increaser divider. This is a
complex function, use it only if you are desperate. The bot has to calculate prices and only if
the prices are calculated correctly, the item will be sold. It calculates the price by formula:
Price = base price * ( 1 - ( Items in shop * step increaser / step increaser divider) ). All these values
are different for every item I think, if you find a better formula, let me know. Shop window must
be open.
BuyItem(ID,base,inc,div) - 4 params, the same as for SellItem.
MagicOnItemByPos(pos,num) - 2 params, item position in inventory and spell number.
MagicOnItemByID(ID,num) - 2 params, item ID and spell number. The item must be in inventory and visible to bot.
PickItemWithItem(x,y,ID,pos) - Use item with item on ground. x, y - coords of the item on ground, ID - id of
item on ground and pos - position in inventory of item you want to use with it.
PickItemWithItemID(x,y,ID,ID2) - Use item with item on ground. x, y - coords of the item on ground, ID - id of
item on ground and ID2 - ID of item in inventory you want to use with it.
SetFire() - tries to lighten fire at characters position. Tinderbox must be in blackbox and visible to bot,
there must be wooden logs on ground where the character is standing.
SetFireAtCoords(x,y) - tries to lighten fire at given position. Tinderbox must be in blackbox and visible to bot,
there must be wooden logs on ground at the given coords.
SetFireTinderPos(Pos) - tries to lighten fire at characters position. Tinderbox must be in the given position,
there must be wooden logs on ground where the character is standing.
OpenDoor(x,y,dir) - Opens doors at coordinates x,y on direction dir.
CloseDoor(x,y,dir) - Closes doors at coordinates x,y on direction dir.
PrayerOn(num) - Turns on prayer with number num.
PrayerOff(num) - Turns off prayer with number num.
FightMode(num) - Sets fight style. Important! The command won't visuall change the menu used for selecting
fight style - that is, if you had fight style 0 (conrolled) and you set it to 1, then menu will still show
as if it was controlled, but factically experience will be added to strength and hitpoints only.
Wait(time) - 1 param, pause length in 1/10 seconds. You should use this function for waiting and also
for avoiding freezing of AutoRune because of infinite loops in script. If yo have an infinite loop,
insert Wait(1) in it.
Sleep(time*100) - 1 param, pause length in 1/1000 seconds. It's analogic to Wait, except time
gets divided by 100.
WaitForQuestMenu(time) - 1 param, timeout in 1/10 seconds. Waits until quest menu appears but if it
doesn't in time specified by param, stop waiting.
b>WaitForServerMessage(time) - 1 param, timeout in 1/10 seconds. Waits until server message appears but if it
doesn't in time specified by param, stop waiting.
WaitForBankWindow(time) - 1 param, timeout. Waits until bank window appears or time runs out.
WaitForShopWindow(time) - 1 param, timeout. Waits until shop window appears or time runs out.
WaitForCoordChange() - no params. Waits until the character changes it's location. You should
use this when climbing ladders, teleporting etc.
RepeatNextCommandUntilQuestMenu(time,count) - 2 params, timeout and command count. It will execute
next commands count specified by 2nd parameter, then wait for quest menu. If waiting times out,
it repeats the commands again and so on until the quest menu appears.
GoTo(label) - jump to label. It can also be a number, specifying how many lines to skip. Can be negative.
GoSub(label) - calls the label as procedure. Ret() will return back to the line it was called from.
Ret() - return from procedure. Jumps back to the last GoSub() it came from.
ERet() - use to return from events. If you want to jump instead of return, you should restore events
with EnableEvents()
EnableEvents() while event is caled, other events are disabled. Use this to enable them.
ERetToRet() - Enables events and puts the return address from the event to ret stack. When you
execute this command, the event now is executed like subroutine (procedure) and you can return from it with Ret().
ResetLastItemGained() - forgets the last item the character has gained.
ResetLastItemLost() - forgets the last item the character has lost.
GoToIfLastItem(label,ID) - jumps to label if the last item ID gained by character is equal to 2nd parameter.
GoToIfLastItemLost(label,ID) - jumps to label if the last item ID gained by character is equal to 2nd parameter.
ID is -2 for invisible items.
GoToIfItemGained(label) - jumps to label if item gained since the last ResetLastItemGained.
GoToIfItemLost(label) - jumps to label if item is gained since the last ResetLastItemLost.
GoToIfBagFull(label) - jumps to label if character's backpack is full.
GoToIfInInventory(label,ID1[,ID2,...]) - jumps to label if all of IDs given as params can be found in
the backpack.
GoToIfCountInInventoryEqual(label,num,ID1[,ID2,...]) - jumps to label if all item numbers with IDs given
are equal to 2nd parameter in inventory.
GoToIfCountInInventoryGreater(label,num,ID1[,ID2,...]) - jumps, if all item numbers in backpack with given
IDs are larger than 2nd parameter.
GoToIfVarEqual(label,var1,var2) - jump to label if variable1 = variable2.
GoToIfVarNotEqual(label,var1,var2) - jump to label if variable1 != variable2.
GoToIfVarAbove(label,var1,var2) - jump if variable1 > variable2.
GoToIfVarBelow(label,var1,var2) - jump if variable1 < variable2.
GoToIfVarEqualNum(label,var1,num1) - jump to label if variable1 = number1.
GoToIfVarNotEqualNum(label,var1,num1) - jump to label if variable1 != number1.
GoToIfVarAboveNum(label,var1,num1) - jump if variable1 > number1.
GoToIfVarBelowNum(label,var1,num1) - jump if variable1 < number1.
GoToIfVarBetween(label,var,varmin,varmax) - jump if var > varmin and var < varmax.
GoToIfVarBetweenNum(label,var,num1,num2) - jump if var > num1 and var < num2.
ResetLastServerMessage() - forgets last server message.
GoToIfLastServerMessageIs(label,"String") - jumps to label, if last server message is equal to String.
GoToIfLastServerMessageIsNot(label,"String") - jumps to label, if last server message is not equal to String.
SetVarNum(var1,num1) - sets variable1 to constant number. variable1 := number1.
SetVar(var1,var2) - sets variable1 to variable2. variable1 := variable2.
SetVarRandom(var1,num1) - sets variable to random value from 0 to num1.
AddVarNum(var1,num1) - increases variable1 by number1. variable1 := variable1 + number1.
AddVar(var1,var2) - increases variable1 by variable2. variable1 := variable1 + variable2.
SubVar(var1,var2) - decreases variable1 by variable2. variable1 := variable1 - variable2.
SetVarItemCount(var1,ID1) - sets variable1 to number of items with ID1 in backpack.
SetVarCountInShop(var,ID) - sets variable to number of items with ID in shop.
SetVarCountInShopVar(var1,var2) - sets variable1 to number of items with ID equal to variable2 in shop.
SetVarMyX(var1) - sets variable1 to your X coordinate.
SetVarMyY(var1) - sets variable1 to your Y coordinate.
SetVarMyHP(var1) - sets variable to your hit points value.
SetVarTime(var1) - sets variable to timestamp. You can use this to get out of loops if you're in them
for too long.
SetCoordsNearer(var1,var2) - assumes that var1,var2 are coordinates and make them one step closer to your position.
GoToIfCoordsCloserThan(label,x1,y1,x2,y2) - jumps if coordinates x1,y1 are closer to you than x2,y2.
GoToIfCoordsCloserThanVars(label,vx1,vy1,vx2,vy2) - jumps if coordinates vx1,vy1 are closer to you than vx2,vy2.
vx1, vy1, vx2, vy2 are variables.
GoToIfCoordsIn(label,x1,y1,x2,y2) - jumps if your coordinates are in box specified by (x1,y1,x2,y2).
GoToIfCoordsInVars(label,vx1,vy1,vx2,vy2) - jumps if your coordinates are in box specified by (vx1,vy1,vx2,vy2).
vx1, vy1, vx2, vy2 are variables.
GoToIfNPCNear(@label,type[,type2,...]) - jumps if NPC specified by type is near.
SetVarsNearestNPC(vx,vy,vID,type[,type2,...]) - puts coords of nearest NPC specified by type in vx and vy and it's
ID in vID.
SetVarsRandomNPC(vx,vy,vID,type[,type2,...]) - puts coords of random NPC of type in vx and vy and ID in vID.
SetVarsNearestNPCIn(vx,vy,vID,x1,y1,x2,y2,type[,type2,...]) - puts coords of nearest NPC specified by type in vx and vy and it's
ID in vID if the NPC is in box specified by x1,y1,x2,y2.
SetVarsRandomNPCIn(%x,%y,%ID,x1,y1,x2,y2,type[,type2,...]) - puts coords of random NPC of type in vx and vy and ID
in vID if the NPC is in box specified by x1,y1,x2,y2.
GoToIfNPCNearIn(@label,x1,y1,x2,y2,type[,type2,...]) - jumps if there is NPC in coords x1,y1,x2,y2 specified by type.
SetVarNPCType(vartype,ID) - sets vartype to type of NPC with ID.
SetVarNPCCoords(vx,vy,ID) - sets vx and vy to coords of NPC with ID.
GoToIfNPCVisible(@label,vID) - will jump if NPC is visible (not dead or out of screen).
SetVarObject(vartype,x,y) - sets vartype to object type at location x,y.
SetVarsNearestObjectXY(vx,vy,dist,type[,type2,...]) - sets vx and vy to the coords of nearest object with type
at distance dist or closer.
GoToIfObjectNear(@label,dist,type[,type2,...]) - jumps if object specified by type is at distance dist or closer.
SetObject(x,y,type) - tells AutoRune, that there is objec with type at x,y.
PutVarInArray(var,i,a1[,a2,...]) - put variable in "array" specified by a1, a2, ... If i=0 then it will put variable in
a1, if i=1 it will put it in a2 etc.
PutNumInArray(num,i,a1[,a2,...]) - put number in "array" specified by a1, a2, ... If i=0 then it will put number in
a1, if i=1 it will put it in a2 etc.
GetVarFromArray(var,i,a1[,a2,...]) - read value from array in variable. i is index, where if i=0 then it will put
in variable a1 contents, if i=1 then contents of a2 etc.
Push(var) - puts variable into stack. You can put up to 50 values in stack and get them out with Pop.
PushNum(num) - puts number into stack. You can put up to 50 values in stack and get them out with Pop.
Pop(var) - gets the most recently Pushed value from stack and puts it into variable.
GoToRandom(label1[,label2,...]) - jumps to any of labels given chosen randomly.
GoSubRandom(label1[,label2,...]) - calls any of given labels as subroutines.
GoToCase(i,label1[,label2,...]) - if i=1 it will jump to label1, if i=2 then to label2 etc.
Debug("String") - Output text in the left Debug box.
DebugVar(var1[,var2,...]) - Output contents of variables in Debug box.
DebugLastServerMessage() - Output the last server message to Debug box.
MessageBox("String") - Show message box with custom text.
GoToIfQuestion(label,"Question") - displays yes/no messagebox and jumps, if user answers with "yes".
Stop() - stops script execution.
StopAndLogOut() - stops script execution and logs out.
SetTraceMode(num) - num is 0, 1 or 2. If it's 0 then trace mode is set to normal, 1 - events are not traced, 2 - nothing is traced.
SetTimeSinceMovingToDest() - give to bot another time since moving to destination.
SetOnPlaceTime(time) - changes the standing on the same place timeout. After character
stands on the same place for given time, it will move randomly a bit. Default timeout is 2400 which is 4 minutes.
SetSkipDestTime(time) - changes the skip destination timeout. This is the time after which the bot will move to
next command even if the destination with MoveTo is not reached. Default time is 2000.
SetCheatDestTime(time) - changes the cheat destination timeout. If you haven't reached MoveTo destination in
this time, then AR will try to pick up unexisting item at the destination, thus going there even if someone is standing
in the way. Default time is 800.
SetRetryDestTime(time) - changes the retry destination timeout. If you haven't reached MoveTo destination in
this time, AR will retry going there. Default time is 30.
SetSkipDestMode(num) - num is 1 or 0. If num is 1 then AR will skip the destination on skip destination timeout,
otherwise it will only trigger the even but won't skip.
SetCheatDestMode(num) - num is 1 or 0. If num is 1 then AR will cheat the destination on cheat destination timeout,
otherwise it will only trigger the even but won't cheat (by trying to take unexisting item at destination coords).
SetRetryDestMode(num) - num is 1 or 0. If num is 1 then AR will retry to reach the destination on retry destination
timeout, otherwise it will only trigger the even but won't retry.
SaveScreenshot - Saves a picture of RS window in AutoRune ScrShots folder. It only works if RS client is visible
(it can't be minimized or behind another window).
WatchObjects(num) - num can be 1 (on) or 0 (off). If you turn this on, then it will remember coordinates of all
objects appeared thus giving you possibility to use such commands as MineNearest and FarActionAtObject. Default is off.
Click(x,y) - Left click at x,y on RS client. x and y are RS applet not screen relative coordinates.
ClickVar(%x,%y) - Left click, coordinates in variables.
GetColor(x,y,%c) - Read color value at x,y and put it into %c.
ClickColor(c) - Scan all RS screen to find color c and click it.
ClickColorAt(c,x1,y1,x2,y2) - Scan all the rectangle specified by x1,y1,x2,y2 for color c and click ir.
ClickColorSpiral(c,x,y,x1,y1,x2,y2) - The fastest scanning function. It starts scanning from x,y and then goes in bigger and bigger circles.
You can set all x1,y1,x2,y2 to -1 to scan the whole RS screen.
FindColor(col,%x,%y,x1,y1,x2,y2) - Find color in the rectangle and put it's coords in %x and %y.
FindColorSpiral(col,%x,%y,x1,y1,x2,y2) - The fastest color finder, set %x and %y to coords you want to start scanning from.
SetLagSafe(0-1) - Turn off/on Lag Safe mode.
SetVarPlayerSkulled(ID,%v) - sets %v to 0 if player ID if not sculled
and 1 if is skulled
DebugRS("text") - sends text to client as server message.
DebugRSVar(%v1[,%v2,...]) - sends variables to client as server message.
HTTPGet("text") - text has to be a valid http address. AR connects to it and
receives data to LastHTTPResponse. It takes time to receive the data
depending on the connection and during that time AR keeps running script. Don't
expect server response to be received instantly after execution of this command.
HTTPGetParamVar(%var1[,%var2,...]) - parameters that will be used with the
next HTTPGet. Will send in format ?v1=%var1&v2=%var2.
GoToIfLastHTTPResponseIs(@Label,"text") - jumps if text is last HTTP
response.
GoToIfLastHTTPResponseIsNot(@Label,"text") - jumps if text is not last HTTP
response.
GoToIfInLastHTTPResponseIs(@Label,"text") - jumps if text
in last HTTP response.
GoToIfInLastHTTPResponseIsNot(@Label,"text") - jumps if text not in last
HTTP response.
DebugLastHTTPResponse() - displays last HTTP response.
ResetLastHTTPResponse() - sets last HTTP response to empty string.
PlaySound("file") - plays wav file (maybe mid as well).
SetVarItemPosByID(%pos,ID) - sets %pos to item ID position in inventory.
SetPMReceiver("name") - set next person to receive PM by name.
SetPMReceiverByID(ID) - set next person to receive PM by ID.
SetPMReceiverLastPMer() - set last person who PMed you as the next person to
receive PM.
PM(hex data) - send private message.
GoToIfLastPMIs(@Label,"text") - jumps
if text is last PM.
GoToIfLastPMIsNot(@Label,"text") -
jumps if text is not last PM.
GoToIfInLastPMIs(@Label,"text") - jumps
if text in last PM.
GoToIfInLastPMIsNot(@Label,"text") -
jumps if text not in last PM.
ResetLastPM() - sets last PM to empty string.
TradePlayer(ID) - send trade request to player ID.
Accept1() - accept in first trade screen.
Accept2() - accept in second trade screen.
Decline() - decline trade.
PutTrade(ID,count[,%ID,%count,...]) - put items for trade in first trade
screen.
ForgetItems() - same as menu Script > Forget Items.
SetNoMouseMovement(0-1) - do not simulate mouse movements while running
script if on.
GoSubNext() - put next line into return stack.
Wield(pos) - wield item.
Unwield(pos) - unwield item.
ClearDebug() - clear debug box.
SetVarFatigue(%v) - set %v to fatigue level. This isn't the same as
fatigue %, %v can go up to 800.
MagicPlayer(%ID,num) - cast spell num on player %ID.
Events
For an example, OnHPChanged event
will be executed every time when hitpoints change. If you have set this event, as, for an example,
OnHPChanged(@HPChanged,%HP), then every time your hit points change, the script will jump to
the label @HPChanged: and
insert the current value of hit points into he variable %HP. After you finish processing the event, return to the main
script with ERet().
Look at EventTest sample script as example.
OnItemLost(label,%ItemID,%ItemPos) - event gets executed every time an
item is lost from inventory. It will copy item position and ID to the variables
specified, if item, that is not visible to bot disappears, then %ItemID is set
to -2. You could use this event for detecting if admins took
your pickaxe or rod.
OnItemGained(label,%ItemID,%ItemPos) - Same as above, but for gaining
items.
OnServerMessage(label) - event gets executed on server messages. You can use commands GoToIfLastServerMessageIs
and GoToIfLastServerMessageIsNot to find out what message it was here.
You could
use this event for the new fatigue system, let me show you this:
GoToIfLastServerMessageIs(@sleep,"@gam@You
are too tired to fish here")
You could use it with this command, it jumps to
the label @sleep when RS shows you, that you
are to tired to fish here. Don't forget to EnableEvents() if you're jumping from event.
OnPrivateMessage(label) - event gets executed on private messages. If you block private messages and yet
a private message is being sent, it's a reason for LogOut() and Stop().
OnCoordsChanged(label,%LastX,%LastY) - gets executed every time the coordinates change. %LastX and %LastY
contain the coordinates you are coming from. Here you can detect if you possibly get teleported by admins.
OnDestinationReached(label) - gets executed every time when MoveTo reaches the destination.
OnIdle(label,time) - gets executed when script sits on the same line for time given and is not moving.
You can use this to detect if the script is stuck.
OnHPChanged(label,%HP) - gets executed when hit points change. %HP will contain the amount of hit points.
OnStatsChanged(label,%StatNumber) - gets executed when stats change. %StatNumber will contain number of
stat that changes (0 - attack, 1 - defense, 2 - strength, 3 - hits, 4 - range, 5 - prayer, 6 - magic, ...).
OnChatMessage(label) - gets executed when someone talks in game. If you have chat messages blocked and
someone still talks - it's admin, beware!!!
OnShopClosed(label) - Shop window closes.
OnNPCAppeared(label,%ID,%x,%y,%type) - New NPC (non playing character) appeared. %ID will contain it's ID,
%x and %y - it's coords and %type - it's type (what kind of monster is it).
OnItemAppeared(label,%ID,%x,%y) - new item appears. %ID - item's ID, %x and %y item's coords.
OnItemDisappeared(label,%ID,%x,%y) - an item disappears. %ID - item's ID, %x and %y item's coords.
OnNPCMoved(label,%ID,%x,%y,%type) - NPC is moving. Params the same as in OnNPCAppeared.
OnObject(label,%type,%x,%y) - Object appears or changes. %type - object type, %x and %y - coordinates.
OnRetryDest(label) - when you get stuck when moving, it will retry to reach the destination and trigger this event.
OnSkipDest(label) - when you get stuck for longer time, it will quit trying to reach the destination and
start with the next command in script.
OnCheatDest - when you get stuck for some time it will try to "fool" The
Game and try to take unexisting
item from groung thos moving to the destination even if someone is standing there.
OnQuestMenuAppeared(label) - gets triggered when quest menu appears.
OnTimer(label,num,time) - num is timer number 1-10, time is time in 1/10 seconds after what the event gets triggered.
It will only be triggered once, you have to set the timer again to trigger it several times.
OnLogin(label) - get's executed when you log in (re-login because of lag or because of Login on Disconnect)
Variables
Definition
var·i·a·ble ( P ) Pronunciation Key (vār--bl,
vr-)
adj.
Likely to change or vary; subject to variation; changeable.
Mathematics. Having no fixed quantitative value.
n.
Something that varies or is prone to variation.
Mathematics.
Yes a variable is a symbol representing a
number, or a letter that contains a number. for example..
SetVarNum(%d,20) %d being the variable (or symbol). 20 is the number the
variable contains.
That would be used to define a variable lets say if you needed to do something
20 times (withdraw 20 iron).
I will explain in detail (I hope) a variable adding, and subtracting script.
| SetVarNum(%a,30) | Ok here it defines the variable, if it was inside the loop then it would keep going and never end. Personally I always add it above the time Its needed, for certain reasons (redoing parts of a script). This line makes %a contain a number 30. |
| @wd: | Label, Wow :D |
| Withdraw(373,1) | Here is the command I want to do 20 times.. which is withdraw a cooked lob. |
| AddVarNum(%a,-1) | Here it is the variable changing part. This will subtract 1 number for the variable %a. |
| Wait(1) | Wait for it! |
| GoToIfVarEqualNum(@close,%a,0) | Here is use of a of variable. This checks to see if the variable %a is 0, if not then continue on, but if so then it breaks out of the loop and go to the label @close. |
| GoTo(@wd) | Loop |
Pretty simple eh? Its not rocket science. Test it with a few scripts you will see its very simple. It can also be used with commands such as ActionVarVar, AttackVar, SetVarMyX, SetVarMyY. Which you will understand if you read this manual.
That's it for now I will right some more if it is needed and with some more advance commands.
Tutorial - Jageks Protection
This is one of the ways to avoid being banned,
because we all know that nobody likes to get banned!
What it does: When teleported/ PMed /see's chat messages it logs out quick. So,
we try to explain you how to add a good Jageks-Admin-protection to your script.
You must have read this manual to understand everything, especially events.
Let's look at this example script:
| - Protection | Comment =D |
| OnChatMessage(@RunAndHideChat) | Trigger for a Chat Message if there is any chat messages then it will goto that label. |
| OnPrivateMessage(@RunAndHidePM) | Trigger for a PM. |
| @script: | This is where your basic script goes what ever it may be. |
| - Your script goes here | |
| - Anti Jageks scheme | |
| @RunAndHideChat: | |
| Debug("Ooops someone is talking in the game. If chat messages are blocked - its an admin!!!") | |
| GoTo(@RunAndHide) | Goes to Log Out |
| @RunAndHidePM: | |
| Debug("Ooops someone is PMing you in the game. If PMs are blocked - its an admin!!!") | |
| GoTo(@RunAndHide) | Goes to Log Out |
| @RunAndHide: | |
| StopAndLogOut() | Stops AR and logs out. |
| Wait(1) |
Version 2.8 new features:
Let's hope there is no more lag!
Version 2.7 new features:
Some stuff that was requested
Version 2.5, 2.6 new features:
Just lots of minor fixes and improvements.
Version 2.4 new features:
And THEY did it again! THEY disabled AutoRune and RuneBot by changing JAVA
obfuscator and network protocol. This is the second time AutoRune has been
resurrected from death. Thank you for the challenge!
Thank you Vee for inspiring me, only because of you I didn't give up.
Version 2.2 and 2.3 new features:
This was where AutoRune was revived after the mass ban. As we know THEY detected AutoRune for several weeks before banning, so making those who purchased AR during that time suffer. That ban was a bit of shock and I had other things I was very busy with so AR was put aside for more than 2 months. Now it has split into 2 very similar versions with a tiny difference - 2.2 still gets you banned while 2.3 doesn't.
Version 2.1 news:
Many things have changed since the last version. The main thing I should mention is:
AutoRune is not property of Kaitnieks anymore. I have sold it to Jason, so any further assistance
will be from him. I am however keeping to develop AR.
Version 2.1 new features:
Version 1.26 (special edition for Bl4ck1E)