Item Search
     
BG-Wiki Search
Page 249 of 302 FirstFirst ... 199 239 247 248 249 250 251 259 299 ... LastLast
Results 4961 to 4980 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #4961
    Puppetmaster
    Join Date
    May 2010
    Posts
    66
    BG Level
    2

    any summoners having issues with gearswap since update ? stuff doesn't switch on pet_midcast and aftercast anymore

  2. #4962
    BG Content
    Join Date
    Jul 2007
    Posts
    22,353
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah, problem has been identified and will be fixed when a new LuaCore is pushed. I don't know when that will be.

  3. #4963
    Puppetmaster
    Join Date
    May 2010
    Posts
    66
    BG Level
    2

    ok thanks ^^ as long as it's not coming from my end, i'll work a temporary macro set where i do some input bp;wait;equip set blablabla in order to play tonight

  4. #4964
    Smells like Onions
    Join Date
    Jan 2016
    Posts
    8
    BG Level
    0

    Hello, everyone!

    I made Cure codes which automatically change its tier according to target's missingHP and also change gears through precast to afftercast.
    But I have noticed that function midcast(spell) doesn't work in my Cure codes, which I think 'cancel_spell()' in function refine_cure(spell) interrupt gearchange through precast to midcast.
    Can enyone tell me how I can avoid this interruption and get gearchange through precast to midcast?
    My code is here.

    Code:
    function find_player_in_alliance(name)
        for party_index,ally_party in ipairs(alliance) do
            for player_index,_player in ipairs(ally_party) do
                if _player.name == name then
                    return _player
                end
            end
        end
    end
    
    function refine_cure(spell)
    --estimating misingHP
        	local missingHP
        
        -- If curing ourself, get our exact missing HP
        	if spell.target.type == "SELF" then
            	missingHP = player.max_hp - player.hp
        -- If curing someone in our alliance, we can estimate their missing HP
        	elseif spell.target.isallymember then
    	        local target = find_player_in_alliance(spell.target.name)
            	local est_max_hp = target.hp / (target.hpp/100)
            	missingHP = math.floor(est_max_hp - target.hp)
    	else
    		missingHP = math.floor((100 - spell.target.hpp) * 20)
       	end
    
    --automatically change Cure spell
    	if spell.name == 'Cure' and missingHP <= 135 then
    		return
    	elseif spell.name == 'Cure' and missingHP <= 285 then
    		cancel_spell()
    		send_command('input /ma "Cure II"'..spell.target.name)
    	elseif spell.name == 'Cure' and missingHP <= 585 then
    		cancel_spell()
    		send_command('input /ma "Cure III"'..spell.target.name)
    	elseif spell.name == 'Cure' and missingHP <= 1035 then
    		cancel_spell()
    		send_command('input /ma "Cure IV"'..spell.target.name)
    	elseif spell.name == 'Cure' and missingHP <= 1440 then
    		cancel_spell()
    		send_command('input /ma "Cure V"'..spell.target.name)
    	elseif spell.name == 'Cure' and missingHP >= 1441 then
    		cancel_spell()
    		send_command('input /ma "Cure VI"'..spell.target.name)
    	end
    end
    
    function precast(spell)
    	if spell.name:startswith('Cure') then
    		equip(sets.precast.Cure)
    	end
    end
    
    function midcast(spell)
    	if spell.name:startswith('Cure') then
    		equip(sets.midcast.Cure)
    	end
    end
    
    function aftercast(spell)
    	if spell.name:startswith('Cure') then
    		equip(sets.aftercast.Cure)
    	end
    end

  5. #4965
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by darkguardian View Post
    Hello, everyone!

    I made Cure codes which automatically change its tier according to target's missingHP and also change gears through precast to afftercast.
    But I have noticed that function midcast(spell) doesn't work in my Cure codes, which I think 'cancel_spell()' in function refine_cure(spell) interrupt gearchange through precast to midcast.
    Can enyone tell me how I can avoid this interruption and get gearchange through precast to midcast?
    you never call refine_cure(spell) so it never goes off

    and cancel_spell() can only be used in filtered_action, pretarget and precast

    any ways here is a better way to do it(as long as find_player_in_alliance works correctly)
    Code:
    function refine_cure(spell)
        --estimating misingHP
        local missingHP
        
        -- If curing ourself, get our exact missing HP
        if spell.target.type == "SELF" then
            missingHP = player.max_hp - player.hp
        -- If curing someone in our alliance, we can estimate their missing HP
        elseif spell.target.isallymember then
            local target = find_player_in_alliance(spell.target.name)
            local est_max_hp = target.hp / (target.hpp/100)
            missingHP = math.floor(est_max_hp - target.hp)
        else
            missingHP = math.floor((100 - spell.target.hpp) * 20)
           end
    
        --automatically change Cure spell
        if missingHP <= 135 then
            return "Cure"
        elseif missingHP <= 285 then
            return "Cure II"
        elseif missingHP <= 585 then
            return "Cure III"
        elseif missingHP <= 1035 then
            return "Cure IV"
        elseif missingHP <= 1440 then
            return "Cure V"
        elseif missingHP >= 1441 then
            return "Cure VI"
        end
    end
    
    function precast(spell)
        if spell.name:startswith('Cure')then
            local new_cure_spell = refine_cure(spell)
            if spell.name == new_cure_spell then
                equip(sets.precast.Cure)
            else
                cancel_spell()
                send_command('input /ma "'..new_cure_spell..'" '..spell.target.name)
                return
            end
        end
    end

  6. #4966
    Smells like Onions
    Join Date
    Jan 2016
    Posts
    8
    BG Level
    0

    Thank you dlsmd! You are so cool!(^-^)

  7. #4967
    Melee Summoner
    Join Date
    May 2013
    Posts
    31
    BG Level
    1

    Im having some big problems with my blm.lua its equiping my "dark magic" set for death instead of death magic burst set. and i am not sure how to fix this. please help!
    Also if someone could tell me how to insert a pre-cast just for death that would be great. thanx please help!
    http://pastebin.com/3eEEN8zm

  8. #4968
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    remove

  9. #4969
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Kalli View Post
    Im having some big problems with my blm.lua its equiping my "dark magic" set for death instead of death magic burst set. and i am not sure how to fix this. please help!
    Also if someone could tell me how to insert a pre-cast just for death that would be great. thanx please help!
    http://pastebin.com/3eEEN8zm
    here is your issue
    Code:
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
            equip(sets.magic_burst)
        elseif  spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.weather)
        end
         
        if spell.english == 'Death' then
            equip(sets.midcast['Elemental Magic'])
            if state.MagicBurst.value then
      `         equip(sets.magic_burst_death)
            end
        end
    end
     
     
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
            equip(sets.magic_burst)
        end
    end
    only the second job_post_midcast function will exist in memory because the second one overwrites the first one

  10. #4970
    Melee Summoner
    Join Date
    May 2013
    Posts
    31
    BG Level
    1

    ok so how do i fix it?

  11. #4971
    Melee Summoner
    Join Date
    May 2013
    Posts
    31
    BG Level
    1

    I think i got it.. its an elseif not an if.. thanx for the help!

  12. #4972
    RIDE ARMOR
    Join Date
    Sep 2015
    Posts
    15
    BG Level
    1

    Quick question. //gs validate inv check for items in the inventory that are not a part of your .lua, is there a command to check the wardrobe this way also?

  13. #4973
    Puppetmaster
    Join Date
    Sep 2015
    Posts
    73
    BG Level
    2

    Hello,

    Does anyone know why the self_command function that I added to this lua isn't functioning? I type //test ingame and nothing happens.

    Spoiler: show
    Code:
    -------------------------------------------------------------------------------------------------------------------
    -- Setup functions for this job.  Generally should not be modified.
    -------------------------------------------------------------------------------------------------------------------
    
    
     -- ctr+f for self_command(command) to find the function I added and am troubleshooting. thanks! --
    
    -- The issue being that the self_command T7 isn't functioning at all ingame. This lua originally --
    		-- did not have a self_command function. I added it to it and apparently I need to alter it some --
    		-- more in order to get it to function. I wish it was simpler than this, lol. --
    		
    	send_command('alias test gs c T7')
    
    
    
    		
    -- Initialization function for this job file.
    function get_sets()
        mote_include_version = 2
        
        -- Load and initialize the include file.
        include('Mote-Include.lua')
    end
    
    
    -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
    function job_setup()
    
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
    function user_setup()
        state.OffenseMode:options('None', 'Normal')
        state.CastingMode:options('MagicBurstSpae','Resistant','Spaekona','MagicBurst')
        state.IdleMode:options('Normal', 'PDT')
    
    	state.MagicBurst = M(false, 'Magic Burst')
    	
        lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
            'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
            'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
            'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
            'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
        
        -- Additional local binds
    
        select_default_macro_book()
    end
    
    -- Called when this job file is unloaded (eg: job change)
    function user_unload()
    --add unbinds--
    end
    
    
    -- Define sets and vars used by this job file.
    function init_gear_sets()
        --------------------------------------
        -- Start defining the sets
        --------------------------------------
        
    	-- I stripped out the gear portion to save some scrolling. It shouldn't be needed to troubleshoot this issue, should it? --
    		
    
     -- ctr+f for self_command(command) to find the function I added and am troubleshooting. thanks! --
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for standard casting events.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
    function job_precast(spell, action, spellMap, eventArgs)
        if spellMap == 'Cure' or spellMap == 'Curaga' then
            gear.default.obi_waist = "Goading Belt"
        elseif spell.skill == 'Elemental Magic' then
            gear.default.obi_waist = "Sekhmet Corset"
            if state.CastingMode.value == 'Proc' then
                classes.CustomClass = 'Proc'
            end
        end
    end
    
    
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_midcast(spell, action, spellMap, eventArgs)
    if spell.type == "Trust" then
    		equip(sets.midcast.FastRecast)
    	end
    end
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
            equip(sets.magic_burst)
        end
    end
    
    function job_aftercast(spell, action, spellMap, eventArgs)
        -- Lock feet after using Mana Wall.
        if not spell.interrupted then
            if spell.english == 'Mana Wall' then
                enable('feet')
                equip(sets.buff['Mana Wall'])
                disable('feet')
            elseif spell.skill == 'Elemental Magic' then
                state.MagicBurst:reset()
            end
        end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for non-casting events.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
        -- Unlock feet when Mana Wall buff is lost.
        if buff == "Mana Wall" and not gain then
            enable('feet')
            handle_equipping_gear(player.status)
        end
    end
    
    -- Handle notifications of general user state change.
    function job_state_change(stateField, newValue, oldValue)
        if stateField == 'Offense Mode' then
            if newValue == 'Normal' then
                disable('main','sub','range')
            else
                enable('main','sub','range')
            end
        end
    end
    
    function job_update(cmdParams, eventArgs)
    	if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
    		local needsArts = 
    			player.sub_job:lower() == 'sch' and
    			not buffactive['Light Arts'] and
    			not buffactive['Addendum: White'] and
    			not buffactive['Dark Arts'] and
    			not buffactive['Addendum: Black']
    			
    		if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
    			if needsArts then
    				send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
    			else
    				send_command('@input /ja "Afflatus Solace" <me>')
    			end
    		end
    	end
    end
    
    -- Called for direct player commands.
    function job_self_command(cmdParams, eventArgs)
        if cmdParams[1]:lower() == 'scholar' then
            handle_strategems(cmdParams)
            eventArgs.handled = true
        end
    end
    
    -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
    function self_command(command)
        if command == 'T7' then
    		add_to_chat(123,'The test was successful.')
    	end
    end
    
    function handle_strategems(cmdParams)
        -- cmdParams[1] == 'scholar'
        -- cmdParams[2] == strategem to use
    	if not cmdParams[2] then
    		add_to_chat(123,'Error: No strategem command given.')
    		return
    	end
    
    	local currentStrats = get_current_strategem_count()
    	local newStratCount = currentStrats - 1
    	local strategem = cmdParams[2]:lower()
    
    	if strategem == 'light' then
    		if buffactive['light arts'] then
    			send_command('input /ja "Addendum: White" <me>')
    			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
    		elseif buffactive['addendum: white'] then
    			add_to_chat(122,'Error: Addendum: White is already active.')
    		elseif buffactive['dark arts']  or buffactive['addendum: black'] then
    			send_command('input /ja "Light Arts" <me>')
    			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
    		else
    			send_command('input /ja "Light Arts" <me>')
    		end
    	elseif strategem == 'dark' then
    		if buffactive['dark arts'] then
    			send_command('input /ja "Addendum: Black" <me>')
    			add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
            elseif buffactive['addendum: black'] then
    			add_to_chat(122,'Error: Addendum: Black is already active.')
    		elseif buffactive['light arts'] or buffactive['addendum: white'] then
    			send_command('input /ja "Dark Arts" <me>')
    			add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
    		else
    			send_command('input /ja "Dark Arts" <me>')
    		end
    	elseif buffactive['light arts'] or buffactive['addendum: white'] then
    		if strategem == 'cost' then
    			send_command('@input /ja Penury <me>')
    		elseif strategem == 'speed' then
    			send_command('@input /ja Celerity <me>')
    		elseif strategem == 'aoe' then
    			send_command('@input /ja Accession <me>')
    		elseif strategem == 'power' then
    			send_command('@input /ja Rapture <me>')
    		elseif strategem == 'duration' then
    			send_command('@input /ja Perpetuance <me>')
    		elseif strategem == 'accuracy' then
    			send_command('@input /ja Altruism <me>')
    		elseif strategem == 'enmity' then
    			send_command('@input /ja Tranquility <me>')
    		elseif strategem == 'skillchain' then
    			add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
    		elseif strategem == 'addendum' then
    			send_command('@input /ja "Addendum: White" <me>')
    		else
    			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
    		end
    	elseif buffactive['dark arts']  or buffactive['addendum: black'] then
    		if strategem == 'cost' then
    			send_command('@input /ja Parsimony <me>')
    		elseif strategem == 'speed' then
    			send_command('@input /ja Alacrity <me>')
    		elseif strategem == 'aoe' then
    			send_command('@input /ja Manifestation <me>')
    		elseif strategem == 'power' then
    			send_command('@input /ja Ebullience <me>')
    		elseif strategem == 'duration' then
    			add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
    		elseif strategem == 'accuracy' then
    			send_command('@input /ja Focalization <me>')
    		elseif strategem == 'enmity' then
    			send_command('@input /ja Equanimity <me>')
    		elseif strategem == 'skillchain' then
    			send_command('@input /ja Immanence <me>')
    		elseif strategem == 'addendum' then
    			send_command('@input /ja "Addendum: Black" <me>')
    		else
    			add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
    		end
    	else
    		add_to_chat(123,'No arts have been activated yet.')
    	end
    end
    
    -- Gets the current number of available strategems based on the recast remaining
    -- and the level of the sch.
    function get_current_strategem_count()
        -- returns recast in seconds.
        local allRecasts = windower.ffxi.get_ability_recasts()
        local stratsRecast = allRecasts[231]
    
        local maxStrategems = 2
    
        local fullRechargeTime = 2*110
    
        local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
    
        return currentCharges
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements standard library decisions.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Custom spell mapping.
    function job_get_spell_map(spell, default_spell_map)
        if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
            --[[ No real need to differentiate with current gear.
            if lowTierNukes:contains(spell.english) then
                return 'LowTierNuke'
            else
                return 'HighTierNuke'
            end
            --]]
        end
    end
    
    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
        if player.mpp < 51 then
            idleSet = set_combine(idleSet, sets.latent_refresh)
        end
        
        return idleSet
    end
    
    
    -- Function to display the current relevant user state when doing an update.
    function display_current_job_state(eventArgs)
        display_current_caster_state()
        eventArgs.handled = true
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Select default macro book on initial load or subjob change.
    function select_default_macro_book()
        set_macro_page(1, 14)
    	send_command('input /echo Setting lockstyle in 5 seconds.;wait 5;input /lockstyleset 100')
    end


    Thanks for taking a look!

  14. #4974
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    because motes include already uses the function self_command look right above it thats where your supost to put your commands
    Code:
    -- Called for direct player commands.
    function job_self_command(cmdParams, eventArgs)
        if cmdParams[1]:lower() == 'scholar' then
            handle_strategems(cmdParams)
            eventArgs.handled = true
        end
        if cmdParams[1] == 'T7' then
            add_to_chat(123,'The test was successful.')
        end
    end

  15. #4975
    Bagel
    Join Date
    May 2010
    Posts
    1,277
    BG Level
    6
    FFXI Server
    Lakshmi

    Hi, sorry I'm completely new to coding outside of extremely basic stuff in Java. I tried using the default Byrth_BLM lua and editing it with my gear but I think I may have completely messed it up, since when I try to load it in FFXI nothing happens.

    Code:
    function get_sets()
        MP_efficiency = 0
        macc_level = 0
        
        sets.precast = {}
        
    --    sets.precast.Stun[1] = {main="Keraunos",sub="Willpower Grip",--ranged="Impatiens",
    --        head="Nahtirah Hat",neck="Jeweled Collar",ear1="Psystorm Earring",ear2="Loquacious Earring",
    --        body="Helios Jacket",hands="Archmage's Gloves",lring="Weatherspoon Ring",rring="Prolix Ring",
    --        back="Swith Cape",waist="Witful Belt",legs="Spaekona's Tonban +1",feet="Regal Pumps+1"}
        
        
        sets.precast.FastCast = {}
        
        sets.precast.FastCast.Default = {ammo="Impatiens",
            head="Nahtirah Hat",neck="Jeweled Collar",ear1="Psystorm Earring",ear2="Loquacious Earring",
            body="Helios Jacket",hands="Helios Gloves",lring="Weatherspoon Ring",rring="Prolix Ring",
            back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Regal Pumps +1"}
        
        sets.precast.FastCast['Elemental Magic'] = set_combine(sets.precast.FastCast.Default,{body="Helios Jacket",head="Wicce Petasos",back="Bane Cape",feet="Spae. Sabots +1"})
        
        sets.precast.FastCast['Enhancing Magic'] = set_combine(sets.precast.FastCast.Default,{waist="Siegel Sash"})
                
        sets.precast.AMII = set_combine(sets.precast.FastCast['Elemental Magic'],{hands ="Archmage's Gloves"})
        
        sets.precast.Manafont = {body="Archmage's Coat",}
        
        sets.Impact = {head=empty,body="Twilight Cloak"}
        
        sets.midcast = {}
        
        sets.midcast.Stun = {main="Apamajas I",sub="Willpower Grip",ammo="Impatiens",
            head="Nahtirah Hat",neck="Jeweled Collar",ear1="Psystorm Earring",ear2="Loquacious Earring",
            body="Helios Jacket",hands="Helios Gloves",lring="Weatherspoon Ring",rring="Prolix Ring",
            back="Swith Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Regal Pumps +1"}
        
        sets.midcast['Elemental Magic'] = {
            [0] = {},
            [1] = {}
            }
        
        sets.ElementalMagicMAB = {
                    Earth={neck={name="Quanpur Necklace", stats={MAB=7,EarthStaffBns=5}}},
                    Dark={head={ name="Pixie Hairpin +1", stats={INT=17,DarkAffinity=28}}, rring={ name="Archon Ring", stats={DarkAffinity=5}} }
                    }
        
        -- MAcc level 0 (Macc and Enmity irrelevant)
        sets.midcast['Elemental Magic'][0][0] = {main="Keraunos",
                    sub="Willpower Grip",
                    ammo="Ghastly Tathlum",
                    head="Helios Band",
                    neck="Sanctity Necklace",
                    ear1="Crematio Earring",
                    ear2="Friomisi Earring",
                    body="Witching Robe",
                    hands="Helios Gloves",,
                    ring1="Shiva Ring +1", stats={INT=9,MAB=3}},
                    ring2="Shiva Ring +1", stats={INT=9,MAB=3}},
                    back="Toro Cape",
                    --waist="Sekhmet Corset",
                    waist="Sekhmet Corset",
                    legs="Hagondes Pants",
                    feet="Helios Boots"}
        
        sets.midcast['Elemental Magic'][0][1] = set_combine(sets.midcast['Elemental Magic'][0][0],{body={name="Spaekona's Coat +1",stats={INT=29,Haste=3,Enmity=-7,MdmgToMP=2}}})
        
        -- MAcc level 1 (MAcc and Enmity relevant)
        sets.midcast['Elemental Magic'][1][0] = {main="Keraunos",
                    sub="Willpower Grip",
                    ammo="Ghastly Tathlum",
                    head="Helios Band",
                    body="Witching Robe",
                    hands="Helios Gloves",
                    legs="Hagondes Pants",
                    feet="Helios Boots",
                    neck="Sanctity Necklace",
                    waist="Sekhmet Corset",
                    ear1="Crematio Earring",
                    ear2="Friomisi Earring",
                    ring1="Shiva Ring +1",
                    ring2="Shiva Ring +1",
                    back="Toro Cape"}
                    
        sets.midcast['Elemental Magic'][1][1] = set_combine(sets.midcast['Elemental Magic'][1][0],{body={name="Spaekona's Coat +1",stats={INT=29,Haste=3,Enmity=-7,MdmgToMP=2}}})
        
        sets.midcast.AMII = {
                    head={ name="Arch. Petasos +1", stats={INT=24, MAB=12, MAcc=29, Enmity=-5}, augments={'Increases Ancient Magic II damage',}},
                    feet={ name="Arch. Sabots +1", stats={INT=20,MAcc=25, Enmity=-4}, augments={'Reduces Ancient Magic II MP cost',}},
                    }
        
        
        sets.midcast['Dark Magic'] = main="Rubicundity",sub="Mephitis Grip",ammo="Impatiens",
            head={ name="Pixie Hairpin +1", stats={INT=17,DarkAffinity=28} },neck="Jeweled Collar",ear1="Crematio Earring",ear2="Loquacious Earring",
            body="Helios Jacket",hands="Archmage's Gloves",lring="Weatherspoon Ring",rring="Archon Ring",
            back="Swith Cape",waist="Witful Belt",legs={name="Spaekona's Tonban +1",stats={INT=34,MAB=20,Haste=5,Enmity=-4}},feet="Wicce Sabots"}
        
        sets.midcast['Enfeebling Magic'] = main="Keraunos",sub="Mephitis Grip",--range='Aureole',
            head="Nahtirah Hat",neck="Sanctity Necklace",ear1="Lifestorm Earring",ear2="Psystorm Earring",
            body="Ischemia Chasu.",hands="Lurid Mitts",ring1="Sangoma Ring",ring2="Angha Ring",
            back="Bane Cape",waist="Sekhmet Corset",legs="Psycloth Lappas",feet="Medium's Sabots"}
            
        sets.midcast.Vidohunir = {ammo="Ghastly Tathlum",
            head={ name="Pixie Hairpin +1", stats={INT=17,DarkAffinity=28} },neck="Fotia Gorget",ear1="Friomisi Earring",ear2="Cremation Earring",
            body="Witching Robe",hands="Helios Gloves",lring={name="Shiva Ring +1", stats={INT=9,MAB=3}},rring={ name="Archon Ring", stats={DarkAffinity=5}},
            back={name="Toro Cape", stat={INT=8, MAB=10}},waist="Fotia Belt",legs="Hagondes Pants",feet="Helios Boots"}
        
        sets.midcast.Myrkr = {ammo="Hydrocera",
            head={ name="Pixie Hairpin +1", stats={INT=17,DarkAffinity=28} },neck="Sanctity Necklace",ear1="Mendicant's  Earring",ear2="Loquacious Earring",
            body="Witching Robe",hands="Helios Gloves",lring="Sangoma Ring",rring="Zodiac Ring",
            back="Bane Cape",waist="Fucho-no-Obi",legs="Spaekona's Tonban +1",feet="Regal Pumps +1"
            }
        
        sets.midcast['Healing Magic'] = {}
        
        sets.midcast['Divine Magic'] = {}
        
        sets.midcast['Enhancing Magic'] = {}
        
        sets.midcast.Cure = {main="Serenity",neck="Phalaina Locket",body="Heka's Kalasiris",hands="Helios Gloves",legs="Gyve Trousers"}
        
        sets.midcast.Stoneskin = {main="Kirin's Pole",neck="Stone Gorget",waist="Siegel Sash",legs="Shedir Seraweels"}
        
        sets.midcast.Aquaveil = {legs="Shedir Seraweels"}
        
        sets.aftercast = {}
        sets.aftercast.Idle = {}
        sets.aftercast.Idle.keys = {[0]="Refresh",[1]="PDT"}
        sets.aftercast.Idle.ind = 0
        sets.aftercast.Idle[0] = {main="Terra's Staff",sub="Oneiros Grip",ammo="Mana ampulla",
            head="Wivre Hairpin",neck="Twilight Torque",ear1="Gifted earring",ear2="Sorcerer's Earring",
            body="Spaekona's Coat +1",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Defending Ring",
            back="Umbra Cape",waist="Fucho-no-Obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
            
        sets.aftercast.Idle[1] = {main="Terra's Staff",sub="Arbuda Grip",ammo="Mana ampulla",
            head="Hagondes Hat +1",neck="Twilight Torque",ear1="Brutal Earring",ear2="Merman's Earring",
            body="Hagondes Coat",hands="Hagondes Cuffs",ring1="Dark Ring",ring2="Defending Ring",
            back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Battlecast Gaiters"}
            
        sets.aftercast.Idle['Mana Wall'] = {feet = "Wicce Sabots"}
                    
        sets.aftercast.Resting = {main="Numen Staff",sub="Ariesian Grip",ammo="Mana ampulla",
            head="Spurrina Coif",neck="Eidolon Pendant",ear1="Relaxing Earring",ear2="Antivenom Earring",
            body="Hagondes Coat +1",hands="Nares Cuffs",ring1="Celestial Ring",ring2="Angha Ring",
            back="Felicitas Cape +1",waist="Austerity Belt +1",legs="Nares Trews",feet="Chelona Boots +1"}
                    
        sets.aftercast.Engaged = {
            head="Hagondes Hat",neck="Twilight Torque",ear1="Brutal Earring",ear2="Merman's Earring",
            body="Hagondes Coat",hands="Hagondes Cuffs",ring1="Dark Ring",ring2="Defending Ring",
            back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Battlecast Gaiters"}
        
        sets.Obis = {}
        sets.Obis.Fire = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Earth = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Water = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Wind = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Ice = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Lightning = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Light = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        sets.Obis.Dark = {waist='Hachirin-no-Obi',back={name='Twilight Cape',stats={Day_Weather=5}},lring={name='Zodiac Ring', stats={Day_Weather=3}}}
        
        sets.FC = {staves={
            Fire = {main='Atar I'},
            Lightning = {main='Apamajas I'},
    	   Ice = {main='Vourukasha I'},
            Earth = {main='Vishrava I'},
            Wind = {main='Vayuvata I'},
    	   Water = {main='Haoma I'},
            Dark = {main='Xsaeta I'}, 
        }}
        
        sets.aftercast.empty = {}
        sets.aftercast.Chry = {neck="Chrysopoeia Torque"}
        tp_level = 'empty'
        
        stuntarg = 'Shantotto'
        send_command('input /macro book 2;wait .1;input /macro set 1')
        
        AMII = {['Freeze II']=true,['Burst II']=true,['Quake II'] = true, ['Tornado II'] = true,['Flood II']=true,['Flare II']=true}
        
    end
    
    windower.register_event('tp change',function(new,old)
        if new > 2950 then
            tp_level = 'Chry'
        else
            tp_level = 'empty'
        end
        if not midaction() then
            if sets.aftercast[player.status] then
                equip(sets.aftercast[player.status],sets.aftercast[tp_level])
            else
                equip(sets.aftercast.Idle,sets.aftercast[tp_level])
            end
        end
    end)
    
    function precast(spell)
        if sets.precast[spell.english] then
            equip(sets.precast[spell.english][macc_level] or sets.precast[spell.english])
        elseif spell.english == 'Impact' then
            equip(sets.precast.FastCast['Elemental Magic'],sets.Impact)
            if not buffactive['Elemental Seal'] then
                add_to_chat(8,'--------- Elemental Seal is down ---------')
            end
        elseif spell.action_type == 'Magic' then
            if spell.skill == 'Elemental Magic' then
                if AMII[spell.english] and player.merits[to_windower_api(spell.english)] > 1 then
                    equip(sets.precast.AMII)
                else
                    equip(sets.precast.FastCast['Elemental Magic'])
                end
            elseif spell.skill == 'Enhancing Magic' then
                equip(sets.precast.FastCast['Enhancing Magic'])
            else
                equip(sets.precast.FastCast.Default)
            end
        end
        
        if spell.english == 'Stun' and stuntarg ~= 'Shantotto' then
            send_command('@input /t '..stuntarg..' ---- Byrth Stunned!!! ---- ')
        end
        
        if sets.FC.staves[spell.element] then
            equip(sets.FC.staves[spell.element])
        end
    end
    
    function midcast(spell)
        equip_idle_set()
        if buffactive.manawell or spell.mppaftercast > 50 then mp_efficiency = 0 else
            mp_efficiency = 1
        end
        
        if string.find(spell.english,'Cur') then 
            weathercheck(spell.element,sets.midcast.Cure)
        elseif spell.english == 'Impact' then
            weathercheck(spell.element,set_combine(sets.midcast['Elemental Magic'][macc_level][mp_efficiency],sets.Impact))
        elseif sets.midcast[spell.name] then
            weathercheck(spell.element,sets.midcast[spell.name])
        elseif spell.skill == 'Elemental Magic' then
            weathercheck(spell.element,sets.midcast['Elemental Magic'][macc_level][mp_efficiency])
            if AMII[spell.english] and player.merits[to_windower_api(spell.english)] > 2 then
                equip(sets.midcast.AMII)
            end
            if sets.ElementalMagicMAB[spell.element] then
                equip(sets.ElementalMagicMAB[spell.element])
            end
        elseif spell.skill then
            equip(sets.aftercast.Idle,sets.aftercast[tp_level])
            weathercheck(spell.element,sets.midcast[spell.skill])
        end
        
        if spell.english == 'Sneak' then
            send_command('cancel 71;')
        end
    end
    
    function aftercast(spell)
        if player.status == 'Idle' then
            equip_idle_set()
        elseif sets.aftercast[player.status] then
            equip(sets.aftercast[player.status],sets.aftercast[tp_level])
        else
            equip(sets.aftercast.Idle,sets.aftercast[tp_level])
        end
        if not spell.interrupted then
            if spell.english == 'Sleep' or spell.english == 'Sleepga' then
                send_command('@wait 55;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
            elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
                send_command('@wait 85;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
            elseif spell.english == 'Break' or spell.english == 'Breakga' then
                send_command('@wait 25;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
            end
        end
    end
    
    function status_change(new,old)
        if new == 'Resting' then
            equip(sets.aftercast.Resting)
        elseif new == 'Engaged' then
            if not midaction() then
                equip(sets.aftercast.Engaged,sets.aftercast[tp_level])
            end
            disable('main','sub')
        else
            equip_idle_set()
            equip(sets.aftercast[tp_level])
        end
    end
    
    function self_command(command)
        if command == 'stuntarg' then
            stuntarg = player.target.name
        elseif command:lower() == 'macc' then
            macc_level = (macc_level+1)%2
            equip(sets.midcast['Elemental Magic'][macc_level][mp_efficiency])
            if macc_level == 1 then windower.add_to_chat(8,'MMMMMMActivated!')
            else windower.add_to_chat(8,'MDamaged') end
        elseif command:lower() == 'idle' then
            sets.aftercast.Idle.ind = (sets.aftercast.Idle.ind+1)%2
            windower.add_to_chat(8,'------------------------ '..sets.aftercast.Idle.keys[sets.aftercast.Idle.ind]..' Set is now the default Idle set -----------------------')
        end
    end
    
    -- This function is user defined, but never called by GearSwap itself. It's just a user function that's only called from user functions. I wanted to check the weather and equip a weather-based set for some spells, so it made sense to make a function for it instead of replicating the conditional in multiple places.
    
    function weathercheck(spell_element,set)
        if not set then return end
        if spell_element == world.weather_element or spell_element == world.day_element then
            equip(set,sets.Obis[spell_element])
        else
            equip(set)
        end
        if set[spell_element] then equip(set[spell_element]) end
    end
    
    function equip_idle_set()
        if buffactive['Mana Wall'] then
            equip(sets.aftercast.Idle[sets.aftercast.Idle.ind],sets.aftercast.Idle['Mana Wall'])
        else
            equip(sets.aftercast.Idle[sets.aftercast.Idle.ind])
        end
        if player.tp == 3000 then equip(sets.aftercast.Chry) end
    end
    
    function to_windower_api(str)
        return str:lower():gsub(' ','_')
    en

  16. #4976
    Jem
    Jem is offline
    Claustrum. Really?
    Join Date
    Nov 2007
    Posts
    3,806
    BG Level
    7
    FFXIV Character
    Kaith Laqueus
    FFXIV Server
    Ragnarok
    FFXI Server
    Asura

    Where's the best place to go grab a good baseline for Gearswap? Google found me Kinematics, they all seem a little old (2 years). Are those going to be fine or is there somewhere else I can grab a baseline from?

  17. #4977
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    The stickied thread in these very forums could be a good start. but yes alot of people still use Mote's stuffs and nobody has heard from him in forever. So support on using them is kinda limited.

  18. #4978
    Jem
    Jem is offline
    Claustrum. Really?
    Join Date
    Nov 2007
    Posts
    3,806
    BG Level
    7
    FFXIV Character
    Kaith Laqueus
    FFXIV Server
    Ragnarok
    FFXI Server
    Asura

    Yeah the stickied thread in this forum didn't have them for the jobs I was looking for unfortunately. Also didn't know how updated they were given the OP hadn't been edited since 2014.

  19. #4979
    Relic Shield
    Join Date
    Sep 2007
    Posts
    1,738
    BG Level
    6
    FFXI Server
    Sylph

    What's up, guys? I decided to gear BST for random stuff, and edited one of Bokura's gearswaps for BST. In the gearswap, it's supposed to precast a JA (Ready/Sic) in Desultor's Tassets for the -5 timer, however, it seems to not precast into it and just goes straight into the midcast for the pet job abilities (had showswaps set to true so I could see if it puts the gear in or not). I looked over the code and can't really find out why it does such. Here's a link to the edited gearswap on pastebin:

    http://pastebin.com/cKL2guvw

    Here's the BG Code for it:
    Code:
    -- *** Credit goes to Flippant for helping me with Gearswap *** --
    -- ** I Use Some of Motenten's Functions ** --
    
    function get_sets()
    	include('organizer-lib')
    	AccIndex = 1
    	AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
    	WsAccIndex = 1
    	WsAccArray = {"LowACC","MidACC","HighACC"}	
    	JugIndex = 1
    	JugArray = {"Meaty Broth","Windy Greens","Muddy Broth","Blackwater Broth","Tant. Broth","Bubbly Broth","Livid Broth","Trans. Broth"} -- Default Jug Is Meaty Broth. Add/Delete Jugs Here --
    	PetFoodIndex = 1
    	PetFoodArray = {"Pet Food Theta","Pet Food Eta","Pet Food Zeta"} -- Default Pet Food Is Theta --
    	IdleIndex = 1
    	IdleArray = {"Movement","Regen"} -- Default Idle Set Is Movement --
    	PetIndex = 1
    	PetArray = {"Haste","PDT","ACC"} -- Default Pet TP Set Is Haste --
    	WeaponIndex = 1
    	WeaponArray = {"Melee","PDT","Sic"} -- Default Weapon Type Is Melee. Don't Input Main/Sub In TP Sets. Melee = Damage Type Axes | PDT = Pet PDT/DT Type Axes | Sic = Sic/Ready Type Axes --
    	Armor = 'None'
    	Twilight = 'None'
    	Pet = 'OFF' -- Set Default Pet Set ON or OFF Here --
    	target_distance = 5 -- Set Default Distance Here --
    	select_default_macro_book() -- Change Default Macro Book At The End --
    	
    
    	-- Gavialis Helm --
    	elements = {}
    	elements.equip = {head="Gavialis Helm"}
    	elements.Ruinator = S{"Ice","Water","Wind"}
    	elements.Rampage = S{"Earth"}
    
    	-- Ready Moves: Magic Type --
    	Magical_Ready_Moves = S{
    			'Acid Mist','Aqua Breath','Blaster','Bubble Shower','Chaotic Eye','Charged Whisker','Corrosive Ooze',
    			'Cursed Sphere','Dark Spore','Drainkiss','Dream Flower','Dust Cloud','Filamented Hold','Fireball',
    			'Foul Waters','Geist Wall','Gloeosuccus','Hi-Freq Field','Infrasonics','Intimidate','Jettatura',
    			'Molting Plumage','Nectarous Deluge','Nepenthic Plunge','Noisome Powder','Numbing Noise','Numbshroom',
    			'Palsy Pollen','Pestilent Plume','Plague Breath','Purulent Ooze','Queasyshroom','Roar','Sandblast','Sandpit',
    			'Scream','Shakeshroom','Sheep Song','Silence Gas','Snow Cloud','Soporific','Spider Web','Spoil','Spore',
    			'Stink Bomb','Toxic Spit','TP Drainkiss','Venom','Venom Spray'}
    
    	Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
    	Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
    	sc_map = {SC1="Ruinator", SC2="Berserk", SC3="Aggressor"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
    
    		-- NOTICE ON STARTUP --
    	notice('  BEASTMASTER KEY BINDS')
    	notice('  F12     = Display current Idle/TP/WS Levels.')
    	notice('  F9 --------  Cycles Accuracy Modes')
    	notice('  ALT + F9 --  Cycles WS/WS Accuracy Mode')
    	notice('  F10 -------  Lock/unlock PDT')
    	notice('  CTRL + F10 - Lock/unlock MDT')
    	notice('  CTRL + F12 - Cycles Idle Mode')
        windower.send_command('bind F9 gs c C1')
    	windower.send_command('bind !F9 gs c WsAcc')
    	windower.send_command('bind F10 gs c C7')
    	windower.send_command('bind ^F10 gs c C15')
    	windower.send_command('bind ^F12 gs c C6')
    	windower.send_command('bind F12 gs c current')
    		-- END --
    		
    	--Organizer--
    	organizer_items = {
        echos="Echo Drops",
        shihei="Shihei",
    	instantwarp="Instant Warp",
    	capacity="Capacity Ring",
    	kumbhakarna="Kumbhakarna",
    	charmersmerlin="Charmer's Merlin",
    }
    
    	sets.Idle = {}
    	-- Regen Set --
    	sets.Idle.Regen = {
    			head="Ocelomeh Headpiece +1",
    			neck="Wiglen Gorget",
    			ear1="Infused Earring",
    			ear2="Ethereal Earring",
    			body="Jumalik Mail",
    			hands="Umuthi Gloves",
    			ring1="Sheltered Ring",
    			ring2="Paguroidea Ring",
    			back="Solemnity Cape",
    			waist="Flume Belt",
    			legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
    			feet="Amm Greaves"
    		}
    
    	-- Damage Type Axe & Shield --
    	sets.Idle.Regen.Melee = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Beatific Shield +1"})
    	-- Damage Type Axes: NIN Sub --
    	sets.Idle.Regen.Melee.NIN = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Hunahpu"})
    	-- Damage Type Axes: DNC Sub --
    	sets.Idle.Regen.Melee.DNC = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Hunahpu"})
    
    	-- Pet PDT/DT Type Axe & Shield --
    	sets.Idle.Regen.PDT = set_combine(sets.Idle.Regen,{
    			main="Izizoeksi",
    			sub="Beatific Shield +1"})
    	-- Pet PDT/DT Type Axes: NIN Sub --
    	sets.Idle.Regen.PDT.NIN = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Izizoeksi",})
    	-- Pet PDT/DT Type Axes: DNC Sub --
    	sets.Idle.Regen.PDT.DNC = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Izizoeksi",})
    
    	-- Sic/Ready Type Axe & Shield --
    	sets.Idle.Regen.Sic = set_combine(sets.Idle.Regen,{
    			main="Charmer's Merlin",
    			sub="Beatific Shield +1"})
    	-- Sic/Ready Type Axes: NIN Sub --
    	sets.Idle.Regen.Sic.NIN = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Charmer's Merlin"})
    	-- Sic/Ready Type Axes: DNC Sub --
    	sets.Idle.Regen.Sic.DNC = set_combine(sets.Idle.Regen,{
    			main="Kumbhakarna",
    			sub="Charmer's Merlin"})
    
    	-- Movement Set --
    	sets.Idle.Movement = set_combine(sets.Idle.Regen,{})
    
    	-- Damage Type Axe & Shield --
    	sets.Idle.Movement.Melee = set_combine(sets.Idle.Movement,{
    			main="Kumbhakarna",
    			sub="Beatific Shield +1"})
    	-- Damage Type Axes: NIN Sub --
    	sets.Idle.Movement.Melee.NIN = set_combine(sets.Idle.Movement,{
    			main="Kumbhakarna",
    			sub="Hunahpu"})
    	-- Damage Type Axes: DNC Sub --
    	sets.Idle.Movement.Melee.DNC = set_combine(sets.Idle.Movement,{
    			main="Kumbhakarna",
    			sub="Hunahpu"})
    
    	-- Pet PDT/DT Type Axe & Shield --
    	sets.Idle.Movement.PDT = set_combine(sets.Idle.Movement,{
    			main="Izizoeksi",
    			sub="Beatific Shield +1"})
    	-- Pet PDT/DT Type Axes: NIN Sub --
    	sets.Idle.Movement.PDT.NIN = set_combine(sets.Idle.Movement,{
    			main="Izizoeksi",
    			sub="Astolfo"})
    	-- Pet PDT/DT Type Axes: DNC Sub --
    	sets.Idle.Movement.PDT.DNC = set_combine(sets.Idle.Movement,{
    			main="Izizoeksi",
    			sub="Astolfo"})
    
    	-- Sic/Ready Type Axe & Shield --
    	sets.Idle.Movement.Sic = set_combine(sets.Idle.Movement,{
    			main="Charmer's Merlin",
    			sub="Beatific Shield +1"})
    	-- Sic/Ready Type Axes: NIN Sub --
    	sets.Idle.Movement.Sic.NIN = set_combine(sets.Idle.Movement,{
    			main="Kumbhakarna",
    			sub="Charmer's Merlin"})
    	-- Sic/Ready Type Axes: DNC Sub --
    	sets.Idle.Movement.Sic.DNC = set_combine(sets.Idle.Movement,{
    			main="Kumbhakarna",
    			sub="Charmer's Merlin"})
    
    	sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
    
    	-- TP Base Set --
    	--sets.TP = {}
    
    	--Normal TP Sets --
    	sets.TP = {
    			ammo="Ginsen",
    			head="Otomi Helm",
    			neck="Asperity Necklace",
    			ear1="Brutal Earring",
    			ear2="Suppanomimi",
    			body="Uac Jerkin",
    			hands={ name="Valorous Mitts", augments={'Pet: Accuracy+23 Pet: Rng. Acc.+23','Pet: Haste+4','Pet: Attack+9 Pet: Rng.Atk.+9',}},
    			ring1="Epona's Ring",
    			ring2="Petrov Ring",
    			back="Bleating Mantle",
    			waist="Windbuffet Belt +1",
    			legs="Obatala Subligar",
    			feet="Loyalist Sabatons",}
    			
    	sets.TP.MidACC = set_combine(sets.TP,{})
    	sets.TP.HighACC = set_combine(sets.TP.MidACC,{})
    
    	-- High Haste Sets --
    	-- March x2 + Haste --
    	-- Embrava + (March or Haste) --
    	-- Geo Haste + (March or Haste or Embrava) --
    	sets.TP.HighHaste = set_combine(sets.TP,{})
    	sets.TP.MidACC.HighHaste = set_combine(sets.TP.MidACC, {})
    	sets.TP.HighACC.HighHaste = set_combine(sets.TP.HighACC, {})
    
    	sets.TP.Pet = {}
    	
    	-- Pet Haste Gear --
    	sets.TP.Pet.Haste = {ammo="Demonry Core",
    		head={ name="Valorous Mask", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2','Pet: Attack+14 Pet: Rng.Atk.+14',}},
    		neck="Empath Necklace",
    		ear1="Domesticator's Earring",
    		ear2="Handler's Earring +1",
    		body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
    		hands={ name="Valorous Mitts", augments={'Pet: Accuracy+23 Pet: Rng. Acc.+23','Pet: Haste+4','Pet: Attack+9 Pet: Rng.Atk.+9',}},
    		ring1="Vocane Ring",
    		ring2="Defending Ring",
    		back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
    		waist="Flume Belt",
    		legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
    		feet={ name="Valorous Greaves", augments={'Pet: Accuracy+30 Pet: Rng. Acc.+30','Pet: "Regen"+5',}},
    		}
    
    	-- Pet PDT Gear --
    	sets.TP.Pet.PDT = set_combine(sets.TP.Pet.Haste,{})
    
    	-- Pet ACC Gear --
    	sets.TP.Pet.ACC = set_combine(sets.TP.Pet.Haste,{})
    
    	-- PDT/MDT/Kiting Sets --
    	sets.PDT = {
    			head="Jumalik Helm",
    			neck="Twilight Torque",
    			ear1="Dudgeon Earring",
    			ear2="Heartseeker Earring",
    			body="Jumalik Mail",
    			hands="Umuthi Gloves",
    			ring1="Vocane Ring",
    			ring2="Defending Ring",
    			back="Solemnity Cape",
    			waist="Flume Belt",
    			legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
    			feet="Amm Greaves"}
    
    	sets.MDT = set_combine(sets.PDT,{})
    
    	sets.Kiting = set_combine(sets.PDT,{feet="Skd. Jambeaux +1"})
    
    	-- Hybrid Sets --
    	sets.TP.Hybrid = set_combine(sets.PDT,{})
    	sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
    	sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
    
    	-- WS Base Set --
    	sets.WS = {}
    
    	-- WS Sets --
    	sets.WS.Ruinator = {}
    	sets.WS.Ruinator.MidACC = set_combine(sets.WS.Ruinator,{})
    	sets.WS.Ruinator.HighACC = set_combine(sets.WS.Ruinator.MidACC,{})
    			
    	sets.WS.Onslaught = {}
    
    	sets.WS.Cloudsplitter = {}
    
    	sets.WS["Primal Rend"] = {}
    
    	sets.WS.Rampage = {}
    
    	-- JA Sets --
    	sets.JA = {}
    	TH_Gear = {waist="Chaac Belt"}
    	sets.JA.Reward = {
    				head="Khimaira Bonnet",
    				ear1="Lifestorm Earring",
    				body="Emet Harness +1",
    				hands="Ogre Gloves", --10%
    				ring1="Sirona's Ring",
    				ring2="Perception Ring",
    				back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
    				legs="Ankusa Trousers",
    				feet="Loyalist Sabatons"} --35%
    				
    	sets.JA.Charm = {}
    	sets.JA.Tame = {head="Totemic Helm +1"}
    	sets.JA.Familiar = {legs="Ankusa Trousers +1"}
    	sets.JA["Call Beast"] = {body="Mirke Wardecors",hands="Monster Gloves +2"}
    	sets.JA["Bestial Loyalty"] = sets.JA["Call Beast"]
    	sets.JA["Feral Howl"] = {body="An. Jackcoat +1",waist="Chaac Belt"}
    	sets.JA["Killer Instinct"] = {head="Ankusa Helm +1"}
    	sets.JA.Provoke = TH_Gear
    	sets.JA.Steal = TH_Gear
    	sets.JA.Mug = TH_Gear
    
    	sets.Pet = {}
    	sets.Pet.Sic = {sub="Charmer's Merlin",legs="Desultor Tassets"}
    	sets.Pet.Ready = {sub="Charmer's Merlin",legs="Desultor Tassets"}
    	sets.Pet.Spur = {feet="Nukumi Ocreae +1"}
    	
    
    	-- Physical Type Ready Moves: Add Pet Attack & Accuracy Gear Here --
    	sets.Physical_Ready_Moves = {
    		ammo="Demonry Core",
    		head={ name="Valorous Mask", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2','Pet: Attack+14 Pet: Rng.Atk.+14',}},
    		neck="Empath Necklace",
    		ear1="Domesticator's Earring",
    		ear2="Handler's Earring +1",
    		body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
    		hands="Nukumi Manoplas",
    		ring1="Vocane Ring",
    		ring2="Defending Ring",
    		back={ name="Pastoralist's Mantle", augments={'STR+4 DEX+4','Accuracy+2','Pet: Accuracy+15 Pet: Rng. Acc.+15','Pet: Damage taken -3%',}},
    		waist="Flume Belt",
    		legs={ name="Valor. Hose", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+3','System: 1 ID: 1795 Val: 8','Pet: Attack+10 Pet: Rng.Atk.+10',}},
    		feet={ name="Valorous Greaves", augments={'Pet: Accuracy+30 Pet: Rng. Acc.+30','Pet: "Regen"+5',}},
    		}
    
    	-- Magic Type Ready Moves: Add Pet Magic Attack & Magic Accuracy Gear Here --
    	sets.Magical_Ready_Moves = set_combine(sets.Physical_Ready_Moves, {})
    
    	-- Step Set --
    	sets.Step = set_combine({},TH_Gear)
    
    	-- Flourish Set --
    	sets.Flourish = set_combine({},TH_Gear)
    
    	-- Waltz Set --
    	sets.Waltz = {}
    
    	sets.Precast = {}
    	-- Fastcast Set --
    	sets.Precast.FastCast = set_combine(sets.PDT, {
    			neck="Voltsurge Torque",
    			ear1="Loquac. Earring",
    			body={ name="Taeon Tabard", augments={'Pet: Accuracy+17 Pet: Rng. Acc.+17',}},
    			ring1="Prolix Ring"})
    
    	sets.Midcast = {}
    	-- Magic Haste Set --
    	sets.Midcast.Haste = set_combine(sets.PDT,{})
    
    	-- Cure Set --
    	sets.Midcast.Cure = set_combine(sets.PDT, {
    			ear2="Mendi. Earring",
    			body="Jumalik Mail",
    			back="Solemnity Cape"
    	})
    end
    
    function notice(msg, color)
    		if color == nil then
                color = 158
            end
    			windower.add_to_chat(color, msg)
    end
    
    function file_unload()
            windower.send_command('unbind F9')
    		windower.send_command('unbind !F9')
    		windower.send_command('unbind F10')
    		windower.send_command('unbind ^F10')
    		windower.send_command('unbind F12')
            notice('Unbinding Blue Mage Interface.')
    end	
    
    function pretarget(spell,action)
    	if midaction() or pet_midaction() then
    		cancel_spell()
    		return
    	elseif spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
    		cancel_spell()
    		send_command('input /item "Echo Drops" <me>')
    	elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
    		cancel_spell()
    		send_command('Aggressor')
    	elseif spell.type == 'WeaponSkill' and player.status == 'Engaged' then
    		if spell.english ~= 'Bora Axe' and spell.name ~= 'Mistral Axe' and spell.target.distance > target_distance then -- Cancel WS If You Are Out Of Range --
    			cancel_spell()
    			add_to_chat(123, spell.name..' Canceled: [Out of Range]')
    			return
    		end
    	elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
    		degrade_spell(spell,Cure_Spells)
    	elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
    		degrade_spell(spell,Curaga_Spells)
    	end
    end
    
    function precast(spell,action)
    	if midaction() or pet_midaction() then
    		cancel_spell()
    		return
    	elseif spell.type == "WeaponSkill" then
    		if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
    			cancel_spell()
    			add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
    			return
    		else
    			equipSet = sets.WS
    			if equipSet[spell.english] then
    				equipSet = equipSet[spell.english]
    			end
    			--EDITED CODE--
    			if equipSet[WsAccArray[WsAccIndex]] then
    				equipSet = equipSet[WsAccArray[WsAccIndex]]
    			end
    			--END EDITED CODE-
    			if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
    				equipSet = set_combine(equipSet,elements.equip)
    			end
    			if buffactive['Killer Instinct'] then
    				equipSet = set_combine(equipSet,{body="Nukumi Gausape +1"})
    			end
    			--if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
    				--equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
    			--end
    		--	if spell.english == "Ruinator" or spell.english == "Rampage" then
    			--	if world.time <= (7*60) or world.time >= (17*60) then -- Equip Lugra Earring +1 From Dusk To Dawn --
    				--	equipSet = set_combine(equipSet,{ear1="Lugra Earring +1"})
    				--end
    			--end
    			equip(equipSet)
    		end
    	elseif spell.type == "JobAbility" then
    		if sets.JA[spell.english] then
    			equip(sets.JA[spell.english])
    		end
    	elseif spell.action_type == 'Magic' then
    		if spell.english == 'Utsusemi: Ni' then
    			if buffactive['Copy Image (3)'] then
    				cancel_spell()
    				add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
    				return
    			else
    				equip(sets.Precast.FastCast)
    			end
    		else
    			equip(sets.Precast.FastCast)
    		end
    	elseif spell.type == "Waltz" then
    		refine_waltz(spell,action)
    		equip(sets.Waltz)
    	elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
    		cast_delay(0.2)
    		send_command('cancel Sneak')
    	elseif spell.type == "PetCommand" then
    		equip(sets.Pet[spell.english])
    	end
    	if Pet == 'ON' then -- Use Pet Toggle For Pet TP Set --
    		equip(sets.TP.Pet[PetArray[PetIndex]])
    	end
    	if Twilight == 'Twilight' then
    		equip(sets.Twilight)
    	end
    end
    
    function midcast(spell,action)
    	if pet_midaction() then
    		return
    	elseif spell.action_type == 'Magic' then
    		if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
    			equip(sets.Midcast.Cure)
    		elseif spell.english:startswith('Utsusemi') then
    			if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
    				send_command('@wait 1.7;cancel Copy Image*')
    			end
    			equip(sets.Midcast.Haste)
    		elseif spell.english == 'Monomi: Ichi' then -- Cancel Sneak --
    			if buffactive['Sneak'] then
    				send_command('@wait 1.7;cancel sneak')
    			end
    			equip(sets.Midcast.Haste)
    		elseif spell.english == 'Flash' or spell.english == 'Drain' or spell.english == 'Aspir' or spell.english == 'Dispel' or spell.english:startswith('Dia') or spell.english:startswith('Bio') or spell.english:startswith('Sleep') then
    			equip(set_combine(sets.Midcast.Haste,{waist="Chaac Belt"}))
    		else
    			equip(sets.Midcast.Haste)
    		end
    	end
    	if spell.type == 'Trust' then
    		equip(sets.Midcast.Trust)
    	end
    end
    
    function aftercast(spell,action)
    	if pet_midaction() then
    		return
    	elseif spell.type == "WeaponSkill" and not spell.interrupted then
    		send_command('wait 0.2;gs c TP')
    	elseif not spell.type == "PetCommand" then
    		status_change(player.status)
    	end
    end
    
    function status_change(new,old)
    	check_equip_lock()
    	if Armor == 'PDT' then
    		equip(sets.PDT)
    	elseif Armor == 'MDT' then
    		equip(sets.MDT)
    	elseif Armor == 'Kiting' then
    		equip(sets.Kiting)
    	elseif new == 'Engaged' then
    		equipSet = sets.TP
    		if Armor == 'Hybrid' and equipSet["Hybrid"] then
    			equipSet = equipSet["Hybrid"]
    		end
    		if equipSet[AccArray[AccIndex]] then
    			equipSet = equipSet[AccArray[AccIndex]]
    		end
    		if (buffactive.Embrava and (buffactive.March or buffactive.Haste)) or (buffactive.March == 2 and buffactive.Haste) or (buffactive[580] and (buffactive.March or buffactive.Haste or buffactive.Embrava)) and equipSet["HighHaste"] then
    			equipSet = equipSet["HighHaste"]
    		end
    		equip(equipSet)
    	else
    		equipSet = sets.Idle
    		if equipSet[IdleArray[IdleIndex]] then
    			equipSet = equipSet[IdleArray[IdleIndex]]
    		end
    		if equipSet[WeaponArray[WeaponIndex]] then
    			equipSet = equipSet[WeaponArray[WeaponIndex]]
    		end
    		if equipSet[player.sub_job] then
    			equipSet = equipSet[player.sub_job]
    		end
    		if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
    			equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
    		end
    		if world.area:endswith('Adoulin') then
    			equipSet = set_combine(equipSet,{body="Councilor's Garb"})
    		end
    		equip(equipSet)
    	end
    	if Pet == 'ON' then -- Use Pet Toggle For Pet TP Set --
    		equip(sets.TP.Pet[PetArray[PetIndex]])
    	end
    	if Twilight == 'Twilight' then
    		equip(sets.Twilight)
    	end
    end
    
    function buff_change(buff,gain)
    	buff = string.lower(buff)
    	if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
    		if gain then
    			send_command('timers create "Aftermath: Lv.3" 180 down;wait 150;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 15;input /echo Aftermath: Lv.3 [WEARING OFF IN 15 SEC.];wait 5;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
    		else
    			send_command('timers delete "Aftermath: Lv.3"')
    			add_to_chat(123,'AM3: [OFF]')
    		end
    	elseif buff == 'weakness' then -- Weakness Timer --
    		if gain then
    			send_command('timers create "Weakness" 300 up')
    		else
    			send_command('timers delete "Weakness"')
    		end
    	end
    	if not midaction() and not pet_midaction() then
    		status_change(player.status)
    	end
    	if buff == 'doom' then
    		if gain then
    			send_command('timers create "Doom" 29 down')
    			send_command('gs disable ring1 ;gs disable ring2')
    			equip(sets.buffs.Doom)
    			add_to_chat(123,'Doom ring on')
    		elseif not gain then
    			send_command('timers delete "Doom"')
    			enable('left_ring')
                enable('right_ring')
    			add_to_chat(123,'DOOM IS OFF')
    			status_change(player.status)
    			end
    	end
    end
    
    function pet_midcast(spell,action)
    	if spell.target.type == 'MONSTER' then
    		if Magical_Ready_Moves:contains(spell.english) then
    			equip(sets.Magical_Ready_Moves)
    		else
    			equip(sets.Physical_Ready_Moves)
    		end
    	end
    end
    
    function pet_aftercast(spell,action)
    	status_change(player.status)
    end
    
    function pet_change(pet,gain)
    	status_change(player.status)
    end
    
    -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
    function self_command(command)
    	if command == 'C1' then -- Accuracy Level Toggle --
    		AccIndex = (AccIndex % #AccArray) + 1
    		add_to_chat(158,'Accuracy Level: ' .. AccArray[AccIndex])
    		status_change(player.status)
    				--MANUAL CODE--
    	elseif command == 'WsAcc' then -- WS ACC TOGGLE 
    		WsAccIndex = (WsAccIndex % #WsAccArray) +1
    		add_to_chat(158,'Weapon Skill ACC Lv.: '..WsAccArray[WsAccIndex])
    		status_change(player.status)
    		--END MANUAL CODE--
    	elseif command == 'C5' then -- Auto Update Gear Toggle --
    		status_change(player.status)
    		add_to_chat(158,'Auto Update Gear')
    	elseif command == 'C17' then -- Weapon Type Toggle --
    		WeaponIndex = (WeaponIndex % #WeaponArray) + 1
    		add_to_chat(158,'Weapon Type: '..WeaponArray[WeaponIndex])
    		status_change(player.status)
    	elseif command == 'C16' then -- Pet TP Set Toggle --
    		PetIndex = (PetIndex % #PetArray) + 1
    		add_to_chat(158,'Pet TP Set: ' .. PetArray[PetIndex])
    		status_change(player.status)
    	elseif command == 'C10' then -- Jug Toggle --
    		JugIndex = (JugIndex % #JugArray) + 1
    		add_to_chat(158,'Jug: ' .. JugArray[JugIndex])
    		sets.JA['Call Beast'].ammo = JugArray[JugIndex]
    		status_change(player.status)
    	elseif command == 'C11' then -- Pet Food Toggle --
    		PetFoodIndex = (PetFoodIndex % #PetFoodArray) + 1
    		add_to_chat(158,'Pet Food: ' .. PetFoodArray[PetFoodIndex])
    		sets.JA.Reward.ammo = PetFoodArray[PetFoodIndex]
    		status_change(player.status)
    	elseif command == 'C2' then -- Hybrid Toggle --
    		if Armor == 'Hybrid' then
    			Armor = 'None'
    			add_to_chat(123,'Hybrid Set: [Unlocked]')
    		else
    			Armor = 'Hybrid'
    			add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
    		end
    		status_change(player.status)
    	elseif command == 'C7' then -- PDT Toggle --
    		if Armor == 'PDT' then
    			Armor = 'None'
    			add_to_chat(123,'PDT Set: [Unlocked]')
    		else
    			Armor = 'PDT'
    			add_to_chat(158,'PDT Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C15' then -- MDT Toggle --
    		if Armor == 'MDT' then
    			Armor = 'None'
    			add_to_chat(123,'MDT Set: [Unlocked]')
    		else
    			Armor = 'MDT'
    			add_to_chat(158,'MDT Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C12' then -- Kiting Toggle --
    		if Armor == 'Kiting' then
    			Armor = 'None'
    			add_to_chat(123,'Kiting Set: [Unlocked]')
    		else
    			Armor = 'Kiting'
    			add_to_chat(158,'Kiting Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C9' then -- Pet Toggle --
    		if Pet == 'ON' then
    			Pet = 'OFF'
    			add_to_chat(123,'Pet Set: [Unlocked]')
    		else
    			Pet = 'ON'
    			add_to_chat(158,'Pet Set: [Locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C3' then -- Twilight Toggle --
    		if Twilight == 'Twilight' then
    			Twilight = 'None'
    			add_to_chat(123,'Twilight Set: [Unlocked]')
    		else
    			Twilight = 'Twilight'
    			add_to_chat(158,'Twilight Set: [locked]')
    		end
    		status_change(player.status)
    	elseif command == 'C8' then -- Distance Toggle --
    		if player.target.distance then
    			target_distance = math.floor(player.target.distance*10)/10
    			add_to_chat(158,'Distance: '..target_distance)
    		else
    			add_to_chat(123,'No Target Selected')
    		end
    	elseif command == 'C6' then -- Idle Toggle --
    		IdleIndex = (IdleIndex % #IdleArray) + 1
    		add_to_chat(158,'Idle Set: ' .. IdleArray[IdleIndex])
    		status_change(player.status)
    	elseif command == 'TP' then
    		add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
    	elseif command:match('^SC%d$') then
    		send_command('//' .. sc_map[command])
    	end
    	if command == 'current' then
    				add_to_chat(207,'Idle Set Active: '..IdleArray[IdleIndex]..'')
    				add_to_chat(207,'TP Set Active: '..AccArray[AccIndex]..'')
    				add_to_chat(207,'WS Set Active: '..WsAccArray[WsAccIndex]..'')
    	end
    end
    
    function check_equip_lock() -- Lock Equipment Here --
    	--[[if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
    		disable('ring1','ring2')
    	elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
    		disable('back')
    	else
    		enable('ring1','ring2','back')
    	end --]]
    end
    
    function actualCost(originalCost)
    	if buffactive["Penury"] then
    		return originalCost*.5
    	elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
    		return originalCost*.9
    	elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
    		return originalCost*1.1
    	else
    		return originalCost
    	end
    end
    
    function degrade_spell(spell,degrade_array)
    	spell_index = table.find(degrade_array,spell.name)
    	if spell_index > 1 then
    		new_spell = degrade_array[spell_index - 1]
    		change_spell(new_spell,spell.target.raw)
    		add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
    	end
    end
    
    function change_spell(spell_name,target)
    	cancel_spell()
    	send_command('//'..spell_name..' '..target)
    end
    
    function refine_waltz(spell,action)
    	if spell.type ~= 'Waltz' then
    		return
    	end
    
    	if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
    		return
    	end
    
    	local newWaltz = spell.english
    	local waltzID
    
    	local missingHP
    
    	if spell.target.type == "SELF" then
    		missingHP = player.max_hp - player.hp
    	elseif spell.target.isallymember then
    		local target = find_player_in_alliance(spell.target.name)
    		local est_max_hp = target.hp / (target.hpp/100)
    		missingHP = math.floor(est_max_hp - target.hp)
    	end
    
    	if missingHP ~= nil then
    		if player.sub_job == 'DNC' then
    			if missingHP < 40 and spell.target.name == player.name then
    				add_to_chat(123,'Full HP!')
    				cancel_spell()
    				return
    			elseif missingHP < 150 then
    				newWaltz = 'Curing Waltz'
    				waltzID = 190
    			elseif missingHP < 300 then
    				newWaltz = 'Curing Waltz II'
    				waltzID = 191
    			else
    				newWaltz = 'Curing Waltz III'
    				waltzID = 192
    			end
    		else
    			return
    		end
    	end
    
    	local waltzTPCost = {['Curing Waltz'] = 200, ['Curing Waltz II'] = 350, ['Curing Waltz III'] = 500, ['Curing Waltz IV'] = 650, ['Curing Waltz V'] = 800}
    	local tpCost = waltzTPCost[newWaltz]
    
    	local downgrade
    
    	if player.tp < tpCost and not buffactive.trance then
    
    		if player.tp < 200 then
    			add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
    			cancel_spell()
    			return
    		elseif player.tp < 350 then
    			newWaltz = 'Curing Waltz'
    		elseif player.tp < 500 then
    			newWaltz = 'Curing Waltz II'
    		elseif player.tp < 650 then
    			newWaltz = 'Curing Waltz III'
    		elseif player.tp < 800 then
    			newWaltz = 'Curing Waltz IV'
    		end
    
    		downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
    	end
    
    	if newWaltz ~= spell.english then
    		send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
    		if downgrade then
    			add_to_chat(158, downgrade)
    		end
    		cancel_spell()
    		return
    	end
    
    	if missingHP > 0 then
    		add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
    	end
    end
    
    function find_player_in_alliance(name)
    	for i,v in ipairs(alliance) do
    		for k,p in ipairs(v) do
    			if p.name == name then
    				return p
    			end
    		end
    	end
    end
    
    function sub_job_change(newSubjob, oldSubjob)
    	select_default_macro_book()
    end
    
    function set_macro_page(set,book)
    	if not tonumber(set) then
    		add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
    		return
    	end
    	if set < 1 or set > 10 then
    		add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
    		return
    	end
    
    	if book then
    		if not tonumber(book) then
    			add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
    			return
    		end
    		if book < 1 or book > 20 then
    			add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
    			return
    		end
    		send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
    	else
    		send_command('@input /macro set '..tostring(set))
    	end
    end
    
    function select_default_macro_book()
    	-- Default macro set/book
    	if player.sub_job == 'WAR' then
    		set_macro_page(1, 17)
    	elseif player.sub_job == 'WHM' then
    		set_macro_page(1, 17)
    	elseif player.sub_job == 'DNC' then
    		set_macro_page(1, 17)
    	elseif player.sub_job == 'NIN' then
    		set_macro_page(1, 17)
    	else
    		set_macro_page(1, 17)
    	end
    end
    Overall , all the gearswaps this person makes has been good for me and normally extremely easy for me to edit coding or adding coding in without breaking anything, however the BST one seems to have an issue. If anyone would be able to help figure out what's wrong with it, I'd be very grateful. I'm assuming the problem code may be around line ~421.

    EDIT: It does switch to the precast for Ready/Sic if I type out in game "//sic" or "//ready", but it doesn't do it if you actually use a Pet JA such as Tail Blow and such.

  20. #4980
    New Spam Forum
    Join Date
    Dec 2009
    Posts
    158
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    It's true that Ready and Sic are "PetCommand"s - but what you actually want to check for is Tail Blow, Fireball, etc, which are "Monster" abilities.

    Change that section of your precast function so it reads:
    Code:
    elseif spell.type == "Monster" then
            equip(theReadyPrecastGearSetYouMade)
    end

Page 249 of 302 FirstFirst ... 199 239 247 248 249 250 251 259 299 ... LastLast

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45