Thread Rating:
  • 3 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(REQ) Ultimate Crafting Profile!
#6
Here's my solution for the "ultimate" crafting profile:
1. Use any class profile that you like (signature and jackie both posted good profiles)
2. Modify the LUA code so it use skill name instead of skill ID when crafting. To do that, you need to create a sub-module that modify SkillMgr.Craft() function.
- Follow this guide here to create a submodule: https://github.com/MMOMinion/FFXIVMinion...ample-%231
- Add the function SkillMgr.Craft() to your file (it basically modifies the original function in ffxiv_skillmgr.lua so if the bot gets updated, it may breaks)
Code:
function SkillMgr.Craft()
    local synth = Crafting:SynthInfo()
    if ( TableSize(synth) > 0 and TableSize(SkillMgr.SkillProfile) > 0 and not ActionList:IsCasting()) then

        local pbuffs = Player.buffs
        
        -- update inner quite stack
        local iqfound=false
        if ( TableSize(pbuffs) > 0) then
            for i, buff in pairs(pbuffs) do
                if (buff.id == 251) then
                        -- first time we have the buff
                    if ( SkillMgr.lastquality == 0 ) then
                        SkillMgr.lastquality = synth.quality
                    elseif ( synth.quality > SkillMgr.lastquality ) then
                        -- second time in here with increased quality -> we gained a stack IQ
                        SkillMgr.lastquality = synth.quality
                        SkillMgr.currentIQStack = SkillMgr.currentIQStack + 1
                    end
                    iqfound = true
                    break
                end
            end
        end
        -- reset
        if not iqfound then
            SkillMgr.currentIQStack = 0
            SkillMgr.lastquality = 0
        end
        
        for prio,skill in pairs(SkillMgr.SkillProfile) do
        
            if ( skill.used == "1" ) then                
                -- get action id from name
                local realskilldata = nil
                local SkillList = ActionList("type=1")
                if ( TableSize( SkillList ) > 0 ) then
                    local i,s = next ( SkillList )
                    while i and s and s.id do
                        if (s.name == skill.name)
                        then
                            realskilldata = ActionList:Get(s.id)
                            break
                        else
                            i,s = next ( SkillList , i )
                        end
                    end
                end
                SkillList = ActionList("type=9")
                if ( TableSize( SkillList ) > 0 ) then
                    local i,s = next ( SkillList )
                    while i and s and s.id do
                        if (s.name == skill.name)
                        then
                            realskilldata = ActionList:Get(s.id)
                            break
                        else
                            i,s = next ( SkillList , i )
                        end
                    end
                end
                
                -- local realskilldata = ActionList:Get(skill.id)
                
                if ( realskilldata and realskilldata.isready ) then
                
                    local castable = true
                    --d("Checking on skill:"..tostring(skill.name).."  "..tostring(synth.durability).." > "..tostring(skill.durabmax) .. ": "..tostring(skill.durabmax > 0 and synth.durability > skill.durabmax))
                    --d("Checking on skill:"..tostring(skill.name).."  "..tostring(skill.condition).." > "..tostring(synth.description) .. ": "..tostring(skill.condition ~= "NotUsed" and synth.description ~= skill.condition))
                    if ( (skill.stepmin > 0 and synth.step >= skill.stepmin) or
                        (skill.stepmax > 0 and synth.step < skill.stepmax) or
                        (skill.cpmin > 0 and Player.cp.current >= skill.cpmin) or
                        (skill.cpmax > 0 and Player.cp.current < skill.cpmax) or
                        (skill.durabmin > 0 and synth.durability >= skill.durabmin) or
                        (skill.durabmax > 0 and synth.durability < skill.durabmax) or
                        (skill.progrmin > 0 and synth.progress >= skill.progrmin) or
                        (skill.progrmax > 0 and synth.progress < skill.progrmax) or
                        (skill.qualitymin > 0 and synth.quality >= skill.qualitymin) or
                        (skill.qualitymax > 0 and synth.quality < skill.qualitymax) or
                        (skill.qualityminper > 0 and synth.qualitypercent >= skill.qualityminper) or
                        (skill.qualitymaxper > 0 and synth.qualitypercent < skill.qualitymaxper) or
                        (skill.iqstack > 0 and SkillMgr.currentIQStack < skill.iqstack) or
                        (skill.condition ~= "NotUsed" and synth.description ~= skill.condition))                            
                        then castable = false
                    end
                        
                  -- buff checks

                    if ( skill.cpbuff ~= "" ) then
                      local bfound = HasBuffs(Player,skill.cpbuff)
                      if not bfound then castable = false end
                    end                        
                    
                    -- dont cast this spell when we have any of the BuffIDs in the skill.cpnbuff list
                    if (skill.cpnbuff ~= "" ) then
                        local tbfound = HasBuffs(Player,skill.cpnbuff)
                        if tbfound then castable = false end                                
                      end                                
    
                            
                        if ( castable ) then
                          d("CASTING(Crafting) : "..tostring(realskilldata.name))                                
                          if ( ActionList:Cast(realskilldata.id,0) ) then                                    
                            skill.lastcast = ml_global_information.Now
                            SkillMgr.prevSkillID = tostring(realskilldata.id)
                          return true
                        end    
                    end    
                end
            end
        end
    end
    return false
end


I'm pretty sure there is a cleaner way to code this, but it's just a little modification it's not worth the time. If you want it to be integrated into the bot, you can request a feature for the official crafting module that recognize the skill name instead of skill ID.
Reply
 


Messages In This Thread
RE: (REQ) Ultimate Crafting Profile! - by Ace - 03-23-2014, 07:57 PM
RE: (REQ) Ultimate Crafting Profile! - by Cichard - 03-23-2014, 10:55 PM
RE: (REQ) Ultimate Crafting Profile! - by Ace - 03-24-2014, 02:14 AM
RE: (REQ) Ultimate Crafting Profile! - by quylao - 03-26-2014, 09:21 PM
RE: (REQ) Ultimate Crafting Profile! - by HansW - 03-27-2014, 06:16 AM
RE: (REQ) Ultimate Crafting Profile! - by Cichard - 03-29-2014, 07:26 PM
RE: (REQ) Ultimate Crafting Profile! - by rahni - 03-30-2014, 06:34 PM
RE: (REQ) Ultimate Crafting Profile! - by Cichard - 04-01-2014, 12:57 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products