EC: selecting combat training type, automatically

In EC, there are cases where it's nice to select a type of action automatically.

For the animal taming mastery spell "Combat Training", the ability to select the option automatically may be useful, especially if in the heat of combat.

Add this case to gumpsparsing.lua, function GumpsParsing.ShowHide:
		elseif (gumpID == 1123123) then	-- combat training, 
local button_number = tonumber(Interface.ForceCombatTraining) -- 1=empowerment, 2=as one, 3=berserk, 4=consume damage

if(button_number ~= nil and button_number > 0 and button_number < 5) then
GumpsParsing.PressButton(gumpID, button_number)
GumpsParsing.ToShow[gumpID] = 0
end
end


In your macros, you can use:

Actions->Other->Command

script Interface.ForceCombatTraining=4
Before casting Combat Training, to select "Consume damage".

You can also issue this in the chat window:
/script Interface.ForceCombatTraining=4
You can also save the setting in your user settings file, so it's not necessary to sprinkle the script command around.

The valid values 1...4 are described in the text above.

Comments

  • ForeverFunForeverFun Posts: 920

    You can also save the setting in your user settings file, so it's not necessary to sprinkle the script command around.


    If you want to persist the setting in your settings file, you'll need this change:

    		elseif (gumpID == 1123123) then	-- combat training, 
    if( Interface.ForceCombatTraining == nil ) then
    Interface.ForceCombatTraining = Interface.LoadNumber("ForceCombatTraining", nil)
    end

    local button_number = tonumber(Interface.ForceCombatTraining) -- 1=empowerment, 2=as one, 3=berserk, 4=consume damage

    if(button_number ~= nil and button_number > 0 and button_number < 5) then
    GumpsParsing.PressButton(gumpID, button_number)
    GumpsParsing.ToShow[gumpID] = 0
    end
    end


    and you can save the setting (consume damage in this case) like so:

    /script Interface.ForceCombatTraining=4
    /script Interface.SaveNumber( "ForceCombatTraining", Interface.ForceCombatTraining )
    (logout to save user settings).

Sign In or Register to comment.