Profile guide

25
RwBot - Advanced Profile Developer’s Guide Introduction RwBot supports both the Glider and Pirox file format - something you probably knew by now. Both of these great programs after which the file format names come, are now r.i.p. Their authors have put some tremendous amount of work in their development and so did their respective communities. The reason behind supporting file formats of each of those great bots was not to steal their community, but to offer an alternative. Both file formats always had an open file structure , which could be viewed / edited in notepad as plain text. Now, when both of these bots are gone the hard work of people behind many profiles is not going to waste. Every Pirox ,as well as, Glider profile developer can use a script language , with which he is already familiar. Further in this tutorial , when we refer to Piroxor Gliderwe will mean the file format, not the particular software. Whether you are already familiar with profile development or not, this tutorial will come in handy. Please note that RwBot is in constant development and you can expect a new release of the Profile Developer’s Guide anytime soon. Please also note that the already implemented behavior might change, and we’ll be starving to reflect all of them in this very guide. Dude, but what exactly are those ‘waypoints’ and what is it all about? Waypoint profiles may consist of waypoints and commands. Together , they can be used to create some advanced peace of code, which is able to complete quests, sell items, fix your armor, resurrect after death, you name it. Waypoints are points in a two or three dimensional space along which your character will be moving by (it will be explained further on). Here is an example: How do the waypoint files look like? Waypoints in the Pirox file format Waypoints in the Glider file format [GoTo] z=Loop() z=WPX( 2293.468, 5273.25, 11.40659, 0) z=WPX( 2289.098, 5275.812, 11.40659, 0) <?xml version="1.0"?> <GlideProfile> <Waypoint>2291,04 5274,891</Waypoint> <Waypoint>2290,613 5280,011</Waypoint>

Transcript of Profile guide

Page 1: Profile guide

RwBot - Advanced Profile Developer’s Guide

Introduction

RwBot supports both the Glider and Pirox file format - something you probably knew

by now. Both of these great programs after which the file format names come, are now r.i.p.

Their authors have put some tremendous amount of work in their development and so did

their respective communities. The reason behind supporting file formats of each of those great

bots was not to steal their community, but to offer an alternative. Both file formats always

had an open file structure , which could be viewed / edited in notepad as plain text. Now,

when both of these bots are gone – the hard work of people behind many profiles is not going

to waste. Every Pirox ,as well as, Glider profile developer can use a script language , with

which he is already familiar. Further in this tutorial , when we refer to ‘Pirox’ or ‘Glider’ we

will mean the file format, not the particular software.

Whether you are already familiar with profile development or not, this tutorial will

come in handy. Please note that RwBot is in constant development and you can expect a new

release of the Profile Developer’s Guide anytime soon. Please also note that the already

implemented behavior might change, and we’ll be starving to reflect all of them in this very

guide.

‘Dude, but what exactly are those ‘waypoints’ and what is it all about’?

Waypoint profiles may consist of waypoints and commands. Together , they can be

used to create some advanced peace of code, which is able to complete quests, sell items, fix

your armor, resurrect after death, you name it.

Waypoints are points in a two or three dimensional space along which your character will be

moving by (it will be explained further on).

Here is an example:

How do the waypoint files look like?

Waypoints in the Pirox file format Waypoints in the Glider file format

[GoTo]

z=Loop()

z=WPX( 2293.468, 5273.25, 11.40659, 0)

z=WPX( 2289.098, 5275.812, 11.40659, 0)

<?xml version="1.0"?>

<GlideProfile>

<Waypoint>2291,04 5274,891</Waypoint>

<Waypoint>2290,613 5280,011</Waypoint>

Page 2: Profile guide

z=WPX( 2288.231, 5282.465, 11.40659, 0)

z=Loop()

<Waypoint>2291,184 5286,84</Waypoint>

</GlideProfile>

Pirox file format supports much more advanced functionalities than Glider. Basically,

all that can be achieved with Glider file format is to create a simple profile with one loop

along which your character would be moving by. Glider file format also supports so called

‘ghost waypoints’. Another important thing to note ,is that, Glider file format does NOT

support the use of flying mounts. The reason behind being so, is that, he mentioned file

format does not store the Z coordinate of your character ( the height at which your character is

located at). All of the waypoints stored in the Glider file format are points in a two-

dimensional space, while points stored by Pirox, are points in a three-dimensional space.

2-dimensional space vs 3-dimensional space

Picture 1: Demonstrates difference between 2 and 3 dimensional space. The lack of Z

coordinate in Glider file format prevents it from being used with flying mounts. Please use

Pirox for such tasks.

‘If the ‘Pirox’ file format is better than why even consider ‘Glider’ file

format?’

There are some situations for which Glider file format, not that might be better, but surely can

take less time to develop. If you are just about to create a short profile with one loop to kill

some mobs around, then why not to use the Glider file format. There is no need to declare

any blocks, and your waypoint file would loop automatically. What does it mean, ‘to loop’ a

profile? Lets take a look..

Consider that you want to create a profile which is to run for 5 hours all time long,

maybe longer. It surely would take lots of time to record such a profile. Actually you would

need to sit by your computer, recording waypoints for 5 hours, and then RwBot would just

play them back until it reaches the last waypoint in the file. It does not sound good, does it? ; ]

Page 3: Profile guide

That’s why the idea of looping waypoint profiles or particular blocks of waypoints.

There are two methods for looping a profile.

1)Sample ‘closed-loop’ profile

2) Sample non-closed loop profile.

Glider file format supports both of these scenarios. What is more, RwBot

automatically detects if a profile forms a closed loop. In case it does not, then it would

reverse the profile and your character would be moving back the path in reverse direction.

That is when the pros of Glider file format start and end If you want to create a simple

profile, which is supposed to do nothing , but run around and kill mobs ,then this might be the

way to go.

We strongly advise to use Pirox file format for any advanced task. We try to make

every change we introduce to work as well with Glider file format as well as with Pirox file

format. Please not however, that Glider file format does not support any commands.

‘How to LOOP my Profile?’

When using Pirox file format, you need to place your waypoints inside of two

“z=Loop()” commands. Example:

Page 4: Profile guide

,,

UPDATE(11.07.12) Important: Please note , that commands/ waypoints can not be placed outside of a code-block, so the

above example has a [GoTo] section declared in the first line.

A proper way to Loop a profile, while performing random jumps might be as follows:

[GoTo] // main starting block

z=Jump2Path("Way1|Way2|Way3" ) // skacze do wylosowanego bloku (1 z 3)

[Way1]

z=WPX( -1106.295, -3347.975, 89.55679, 0) //A

z=WPX( -1103.342, -3342.062, 90.70649, 0)

z=WPX( -1099.505, -3336.207, 91.58681, 0) //X

z=j2p("GoTo") // lets jump back to GoTo

[Way2]

z=WPX( -1106.295, -3347.975, 89.55679, 0) //B

z=WPX( -1103.342, -3342.062, 90.70649, 0)

z=WPX( -1099.505, -3336.207, 91.58681, 0)//Y

z=j2p("GoTo") // lets jump back to GoTo

[Way3]

z=WPX( -1114.928, -3353.736, 89.44655, 0) //C

z=WPX( -1119.16, -3349.318, 90.37038, 0)

z=WPX( -1124.692, -3351.105, 90.54344, 0)

z=WPX( -1129.972, -3355.723, 90.59206, 0)//Z

z=j2p("GoTo") // lets jump back to GoTo

in the above example, there is no need to use the z=Loop() commands. The reason is that, the

z=j2p(“GoTo”), command takes care of jumping back to the main GoTo as soon as it reaches

the last(j2p) command in any of the three (Way1,Way2 or Way3) waypoint blocks. The result

is a profile, being looped in an infinite way.

Also please note that for the above example to work, the starting and ending waypoints need

to be very close to each other (same place), otherwise, your character might end up being too

far away to perform a jump to any of the other sections.

Ie. A~B~C~X~Y~Z

Page 5: Profile guide

“What happens when my character DIES?”

Short answer: When your character dies, bot switches from normal waypoints to the ‘ghost-

waypoints’. BUT… only if such waypoints are in place :-)

What are those ghost-waypoints and how do you create them? Well, these are just

regular waypoints, but recorded while running from the nearest graveyard to the closest

‘normal waypoint’. That’s just the simplest possibility . Alternatively; after death you could

instruct RwBot to detect the location of the graveyard, at which your character has repoped at

, and jump to the closest ghost block accordingly. To accomplish such a task, you would need

to use Pirox profile format.

The way ghost waypoints are represented in a profile differs. Here are the main differences.

File

format

Pirox Glider

Example

of ghost

waypoints

[Ghost]

z=WPX( 2293.468, 5273.25, 11.40659, 0)

z=WPX( 2289.098, 5275.812, 11.40659, 0)

z=WPX( 2288.231, 5282.465, 11.40659, 0)

z=WPX( 2293.468, 5273.25, 11.40659, 0)

z=WPX( 2289.098, 5275.812, 11.40659, 0)

z=WPX( 2288.231, 5282.465, 11.40659, 0)

<GhostWaypoint>-5291,792

337,319</GhostWaypoint>

<GhostWaypoint>-5286,752

337,5091</GhostWaypoint>

<GhostWaypoint>-5281,454

337,7089</GhostWaypoint>

<GhostWaypoint>-5276,197

337,9072</GhostWaypoint>

Block

name

[Ghost] Glider file format does not

suport blocks of waypoints.

Ghost waypoints are stored as

‘GhostWaypoint’ XML nodes.

Page 6: Profile guide

RwBot would switch to ghost waypoint recording mode when your character dies so

there no need to worry about it. All you need to do is to run from the graveyard to the nearest

gathering/leveling waypoint.

‘What if I want character to resurrect at the spirit healer instead of

following the ‘ghost waypoints?’

You need to use Pirox file format and set the SpiritOnDeaths flag inside of the

profile. In the latest release, RwBot would automatically jump to and resurrect at the spirit

healer if a blocked named ‘Spirithealer’ is found.

Example:

[ToSpiritHealer] //instructs how to reach the Spirit Healer – not required.

z=UseNPC("Spirit Healer")

[SpiritHealer] //instructs what to do after resurrection at the spirit healer

z=J2P("ForceSleep")

[ForceSleep]

z=MountingUp() //mounts up

z=SendIt("SPACE down") //press space bar key down -causes character to fly up

z=SleepIt(2000,2250) //sleeps for time between 2000 and 2250 ms

z=SendIt("SPACE up") //relase space bar button.

z=SleepIt("600000") //sleeps for 600000ms

z=J2PIIR("GoTo", "", "", "", "", 1000) //jumps to the GoTo block

The story continues…

‘Ok, now I know what the waypoints are. Tell me about the ‘commands’ how

can I make RwBot accomplish some more advanced tasks, such as, questing,

repairing my armor etc. ?’

Actually, RwBot implements whole scripting language which you can use to declare

variables, compare those, performs conditional jumps to other files and perform mathematical

expression evaluation .

Sample pirox commands:

z470=UseVendor("35929") Attempts to use vendor with DisplayID of

35929.

z=GoToVendor() Jumps to a Vendor block if your armor is

damaged.

z=SetOption("DisableCollecting", 0) Disables gathering

z=J2PIIR("BeforeGoTo", "", "", "", "", 30) Performs a jump to a BeforeGoTo section of

a Pirox profile if it’s in range of 30 yards.

z=SleepIt(500) would cause RwBot to sleep for 500 ms

z=UseVendor("Mardan Thunderhoof") instructs RwBot to use Vendor “Mardan

Page 7: Profile guide

Thunderhoof”, which would also repair your

armor.

z1=AddObjectToBlacklist(-10365.2,-

286.1615,231.0436)

Add objects located at (-10365.2,-

286.1615,231.0436) to a blacklist. Node

located at such location or very close to,

would not be gathered.

z=MountUp(1) Instructs RwBot to mount up (1 = flight

mount , 0 = land mount)

Tip for the most advanced users: Please note that for the most advanced tasks

RwBot utilizes a plugin subsystem. The plugin subsystem enables C# developers to access

functionalities, such as, methods casting particular spells by name. Everything happens

outside of game’s process and it’s memory space. RwBot API allows to override RwBot

functionalities, such as, navigations system and makes it possible to add features never

intended by authors of this software. You can expect a separate tutorial which deals with

RwBot API.

More about the Pirox profile blocks / sections

As you might have already noticed - a single profile can be divided into multiple

sections. Some of the profile blocks have reserved special names such as [Ghost] [Profile]

and [SpiritHealer]. The [GoTo] block is the default starting block if not specified otherwise.

Sample ‘Profile’ block:

[Profile]

Faction=Both //profile intended for Alliance as well as Horde

UseFlyMount=1 // instructs RwBot to use the flying mount for all of the waypoints

StartPath=BeforeStart // sets the starting block to [BeforeStart] instead of [GoTo]

[Profile] block is a special block in which you can set some settings related flags. These

settings would override your RwBot setup.

You can define your own profile sections. Every profile sections name needs to be

surrounded by two brackets and placed in a new line. You can jump to any self-defined

section using the ‘j2p’ command.

Important information: There are quite a few commands, taking different number of

arguments, which can be used to jump to a specific profile block depending on the situation.

These commands include: J2PIfClass, Jump2PathIfInRange, j2p, Jump2Path, J2PIIR.

Example:

z=j2p(‘GoTo2’)

performs a jump to the GoTo2 section

Page 8: Profile guide

z=j2p(‘GoTo2| GoTo3| GoTo4’)

performs a random jump to one of the 3 blocks

z=Jump2Path("VENDOR", "Ultimate Uldum by Momondoodk\PROFILES\vendor.ini")

performs a jump to the [Vendor] block inside of the vendor.ini file.

z=J2P("LOOP1|LOOP2|LOOP3|LOOP4|LOOP5", "Ultimate Uldum by

Momondoodk\PROFILES\heart.ini")

performs a random jump to one of the five profile sections located in the hear.ini file.

z=J2PIf(ReadVar("GotIt", 1), 10, "Done")

performs jump to the [Done] section if the ‘GotIt’ variable is set to 10.

z=J2PIf("ReadVar('Uldum_Loop', 1) > ReadVar('How Many Loops In Uldum', 1)", true,

"Done")

performs jump to the [Done] section if 'Uldum_Loop' variable is of greater value than the

'How Many Loops In Uldum' variable.

z=J2PIIR("NW_Loop|NE_Loop|SW_Loop", "", "", "", "", 300)

performs a random jump to one of the 3 section if the randomly selected block is in range of

300 yards.

“How do I make RwBot pay a visit to the Vendor?”

As you might have guessed for a profile to support Vendor blocks - there needs to be a

[Vendor] block.

Here is how a sample Vendor profile looks like:

Page 9: Profile guide

And now, when would RwBot attempt to visit a vendor ?

1) armor is damaged

2) there is no free backpack space

When does RwBot check if it needs to visit vendor?

1)Each time it enters a Loop

2)GoToVendor command would FORCE RwBot to visit a vendor

When one of the jump conditions is verified to be true, a jump to the beginning of the

[Vendor] block would be initiated. Please note that you are responsible for a successful return

to the main route at the end of the Vendor block. A successful Vendor block should guide

your character from a place where the jump conditions is verified (the beginning of a Loop

and/or the GoToVendor command), to the Vendor, where it would initiate the UseNPC()

command, and after finished, guide your character back to the initial location (the beginning

of a main Loop). After RwBot return from the vendor block, it would go ahead and execute

next command. After it jumps to the Vendor block you are fully responsible what happens

next. You can also use any of the commands in the Vendor block like j2p etc.

Page 10: Profile guide

“How do I ignore mobs?”

There are two ways to ignore mobs:

a)by ID

z=IgnoreFaction(ID)

by)by Name

z=IgnoreMob(Name)

Both have advantages and disadvantages. Here are two:

a) Maybe there is a Mobtype who has the same ID

b)The name is based off the client. If you play with the enGB client thename is totally

different to the deDE client.

“How do I ignore certain locations/ spots?”

Case: There is a mining/herbalism spot which gets your character killed a lot and so you want

to discard any attempt of visiting such a location. How do you know the coordinates of the

mining node? Before RwBot attempt to mine any node, it would first write down it’s location

into the log-window. That’s where you find it’s coordinates.

The command used to blacklist spots looks like this:

z=AddObjectToBlacklist(-9151.728,480.7656,157.1585)

“How to make RwBot use hearthstone?”

z=UseHearthStone() command

After WoW loads all of the data RwBot would continue as normal.

Page 11: Profile guide

“How to use the flightmaster?”

To use the flighmaster use this code:

z=UseNPC("Name of Flighmaster ")

z=ClipboardPut ("/click TaxiButton11")

z=SendIt("{Enter}")

z=SleepIt(1000)

z=SendIt("^{v}", 1)

z=SleepIt(1000)

z=SendIt("{Enter}")

To get the ID of the flighpath its simple do this:

1)Create a new Macro with this input:

2)/run ChatFrame1:AddMessage(GetMouseFocus():GetName())

3) Bind it to a key4) Hold the mouse over the flighpath and press that button

5) in the Chat there is now something like this: Flighpath XXX= the ID

Good to do that when you want to use two Spots (Farming).

Profile commands

(Not all of them documented yet, more will come..)

Page 12: Profile guide

* SleepIt( Time, [TimeMax = 0, force = 0, [InCombatCheck = 0]]] )

Time : The time which the bot shall sleep, in [ms]

[TimeMax] : [optional] If TimeMax > Time then the bot will choose a value between Time

and TimeMax to sleep (random sleep), in [ms]

[Force] : [optional] will always executed, also in ghost path

[InCombatCheck] : [optional] if iis set to 1, bot will check if u are in combat, if u are, then bot

will break this function

Code:

e.g.:

[GoTo]

z=SleepIt(1000) ;wait 1sec

z=SleepIt(1000,2000) ;waits 1 to 2sec, can be 1,1 or 1,9, it is random

z=SleepIt(1000,2000,1,1) ;force=1 -> the bot will wait here also if the status has changed (e.g.

died), InCombatCheck=1 -> the bot will breake the function if u got attacked

* SendIt( Key, [ActivateWoW = 0, [Force = 0]] ) updated v2.3.0

Key : which Key to send to wow - Key List - ex: F1 or NUMPAD1. It can also send a random

chosn Key with the | sperator. e.g: F1|a|{f}. If you want to use | as a text char, you have to use

{|} or \|

[ActivateWoW] : [optional] 1 will activate wow before sending the key, required to send

modifier + key (ex: CTRL+v)

[Force] : [optional] will always executed, also in ghost path

Code:

e.g.:

[GoTo]

z=SendIt("a") ;sends the key "a" to wow

z=Sendit("{ENTER}") ;sends the key "ENTER"

z=SendIt("hallo|hi") ;send the keys "h a l l o" or "hi"

z=Sendit("{ENTER}") ;sends the key "ENTER"

z=Sendit("{|}") ;sends the key "|"

z=Sendit("^{v}",1) ; activated wow window, press CTRL+V

* SendChat( Text )new v2.3.0

Text : The text to send directly to wow chat. Don't use it for key sending like {a}. It is for text

only. It can also send a random chosn text with the | sperator. e.g: Hello|Hi|Wazzup. If you

want to use | as a text char, you have to use \|

Quote:

Page 13: Profile guide

z=SendChat("hello|hi|wazzup")

z=SendChat("/s hello|/s hi|/s wazzup")

z=SendChat("Do you know this symbol \|. it is cool")

* UseBuff( [Random = 0] )

Just sends the Buff #1-#4 keys to wow and starts the Buff #1-#4 Timers...

[Random] : [optional] 1 means chance of 75% to buff, default 0 means always buff. In level

profiles put this into [BeforeStart] in BG profiles put this in each graveyard path at beginning

e.g.:

[GoTo]

z=UseBuff() ;buffs, use poison and summon pet, this starts the recast timers, use it once in

profile

z=Loop()

* MountingUp( [mountTyp = -1] ) updated v2.0.2

Just sends the mount-up key to wow and waits the mount cast time if you are out of combat

[mountTyp][optional] = -1 (default) --> last used mount, = 0 --> ground mount, 1 -->

flugmount updated v2.0.2

Code:

e.g.:

[GoTo]

z=MountingUp() ;mounts up with last used mount, or

....

z=MountingUp(1) ;mounts up with flymount, if set!

* MountingDown( )

Just sends the mount-up key and moves forward to cancel

Code:

e.g.:

[GoTo]

z=MountingDown()

* Loop( [LoopsMin = 10000, [LoopsMax = 10000, [Index = 1, [TimeMax = 0]]]] [LoopsMin]

: [optional] Min Times to execute the loop() - default is 10000 [ms]

[LoopsMax] : [optional] Max Times to execute the loop(), if LoopsMax is not 10000, the bot

will take a random value between LoopsMin and LoopsMax - default is 10000 [ms]

Page 14: Profile guide

[Index] : [optional] The index of the current loop. To identify which loop() is for which

loop(). Index Range: 1 - 20

[TimeMax] : [optional] If the execute time of loopis higher that value, then the bot will quit

loop, value in [ms]

Ring loops (#1) and In-Out loops (#0) work with Loop() (see screenshot below)

Code:

e.g.:

[GoTo]

z=UseBuff()

z=Loop() ;set the first loop

..

..

..

z=Loop() ;bot will loop the part within both loops

;or

z=UseBuff()

z=Loop(9000,10000,3) ;set the first loop with index 3, max loops 9000-10000

..

..

..

z=Loop(9000,10000,3) ;bot will loop the part within both loops with index 3

* LoopUntilTextFound( Text, [Channel = "*", [Times = 10000, [TimesMAX = 10000,

[Index = 1, [MaxTime = 0]]]]] )

Text : The text to search in chat; Same Filter style like the wordlist. Use seperator & for

multiple line matches

[Channel] : default * = all enabled channels. The channel to search the text - For all available

channels, see bottom

rest see function Loop()

* Click( [button = "secondary", [x = 50, [y = 50, [clicks = 1, [speed = 0]]]]] )

[Button] : [optional] The button to click: "left", "right", "middle", "main", "menu", "primary",

"secondary".

[X,Y] : [optional] The x/y coordinates to move the mouse relative to wow window. Values are

in percent (%). x=100,y=100 means a click in the bottom right corner of WoW

[Clicks] : [optional] The number of times to click the mouse. Default is 1.

[Speed] : [optional] The speed to move the mouse in the range 1 (fastest) to 100 (slowest). A

Page 15: Profile guide

speed of 0 will move the mouse instantly. Default speed is 0.

Code:

[GoTo]

z=Click() ;secondary (right) click (defalt values)

z=Click("primary",0,0) ;primary (left) click at top left corner

* UseObject( [Name = "", [MoveToRange = 3, [ MaxSearchDistance = 40]]] )

[Name] : [optional] If a gameobject with that name exists and is within MaxObjectDistance

(main -> premium), the bot will run to it and use it/loot it

if blank, the bot will use nearest object

[MoveToRange] : [optional] How near the bot shall move to the object

[MaxSearchDistance] : [optional] The Object has to be within this range

Code:

[GoTo]

z=UseObject() ;move to and use nearest object

z=UseObject("teleporter) ;move to and use object wit name teleporter

* Jump2Path( "Path", [Profile="", [reverse="", [line="", [level=""]]]]] )

Path : The bot will jump to another [Path] in the current profile

Can now jump to random Path, the path has to be split with "|" ex:

Jump2Path("GoTo1|GoTo2")

[Profile] : [optional] The bot will execute another Profile and jump to the set Path (with this u

can combain Goto and level profiles). Profile has to be something like "Profiles\xxx\xxx.ini".

(default = "" means current profile)

[reverse] : [optional] value = 0,1,"" -> 1 = reversing the new Path, 0 = not reversing (default =

"")

[line] : [optional] The Line to jump in new Path (default = "", means first line)

[level] : [optional] the jump will only done if u have this lvl, (default = "", means not used)

Code:

[GoTo]

...

z=Jump2Path("Test") ;jumps to path test

[Test]

..

z=Jump2Path("GoTo") ;jumps to path goto

Page 16: Profile guide

* Jump2PathIfInRange( "Path", [Profile="", [reverse="", [line="", [level="",

[Distance=MaxWPDistance]]]]]] )

Same as Jump2Path, but the bot will only jump to that path if it is in range

Path : The bot will jump to another [Path] in the current profile

Can now jump to random Path, the path has to be split with "|" ex:

Jump2Path("GoTo1|GoTo2")

[Profile] : [optional] The bot will execute another Profile and jump to the set Path (with this u

can combain Goto and level profiles). Profile has to be something like "Profiles\xxx\xxx.ini".

(default = "" means current profile)

[reverse] : [optional] value = 0,1,"" -> 1 = reversing the new Path, 0 = not reversing (default =

"")

[line] : [optional] The Line to jump in new Path (default = "", means first line)

[level] : [optional] the jump will only done if u have this lvl, (default = "", means not used)

[Distance] : [optional] the distance which the path must be within to where the bot shall jump,

default is max wp distance

Code:

[GoTo]

...

z=Jump2PathIfInRange("Test3") ;jumps to path test3 if in range

z=Jump2PathIfInRange("Test2") ;jumps to path test2 if in range

z=Jump2Path("Test") ;force a jump or profile will be finished

[Test3]

wpx...

[Test2]

wpx...

[Test]

..

z=Jump2Path("GoTo") ;jumps to path goto

* J2PIfObjectExists(GameObjectName, Path, [File = "", [MaxDistance=50,

[MaxZDistance=0]]])

"GameObjectName" : the name of the game object

Path : the path to jump to

[MaxDistance] : [optional] (default 0) 0 = do not check distance, max distance to object

[MaxZDistance] : [optional] (default 0) 0 = do not check distance, max Z distance to object

Page 17: Profile guide

* J2PIfObjectNotExists(GameObjectName, Path, [File = "", [MaxDistance=50,

[MaxZDistance=0]]])

"GameObjectName" : the name of the game object

Path : the path to jump to

[MaxDistance] : [optional] (default 0) 0 = do not check distance, max distance to object

[MaxZDistance] : [optional] (default 0) 0 = do not check distance, max Z distance to object

* IgnoreMob( mobName )

mobName : the bot will ignore all mobs with exactly this name, you can ignore multiple mobs

by seperating them with |

Code:

[BeforeStart]

z=IgnoreMob("Angry Animal")

z=IgnoreMob("Angry Animal|SeconMob|ThirdMob")

* IgnoreFaction( [factionId = 0] )

[factionId] : [optional] the bot will ignore all targets with that faction id, call this function in

[BeforeStart]. You can ignore multiple factions by seperating them with |

Code:

[BeforeStart]

z=IgnoreFaction() ;ignores human players

z=IgnoreFaction(134|325)

* GoToVendor( [MoveBackToGoto = 0] )

If u checked an option in pvpTool under Vendor, then the bot will jump into path [Vendor]

(or if this path exist [Vendor-Alliance] or [Vendor-Horde]) if the option come in action, like

food/drink empty

[MoveBackToGoto] [optional]

0 : the bot will jump to [GoTo] at the end of vendor path

1 : the bot will reverse the [Vendor] path and jump to GoTo after vendor is reversed

* UseVendor( [VendorName = ""] )

Use this to talk with an vendor in [Vendor] Path

[VendorName] : [optional] set the vendor name or a part of the vendor name. If it is blank,

then the bot will use the nearest NPC, blank is usefull for russian/chinese wow player

* UseNPC( [NPCname = ""] )

Page 18: Profile guide

Use this to talk with an NPC

[NPCname] : [optional] set the npc name or a part of the npc name. If it is blank, then the bot

will use the nearest NPC, blank is usefull for russian/chinese wow player

* GoToNPC( [NPCname = ""] )

will move to npc

[NPCname] : [optional] set the npc name or a part of the npc name. If it is blank, then the bot

will move to the nearest NPC, black is usefull for russian/chinese wow player

* SetOption( "option", [value = -1] )

option : is the variable name

[value = -1] : [optional] the value you want to set (-1 loads the default config value)

available options:

o "OldTargetSystem"(0/1) - if = 1 then old target system (TAB only) will be used, 0 = new

target system

o "MaxWPDistance" - Distance between WPs

o "TargetSearchRange"(a number) - Search range for new Target system

o "MaxTargetDistance" (a number) - The max distance of a target to not start combat

o "LeashDistance" (a number) - The max distance from WP to target (anti kite)

o "MaxObjectDistance"(a number) - The max distance of objects (herbs/ore..)

o "MaxCombatTime" (a number) - The max time of a combat

o "WPLoopBreakeDistance" (a number)

o "HealthChangeTime"(a number) -If hp does not change within that time, bot will ignore it

o "byPass32kbLimit" (0/1) - If the file path is >32kb, it will executed anyway

o "DisableLoot" (0/1)

o "DisableCollecting" (0/1)

o "DisableSearchTarget" (0/1)

o "DisableCombat" (0/1)

o "ForceLoot" (0/1) - Force to loot a one hit kill

o "WalkToLoot" (0/1)

o "RunBackAfterLoot" (0/1)

o "RandomJumpimg" (0/1)

o "SkipWps" (a number)

o "RunBackFromTarget" (0/1)

o "RunBackFromTargetRange" (a number)

o "SearchFishPools" (0/1)

o "EnableCombatOnFlyMount" (0/1)

o "Skinning" (0/1)

o "NinjaSkinning" (0/1)

o "MaxZDistanceToTarget" (a number)

o "Herbing" (0/1)

o "Mining" (0/1)

o "Gasclouds" (0/1)

Page 19: Profile guide

o "Objects" (0/1)

o "GetAllObjects" (0/1)

o "GatherTheseObjects" (ObjectNames sperated with ,)

o "IgnoreTheseObjects" (ObjectNames sperated with ,)

[GoTo]

z=SetOption("DisableCollecting",1) ;set it to 1 (true) = disable it

..

z=SetOption("DisableCollecting") ;loads default value = 0

* StartFishing ( MinTime, [MaxTime = 0] ) [requires *Elite*]

MinTime : The min time in seconds the bot shall fish

[MaxTime = 0] : [optional] The max time in seconds the shall fish, if set, a value between

min/max time will be chosn

If bot dies while fishing or the Status change, the bot will quit the function and go back to

profile. Can be used for fishing with ghost WPs

StartFishing will be memory fishing only!

Quote:

[GoTo]

z=Loop()

z=wp..

..

z=Turn(a number) ;dont forget to turn to water

z=StartFishing(3600) ;fish 60sec*60sec = 1hour

..

z=Turn(a number) ;dont forget to turn to water

z=StartFishing(3600,7200) ;fish 1-2hour

z=Loop()

[Ghost]

* Random ( [Min = 0, [Max = 1, [Flag = 0] )

[Min] : [optional] The smallest number to be generated. The default is 0.

[Max] : [optional] The largest number to be generated. The default is 1.

[Flag] : [optional] If this is set to 1 then an integer result will be returned. Default is a floating

point number.

Quote:

[GoTo]

z=SleepIt(Random(1000,2000,1))

Page 20: Profile guide

Profile Options

* Option: Faction =

Value: Alliance/Horde/Both

Set for which faction the profile is

* Option: UseFlyMount =

Value:

0 : mount is no fly mount

1 : mount is fly mount, the profile requires a flymount

* Option: MinLevel =

Value:

0 : option not used

1-100 : the bot will not search for targets / NPCs which are under this level but the bot will

fight back if they attack you.

* Option: MaxLevel =

Value:

0 : option not used

1-100 : the bot will not search for targets / NPCs which are above this level but the bot will

fight back if they attack you.

* Option: DisableSearchTargets =

Value:

0 : option not used

1 : the bot will not search for targets / NPCs in WPX()

* Option: DisableCombat =

Value:

0 : option not used

1 : the bot will not attack any mob / player in WPX(), but while doing special actions like

looting or collecting things

Page 21: Profile guide

* Option: MaxObjectDistance =

Value: a number (example 40)

This will overwrite the pvpTool global settings of MaxObjectDistance. It is the distance from

player to the object, if it is in that range, the bot will loot it

* Option: MaxObjectDistance_Min =

Value: a number (example 40)

This will set the minimal value of MaxObjectDistance. If MaxObjectDistance is below, then it

will set to this value.

* Option: NaturalRun =

Value:

0 : option not used

1-100 : bot will add a random value from -value to value to the WPs x,y

* Option: SearchFishPools =

(requires *Premium*, can also be enabled with SetOption()

Value:0 : option not used

1 : bot willsearch FishPools

* Option: Reversible =

Value:

0 : option not used

1 : the profile can be reversed on bot start. That means from end to beginning (enabled by

default for GoTo profiles)

e.g.

Quote:

[Profile]

Faction=both

UseFlyMount=0

MinLevel=12

MaxLevel=17

*AcceptQuest ([NpcDisplayID])

Accepts quest from NPC defined by the NpcDisplayID.

* LoopUntilTextFound([“[text]”])

Loops profile until text found. This can be used to check quest’s progress.

Page 22: Profile guide

Ex.

z34=LoopUntilTextFound("6/6", "*", 2, 2, 2, 0)

*InitVar([VarName], [InitialValue])

Initiates a variable VarName, with a value of InitialValue.

Ex.

z=InitVar("GOLD",0)

Would initiate variable GOLD with a value of 0.

* SetVar([VarName],[Value])

Sets value of variable VarName to Value.

z=SetVar("Outland", 1) , would set value of variable Outland to 1.

Support of Events (NEW!)

“Dude, I would like to know if is possible with Rwbot to farm mounts such as

time-lost-proto-drake or aeonax.”

To accomplish such tasks we have implemented into RwBot the support of so called

‘events’.

With the use of events , you can accomplish certain tasks BUT only when a particular event

occurs. These event may include appearance of a certain object inside of the game’s world

eg. a ship / mob / item. This feature is extremely useful for tasks, such as those, mentioned in

the paragraph’s title.

What happens after the event gets fired is limited only by your very imagination

To take use of the new capabilities , all you need to do, is to declare an event hander: (yeah,

sounds scary ;] )

setEvent([objectID], [eventHandlerBlockName],[eventType])

where:

objectID – displayID or name of an object

eventHandlerBlockName –name of profile block to which RwBot would jump after the event

gets fired

eventType – specifies the event type. Currently supports only the value of 1 – appearance of

an object/mob/npc etc.

Page 23: Profile guide

example:

[GoTo]

z=setEvent(‘aeonaxx’,’onAenaxx’,1)

[onAenaxx]

z=UseEventObject()

z=KillEventObject()

z=Return()

That’s it

Now, a couple of things about how exactly does RwBot handle events.

The event gets fired if we’re close to the object in question and the object appears.

RwBot then goes ahead and performs a jump to the block specified by the

eventHandlerBlockName parameter. After the commands finish executing and no jump

operation is forced by the eventBlock ( j2p command etc.), then you need to remember to put

a Return command in the end of the event block. The return command instructs RwBot to

return to the exact same location it was at, before the event got fired.

If there are multiple objects that match the event, then RwBot shall interact with the

closest one.

As you can see we’ve included two new commands especially for use with the event

blocks: the UseEventObject and KillEventObject and Return commands. These commands

would work ONLY inside of the event handler. The logic behind these command is pretty

complicated and designed especially to work in some difficult situations. RwBot shall take

into account whether the target is an object/ mob, whether it’s flying or not, you do not need

to worry about the details All you need to do is to provide target’s name or display ID in

the declaration of the event handler.

+ UseEventObject() – attempts to use the object

+ KillEventObject() – I’ve forgetten ;P loots / skins afterwards.

+Return – instructs RwBot to return to the exact same location ,it was at, before the event got

fired

Page 24: Profile guide

Advanced RwBot profile development

by examples

Note: Some of these examples come from profles developed by Gringo.

[Profile]

Faction=Both

StartPath=;multiple paths possible, e.g: 'goto,vendor, ghost'

MinLevel=0

MaxLevel=0

Loop=1

icon=bygringo

Reversible=0

NaturalRun=0

DisableSearchTargets=0

DisableCombat=0

UseFlyMount=0

SearchFishPools=0

MaxObjectDistance_Min=0

MaxObjectDistance_Max=0

[BeforeStart]

z0=IgnoreFaction() ;ignore human players

[GoTo]

z1=WPX( 3486.05, 5343.95, 43.16, 1, 1, 3 )

z2=MountUp(0) ; mount onto the land mount // 1 – flight mount

…… waypoints….

z47=MountDown() ; mounts down

z52=UseVendor("24343") ; use vendor specified by displayID of 2343, you could also type his/her name here

z2=AcceptQuest("23032") ; accepts quest from NPC defined by it’s display ID. You could also use his name

here.

…..waypoints……

z44=J2PIIR("GoTo2", "", 0, 0, 0, 100) if we are in range of 100 yards from the first waypoint in the GoTo2

block then RwBot jumps to the GoTo2 block.

[GoTo2]

z45=LoopUntilTextFound("1/1", "*", 3, 3) /// Creates a loop

z95=WPX( 3485.51, 6118, 70.97, 3, 1, 3 )

z96=UseObject("7631", 4, 40)

z97=AntiAfk(15000, 1, 0, 20000)

z98=WPX( 3485.73, 6117.39, 70.97, 3, 1, 3 )

z99=UseObject("7631", 4, 40)

z109=WPX( 3354.6, 6086.57, 68.81, 3, 1, 3 )

z110=LoopUntilTextFound("1/1", "*", 3, 3) /// end of the loop, it would Loop till the quest is finished (“1/1” is

found).

MORE examples and documentation to come…

Page 25: Profile guide