World of Kungfu Bot (Updated)

You may request or share scripts for MicroMacro in this forum.
Message
Author
hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

World of Kungfu Bot (Updated)

#1 Post by hackbar » Tue Jan 08, 2008 6:04 pm

Here be the new version with added buffs and caster class support. More updates to come in the future.
Attachments
kungfu.lua
(8.71 KiB) Downloaded 893 times

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#2 Post by Administrator » Tue Jan 08, 2008 8:20 pm

I'll have to check this one out; it looks interesting. And thanks for your addition.
Here's the URL to the WoKF site for others: http://www.worldofkungfu.com/
And screenshots are here: http://www.worldofkungfu.com/index.cfm?action=media


EDIT:
Dear elverion,

This is a notice of a ban placed on the Aeria Games account assigned to this e-mail address. It was found that a character under the account was 'Hacking'. With this behavior confirmed we have placed a 'permanent' ban on the account starting on Tue, 2008-01-08 10:52. If you wish to discuss this ban further please contact us at info@aeriagames.com to receive a request ticket.


-- Aeria Games Team
Actually, the funny thing is, I haven't played Shaiya in a long time, and I didn't cheat at all in DOMO. The DOMO script I posted wasn't used by me--ever. And I'm not sure exactly why they think banning me is going to do any good. Looks like I'll definitely be playing WoKF then!

Guest

Re: World of Kungfu Bot (Updated)

#3 Post by Guest » Wed Jan 09, 2008 8:54 am

Bunk. Guess ill see you in wokf at least :)

hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

Re: World of Kungfu Bot (Updated)

#4 Post by hackbar » Wed Jan 09, 2008 11:01 am

Erm didnt know you could log in as guest. Lol.

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#5 Post by Administrator » Wed Jan 09, 2008 5:46 pm

Yeah, guests are enabled (at least for now). I don't really see too much of a problem with it. They have restricted rights, but can still post. I figure, maybe some people will post that don't want to bother signing up.

Anyways, I've made a few changes to the script. One is changing

Code: Select all

proc = openProcess( findProcess("Kungfu Client Ver:1.0.29b") );
to

Code: Select all

proc = openProcess( findProcessByExe("GongfuClient.exe") );
No idea why it's "Gong Fu" now instead of "Kung Fu." The reason for this is that you won't need to change it whenever they update the game's window name. You'd still need to update the window name for findWindow, though... I've also changed the warrior fight function, but that doesn't necessarily mean it's better. It just allows you better control over the chance of using each skill:

Code: Select all

function fight_warrior()

  while( have_target() ) do
    if( HP < HP_potion ) then
      hp_potion(); yrest(500); end
    if( MP < MP_potion ) then
      mp_potion(); yrest(500); end
    if( SP < SP_potion ) then
      sp_potion(); yrest(500); end

    local roll = math.random(100);

    if( roll <= skill1_chance and MP >= skill1_cost ) then
      keyboardPress(key_skill1);
      yrest(120);
    elseif( roll <= skill2_chance and MP >= skill2_cost ) then
      keyboardPress(key_skill2);
      yrest(120);
    elseif( roll <= skill3_chance  and MP >= skill3_cost ) then
      keyboardPress(key_skill3);
      yrest(120);
    else
      keyboardPress(key_attack);
      yrest(500);
    end

    coroutine.yield();
  end

  yrest(1000);
end
So basically, it will use skill2 only if the roll for skill 1 fails, and skill 3 if the roll for skill 2 fails. If even skill 3 fails, it'll just hit them with the spear and re-roll.

hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

Re: World of Kungfu Bot (Updated)

#6 Post by hackbar » Thu Jan 10, 2008 3:16 pm

Didn't know you could find by Exe thats alot easier nice change.


Nice improvement to the basic functionality of the warrior_fight() but im not sure whats gonna happen by testing MP cost as warriors dont use MP I haven't actually bothered finding the pointer and offset for the aggression yet. Once I do I'm gonna have to start breaking up classes more as the way that the melee (aggression) classes work is backwards. Spear starts with 100 aggression and works down almost always being able to do solid consistent damage. Axe/Hammer start at 0 and work up working on strong burst damage which is also based on their various buffs.

Theres 9 classes total i think so it could get pretty hairy coding an individual fight script for each one but I don't see how generic scripts are gonna cut it.

I haven't even tested the archer yet, prolly make a second account tonight to do that.

Another thing im working on is finding the map coordinates pointers and addresses so we can hopefully build a half decent resupply / inventory dump script.

I've found the addresses for the cursor location when you click somewhere on terrain but not for the characters actual location. Every time i search for the pointers after restarting the client artmoney bombs on me.

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#7 Post by Administrator » Thu Jan 10, 2008 6:32 pm

What do you mean the coordinates of the mouse? The "world" coordinates (where clicking will take you), or the screen coordinates (the relation to the top-left of the window)?

If you have found world coordinates, that's awesome! It could definitely allow us to setup a waypoint script that would take your character through certain areas, or to go to shop, or whatever.

If you need help with the pointers, can you post any information on how you found the information? Also, post the non-pointer addresses if you can (it'll help me figure out which result I get is correct).

Guest

Re: World of Kungfu Bot (Updated)

#8 Post by Guest » Thu Jan 10, 2008 6:43 pm

Well basically i just looked at the number shown under the mini map. Then i just searched for the address and found it but when i filtered the value came up twice. I watched the values as I clicked somewhere new in the world. One would immediatly change to the new coordinates that you would arrive at the other would change as you walked to the new location. Also cooresponding to the mini map coords.

Heres what i think are the x and the y of the place where your mouse clicks in the world.

hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

Re: World of Kungfu Bot (Updated)

#9 Post by hackbar » Thu Jan 10, 2008 6:44 pm

Oops I forgot to log in...

Heres the code:

Code: Select all

--new map functions
-----------------------------

X_coord        = 10000;
Y_coord        = 10000;


X_ptr          = "005EE6B0";
X_offset       = 100;

Y_ptr          = "005EE6B0";
Y_offset       = 104;

hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

Re: World of Kungfu Bot (Updated)

#10 Post by hackbar » Fri Jan 11, 2008 9:26 am

patch day pointers / offsets didnt change far as i can tell at least for hp/mp i hope the map ones didnt change either as i haven't tested em.

heres the changes for the script.

Code: Select all

function main()
  win = findWindow("Kungfu Client Ver:1.0.30b");
  hdc = openDC(win);
  proc = openProcess( findProcessByExe("GongfuClient.exe") );
  attach(win);

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#11 Post by Administrator » Fri Jan 11, 2008 7:24 pm

Have you played around with the movement yet?

I had a quick idea. I think if we lock the x,y of the moveto position, then click anywhere on the screen, it might be possible to make your character move directly to that position. I think I'll have to test this out.

Oh, in other news, I've evaded my Shaiya/Domo ban. I'm like a ninja; moving swiftly and silently. Still annoying that I lost about 180k + tons of items.

hackbar
Posts: 8
Joined: Sun Jan 06, 2008 5:07 pm

Re: World of Kungfu Bot (Updated)

#12 Post by hackbar » Fri Jan 11, 2008 9:00 pm

Well i got the pointer +offset for aggression.

I still can't get the map stuff right. Whenever i lookup the pointer for current character location I find nothing even though i can get the raw address. All we currently have is the click point.

The char location is more important i think in terms of getting teleports going and doing the automated walking.

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#13 Post by Administrator » Fri Jan 11, 2008 9:55 pm

Of course. However, the way I see it is that we can setup waypoints. Whenever there are no enemies in the area, it would move to the next waypoint, check again, and continue moving along the chain of waypoints. To determine if you are at the waypoint, you would, of course, need to use the distance formula between your character and check if you are within, say, 10 meters.

Are you searching for type float/double? I think that if it only displays a non-floating-point integer, that you should check within a range. So if you are looking for the number 135 for example, search in the range of 135.0 to 136.0.

felix_fx2
Posts: 11
Joined: Fri Feb 01, 2008 9:01 pm

Re: World of Kungfu Bot (Updated)

#14 Post by felix_fx2 » Sat Feb 02, 2008 4:37 pm

hackbar wrote:Oops I forgot to log in...

Heres the code:

Code: Select all

--new map functions
-----------------------------

X_coord        = 10000;
Y_coord        = 10000;


X_ptr          = "005EE6B0";
X_offset       = 100;

Y_ptr          = "005EE6B0";
Y_offset       = 104;
hackbar-

this is added in the user portion of the script right.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: World of Kungfu Bot (Updated)

#15 Post by 3cmSailorfuku » Sat Feb 02, 2008 7:46 pm

elverion wrote:Of course. However, the way I see it is that we can setup waypoints. Whenever there are no enemies in the area, it would move to the next waypoint, check again, and continue moving along the chain of waypoints. To determine if you are at the waypoint, you would, of course, need to use the distance formula between your character and check if you are within, say, 10 meters.

Are you searching for type float/double? I think that if it only displays a non-floating-point integer, that you should check within a range. So if you are looking for the number 135 for example, search in the range of 135.0 to 136.0.
That's merely a bit of the work you would have todo. You would have to constantly calculate the X and Y/Z coordinates you're walking. However those would have to be recalculated again depending on the Camera/Speed/Direction setup. That's just an insane amount of work, which could be solved easier.

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#16 Post by Administrator » Sat Feb 02, 2008 7:58 pm

Not necessarily. Doing it that way would be a lot of work, yes. What I had proposed was to just fake it, and let the client figure it out. That is, rather than figure out where the correct place to click is, set the addresses to where you want to go, and induce the movement.

But yeah, it's a boring game. I can't be bothered.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: World of Kungfu Bot (Updated)

#17 Post by 3cmSailorfuku » Sun Feb 03, 2008 9:26 am

elverion wrote:Not necessarily. Doing it that way would be a lot of work, yes. What I had proposed was to just fake it, and let the client figure it out. That is, rather than figure out where the correct place to click is, set the addresses to where you want to go, and induce the movement.

But yeah, it's a boring game. I can't be bothered.
That would be calling a function of the game itself, like I had suggested once. You could easily dump the game's function offsets and make them useable for yourself. If you happen to accomplish such thing, then the bot won't need so send keys anymore etc or to have the focus on all the time. But such a thing needs alot of work if you want to make it compatible for for than 2 games. Just imagine such a bot where you don't have to setup any kind of Hotkeybar or a Skill setup. You just call it via CastSpell(1193); :P . Oh wait, I forgot this is opensource. I might want to toy around by myself then (:

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#18 Post by Administrator » Sun Feb 03, 2008 2:38 pm

Yeah. That's where the plugin system will help. All you would need to do is download the associated .dll files, put them in the plugin folder, and everything will work.

I really would need some example code to work from, so if you're up to the challenge, go ahead and try doing exactly this (make sure it all works), and send some code my way. I'll need it to make sure the plugins are working correctly.

User avatar
3cmSailorfuku
Posts: 354
Joined: Mon Jan 21, 2008 6:25 pm

Re: World of Kungfu Bot (Updated)

#19 Post by 3cmSailorfuku » Sun Feb 03, 2008 6:07 pm

elverion wrote:Yeah. That's where the plugin system will help. All you would need to do is download the associated .dll files, put them in the plugin folder, and everything will work.

I really would need some example code to work from, so if you're up to the challenge, go ahead and try doing exactly this (make sure it all works), and send some code my way. I'll need it to make sure the plugins are working correctly.
C++ Code of how to call a function + codecave?

User avatar
Administrator
Site Admin
Posts: 5313
Joined: Sat Jan 05, 2008 4:21 pm

Re: World of Kungfu Bot (Updated)

#20 Post by Administrator » Sun Feb 03, 2008 7:00 pm

Actually I'm not even sure how would be the best to go about this. There are several ways it can be done.

It might be easiest to just inject some DLLs into the target process, and have MicroMacro send a message requesting that the DLL call the functions from within the program. It's actually kind of a lot of work, I guess, but I'd like to have the system not dependent on having modified clients.

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests