Page 1 of 1

Problem with function setupMacroHotkey()

Posted: Sat Aug 11, 2012 11:32 pm
by Andreas_B
Originally this function should remove macros from the actionbar, which were used by older versions of the bot. But this function removes also mounts from the actionbar, which I have placed there for easier access.

Re: Problem with function setupMacroHotkey()

Posted: Sat Aug 11, 2012 11:49 pm
by lisa
Which version are you using, the bot doesn't use the macro on hotkey bar anymore and shouldn't be removing any skills/macros from the hotkey bar.

Re: Problem with function setupMacroHotkey()

Posted: Sun Aug 12, 2012 3:43 am
by rock5
Actually it does. It still finds the action key that points to the macro, if it exists, and deletes it. I don't know how a mount could be mistaken for a macro key. Action keys with macros have ids between 1 and 49. Items in the action bar have ids of the items.

Maybe the easy solution is to remove that code. I don't think it's needed anymore. It was mainly for just tidying up the action bar when the change was first introduced.

Re: Problem with function setupMacroHotkey()

Posted: Tue Aug 28, 2012 8:13 am
by Andreas_B
lisa wrote:Which version are you using, the bot doesn't use the macro on hotkey bar anymore and shouldn't be removing any skills/macros from the hotkey bar.
Yes - the bot says, the macro on hotkey bar is not needed anymore - and removes the pet from the bar. The code to do this is in the function setupMacroHotkey(). The pet is also removed, if there is no action key that points to the macro.

The bot is the current version from svn ... revision 737

Code: Select all

function setupMacroHotkey()
	-- Find the action key that points to the command macro.
	local actionKey, hotkey = findActionKeyForMacro(commandMacro)
	if actionKey then
		-- A hotkey for the macro is no longer needed.
		printf("You no longer need to place the macro into the actionbar. It will be removed.\n")
		setActionKeyToId(actionKey, "delete")
	end

	-- Set settings.profile.hotkeys.MACRO.key
	local hotkey, modifier = getHotkeyByName("TOGGLEPLATES") -- The "Toggle title/guild" hotkey
	if hotkey == 0 or modifier ~= nil then
		error("Please assign a hotkey to 'Show title/guild' in the games 'Key Bindings' interface. Dont use a modifier(CTRL,SHIFT,ALT).")
	end
	settings.profile.hotkeys.MACRO.key = hotkey

	if( settings.options.DEBUGGING_MACRO ) then
		printf("The macro hotkey is ".. string.char(hotkey) .. ".\n")
	end
end
At this time I have removed the Lines

Code: Select all

		printf("You no longer need to place the macro into the actionbar. It will be removed.\n")
		setActionKeyToId(actionKey, "delete")

Re: Problem with function setupMacroHotkey()

Posted: Tue Aug 28, 2012 8:37 am
by rock5
Ok, I'll remove those line next commit, after the addresses update.