taultunleashed logoHunting bot coding started in c# : EverQuest 2 Premium Discussions
newtopic  postreply
 [ 14 posts ] 
blue large dot

Hunting bot coding started in c# : EverQuest 2 Premium Discussions

Posted: March 8th, 2008, 12:56 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
I don't know if anyone is still interested in a vista compatible hunting bot for EQ2 but I am. I've spent the last few weeks learning how to write in C# and now I'm putting my new skills to use.

So far I have been able to get my application to grab resources from the EQ2 class so I am well on my way to having a workable program. Id like to know if anyone is interested in this or if these boards are just dead.

Anyways it should be done soon... if it is wanted :wink:


Reply with quote
Posted: March 8th, 2008, 1:58 pm
 
letsgo2u
letsgo2u's Reps:
User avatar
i would be interested in how you send key commands to the eq2 window - cause iam stuck on that part in vb 2008 :/


Reply with quote
Posted: March 8th, 2008, 9:13 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
well I wouldn't know how to do that in VB i don't think... I have worked with VBScript.

I'm having a minor problem finding the memory address for you toons heading... anyone know anything about how EQ2 stores this variable?


Reply with quote
Posted: March 9th, 2008, 3:14 am
 
letsgo2u
letsgo2u's Reps:
User avatar
you are not useing eq2extreme? in there i would be player.heading if iam not mistaken


Reply with quote
Posted: March 9th, 2008, 2:28 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
no I'm not using EQ2 extreme... this program should be stand alone. I managed to get the player heading address... now I'm just working on target variables and stuff... c# owns


Reply with quote
Posted: March 9th, 2008, 2:48 pm
 
letsgo2u
letsgo2u's Reps:
User avatar
well eq2extreme does all the memory reading stuff for you, but here is a great guide from wyvern regarding memory offsets, thats what you are looking for.

http://www.taultunleashed.com/phpbb2/ab ... rial_.html


Reply with quote
Posted: March 9th, 2008, 5:26 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
thanks, im a bit beyond that though.. im trying to find memory addresses to some of the harder values, such as other npcs/pcs variables


Reply with quote
Posted: March 11th, 2008, 4:24 am
 
letsgo2u
letsgo2u's Reps:
User avatar
do you actually get the toon to move with c#? cause in vb2008 i cant send movement commands since eq2 is a directx game and i would have to make a hardware simulated movement command, but in vb2008 i only have sendkeys and thats software simulation.

any idea maybe?


Reply with quote
Posted: March 11th, 2008, 2:44 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
Alright, well I'm still learning myself. In that case I would try and create some methods that are able of interacting with the game. It cant be that hard, I mean at some level the game cant distinguish between your keyboard/mouse signals and signals sent by your program. I'm not expecting an easy answer like Sendkeys =P. Anyways I'm not really there yet, and I have limited knowledge of VB. Anyways I have a little program here that periodically captures variables from your memory. Ive got all the variables I need to create a strong hunting bot. I'm going to work to that end =D, GL to you, mabey I can help u out if u get stuck at some point.


Reply with quote
Posted: March 11th, 2008, 3:53 pm
 
letsgo2u
letsgo2u's Reps:
User avatar
well iam stuck at the movement commands thats all XD
since sendkeys works only for the chat iam really stuck.
i mean exhume crew got it to work with keyup and keydown i wonder what their trick is.

would be really great if some of the pros here (slam, gheezer, staz and tault guys) would give some hints or such...


Reply with quote
Posted: March 11th, 2008, 4:02 pm
 
gheezer
gheezer's Reps:
User avatar
I used the keybd_event API a while back, not sure if it is still the best way with Vista. Make sure EQ2 has the focus first, look up GetForegroundWindow and BringWindowToTop API calls.

http://pinvoke.net/default.aspx/user32/keybd_event.html


Reply with quote
Posted: March 13th, 2008, 3:40 am
 
fatalshrooms
fatalshrooms's Reps:
User avatar
Well here is how you can send keys in C#. I am using visual studio 2008.

System.Windows.Forms.SendKeys.Send("anystring")
or
System.Windows.Forms.SendKeys.Send("{ENTER}")

also I found that this is the same as visual basic's coding:

SendKeys.Send("anystring")

but you need to make sure you have the target window's control before you send keystrokes to it so...

Process[] processes = Process.GetProcessesByName("EverQuest2");
foreach (Process p in processes)
{
IntPtr pFoundWindow = p.MainWindowHandle;
public static extern bool SetForegroundWindow(IntPtr pFoundWindow );
SendKeys.Send ("{NUMLOCK}")
}

well that last tidbit is untested, ill test it later, but it should find the process EverQuest2, then set that window to foreground, then it should send Numlock. This should make your avatar to start runnin.

Also, for movement... it should be fairly easy to find out on your own but incase you really cant.... just use keydown/delay/keyup to simulate turns runs and backpedals, that part should b easy. Gettingyour char to run to locations is a diferent story.


As for VB.. the code isnt much different and the concept is the same:
get the window you want's handle, use that handle to bring it to foreground, and then send keys to it. Hope that helps


Reply with quote
Posted: March 13th, 2008, 5:03 am
 
letsgo2u
letsgo2u's Reps:
User avatar
iam that far and let me tell you, it doesnt work!
sendkeys doesnt work since eq2 is a directx game, you need to make a hardware emulation
and sendkeys emulates on a software lvl so its no good for movement, but to make chat marcos, thats all :/ sadly :(
and like i said, with the exhume debugger and build in commands, i get perfectly running bot (turns, find heading approch, stuck and such) but the big problem, vb2008 doesnt have keydown/up like exhume has, vb2008 only has a keydown/up that checks if a key IS pressed or not :/ so its quite different.


but thanks. and if you have problems with the process id, i have a perfectly working script for that, if you need help, just ask


Reply with quote
Posted: March 13th, 2008, 1:42 pm
 
fatalshrooms
fatalshrooms's Reps:
User avatar
okay well, i AM going to help you eventually! Right now I have all the data i need from EQ mapped out and on a repeat timer in my program. I'm just about to enounter all the problems you may have... I will give you my solution in C# with an attempt to write it in VB as well...

Question to anyone who can answer:

Anyone know what a memory address that holds information regarding what type of a mob this is? It would greatly improve my project if I could also have player type (node/pc/npc/mob/ect..), and also whether or not the target is heroic... what type of variables may these be? 4byte? i doubt its float, it could possibly be a 1byte or a 2 byte... (EDIT... Found it an hour later..DOH!)


Reply with quote
Want Advertisements After The Last Post Removed? Create A Free Account!

blue large dot Who is online
Users browsing this forum: No registered users and 64 guests

Popular Sections
SWTOR Cheats
Guild Wars 2 Cheats
Guild Wars 2 Hacks
Guild Wars 2 Bots
Diablo 3 Cheats
Guild Wars 2 Mods

Popular Sections
WoW Cataclysm Cheats & Exploits
WoW Cataclysm Hacks & Bots
Star Wars The Old Republic Cheats
SWTOR Mods
Torchlight 2 Cheats
SWTOR Space Mission Bots
Site Nav and RSS
RSS Feed of EverQuest 2 Premium Discussions RSS Feed 
Sitemap of EverQuest 2 Premium Discussions Sitemap 
SitemapIndex SitemapIndex
RSS Feed RSS Feed
Channel list Channel list
left bottom corner Site and Contents Copyright 2001-2012 All Rights Reserved TaultUnleashed.com bottom corner
top left
top right
createaccount
Username:   Password:   Remember Me?