Locked Home » Forums » Legacy & Archived » Archived Content » Vanguard » Vanguard Premium Discussions

Very basic VB script hunter bot : Vanguard Premium Discussions

Posted: February 9th, 2007
Total Posts:40 Joined:2005
K, here is the current script that i run while i sleep. In VG there are sooo many roaming tough mobs, i removed the travel part of the script so it just spins and kills stuff. I just thought i would post it here incase anyone can use pieces of it to build a better bot(like maybe the loot code, ect). Its really basic, but it does the job for me, and I am always updating it and making it better. Anyways, hope this helps someone somewhere :)

Code: Register to unlock hidden link

'-------------------------------------------------------------
'-------------------------------------------------------------
'-------------------------------------------------------------
'VG GetTO Bot v1.0
'Jake Craner
'Vanguard Bot
'Configured for his Ranger
'Started 11/14/06
'1440x900 (Windowed Mode)
'Deadly Shot in slot 6, Blade of Winter in slot 3
'Please share only with Tault.com members
'If you steal it, atleast put my name in it
'This is my first bot, so yes, it sucks
'ZOMG j00 spelled Ghetto wrong!
'I know, STFU noob I mean WTFBBQ I will WTFPWN ur FACE!?
'-------------------------------------------------------------
'None of the following is required:
'It just helped me for copy/paste
'Only change these vars with the code
'Use GetPixelColor to find this information
'(x,y) = colorcode
'corpse = xuscripthost.getpixelcolor(1202,68) = 131587
'mob = xuscripthost.getpixelcolor(1202,68) = 723775
'90%health = xuscripthost.getpixelcolor(220,85) = 724139
'behind = xuscripthost.getpixelcolor(763,179) = 255
'away = xuscripthost.getpixelcolor(796,178) = 255
'VK Key Values: 
'(Used for movement)
's = 83
'd = 68
'w = 87
'a = 65
'-------------------------------------------------------------
'Delay for Window Change
xuscripthost.sleep 5000

i = 1

'Number of times bot will run
Do until i = 9999

'Rests till 90% health
Do until xuscripthost.getpixelcolor(220,85) = 724139

'If attacked while resting
If xuscripthost.getpixelcolor(1202,68) = 723775 then

'Attacks Target, see Sub Attack
Attack

Else

'Rests
xuscripthost.sleep 100

End If

Loop

'Finds Target, see below
FindTarget

i = i + 1

Loop 

'-------------------------------------------------------------
'Moves and Tabs for Target
Sub FindTarget

i = 0

    Do Until xuscripthost.getpixelcolor(1202,68) = 723775 'or i = 8
    
    xuscripthost.sendkeys "{TAB}"    
    xuscripthost.keydown 65
    xuscripthost.sleep 150
    xuscripthost.keyup 65
    xuscripthost.sleep 100
    
    i = i + 1

    Loop

'Scans for Target, see Sub Scan
'Scan

'    Loop

'Attacks the Target, see Sub Attack
Attack

End Sub
'-------------------------------------------------------------
'Spins and Scans
Sub Scan

    xuscripthost.keydown 87
    xuscripthost.sleep 100
    xuscripthost.keydown 68
    xuscripthost.sleep 200
    xuscripthost.keyup 68
    xuscripthost.sleep 2000
    xuscripthost.keyup 97

End Sub
'-------------------------------------------------------------
'Attacks the Target
Sub Attack

'Pulls Target, see Sub Pull
Pull

    While xuscripthost.getpixelcolor(1202,68) = 723775

'Normal Attack    
        
        xuscripthost.sendkeys 3
        xuscripthost.sleep 1500

'If Target is Behind
    If xuscripthost.getpixelcolor(763,179) = 255 then
    
    xuscripthost.keydown 68
    xuscripthost.sleep 1200
    xuscripthost.keyup 68

    End If

'If Target is Away
    If xuscripthost.getpixelcolor(796,178) = 255 then

'Ranges Target, see Sub Ranged
Ranged

    End If

    WEnd

'Loots Target, see Sub Loot
Loot

 End Sub
'-------------------------------------------------------------
'Pulls the Target
Sub Pull

    xuscripthost.sendkeys 6
    xuscripthost.sleep 1500

'If Target is Away
    If xuscripthost.getpixelcolor(796,178) = 255 then

    xuscripthost.sendkeys "{ESC}"
    xuscripthost.sleep 1000

    End If

'If Target is Behind
    If xuscripthost.getpixelcolor(763,179) = 255 then
    
    xuscripthost.sendkeys "{ESC}"
    xuscripthost.sleep 1000

    End If

End Sub
'-------------------------------------------------------------
'Ranges the Target
Sub Ranged

    xuscripthost.sendkeys 6
    xuscripthost.sleep 1500

'If Target is Away
    If xuscripthost.getpixelcolor(796,178) = 255 then

    xuscripthost.sendkeys "{ESC}"
    xuscripthost.sleep 1000

    End If

'If Target is Behind
    If xuscripthost.getpixelcolor(763,179) = 255 then
    
    xuscripthost.sendkeys "{ESC}"
    xuscripthost.sleep 1000

    End If

End Sub
'-------------------------------------------------------------
'Loots the Target
Sub Loot
    
    xuscripthost.sleep 2000

    If xuscripthost.getpixelcolor(1202,68) = 131587 then

    xuscripthost.sleep 1000
    xuscripthost.sendkeys "/loot"
    xuscripthost.sleep 250
    xuscripthost.sendkeys "{ENTER}"
    xuscripthost.sleep 500
    xuscripthost.sendkeys "/lootall"
    xuscripthost.sleep 250
    xuscripthost.sendkeys "{ENTER}"
    
    End If

    xuscripthost.sleep 1500

    If xuscripthost.getpixelcolor(1202,68) = 131587 then

    xuscripthost.sendkeys "{ESC}"
    xuscripthost.sleep 2000

'Attacks Target, see Sub Attack
Attack
    
    End If
    
End Sub
'-------------------------------------------------------------
Posted: February 9th, 2007
User avatar
administrator
Total Posts:29892 Joined:2002
Can premium members say yay or nay to this being moved to a confirmed section.
Posted: February 9th, 2007
lightningzero
i'll test it out as i'm also a ranger... but how do i run it?

and is the screen resolution really need to be 1440x900? cuz my 19" widescreen seems to be having an issue running that.
Posted: February 10th, 2007
Total Posts:40 Joined:2005
you need to save the script and run it in xunleashed. It doesnt have to be in 1440... but that would mean that you would have to make new pixel color cords. The main reason for posting this is just for reference, incase it happens to help someone making a better bot. Its not really user friendly, and i dont really have the time to make it so.
Posted: February 10th, 2007
lightningzero
ok so how do i load it in xunleashed? i put it in scripts folder, saved it as .vbs, just a quick steps one two three list of how to run it would be nice if you could. i've checked the faq's and stuff but the only things i found were for things that already had plugins (i.e. EQ2). i'll keep looking but i dunno...
Posted: February 10th, 2007
tault_razorwing
lol why do people make macros in non-standard screen res?

Most people can run 1024x768 and most people can run 1280x1024 even on a 17" monitor, so why create something which runs on 1440x900 widescreen when alot of people dont have it?

Other than that, great work, its good to see more macros /scripts coming to tault.
Posted: February 10th, 2007
Total Posts:40 Joined:2005
tault_razorwing wrote:lol why do people make macros in non-standard screen res?

Most people can run 1024x768 and most people can run 1280x1024 even on a 17" monitor, so why create something which runs on 1440x900 widescreen when alot of people dont have it?

Other than that, great work, its good to see more macros /scripts coming to tault.
because i dont care if you can use it or not :) It was a personal work, i dont really have time to write scripts for everyone. Anyways, step by step instructions:

1)Save it as .vbs in scripts folder
2)Launch xunleashed
3)Run xunleashed in dx9 standalone mode
4)Click scripts->whatever you saved it as
5)tada! once again, if you dont run it ijn 1440 windowed, you will have to replace the pixel points with your own. But, as ive said before, this script was more just for reference to see how i worked some of the problems i ran into (as in looting). Its just a reference as people are working on much much better bots that will be out in a week or so.
Posted: February 10th, 2007
lightningzero
alright so i ran it with the standalone plug in, dx9 checked, opened the game and it said it was running the script, however it didn't do anything...... so i dunno. i'm probably just an idiot
Posted: February 15th, 2007
Total Posts:5 Joined:2005
Well I have managed to get the script to run and spin and tab targets but I don't think the script is getting the right colors on my computer. How do I set up the proper mouse cords to get the pixel color? I have done a rather through search on the forum but there is a lot of info to pull in. I have a rather limited coding background so a lot of this is confusing but I would like to be able to learn how to write my own.
Posted: February 15th, 2007
Total Posts:40 Joined:2005
use getpixelcolor. It is a script in xunleashed. Just pick points like roughly 90% health for how long to regen to, mob health at its very lowest point it will read... ect.
Posted: February 15th, 2007
Total Posts:5 Joined:2005
I think I understand but how do I ... for lack of better words, get it to look at the health bar for a specific color, or a mobs icon to know that it has a target. Is that related to mouse cord. or did I miss something?
Posted: February 15th, 2007
User avatar
Premium
Total Posts:6662 Joined:2004
Should really convert this to XUM and run the XUM client instead of XU Stand alone.

_________________
Use Search first, ask questions later!
Posted: February 15th, 2007
Total Posts:5 Joined:2005
Is there a difference is scripting if you run it in XUM (is that exhume?) I loaded XUM and all I got was a basic compiler / coding window.

EDIT: I know this is probibly not the proper place to ask thies questions but I am just trying to get a little insight into how this all works.
Posted: February 15th, 2007
Total Posts:40 Joined:2005
is a noob to XUM <------
Posted: February 22nd, 2007
Total Posts:40 Joined:2005
While i'm waiting for slam666 to finish his ultra bot i will convert this over to VGE and xum. Should only take a couple of days, and ill post it here when I'm done!
Ready to join the community? Click here and see all of the benefits!
blue large dotWho is online
Users browsing this forum: No registered users and 3 guests
Locked