Thread Rating:
  • 45 Vote(s) - 3.02 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Module] Controller [1.07]
#45
Cichard,

This is also available in the repo I sent you.

I was trying to implement a Return to Option to eventually suggest blending in with your INN option but I am having a bit of trouble.

I got it to work if I use the MultiBot COM Server Console

Code:
sendc <channel>  11;WakingSands
sendc <channel>  11;RisingStones

both work. I still need to do a bit of work to interrupt a path if I change my mind. The problem is that the mb.ReceivedMsg is not lining up and even though it states it is sending the same data it isn't firing. My guess is there is some translation on the mb.ReceivedMsg I need to do for an exact match (something like its actually sending % instead.

Let me know any thoughts you have. This is just a first go to try and get more familiar with the LUA and API but I am trying.

Code:
--==================Set Return Mode=======================

ctrl.AddComboBox("Return To Location","RETURN","Settings","RisingStones, WakingSands")
function compileReturnMessage()
    return "11;".._G["CONTROLLERUI_RETURN"]
end
local handlerReturnTo = {
    evaluate = function ()
        if (mb.ReceivedID == 11) then
            return true
        end
        return false
    end,
    execute = function ()
        local destid = 0
        local message = mb.ReceivedMsg
        if (message == "RisingStones") then
            destid = 351
        elseif (message == "WakingSands") then
            destid = 212
        end

        if (Player.localmapid == destid) then
            return false
        else    
        local bestMap = 0
            bestMap = destid
        
        if (bestMap ~= 0) then
            if (gBotRunning == "1") then
                ml_task_hub.ToggleRun()
            end

            ml_task_hub.shouldRun = true
            gBotRunning = "1"
            ml_task_hub:ClearQueues()
    
                local task = ffxiv_task_movetomap.Create()
                task.destMapID = bestMap
                task.task_complete_execute = function()
                    ml_task_hub.ToggleRun()
                end
                ml_task_hub:Add(task, LONG_TERM_GOAL, TP_ASAP)
        end
        end
    end,
}

mb.AddHandler(handlerReturnTo)
local action = function ()
    local destid = 0
local message = mb.ReceivedMsg
        if (message == "RisingStones") then
            destid = 351
        elseif (message == "WakingSands") then
            destid = 212
        end
    if (Player.localmapid == destid) then
        return false
    else
    local bestMap = 0
            bestMap = destid
        
        if (bestMap ~= 0) then
            if (gBotRunning == "1") then
                ml_task_hub.ToggleRun()
            end

            ml_task_hub.shouldRun = true
            gBotRunning = "1"
            ml_task_hub:ClearQueues()
                
                local task = ffxiv_task_movetomap.Create()
                task.destMapID = bestMap
                task.task_complete_execute = function()
                    ml_task_hub.ToggleRun()
                end
                ml_task_hub:Add(task, LONG_TERM_GOAL, TP_ASAP)
        end
    end
end
ctrl.AddInitiator("Return To", compileReturnMessage, action)
Reply
 


Messages In This Thread
[Module] Controller [1.07] - by Ace - 01-27-2015, 04:24 AM
RE: [Module] Controller [1.0] - by Zale00 - 01-27-2015, 05:22 AM
RE: [Module] Controller [1.0] - by Ace - 01-27-2015, 01:26 PM
RE: [Module] Controller [1.0] - by ledicious - 01-27-2015, 02:18 PM
RE: [Module] Controller [1.0] - by earisu - 01-27-2015, 04:23 PM
RE: [Module] Controller [1.0] - by Cichard - 01-27-2015, 04:50 PM
RE: [Module] Controller [1.0] - by Cybio - 01-27-2015, 04:57 PM
RE: [Module] Controller [1.0] - by Ace - 01-27-2015, 05:14 PM
RE: [Module] Controller [1.0] - by Cichard - 01-27-2015, 05:22 PM
RE: [Module] Controller [1.01] - by xrizonx - 01-27-2015, 06:55 PM
RE: [Module] Controller [1.02] - by Ace - 01-27-2015, 08:04 PM
RE: [Module] Controller [1.02] - by ledicious - 01-27-2015, 08:31 PM
RE: [Module] Controller [1.02] - by Ace - 01-27-2015, 08:46 PM
RE: [Module] Controller [1.03] - by Ace - 01-28-2015, 03:24 PM
RE: [Module] Controller [1.03] - by Zale00 - 01-28-2015, 04:41 PM
RE: [Module] Controller [1.05] - by Ace - 02-01-2015, 04:25 AM
RE: [Module] Controller [1.05] - by Zale00 - 02-01-2015, 04:38 AM
RE: [Module] Controller [1.05] - by Ace - 02-01-2015, 04:40 AM
RE: [Module] Controller [1.05] - by kitanoi - 02-01-2015, 05:22 AM
RE: [Module] Controller [1.05] - by rsilva712 - 02-01-2015, 07:50 AM
RE: [Module] Controller [1.05] - by Ace - 02-01-2015, 03:07 PM
RE: [Module] Controller [1.05b] - by garnet - 02-01-2015, 06:24 PM
RE: [Module] Controller [1.05b] - by Ace - 02-01-2015, 07:09 PM
RE: [Module] Controller [1.05b] - by garnet - 02-01-2015, 09:43 PM
RE: [Module] Controller [1.05b] - by Cichard - 02-01-2015, 11:42 PM
RE: [Module] Controller [1.05b] - by garnet - 02-02-2015, 09:36 AM
RE: [Module] Controller [1.05b] - by Cichard - 02-03-2015, 04:06 AM
RE: [Module] Controller [1.05b] - by Cash4gil - 02-03-2015, 11:00 AM
RE: [Module] Controller [1.05b] - by Ace - 02-03-2015, 02:19 PM
RE: [Module] Controller [1.06] - by Cichard - 02-03-2015, 04:02 PM
RE: [Module] Controller [1.06] - by rsilva712 - 02-03-2015, 06:51 PM
RE: [Module] Controller [1.06] - by Ace - 02-03-2015, 07:01 PM
RE: [Module] Controller [1.06] - by Cash4gil - 02-04-2015, 11:06 AM
RE: [Module] Controller [1.06] - by sebbs - 02-04-2015, 11:12 AM
RE: [Module] Controller [1.06] - by Kyle - 02-04-2015, 11:59 AM
RE: [Module] Controller [1.06] - by Cash4gil - 02-04-2015, 12:04 PM
RE: [Module] Controller [1.06] - by sebbs - 02-04-2015, 12:55 PM
RE: [Module] Controller [1.06] - by Ace - 02-04-2015, 02:04 PM
RE: [Module] Controller [1.06] - by Cash4gil - 02-04-2015, 02:24 PM
RE: [Module] Controller [1.06] - by Cichard - 02-04-2015, 09:38 PM
RE: [Module] Controller [1.06] - by Cash4gil - 02-06-2015, 02:15 PM
RE: [Module] Controller [1.06] - by Ace - 02-04-2015, 03:00 PM
RE: [Module] Controller [1.06] - by Cichard - 02-06-2015, 02:17 PM
RE: [Module] Controller [1.07] - by edb6377 - 02-17-2015, 12:38 AM
RE: [Module] Controller [1.07] - by Ace - 02-17-2015, 04:40 PM
RE: [Module] Controller [1.07] - by edb6377 - 02-17-2015, 04:54 PM
RE: [Module] Controller [1.07] - by Cichard - 02-19-2015, 03:34 PM
RE: [Module] Controller [1.07] - by edb6377 - 02-19-2015, 07:22 PM
RE: [Module] Controller [1.07] - by Ace - 02-17-2015, 05:14 PM
RE: [Module] Controller [1.07] - by edb6377 - 02-18-2015, 04:25 AM
RE: [Module] Controller [1.07] - by Cichard - 02-19-2015, 08:07 PM
RE: [Module] Controller [1.07] - by edb6377 - 02-27-2015, 08:57 AM
RE: [Module] Controller [1.07] - by edb6377 - 02-27-2015, 10:02 AM
RE: [Module] Controller [1.07] - by Ace - 03-01-2015, 09:16 PM
RE: [Module] Controller [1.07] - by edb6377 - 03-04-2015, 12:07 AM
RE: [Module] Controller [1.07] - by aDent - 03-06-2015, 10:41 AM
RE: [Module] Controller [1.07] - by Cichard - 03-06-2015, 02:45 PM
RE: [Module] Controller [1.07] - by aDent - 03-06-2015, 04:50 PM
RE: [Module] Controller [1.07] - by Cichard - 03-06-2015, 05:15 PM
RE: [Module] Controller [1.07] - by aDent - 03-09-2015, 11:34 AM
RE: [Module] Controller [1.07] - by sasquatch23 - 04-28-2015, 09:06 PM
RE: [Module] Controller [1.07] - by Cichard - 04-28-2015, 09:10 PM
RE: [Module] Controller [1.07] - by Ace - 04-29-2015, 05:29 PM
RE: [Module] Controller [1.07] - by sasquatch23 - 04-29-2015, 10:19 PM
RE: [Module] Controller [1.07] - by utage - 10-01-2015, 01:31 AM
RE: [Module] Controller [1.07] - by Cichard - 10-01-2015, 03:09 AM
RE: [Module] Controller [1.07] - by Namnaf - 10-01-2015, 04:18 AM
RE: [Module] Controller [1.07] - by Shannon - 02-17-2017, 03:29 AM

Forum Jump:


Users browsing this thread: 12 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products