Re: --=== Official new patch thread ===-- patch 4.0.9
Posted: Thu Mar 22, 2012 7:21 am
Couple of missing/extra parentheses but I went ahead and added/removed them accordingly.
Here are some of the output/debug messages. Again, the bot stopped attacking the main mob mid-battle and went to attack another mob instead.
Code: Select all
6:46am - scripts\rom/bot.lua:604: ')' expected near 'then'Code: Select all
6:46am - scripts\rom/bot.lua:608: 'then' expected near ')'Code: Select all
Fight finished. Killed 11 MOB_NAME_HERE. (fight #11 / runtime 7 minutes)
Clearing target.
Resting for 4 seconds.
Resting finished after 4 seconds.
Clearing target.
[DEBUG] FightStartX -954.00732421875 FightStartZ -2667.8962402344
[DEBUG] dir_FS->WP rad 1.827 dir_FS->FE rad 2.229
[DEBUG] Line FS->WP / FS->FE: angleDif rad 0.402 grad 23
[DEBUG] We (would) pass(ed) wp #3 (dist 158.0) in a dist of 63 (skip at 100)
Moving to waypoint #3, (-994, -2515)
Resting up to 23 to fill up mana and HP.
Resting finished after 1 seconds.
Moving to waypoint #4, (-816, -2522)
Stopping waypoint: Target acquired.
Engaging enemy [MOB_NAME_HERE] in combat.
We begin the fight with ranged pulling.
Ranged pulling finished, mob in melee distance.
Too close. Backing up.
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1961/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1961/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1961/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1961/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1955/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1955/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1908/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1847/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1841/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1774/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1727/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1666/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1666/1961)
Use MACRO: WARRIOR_OPEN_FLANK => MOB_NAME_HERE (1666/1961)
[DEBUG] 1040141056 anti kill steal: target not fighting us: target don't targeti
ng a friend
Fight finished. Killed 12 MOB_NAME_HERE. (fight #12 / runtime 8 minutes)
Clearing target.
[DEBUG] 0 target dist > MAX_TARGET_DIST with battling from other mob
[DEBUG] FightStartX -877.00634765625 FightStartZ -2497.3603515625
[DEBUG] dir_FS->WP rad -0.384 dir_FS->FE rad 0.315
[DEBUG] Line FS->WP / FS->FE: angleDif rad 0.699 grad 40
[DEBUG] We (would) pass(ed) wp #4 (dist 65.8) in a dist of 45 (skip at 100)
Moving to waypoint #4, (-816, -2522)
Moving to waypoint #5, (-808, -2671)
Moving to waypoint #6, (-798, -2867)
Moving to waypoint #1, (-1030, -3024)
Moving to waypoint #2, (-970, -2843)
[DEBUG] 663109888 target dist > MAX_TARGET_DIST with battling from other mob
We have aggro. Stop moving to waypoint and wait for target.
Engaging enemy [MOB_NAME_HERE] in combat.
Use MACRO: WARRIOR_PROBING_ATTA=> MOB_NAME_HERE (1822/1961)
lisa wrote:Now we are getting somewhere =)
Ok the code in question is thisSo in order for it to do the anti KS and stop killing mob it has to be true for all of theseCode: Select all
if( settings.profile.options.ANTI_KS ) then if( target:haveTarget() and target:getTarget().Address ~= player.Address and (not player:isFriend(CPawn(target.TargetPtr))) and target:getTarget().Address ~= 0 -- because of distance limitation and target:getTarget().InParty ~= true )then cprintf(cli.red, language[5], target.Name); else player:fight(); end else player:fight(); end
mob isn't targeting you
target:getTarget().Address ~= player.Address
mob isn't targeting a "friend"
(not player:isFriend(CPawn(target.TargetPtr))
mob actually has a target
target:getTarget().Address ~= 0
mob isn't targeting a party member
target:getTarget().InParty ~= true
I am going to add some "debugging" prints to the attached file to narrow down which is causing it to trigger the anti-ks so we can then work out why.
Please test it and post what MM prints when it changes target.