Bug or not a bug

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Bug or not a bug

#1 Post by BlubBlab » Thu Jan 31, 2013 8:17 am

I don't know if this 2 lines are a bug in the bot.lua or be intended this way:

Code: Select all

if( type(settings.profile.events.onUnstickFailure) == "function" ) and
		player.Unstick_counter == settings.profile.options.MAX_UNSTICK_TRIALS + 1 then --this Line
		pcall(settings.profile.events.onUnstickFailure);
should be

Code: Select all

if( type(settings.profile.events.onUnstickFailure) == "function" ) and
		player.Unstick_counter >= settings.profile.options.MAX_UNSTICK_TRIALS + 1 then --this line
		pcall(settings.profile.events.onUnstickFailure);
Because under very rare circumstances player.Unstick_counter can be bigger then settings.profile.options.MAX_UNSTICK_TRIALS + 1 , had that 2 times, my bot was running mad.

the other is:

Code: Select all

-- if next waypoint is 'in front' of current waypoint
if( math.deg(angleDif) > settings.profile.options.WAYPOINT_PASS_DEGR ) then	-- default 90
	if (settings.profile.options.DEBUG_WAYPOINT) then
	cprintf(cli.yellow, "[DEBUG] We overrun waypoint #%d, skip it and move on to #%d\n",currentWp.wpnum, nextWp.wpnum);
	end
I got irritating by reading this the Debug message says you want to skip the WP in front, i'm not sure what is right 0 or 90 degree for is "front", but that means anyway you are not skip a quarter but all of the rest. if 90 degree is in front of you, it won't skip it because it must be then" angleDif) >= settings.profile.options.WAYPOINT_PASS_DEGR" for that.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug or not a bug

#2 Post by rock5 » Thu Jan 31, 2013 8:55 am

The first is done, but I used

Code: Select all

player.Unstick_counter > settings.profile.options.MAX_UNSTICK_TRIALS then
removing the '+ 1'. Seemed logical.

The second thing, I didn't quite follow you. Are you saying you don't understand it or you think something is wrong or you want to get rid of one of the duplicated messages?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Bug or not a bug

#3 Post by BlubBlab » Thu Jan 31, 2013 10:11 am

rock5 wrote:The first is done, but I used

Code: Select all

player.Unstick_counter > settings.profile.options.MAX_UNSTICK_TRIALS then
removing the '+ 1'. Seemed logical.

The second thing, I didn't quite follow you. Are you saying you don't understand it or you think something is wrong or you want to get rid of one of the duplicated messages?
First that wouldn't help every time because it happens when the bot reached a new Waypoint File and had already x fail tries, I changed the MAX_UNSTICK_TRIALS in the new File and than MAX_UNSTICK_TRIALS could be x-1, yes than it will work, but It could also x-2,x-3, x-n....., because of this the bot would not run the onUnstickFailure event.

The second thing I only assume to look over and may rethink again whether you really want to skip 3/4 of the unit circle and 1/4 not.

But I have a real problem can you test what these DEBUG Messages Print by(at) you?

Code: Select all

local lootIgnoreList = {};
local lootIgnoreListPos = 0;
function evalTargetLootable(address, target)

	if not target or not target.HP then
		target = CPawn.new(address)
	end
	-- Check if still valid target
	if not target:exists() then
		return false
	end

	-- Check if lootable
	target:updateLootable()
	if not ( target.Lootable ) then
		return false;
	end
	cprintf(cli.yellow, "[DEBUG] Eval Lootignore pre seach.\n");
	-- Check if in lootIgnoreList
	for __, addr in pairs(lootIgnoreList) do
	cprintf(cli.yellow, "[DEBUG] Eval Lootignore seach.\n");
		if target.Address == addr then
			cprintf(cli.yellow, "[DEBUG] Eval Lootignore found it.\n");
			return false
		end
	end
?
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug or not a bug

#4 Post by rock5 » Thu Jan 31, 2013 11:55 am

Code: Select all

player.Unstick_counter > settings.profile.options.MAX_UNSTICK_TRIALS then
Is exactly the same as what you wrote

Code: Select all

player.Unstick_counter >= settings.profile.options.MAX_UNSTICK_TRIALS + 1 then
just a bit shorter.
BlubBlab wrote:The second thing I only assume to look over and may rethink again whether you really want to skip 3/4 of the unit circle and 1/4 not.
Maybe you don't understand what 'angleDif' is. It's the angle between the player and the next wp and the player and the waypoint after that. Here's a diagram.
angledif.jpg
If the player ends a fight at position A then the angle from the player between the next waypoint and the one after that will be less than 90 so it will still go to the 'next WP'. If the player ends up at position B then the angle will be more than 90 so it will skip the 'next WP' and head to the 'next WP +1'. I hope that clears it up.
BlubBlab wrote:But I have a real problem can you test what these DEBUG Messages Print by(at) you?
I'm not sure what you wanted me to do but I forced a failed loot, then when it killed something else it printed

Code: Select all

[DEBUG] Eval Lootignore pre seach.
[DEBUG] Eval Lootignore seach.
[DEBUG] Eval Lootignore found it.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: Bug or not a bug

#5 Post by BlubBlab » Thu Jan 31, 2013 4:58 pm

thx
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 12 guests