VG Bot - Warrior Bot (By Ant)
Posted: March 24th, 2007, 6:20 pm
Hey all,
This is my second melee bot which is pretty much the same as the paladin bot, expect without all the self healing aspects.
As with the paladin bot, the warrior bot is a modification of the original sample necro bot, and has several fixes for that sample bot.
Here's a list of the new features that are currently in the Ant Warrior Bot:
-Chain Attacks have been added to the end of the attack line in the KillCurrentTarget function.
-The combat loop now loops properly.
-The Auto Attack code has been fixed as well, now the bot will check to see if your Auto Attack ability is on before trying to turn it on itself. Previous with the sample bot, the bot would just turn on ( or in most cases off) the auto attack, without checking first to see if it was on or off.
In Development:
-The bot being able to handle adds. This is a huge problem for many and I'll be looking more closely over this during the weekend.
- Self buffing. I will try to make the bot buff itself at the beginning of the bot, and then rebuff once the buff has run out. The buffing shouldn't be a problem, but still haven't found a proper way to help the bot see if the buff is on or off.
- The chocie to avoid certain mobs, as in you put the mobs names on a list and if that mob appears the bot will move safely away from that mob.
- A possible Self Resurrecter. Yet this is still in concept
.
BUGs
-So far I've only experienced one bug, and that is a mob health bug. When the mobs die, their health sometimes doesn't go all the way down. This confuses the bot and causes it to continue to attack the mob till the mob vanishes. Still looking for a solution to this, if there is on.
How to set up
If you've already tried the sample necro bot then you will notice that the Ant Warrior Bot is self tuned in pretty much the same way.
However here's a remind for what you need to tweak in order for the bot to work properly on your pc.
1) First you will see a long list of skills with their sleep time added under them. In this list, add the variables for the skills that you want your bot to use. Forexample, if you want the bot to be able to identify your characters different attacks as variables, then use the following string of
code:
const HOTKEY_SPELL_ATTACK = "1"
Note: The "1" is the location of your attack on your in-game hotbar.
Next you will want to add a variable for "waiting", so that the bot will pause for a short while after activating the attack. You can do this with this.
code:
const SLEEP_SPELL_ATTACK = 2000
Note: the 2000 is how many seconds you want the bot to wait. 1000 = 1 second.
Also in the skills list, make sure that your hotkeys are all set correctly, such as for the Target Next Mob variable.Default for this variable is TAB.
1.5) For the string "const MAX_RUNS = 500000", besure to edit the number to how many times you want the bot to run.
2) Now that you have your skills defined, you will need to tell the bot what mobs you want to hunt. You do this under the "Dim GoodSpawns(3)" code. Now first off, the "3" in Dim GoodSpawns(3), tells the bot how many mobs you want to kill. Since the bot also counts the number 0.. 4 mobs is equal to 3. So if there's a total of 6 mobs in the area that you want to kill, simply change the 3 to a 5.
Now under Dim GoodSpawns(3), you will see a list of names as follows:
GoodSpawns(0) = "Grass Beetle"
GoodSpawns(1) = "Giant Spider"
GoodSpawns(2) = "Young Leaper"
GoodSpawns(3) = "Infected Rat"
These are the default settings which you will no doubt need to change in order for the bot to work for you. However this is done simply by changing the name. So if you want to attack a deer called "Horny Deer" then add this code:
GoodSpawns(4) = "Horny Deer"
or just change one of the previous "GoodSpawns()".
Also note: if you add a GoodSpawn string, don't forget to increase the number in Dim GoodSpawns().
3) As it is, your bot is ready to fight a basic fight, however you will want to customize it as much as possible, in order for the bot to work in the best possible way.
In the bot, scroll down to :
function KillCurrentTarget()
From this point to endfuction, every attack your bot does is defined here.
Now it is very important that you make sure that the skill names defined, and the order of location, are correct according to your specifications.
Im not gonna go into too much detail but here's how to make a simple attack code:
faceMob getTarget
Log.DebugLog ("Cast HOTKEY_ATTACK_SPELL_...")
VGSendText HOTKEY_ATTACK_SPELL_
Sleep SLEEP_ATTACK_SPELL_
The Log.DebugLog, gives you messages in the VGExtreme client. VGSendtext, is the hotkey you want the bot to press (note that this is where the previously defined variables comes in). And finally theres Sleep ( again with the previously defined variables).
Just edit that code and add it to your bot in order for it to activate that a skill during combat.
4. And that's it for now, just press F5, and let the bot do it's job.
As a final note however, the bot uses an array waypoint feature, which is simply a bunch of waypoints combined into a list. You can use pretty much any waypoint creater that you find for vanguard in these forums, just be sure to select X, Y as the format which you want the waypoints to be in.
I recommend using the Waypoint Creator 1.0 by Binafus. It's really simple to use and fully compatible with the Ant bots ( just be sure to set the format to equal to 2, in the waypoint creater). You can find it here:
Register to unlock hidden link
When you have the waypoint list you will need to do two things.
First you need to copy and paste the list into the Ant Bot, replacing the list which you should be able to see in the beginning of the script.
Secondly you will notice this string of code:
const WAYPOINTS = 23
Dim WAYPOINT_ARRAY(23,1)
These two strings of code tell the bot how many way points there are, and what format they are in. So for const WAYPOINT, you simply put the number of waypoints you want your bot to go through. Secondly under Dim WAYPOINT_ARRAY, as before insert the number of waypoints that you want the bot to go through, however make sure that the number after is "1" as it tells the bot that you're using X and Y variables to define your waypoints.
FAQ.
Q- Sometimes I leave my computer for a couple of minutes and when I come back I find my character dead! Is there anyway for the bot to ress my character and continue the grinding as he did before?
A- Atm, the bot is only an attacker bot so it hasn't been equiped with a self resser. The main reason for this was because I was only planning on the Ant bots being used as short term project, untill the bigger VGextreme bots start appearing. But if I see that it will be a while before the more advance bots start appear, then I'll try to add some more features such as self ressing.
Note:Also a good way to avoid getting killed is placing your bot in areas with non aggresive mobs. In other words, mobs that don't attack you unless you attack them first. Doing so will no doubtly keep your player alive longer, and it will stop those trains of mobs coming after you. Start to create some waypoints for your character to follow as well. Waypoints really help make the bot more effective at grinding, and it helps your character avoid aggroing mobs.
Q- My character isn't a warrior or a paladin, and is therefore his abilities have not be fully taken advantage of by this bot! Will you be porting this bot to any other classes?
A- I'll most likely end up porting the ant warrior bot to other classes, especially the scout classes.However because I'm a regular vangaurd player as well, and because I don't have a character for every class, it could take a while before I start to make some proper ports to the other classes. With that said, feel free to port the Ant warrior bot to other classes if your interested in doing so, my main objective is getting a proper working bot out to as many people as possible, and the more people who can help me accomplish this, the better.
Atm kumqwat420 has offered to port the warrior bot over to dreadknight class.
Q- Back to the bot. Sometimes when I go hunting my bot ignores some of the mobs which I've stated as the ones I wish to hunt! Why is that?!
A- Well, the bot works by finding mobs, then pressing "Tab" to select them. If the mobs are too far away, or if there are other mobs which are closer to you then the one you want killed, then the bot cant select it and will therefore continue to looking for other mobs. Hence why the bot may ignore some mobs.
If you have any other questions, please feel free to ask below.
Conclusion
Let me know how the bot runs for you and if you are experiencing any problems while running the bot.
Regards,
Antareus
This is my second melee bot which is pretty much the same as the paladin bot, expect without all the self healing aspects.
As with the paladin bot, the warrior bot is a modification of the original sample necro bot, and has several fixes for that sample bot.
Here's a list of the new features that are currently in the Ant Warrior Bot:
-Chain Attacks have been added to the end of the attack line in the KillCurrentTarget function.
-The combat loop now loops properly.
-The Auto Attack code has been fixed as well, now the bot will check to see if your Auto Attack ability is on before trying to turn it on itself. Previous with the sample bot, the bot would just turn on ( or in most cases off) the auto attack, without checking first to see if it was on or off.
In Development:
-The bot being able to handle adds. This is a huge problem for many and I'll be looking more closely over this during the weekend.
- Self buffing. I will try to make the bot buff itself at the beginning of the bot, and then rebuff once the buff has run out. The buffing shouldn't be a problem, but still haven't found a proper way to help the bot see if the buff is on or off.
- The chocie to avoid certain mobs, as in you put the mobs names on a list and if that mob appears the bot will move safely away from that mob.
- A possible Self Resurrecter. Yet this is still in concept
BUGs
-So far I've only experienced one bug, and that is a mob health bug. When the mobs die, their health sometimes doesn't go all the way down. This confuses the bot and causes it to continue to attack the mob till the mob vanishes. Still looking for a solution to this, if there is on.
How to set up
If you've already tried the sample necro bot then you will notice that the Ant Warrior Bot is self tuned in pretty much the same way.
However here's a remind for what you need to tweak in order for the bot to work properly on your pc.
1) First you will see a long list of skills with their sleep time added under them. In this list, add the variables for the skills that you want your bot to use. Forexample, if you want the bot to be able to identify your characters different attacks as variables, then use the following string of
code:
const HOTKEY_SPELL_ATTACK = "1"
Note: The "1" is the location of your attack on your in-game hotbar.
Next you will want to add a variable for "waiting", so that the bot will pause for a short while after activating the attack. You can do this with this.
code:
const SLEEP_SPELL_ATTACK = 2000
Note: the 2000 is how many seconds you want the bot to wait. 1000 = 1 second.
Also in the skills list, make sure that your hotkeys are all set correctly, such as for the Target Next Mob variable.Default for this variable is TAB.
1.5) For the string "const MAX_RUNS = 500000", besure to edit the number to how many times you want the bot to run.
2) Now that you have your skills defined, you will need to tell the bot what mobs you want to hunt. You do this under the "Dim GoodSpawns(3)" code. Now first off, the "3" in Dim GoodSpawns(3), tells the bot how many mobs you want to kill. Since the bot also counts the number 0.. 4 mobs is equal to 3. So if there's a total of 6 mobs in the area that you want to kill, simply change the 3 to a 5.
Now under Dim GoodSpawns(3), you will see a list of names as follows:
GoodSpawns(0) = "Grass Beetle"
GoodSpawns(1) = "Giant Spider"
GoodSpawns(2) = "Young Leaper"
GoodSpawns(3) = "Infected Rat"
These are the default settings which you will no doubt need to change in order for the bot to work for you. However this is done simply by changing the name. So if you want to attack a deer called "Horny Deer" then add this code:
GoodSpawns(4) = "Horny Deer"
or just change one of the previous "GoodSpawns()".
Also note: if you add a GoodSpawn string, don't forget to increase the number in Dim GoodSpawns().
3) As it is, your bot is ready to fight a basic fight, however you will want to customize it as much as possible, in order for the bot to work in the best possible way.
In the bot, scroll down to :
function KillCurrentTarget()
From this point to endfuction, every attack your bot does is defined here.
Now it is very important that you make sure that the skill names defined, and the order of location, are correct according to your specifications.
Im not gonna go into too much detail but here's how to make a simple attack code:
faceMob getTarget
Log.DebugLog ("Cast HOTKEY_ATTACK_SPELL_...")
VGSendText HOTKEY_ATTACK_SPELL_
Sleep SLEEP_ATTACK_SPELL_
The Log.DebugLog, gives you messages in the VGExtreme client. VGSendtext, is the hotkey you want the bot to press (note that this is where the previously defined variables comes in). And finally theres Sleep ( again with the previously defined variables).
Just edit that code and add it to your bot in order for it to activate that a skill during combat.
4. And that's it for now, just press F5, and let the bot do it's job.
As a final note however, the bot uses an array waypoint feature, which is simply a bunch of waypoints combined into a list. You can use pretty much any waypoint creater that you find for vanguard in these forums, just be sure to select X, Y as the format which you want the waypoints to be in.
I recommend using the Waypoint Creator 1.0 by Binafus. It's really simple to use and fully compatible with the Ant bots ( just be sure to set the format to equal to 2, in the waypoint creater). You can find it here:
Register to unlock hidden link
When you have the waypoint list you will need to do two things.
First you need to copy and paste the list into the Ant Bot, replacing the list which you should be able to see in the beginning of the script.
Secondly you will notice this string of code:
const WAYPOINTS = 23
Dim WAYPOINT_ARRAY(23,1)
These two strings of code tell the bot how many way points there are, and what format they are in. So for const WAYPOINT, you simply put the number of waypoints you want your bot to go through. Secondly under Dim WAYPOINT_ARRAY, as before insert the number of waypoints that you want the bot to go through, however make sure that the number after is "1" as it tells the bot that you're using X and Y variables to define your waypoints.
FAQ.
Q- Sometimes I leave my computer for a couple of minutes and when I come back I find my character dead! Is there anyway for the bot to ress my character and continue the grinding as he did before?
A- Atm, the bot is only an attacker bot so it hasn't been equiped with a self resser. The main reason for this was because I was only planning on the Ant bots being used as short term project, untill the bigger VGextreme bots start appearing. But if I see that it will be a while before the more advance bots start appear, then I'll try to add some more features such as self ressing.
Note:Also a good way to avoid getting killed is placing your bot in areas with non aggresive mobs. In other words, mobs that don't attack you unless you attack them first. Doing so will no doubtly keep your player alive longer, and it will stop those trains of mobs coming after you. Start to create some waypoints for your character to follow as well. Waypoints really help make the bot more effective at grinding, and it helps your character avoid aggroing mobs.
Q- My character isn't a warrior or a paladin, and is therefore his abilities have not be fully taken advantage of by this bot! Will you be porting this bot to any other classes?
A- I'll most likely end up porting the ant warrior bot to other classes, especially the scout classes.However because I'm a regular vangaurd player as well, and because I don't have a character for every class, it could take a while before I start to make some proper ports to the other classes. With that said, feel free to port the Ant warrior bot to other classes if your interested in doing so, my main objective is getting a proper working bot out to as many people as possible, and the more people who can help me accomplish this, the better.
Atm kumqwat420 has offered to port the warrior bot over to dreadknight class.
Q- Back to the bot. Sometimes when I go hunting my bot ignores some of the mobs which I've stated as the ones I wish to hunt! Why is that?!
A- Well, the bot works by finding mobs, then pressing "Tab" to select them. If the mobs are too far away, or if there are other mobs which are closer to you then the one you want killed, then the bot cant select it and will therefore continue to looking for other mobs. Hence why the bot may ignore some mobs.
If you have any other questions, please feel free to ask below.
Conclusion
Let me know how the bot runs for you and if you are experiencing any problems while running the bot.
Regards,
Antareus