I founded this on auto it example scripts!
Is nice )
.Quote:
WOW Travelbot
showoff;
After my last (and first) autoIt Project; ChipX i went a little futhre with the development of automated movement for World Of Warcraft. I back then told about my new project with a bot that could walk from A to B without using any memory reading. Many people have asked for help with this so i thought i should make a little showoff.
First thing we need is the data from World Of Warcraft, to make the bot go from A to B we need;
A's X and Y axis
B's X and Y axis
and the players rotation.
This information can be gathered with the scripting code (LUA) inside the game and is totally legal.
Then we need that information to be readable inside AutoIT and since we might need direct updates we need the data transfer to be 100% stable.
So i made a little Addon for World Of Warcraft, this addon gathers data like X and Y position and Rotation of the player, but also gathers info about Zones and stuff but that is not important right now.
The data gathered is converted to binary, this gives you a much more stable tranfser.
The binary code is displayed with colours; BLUE = 0 and RED = 1
You can also use baseX to minimize the size of the addon and then do it with more colours, but the less colours the more stable.
As you can see the colours are also located on the top left of the screen and are each 1x1 pixel making it readable at any resolution, and also makes it possible to have a customized User interface. (my addon was set to overlap any other addon, so if something goes at those pixels, it wouldn't disturb the data)
Tho the user of the bot must use the original game screen ratio, i tested the mod on a widescreen monitor running World Of Warcraft at Windowed Maximized wich resulted some pixels to be streched;
Then make your autoIT application read the colours from the pixels located at 0-2,0-10.
Then to convert the data to Decimal i used a function Bin2Deg found on these forumsCode:CODE$col[1] = PixelGetColor (0,0) $col[2] = PixelGetColor (1,0) $col[3] = PixelGetColor (2,0) $col[4] = PixelGetColor (3,0) $col[5] = PixelGetColor (4,0) $col[6] = PixelGetColor (5,0) $col[7] = PixelGetColor (6,0) $col[8] = PixelGetColor (7,0) $col[9] = PixelGetColor (8,0) $col[10] = PixelGetColor (9,0) $colx[1] = PixelGetColor (0,1) $colx[2] = PixelGetColor (1,1) $colx[3] = PixelGetColor (2,1) $colx[4] = PixelGetColor (3,1) $colx[5] = PixelGetColor (4,1) $colx[6] = PixelGetColor (5,1) $colx[7] = PixelGetColor (6,1) $colx[8] = PixelGetColor (7,1) $colx[9] = PixelGetColor (8,1) $colx[10] = PixelGetColor (9,1) $coly[1] = PixelGetColor (0,2) $coly[2] = PixelGetColor (1,2) $coly[3] = PixelGetColor (2,2) $coly[4] = PixelGetColor (3,2) $coly[5] = PixelGetColor (4,2) $coly[6] = PixelGetColor (5,2) $coly[7] = PixelGetColor (6,2) $coly[8] = PixelGetColor (7,2) $coly[9] = PixelGetColor (8,2) $coly[10] = PixelGetColor (9,2) $colr[1] = PixelGetColor (0,3) $colr[2] = PixelGetColor (1,3) $colr[3] = PixelGetColor (2,3) $colr[4] = PixelGetColor (3,3) $colr[5] = PixelGetColor (4,3) $colr[6] = PixelGetColor (5,3) $colr[7] = PixelGetColor (6,3) $colr[8] = PixelGetColor (7,3) $colr[9] = PixelGetColor (8,3) $colr[10] = PixelGetColor (9,3) ;Rotation To Numbers For $i = 1 To 10 Step 1 $colhex[$i] = hex($col[$i],6,) if $colhex[$i] = "ff0000" then ControlSetText("CCT", "", $ShowRotLabel[$i], "1") $BitRot[$i] = "1" Else ControlSetText("CCT", "", $ShowRotLabel[$i], "0") $BitRot[$i] = "0" EndIf Next ;Position X to numbers For $i = 1 To 10 Step 1 $colhex[$i] = hex($colx[$i],6,) if $colhex[$i] = "ff0000" then ControlSetText("CCT", "", $ShowPosXLabel[$i], "1") $BitLocX[$i] = 1 Else ControlSetText("CCT", "", $ShowPosXLabel[$i], "0") $BitLocX[$i] = 0 EndIf Next ;Position Y to numbers For $i = 1 To 10 Step 1 $colhex[$i] = hex($coly[$i],6,) if $colhex[$i] = "ff0000" then ControlSetText("CCT", "", $ShowPosYLabel[$i], "1") $BitLockY[$i] = 1 Else ControlSetText("CCT", "", $ShowPosYLabel[$i], "0") $BitLockY[$i] = 0 EndIf Next ;Randoms to numbers For $i = 1 To 10 Step 1 $colhex[$i] = hex($colr[$i],6,) if $colhex[$i] = "ff0000" then ControlSetText("CCT", "", $ShowRandomLabel[$i], "1") $Bitrandom[$i] = 1 Else ControlSetText("CCT", "", $ShowRandomLabel[$i], "0") $Bitrandom[$i] = 0 EndIf
CODE$CurrentRot = BinToDec($Overllrot)
$CurrentLocX = BinToDec($OverlllocX)
$CurrentLocY = BinToDec($OverlllotY)
$currentZone = BinToDec($OverllZone)
Now you got the data from the game, you are on Position (pos1) and want to go to (pos2).
Then we need to know the rotation we must face to turn the right way;
CODE$result = floor(atan(($posy1-$posy2)/($posx2-$posx1)) * $radToDeg)
Note; to turn the character ingame can be rather hard with just a normal mouse function, i highly recommend that you take a look at this;
Mouse Move Plus, which gives you a much better and stable result.
Now you can walk from A to B and that is overall not that impressive at all.
So you might want to expand it a bit more.
I made a XML database each Zone, and i can highly recommend using XML for this kind of data;
CODE<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DATAPACKET Version="2.0">
<METADATA>
<FIELDS>
<FIELD attrname="Continent" fieldtype="i4"/>
<FIELD attrname="Zone" fieldtype="i4"/>
<FIELD attrname="Nr" fieldtype="i4"/>
<FIELD attrname="posX" fieldtype="i4"/>
<FIELD attrname="posY" fieldtype="i4"/>
<FIELD attrname="Comment" fieldtype="string" WIDTH="20"/>
</FIELDS>
<PARAMS/>
</METADATA>
<ROWDATA>
<ROW Continent="0" Zone="00" Nr="1" posX="520" posY="311" Comment="Lion's Pride Inn"/>
<ROW Continent="0" Zone="00" Nr="2" posX="526" posY="316" Comment="Elwyn Forest - road"/>
<ROW Continent="0" Zone="00" Nr="3" posX="520" posY="321" Comment="Elwyn Forest - mine"/>
</ROWDATA>
</DATAPACKET>
This is a little sample,
Continent is the continent ID; 0 = Eastern Kingdom, 1 = Kalimdor (dungeons also have unique ID's)
Zone Is the Zone ID; 00 is Elwyn Forest.
NR is the XML ID; this can be used when making automated routes, like saying: If you are at nr 141 then you must go to 140 when walking to Stormwind and 142 if you want to go to Ironforge
posX and posY Bot much to say here other than the position here is made with the Map Pos in wow, meaning the each Zone has fom 0-600 X-Y so the position is not Continent or World wide.
Comment A good way to keep track on each Waypoint, but can also be used for log's etc.
I added a function for my AutoIt Script to save my current position.
Then walking throught an area and saving the locations in movement order.
If you then place your char anywhere in the zone, and make it calculate the closest waypoint.
Then you can start your travel from anywhere and go to everywhere.
At the current state of my bot i can from a ingame toolbar set it to go to any location, even a place inside a dungeon and then the bot will start the journey, automaticly calculating the shortest route also using transportation such as mount's, gryphon's, tram, boat's or Zep's.
If i die the bot will save the position of my corpse and walk back to the boddy, ressurect and move on.
Overall there is a lot of exiting things you can do with this kind of stuff, and the only limit is your time and will to do such a project
The rest should just be up to your own imagination and creativity.
If you got any other questions regarding these method's, LUA/XML programming or the code of my bot feel free to ask. [/QUOTE]
And the nice bot that kill mob
CHIPS!![QUOTE]Im finaly finished with the first stable version of my World of Warcraft bot.
A smart little fellow that;
-Walks around (you can preset its moves)
-If an enemy starts hunting the bot or attacks it the bot will check if the rotation is ok (check if the player is standing with the face towards the enemy), check if the enemy is within sight and range of your weapon or ability.
-Starts attacking
-(if health is low it will (if possible shield itself and then) heal itself)
-When the enemy is down it will loot the mob (this can be turned off)
-If someone whispers, the bot will reply with a random phraze set in the configuration file (after replying to a whisper the bot wait with replying again to make itself more realistic)
-And then loops the walking.
Many settings can be set in the configuration file.
SOURCE;

ChipX1.4c (former WOW-BOT)
Updated Mirrors:


Name changed to ChipX due to request from Bartuc.
Under [Initialize] in the Configuration.ini i have now added Filename=ChipX.
If you change the string the program will automaticly be called the new name (you migt want to rename the app too)
As you can see on the pic above i added a "Jump" checkbox.
This simply makes you jump while walking, this can be used to minimize the risk of getting stuck.
The updated version of CCT is included in this release.
To use CCT simply check the radio next to the data you want to change, maximize world of warcraft and move the cursor to the location showen in the ChipXsetup.jpg's. Then press [f2] to freeze it, click the next you want to change and so on.. when you are finished click save, and the data will be set directly to the configuration.ini.
(note that caster mode is still diactivated)
Additional notes;
-Read through Configuration.ini before starting the program.
-CCT is not a full config tool yet, but it will later replace the ini file so you can set all settings in it.
-CCT can somehow only be closed by hitting the [ESC] button (fixed soon)
-Make shure that the posotions are correct, cause even tho the bot might seem to run if the positions are wrong but some things might get bugged.
Known bugs;
-Sometimes the bot turns even tho the rotation is perfect. This is a blizzard ui bug and might be hard to fix.
-Turning time can seem slow.
-Sometimes the bot targets mobs that are out of range and "loop the loot".
Current Progress (and upcomming features / fixes);
Next Version;
Progress is on hold, while a new and better bot is being made.
You are still welcome to download and test the current version of ChipX.
And also welcome to give some feedback and new or neat ideas for the new bot.






