Page 3 of 4

Re: World of Kungfu Bot (Updated)

Posted: Sat May 31, 2008 8:28 pm
by supercraz
Sorry about that.

what happens if alt F4 dont work on the game? is there an alternative?

Re: World of Kungfu Bot (Updated)

Posted: Sun Jun 01, 2008 12:58 am
by Administrator
You could reproduce opening the menu (typically pressing ESC a few times), and clicking the "exit game" button. You could also induce the OS's kill command to kill the process.

Re: World of Kungfu Bot (Updated)

Posted: Sun Jun 01, 2008 5:41 am
by supercraz
alt f4 doesn't work. Os kill as in shut down computer? hmm. :) what about task manager to kill the game

Re: World of Kungfu Bot (Updated)

Posted: Sun Jun 01, 2008 4:20 pm
by Administrator
Actually, I was thinking more along the lines of this:

Code: Select all

os.execute("taskkill /IM whatever.exe");

Re: World of Kungfu Bot (Updated)

Posted: Mon Jun 02, 2008 12:51 pm
by supercraz
sweet where do i put that command?

Re: World of Kungfu Bot (Updated)

Posted: Mon Jun 02, 2008 4:40 pm
by Administrator
Put it in place of the ALT F4 press from the previous code.

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 2:11 am
by juzanoob
when i was botting i found tat the char will get stuck(rocks,trees..etc) sometime and do nth. is there anyway to fix this?

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 2:30 am
by Administrator
Well, the easiest thing to do would be to bot in an area that's wide open and devoid of anything you can get stuck on. If this is not an option, you can try making a timed function to switch targets after 1 minute of not killing the targeted monster.

Add this anywhere outside of any function

Code: Select all

function switch_target_timer()
  target_monster();
  unregisterTimer("switch_target");
end
Then modify your fight function by adding the noted lines

Code: Select all

function fight_warrior()
  registerTimer("attack_timer", 3000, attack_timer);
  registerTimer("switch_target", minutesToTimer(1), switch_target_timer); -- ADD THIS

  while( have_target() ) do
    if( HP < HP_potion ) then
      hp_potion(); end
    if( MP < MP_potion ) then
      mp_potion(); end
    keyboardPress(key_skill1);
    yrest(120); 
    keyboardPress(key_skill2);
    yrest(120);  
    keyboardPress(key_skill3);
    yrest(120);
    coroutine.yield();	
  end

  unregisterTimer("attack_timer");
  unregisterTimer("switch_target"); -- ADD THIS

  yrest(1000);
end
That should help, at least. You can also try having the character jump (if WoKF supports this), or move a few steps.

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 2:42 am
by juzanoob
very nice of u to reply so fast. thx alot , tat shd help :D

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 3:20 am
by juzanoob
hmm any idea y it doesnt work? :?

-------------------------------------------------
-- FUNCTION MAIN
-------------------------------------------------
function main()
win = findWindow("Kungfu Client");
hdc = openDC(win);
proc = openProcess( findProcessByExe("GongfuClient.exe") );
attach(win);

registerTimer("update_vars", 100, update_vars);
registerTimer("buff1_timer", buff1_duration, buff1_timer);
registerTimer("buff2_timer", buff2_duration, buff2_timer);
registerTimer("buff3_timer", buff3_duration, buff3_timer);


function switch_target_timer()
target_monster();
unregisterTimer("switch_target");
end

i tried puting it above
-- update client variables by reading from it's memory function update_vars()
but it doesnt work too

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 4:03 am
by Administrator
You need to define "doesn't work." Does the script run? Does the script exit in error? Does it appear to run fine, just does not switch targets after that 1 minute?

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 5:06 am
by juzanoob
yea it does run normally but it doesnt change target after 1min

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 7:05 am
by Administrator
target_monster() seems to just be pressing the TAB button. If you have a target, and press TAB, does it switch to a new target, or keep the same target?

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 12:01 pm
by juzanoob
yup it does change target when i press tab

Re: World of Kungfu Bot (Updated)

Posted: Tue Jul 15, 2008 6:33 pm
by Administrator
Edit switch_target_timer(). Add

Code: Select all

printf("switch_target_timer");
to it, and make sure the function is actually being called. If you see the line "switch_target_timer" printed to MicroMacro's screen, then it is obviously being called.

Re: World of Kungfu Bot (Updated)

Posted: Wed Jul 16, 2008 11:48 am
by juzanoob
in which line to change u mean?
this registerTimer("switch_target", minutesToTimer(1), switch_target_timer);
or
function switch_target_timer()

Re: World of Kungfu Bot (Updated)

Posted: Wed Jul 16, 2008 7:17 pm
by Administrator
I said to add that line into the function. You should not be changing any lines, just adding one.

Re: World of Kungfu Bot (Updated)

Posted: Wed Jul 23, 2008 7:30 pm
by felix_fx2
elverion, do you have hackbar's msn ? need his help again for the new offsets.

or someone has knowledge on how to get that.

PM me, i'll be checking my pm tonight when i reach work

Re: World of Kungfu Bot (Updated)

Posted: Thu Jul 24, 2008 10:38 am
by Administrator
I do not have his MSN address, however, he has marked his e-mail address for his profile. You could just click that little mail icon under his name on his first post in this topic. At least, I think you can see that, right?

Re: World of Kungfu Bot (Updated)

Posted: Sun Jul 27, 2008 6:29 pm
by pheiv
How can this game be played when it lags like hell. :|