|
Vanguard Bot - VGExtreme Scritping Service : VGExtreme General Discussion - Page 32
|
|
Posted: August 16th, 2008, 10:50 am
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
Well, I've decided to take a crack at scripting. I'm used to C++/Win32 API/MFC/DirectX coding, so will probably be using JScript for all of this, but the one spoil in my life has been Intellisense. I love it, and I miss it. So my question is to Wyvernx, is there any way to get Intellisense working , or am I going to have to be a 'true' coder and work like the Linux guys?=). I caught a glimpse of some Visual Studio talk, so figured if somehow we could script in there, maybe Intellisense was a possibility.
Quick edit: I've been searching for over an hour now trying to find a list of VG.<x> functions, but can't seem to find them anywhere. I assume they are all in the different VBS files written as functions already that are in the include directory, or are there more out there?..I tried a simple "name = VG.Player.Name" and then outputting "name" to Vanguard, however it seems to be returning NULL, and by that I mean instead of "myname" it is "". I can get vg.player.level to display just fine, but vg.player.hp is also null, as well as some others. The default startup script is using these functions just fine, so I have no clue why I can't get them going in this little test script? Using JScript, should I not be able to just type name = VG.Player.Name; and be able to VG.input.SendText(name); ?
|
|
|
|
|
Posted: August 17th, 2008, 12:23 pm
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
It isn't working because the class structure for the offset code hasn't been compatible with the vgewrapper for quite some time.
However, wyvernx has done quite a bit of work lately rewriting vgextreme to allow it to be referenced externally. The code is written, but hasn't been officially released yet.
Once it has, you should be able to reference it from whatever dev suite you're comfortable with, so if you'd rather write your bot in cpp than js, hold off a bit longer.
|
|
|
|
|
Posted: August 18th, 2008, 3:12 pm
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
Oh, that's cool..thanks for the update beergeek. I actually cracked open a VB book and figured for the sake of scripting, its probably less hassle to VB it. I noticed in the radar program, they were able to call some functions from a .DLL, which is exactly what I'd rather do so I can code all AI into a DLL and reference that way. The less scripting the better in my case. I did want to find out about referencing specific diplomacy cards though. The Parley functionality is there (though not working for a bunch of the current functions at the moment), but you could get a much smarter bot going if you could read each individual card and its stats. Currently, the only parley referencing available seems to be the 'board' (Where the purple ribbon is, who's turn it is, that sort of thing). My current way of dodging this would be to hard code every possible card into a DLL and have it referenced by name manually filled out in script; however it would be much less hassle if the script could just read every card in the parley strategy, fill the stats in automatically, and work from there. It would be 100x easier for those who hate/have trouble modifying script, and allow the bot to be so much more dynamic with the use of linked lists and all that fun stuff. Imagine being able to change your strategy cards whenever you want, in any order you want, and just let it go. Currently, you'd have to change your strategy a bit, tell the script which card is where, and waste a bunch of time.
Anyways, those are my thoughts of the day, so I guess I'll get back to work on my Diplomacy AI in the meantime so I can get it ready to go=).
|
|
|
|
|
Posted: August 19th, 2008, 5:27 am
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
I wanted to do just that with mythic's diplo bot and requested wyvernx to create a couple functions. One an arraylist that returns a card object for each card in your current strategy and another that takes the card object as an argument to return various information, such as influence, cost, etc. This was a while ago, though, and I'm not sure if he plans to add them.
However, even if they aren't added, you could do them yourself by figuring out where the offsets are and using the memory functions within vgextreme, much in the same way I did in my craft bot (I'm currently porting it to vb.net with major enhancements). The functions will be there in the same reference you create and can be used the same way they are now in the script engine.
You can also reference vgextreme for mouse and keyboard functions if you feel too lazy to write your own
|
|
|
|
|
Posted: August 19th, 2008, 4:30 pm
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
Unfortunately, I'm not that savvy when it comes to hex editor's. My experience is limited to a memory search of <x>, wait for <x> to change in game, search again with process of elimination until I find what I need. Looking at your script, I get what the code is doing, I just don't know how you got those values.
|
|
|
|
|
Posted: August 21st, 2008, 6:26 pm
|
|
|
|
sagatious
Total Posts: 11
Joined: September 19th, 2005, 8:57 pm
sagatious's Reps: 1
|
Hey beergeek,
If your porting your bot to VB.NET are you using a wrapper to VGE or are you using your own memory addresses? I baiscally want to do the same with my home brewed bot's so I can run them all from one place with a bit better logic behind them. Just wondering what I'll have to do in order to get it rolling again.
|
|
|
|
|
Posted: August 22nd, 2008, 3:15 pm
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
sagatious (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))): Hey beergeek, If your porting your bot to VB.NET are you using a wrapper to VGE or are you using your own memory addresses? I baiscally want to do the same with my home brewed bot's so I can run them all from one place with a bit better logic behind them. Just wondering what I'll have to do in order to get it rolling again.
Wait for wyvernx's next release of vgextreme. He got it working again so you can create a reference to vgextreme for the offsets and vgehelper for memory functions and ScriptHost for keyboard, mouse and pixel functions.
In the meantime, you can put your code in a new project and just hold off on changing the functions that reference vgextreme until it's released. You can also create functions that will do the external calls and just have them return bogus values for now so you can test your code. The easiest way to do this is to put the existing vgservice.vbs code in a public module, comment out all the VG namespace calls, and when the new service is released, add it as a reference then do a Public VG As New MMOViper.Vanguard() declaration.
Using your own memory addresses without referencing these libraries is not as simple as you'd think. You need to use a technique called dll injection to be able to read the memory space of another process, which is beyond my current skill level. Plus, why reinvent the wheel?
|
|
|
|
|
Posted: September 6th, 2008, 9:00 am
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
Are the offsets buggered up again, or is it just something weird going on with me? I just tried to run the default script that loads with VGExtreme. Name is blank, Heading is 90, level is -1, and almost everything else is at 0. Deleting VGExtreme, the DLL's, and running the update didn't do anything this time, so I'm assuming SOE has decided to annoy us again.
|
|
|
|
|
Posted: September 6th, 2008, 10:08 am
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
They are working. You probably just need to restart VG and VGE
|
|
|
|
|
Posted: September 6th, 2008, 4:41 pm
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
I figured it out, something wyvern will hopefully look into. It seems that when I run the new stereoscopic drivers from IZ3D it messes up the offsets. Probably due to whatever hooking techniques it uses for stereoscopics? At any rate, I guess I'll have to uninstall and re-install when the need arises.
|
|
|
|
|
Posted: September 22nd, 2008, 4:32 pm
|
|
|
|
sagatious
Total Posts: 11
Joined: September 19th, 2005, 8:57 pm
sagatious's Reps: 1
|
beergeek (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))): Wait for wyvernx's next release of vgextreme. He got it working again so you can create a reference to vgextreme for the offsets and vgehelper for memory functions and ScriptHost for keyboard, mouse and pixel functions.
I've been playing with your ACB 2.0 ... very nice...
So, when does the new VGe get released to the rest of us programmer types that wanna have some fun too?
|
|
|
|
|
Posted: September 22nd, 2008, 5:28 pm
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
sagatious (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))): beergeek (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))): Wait for wyvernx's next release of vgextreme. He got it working again so you can create a reference to vgextreme for the offsets and vgehelper for memory functions and ScriptHost for keyboard, mouse and pixel functions.
I've been playing with your ACB 2.0 ... very nice... So, when does the new VGe get released to the rest of us programmer types that wanna have some fun too?
It's right there in the package I released with ACB2.0.
Just add VGExtremeService.exe as a reference, then create a new object for MMOViper.Vanguard. All the vanguard-specific functions are in that class.
If you want the mouse functions, memory functions, etc., create another reference to VGEHelper.dll.
One important thing to note: if you're using Microsoft's dev platform (not sure about others), creating your reference will copy the required files into your project folder EXCEPT HVMRuntm.dll (a code encryption/obfuscator library). Without this file, your program will not run although it will build fine. Copy that file manually into your project folder where it put the others.
It may have been because of this I could not publish the project into a neat install package, but if you build the project you can still run the .exe
|
|
|
|
|
Posted: October 16th, 2008, 1:16 pm
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
I hate compilers and compiler setup with a passion. Was there any documentation released with the DLL's and how to get a basic program setup by chance? I'm assuming there was no official release and that the only reason I caught it is because I happened to read the end of this forum?
|
|
|
|
|
Posted: October 16th, 2008, 2:44 pm
|
|
|
|
beergeek
Total Posts: 434
Joined: July 10th, 2005, 9:59 am
beergeek's Reps: 21
|
glass40 (!empty($user->lang['WROTE'])) ? $user->lang['WROTE'] : ucwords(strtolower(str_replace('_', ' ', 'WROTE'))): I hate compilers and compiler setup with a passion. Was there any documentation released with the DLL's and how to get a basic program setup by chance? I'm assuming there was no official release and that the only reason I caught it is because I happened to read the end of this forum?
It couldn't be easier in visual studio, if that's what you're using. I imagine visual basic express works just as well.
Here's some simple instructions:
Create a new project, give it whatever name you want.
In the project's directory, copy all the vgextreme files and support files (/includes directory not necessary)
In VS, right click the project name in your Solution Explorer and choose Add Reference
In the Add Reference window, click the Browse tab and browse to vgextremeservice.exe in your project folder and click OK
Repeat for VGEHelper.dll if you want those functions as well (pixel, mouse, etc. that is not directly associated with vanguard or memory)
In your code, add these declarations:
Visual Basic:
(!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): Dim oVG As New MMOViper.Vanguard() Dim oVGH As New VGEHelper.ScriptHost() C# (!empty($user->lang['CODE'])) ? $user->lang['CODE'] : ucwords(strtolower(str_replace('_', ' ', 'CODE'))): MMOViper.Vanguard oVG = new MMOViper.Vanguard(); VGEHelper.ScriptHost oVGH = new VGEHelper.ScriptHost();
Using these are easy. Example:
intPlayerHP = oVG.Player.HP
etc... the IntelliSense will give you dropdowns for the available methods and properties of oVG and oVGH (you can, of course, name these whatever you want. doesn't have to be oVG)
As for compiler settings, there is nothing from default that you would want to change, although if using VB, you may want to set Option Strict so the dev environment can more easily catch errors.
The environment will allow you to execute the code within visual studio or you can run the exe separately. All you have to do is click the Build your_program_name from the Build menu, and it will create the .exe in the project folder. That can be distributed as is. The only limitation is it must be in the same directory as vgextremeservice.
One last note... make sure you copy the vgextreme files into the project folder. You can create a reference to the exe in another location, but it will attempt to copy the needed files in the project folder anyway. However, since it does not copy the code obfuscation library (HVNRuntm.dll), it will generate an error when you try to debug your program. Also, do not have vgextremeservice.exe running when you try to run your compiled program as the service can only hook vanguard logging once and may be dumping the log in the wrong place.
|
|
|
|
|
Posted: October 16th, 2008, 6:00 pm
|
|
|
|
glass40
Total Posts: 63
Joined: June 21st, 2008, 5:46 pm
glass40's Reps: 5
|
Oh, that is simple.. Thanks Beergeek. Do you know how difficult it would be to do this using MFC? (Visual Studio of course). Adding a resource in an MFC project doesn't seem to be as simple as this, as there really is no "Add Resource" option. There *is* a resource section, but nothing that will allow me to browse files. That said, if its just going to be a hassle, I may as well get with the times and work with C#. My only problem with that is to implement any A* techniques, I need to use linked lists and direct access to memory, which with C# is kind of a pain if I remember correctly.
|
|
|
|
|
Who is online |
|
Users browsing this forum: No registered users and 17 guests |
|
|
|