Thread Rating:
  • 4 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ffxiv_task_ vs onupdate handler.
#6
(12-16-2013, 11:49 PM)f3re Wrote:  If you want your task to be queued, you would need to add a CNE that adds it as a subtask of whatever bot mode you want to use it from. You don't have to modify the Init() function of that task, you can insert them from an Init() function in your own module. Just add your cne to the task.process_elements() list or the task.overwatch_elements list. You want your module to be as independent of the main bot code as possible, so you want to avoid overriding/hooking/etc if at all possible.

So, if I understand you right, that would look something like this?

Code:
function SpecificHunting_task:Create()
    local newinst = inheritsFrom(ffxiv_task_grind) -- changing this to inherit from the grind task, thus becomes a subtask?
    
    --ml_task members
    newinst.valid = true
    newinst.completed = false
    newinst.subtask = nil
    newinst.auxiliary = false
    newinst.process_elements = {}
    newinst.overwatch_elements = {}
    
    --ffxiv_task_killtarget members
    newinst.name = "LT_SPECIFICHUNTING"
    
    return newinst
end

function SpecificHunting_task:Init()
    local ke_companion = ml_element:create( "Companion", c_companion, e_companion, 20 )
    self:add( ke_companion, self.overwatch_elements)
    
    local ke_companionstance = ml_element:create( "Companion Stance", c_companionstance, e_companionstance, 25 )
    self:add( ke_companionstance, self.process_elements)

    local ke_pethealassist = ml_element:create( "Pet Heal Assister", c_pethealassist, e_pethealassist, 15 )
    self:add( ke_pethealassist, self.overwatch_elements)

    self:AddTaskCheckCEs()
end
Reply
 


Messages In This Thread
RE: ffxiv_task_ vs onupdate handler. - by HansW - 11-30-2013, 09:27 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-16-2013, 10:22 PM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-16-2013, 11:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 12:36 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 01:26 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 02:33 AM
RE: ffxiv_task_ vs onupdate handler. - by ferenz - 12-17-2013, 03:08 AM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-17-2013, 04:34 AM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 04:05 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 05:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 05:49 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 07:38 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 08:11 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-14-2014, 09:41 PM
RE: ffxiv_task_ vs onupdate handler. - by Wirlo - 12-14-2014, 10:00 PM
RE: ffxiv_task_ vs onupdate handler. - by Ace - 12-15-2014, 12:02 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products