Item Search
     
BG-Wiki Search
+ Reply to Thread
Page 17 of 22 FirstFirst ... 7 15 16 17 18 19 ... LastLast
Results 321 to 340 of 421
  1. #321
    Relic Weapons
    Join Date
    Jul 2008
    Posts
    384
    BG Level
    4
    FFXI Server
    Asura

    I have a "mote" based RUN lua I am trying to add what I think should be a simple rule to. I just want a to equip one fast cast set when valiance/vallation is up and then a different one when those are not up. I'm either missing something simple or not placing it in the correct spot. Any help would be much appreciated.

    This is what I came up with.
    Code:
    function precast(spell,abil)
        if spell.action_type == 'Magic' then
    		if buffactive['Valiance'] then
    			equip(sets.precast.FC.Inspire)
    		elseif buffactive['Vallation'] then
    			equip(sets.precast.FC.Inspire)
    		else
    			equip(sets.precast.FC)			
    		end
    	end
    This is the full lua
    Spoiler: show
    Code:
    
    -------------------------------------------------------------------------------------------------------------------
    -- Setup functions for this job.  Generally should not be modified.
    -------------------------------------------------------------------------------------------------------------------
    
    -- 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.
    function job_setup()
        -- Table of entries
        state.Buff.Battuta = buffactive.Battuta or false
    	state.Buff.Embolden = buffactive.Embolden or false
    	
        if player.main_job_level >= 65 then
            max_runes = 3
        elseif player.main_job_level >= 35 then
            max_runes = 2
        elseif player.main_job_level >= 5 then
            max_runes = 1
        else
            max_runes = 0
        end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
    -------------------------------------------------------------------------------------------------------------------
    
    function user_setup()
        state.OffenseMode:options('DT', 'Standard', 'DTAccuracy')
        state.WeaponskillMode:options('Normal', 'Acc')
        state.IdleMode:options('DT', 'Enhance')
    	
    	send_command('bind f11 gs c cycle IdleMode')
    	send_command('bind f10 gs c cycle WeaponskillMode')
    	
    end
    
    
    function init_gear_sets()
    	-- 2952HP 1030MP --
        sets.enmity = {
    		ammo="Aqreqaq Bomblet",
    		head="Halitus Helm",
    		body="Runeist's Coat +3",
    		hands="Kurys Gloves",
    		legs="Eri. Leg Guards +1",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Trance Belt",
    		left_ear="Cryptic Earring",
    		right_ear="Friomisi Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    
    	sets.Battuta = {feet="Turms Leggings +1"}
    	sets.Embolden = {head="Erilaz Galea +1",back="Evasionist's Cape",legs="Futhark Trousers +3"}
    	--------------------------------------
    	-- Precast sets
    	--------------------------------------
    
    	-- Precast sets to enhance JAs
        sets.precast.JA['Vallation'] = set_combine(sets.enmity, {body="Runeist's Coat +3",legs="Futhark Trousers +3",
    		back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+5','Enmity+10','Damage taken-5%',}}})
        sets.precast.JA['Valiance'] = sets.precast.JA['Vallation']
        sets.precast.JA['Pflug'] = set_combine(sets.enmity, {feet="Runeist Bottes +1"})
        sets.precast.JA['Battuta'] = set_combine(sets.enmity, {head="Fu. Bandeau +3"})
        sets.precast.JA['Liement'] = set_combine(sets.enmity, {body="Futhark Coat +3"})
        sets.precast.JA['Lunge'] = {}
        sets.precast.JA['Swipe'] = sets.precast.JA['Lunge']
        sets.precast.JA['Gambit'] = set_combine(sets.enmity, {hands="Runeist's Mitons +3"})
        sets.precast.JA['Rayke'] = set_combine(sets.enmity, {feet="Futhark Boots"})
        sets.precast.JA['Elemental Sforzo'] = set_combine(sets.enmity, {body="Futhark Coat +3"})
        sets.precast.JA['Swordplay'] = sets.enmity
        sets.precast.JA['Embolden'] = set_combine(sets.enmity, {head="Erilaz Galea +1",legs="Futhark Trousers +3",back="Evasionist's Cape"})
        sets.precast.JA['Vivacious Pulse'] = sets.idle.DT
        sets.precast.JA['One For All'] = sets.enmity
        sets.precast.JA['Provoke'] = sets.enmity
    
    	-- Fast cast sets for spells. 2982HP 1075MP --
        sets.precast.FC = {
    		ammo="Sapience Orb",
    		head="Carmine Mask +1",
    		body="Adhemar Jacket",
    		hands="Leyline Gloves",
    		legs="Futhark Trousers +3",
    		feet="Carmine Greaves +1",
    		neck="Baetyl Pendant",
    		waist="Tempus Fugit",
    		left_ear="Etiolation Earring",
    		right_ear="Loquac. Earring",
    		left_ring="Kishar Ring",
    		right_ring="Prolix Ring",
    		back="Moonlight Cape"
    	}
    
    	-- Fast cast sets for spells. 2982HP 1075MP --
        sets.precast.FC.Inspire = {
    		ammo="Staunch Tathlum +1",
    		head="Rune. Bandeau +2",
    		body="Futhark Coat +3",
    		hands="Leyline Gloves",
    		legs="Aya. Cosciales +2",
    		feet="Carmine Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Flume Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Eabani Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    
        sets.precast.FC['Utsusemi: Ichi'] = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
        sets.precast.FC['Utsusemi: Ni'] = sets.precast.FC['Utsusemi: Ichi']
    
    
    	-- Weaponskill sets
    	sets.precast.WS = {
    		ammo="Knobkierrie",
    		head="Meghanada Visor +2",
    		body="Ayanmo Corazza +2",
    		hands="Meghanada Gloves +2",
    		legs="Lustr. Subligar +1",
    		feet="Lustra. Leggings +1",
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Sherida Earring",
    		right_ear="Moonshade Earring",
    		left_ring="Niqmaddu Ring",
    		right_ring="Regal Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%','Phys. dmg. taken-10%',}}
    	}
    	
        sets.precast.WS['Resolution'] = {
    		ammo="Knobkierrie",
    		head="Adhemar Bonnet +1",
    		body="Adhemar Jacket +1",
    		hands="Adhemar Wrist. +1",
    		legs="Meg. Chausses +2",
    		feet={ name="Herculean Boots", augments={'Attack+28','"Triple Atk."+4','Accuracy+10',}},
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Sherida Earring",
    		right_ear="Moonshade Earring",
    		left_ring="Niqmaddu Ring",
    		right_ring="Ilabrat Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%','Phys. dmg. taken-10%',}}
    	}
        sets.precast.WS['Resolution'].Acc = sets.precast.WS['Resolution']
    	
        sets.precast.WS['Dimidiation'] = {
    		ammo="Knobkierrie",
    		head="Fu. Bandeau +3",
    		body="Futhark Coat +3",
    		hands="Meg. Gloves +2",
    		legs="Lustr. Subligar +1",
    		feet="Lustra. Leggings +1",
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Sherida Earring",
    		right_ear="Moonshade Earring",
    		left_ring="Niqmaddu Ring",
    		right_ring="Ilabrat Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%','Phys. dmg. taken-10%',}}
    	}
        sets.precast.WS['Dimidiation'].Acc = sets.precast.WS['Dimidiation']
    	
    	sets.precast.WS['Requiescat'] = {
    		ammo="Knobkierrie",
    		head="Meghanada Visor +2",
    		body="Ayanmo Corazza +2",
    		hands="Meghanada Gloves +2",
    		legs="Lustr. Subligar +1",
    		feet="Lustra. Leggings +1",
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Moonshade Earring",
    		right_ear="Brutal Earring",
    		left_ring="Niqmaddu Ring",
    		right_ring="Regal Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%','Phys. dmg. taken-10%',}}
    	}
    	sets.precast.WS['Requiescat'].Acc = sets.precast.WS['Requiescat']	
    	
    	sets.precast.WS['Shockwave'] = {
    		head="Aya. Zucchetto +2",
    		body="Ayanmo Corazza +2",
    		hands="Aya. Manopolas +2",
    		legs="Aya. Cosciales +2",
    		feet="Aya. Gambieras +2",
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Digni. Earring",
    		right_ear="Gwati Earring",
    		left_ring={name="Moonbeam Ring",bag="wardrobe"},
    		right_ring={name="Moonbeam Ring",bag="wardrobe2"},
    		back="Moonlight Cape"
    	}
    	
    	sets.precast.WS['Full Break'] = {
    		head="Aya. Zucchetto +2",
    		body="Ayanmo Corazza +2",
    		hands="Aya. Manopolas +2",
    		legs="Aya. Cosciales +2",
    		feet="Aya. Gambieras +2",
    		neck="Fotia Gorget",
    		waist="Fotia Belt",
    		left_ear="Digni. Earring",
    		right_ear="Gwati Earring",
    		left_ring={name="Moonbeam Ring",bag="wardrobe"},
    		right_ring={name="Moonbeam Ring",bag="wardrobe2"},
    		back="Moonlight Cape"
    	}
    	
    	sets.precast.WS['Savage Blade'] = {
    		ammo="Ginsen",
    		head="Meghanada Visor +2",
    		neck="Fotia Gorget",
    		left_ear="Moonshade Earring",
    		right_ear="Brutal Earring",
    		body="Herculean Vest",
    		hands="Meghanada Gloves +2",
    		left_ring="Petrov Ring",
    		right_ring="Rajas Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
    		waist="Fotia Belt",
    		legs="Meg. Chausses +2",
    		feet="Meg. Jam. +2"
    	}
    	
        sets.precast.WS['Herculean Slash'] = sets.engaged.DT
    
    
    
    	--------------------------------------
    	-- Midcast sets
    	--------------------------------------
    	
        sets.midcast.FastRecast = sets.precast.FC
        -- 3094HP 1039MP --
    	sets.midcast['Enhancing Magic'] = {
    	    ammo="Staunch Tathlum +1",
    		head="Erilaz Galea +1",
    		body="Runeist's Coat +3",
    		hands="Runeist's Mitons +3",
    		legs="Futhark Trousers +3",
    		feet="Carmine Greaves +1",
    		neck="Incanter's Torque",
    		waist="Olympus Sash",
    		left_ear="Etiolation Earring",
    		right_ear="Andoaa Earring",
    		left_ring={name="Stikini Ring +1",bag="wardrobe"},
    		right_ring={name="Stikini Ring +1",bag="wardrobe2"},
    		back="Moonlight Cape"
    	}
    	sets.midcast['Refresh'] = set_combine(sets.midcast['Enhancing Magic'], {waist="Gishdubar Sash"})
        sets.midcast['Regen'] = set_combine(sets.midcast['Enhancing Magic'], {head="Rune. Bandeau +2"})
        sets.midcast['Temper'] = set_combine(sets.midcast['Enhancing Magic'], {head="Carmine Mask +1",legs="Carmine Cuisses +1"})
    	
    	-- 2958HP 923MP --
    	sets.midcast['Phalanx'] = {
    		head="Fu. Bandeau +3",
    		body={ name="Taeon Tabard", augments={'Mag. Evasion+18','Spell interruption rate down -10%','Phalanx +3',}},
    		hands={ name="Taeon Gloves", augments={'Mag. Evasion+12','Spell interruption rate down -10%','Phalanx +3',}},
    		legs="Futhark Trousers +3",
    		feet={ name="Taeon Boots", augments={'Mag. Evasion+11','Spell interruption rate down -10%','Phalanx +3',}},
    		neck="Moonbeam Necklace",
    		waist="Rumination Sash",
    		left_ear="Etiolation Earring",
    		right_ear="Magnetic Earring",
    		left_ring={name="Moonbeam Ring",bag="wardrobe"},
    		right_ring={name="Moonbeam Ring",bag="wardrobe2"},
    		back="Moonlight Cape"
    	}
    	
    	sets.midcast['Foil'] = sets.enmity
    	sets.midcast.Cure = sets.enmity
    	sets.midcast['Divine Magic'] = sets.enmity
    	sets.midcast['Blank Gaze'] = sets.enmity
    	-- 2882HP 1176MP, 103SIRD(cap) with 5 merits, (93 without merits)--
    	sets.midcast['Blue Magic'] = {
    		ammo="Staunch Tathlum +1",
    		head="Rune. Bandeau +2",
    		body="Taeon Tabard",
    		hands="Rawhide Gloves",
    		legs="Carmine Cuisses +1",
    		feet="Carmine Greaves +1",
    		neck="Moonbeam Necklace",
    		waist="Rumination Sash",
    		left_ear="Halasz Earring",
    		right_ear="Magnetic Earring",
    		left_ring="Evanescence Ring",
    		right_ring="Moonbeam Ring",
    		back="Moonlight Cape"
    	}
    
    	--------------------------------------
    	-- Idle/resting/defense/etc sets
    	--------------------------------------
    	-- 2996HP 1192MP --
    	sets.idle.DT = {
    		ammo="Staunch Tathlum +1",
    		head="Fu. Bandeau +3",
    		body="Runeist's Coat +3",
    		hands="Runeist's Mitons +3",
    		legs="Eri. Leg Guards +1",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Eabani Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    	--2882HP--
    	sets.idle.Enhance = {
    		ammo="Staunch Tathlum +1",
    		head="Erilaz Galea +1",
    		body="Runeist's Coat +3",
    		hands="Runeist's Mitons +3",
    		legs="Futhark Trousers +3",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Eabani Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    	
        sets.Kiting = {legs="Carmine Cuisses +1"}
    	
    	sets.idle.hp = {    
    		ammo="Staunch Tathlum +1",
    		head="Rune. Bandeau +2",
    		body="Runeist's Coat +3",
    		hands="Turms Mittens +1",
    		legs="Futhark Trousers +3",
    		feet="Turms Leggings +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Odnowa Earring",
    		right_ear="Odnowa Earring +1",
    		left_ring={name="Moonbeam Ring",bag="wardrobe"},
    		right_ring={name="Moonbeam Ring",bag="wardrobe2"},
    		back="Moonlight Cape"
    	}
    	
    	--Resist elements/ailments 49% PDT 2960HP 1043MP --
    	sets.defense.MDT = {
    		ammo="Staunch Tathlum +1",
    		head="Fu. Bandeau +3",
    		body="Runeist's Coat +3",
    		hands="Erilaz Gauntlets +1",
    		legs="Runeist's Trousers +3",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Hearty Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    	
    	-- 2956HP --
        sets.defense.PDT = {
    		ammo="Staunch Tathlum +1",
    		head="Fu. Bandeau +3",
    		body="Runeist's Coat +3",
    		hands="Runeist's Mitons +3",
    		legs="Eri. Leg Guards +1",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Eabani Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    	--------------------------------------
    	-- Engaged sets
    	--------------------------------------
    	-- 2956HP 1202MP --
        sets.engaged.DT = {
    		ammo="Staunch Tathlum +1",
    		head="Fu. Bandeau +3",
    		body="Runeist's Coat +3",
    		hands="Turms Mittens +1",
    		legs="Eri. Leg Guards +1",
    		feet="Erilaz Greaves +1",
    		neck="Futhark Torque +2",
    		waist="Engraved Belt",
    		left_ear="Etiolation Earring",
    		right_ear="Eabani Earring",
    		left_ring="Vocane Ring +1",
    		right_ring="Defending Ring",
    		back="Moonlight Cape"
    	}
    	
        sets.engaged.Standard = {
    		ammo="Yamarang",
    		head="Adhemar Bonnet +1",
    		body="Adhemar Jacket +1",
    		hands="Adhemar Wrist. +1",
    		legs="Samnuha Tights",
    		feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+4',}},
    		neck="Anu Torque",
    		waist="Kentarch Belt +1",
    		left_ear="Sherida Earring",
    		right_ear="Cessance Earring",
    		left_ring="Niqmaddu Ring",
    		right_ring="Epona's Ring",
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
        }
    	-- 44% PDT 1211 Accuracy 2613HP--
    	sets.engaged.DTAccuracy = {
    		ammo="Yamarang",
    		head="Fu. Bandeau +3",
    		body="Ayanmo Corazza +2",
    		hands="Turms Mittens +1",
    		legs="Meg. Chausses +2",
    		feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+4',}},
    		neck="Futhark Torque +2",
    		waist="Kentarch Belt +1",
    		left_ear="Sherida Earring",
    		right_ear="Cessance Earring",
    		left_ring={name="Moonbeam Ring",bag="wardrobe"},
    		right_ring={name="Moonbeam Ring",bag="wardrobe2"},
    		back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}
    	}
    
    
    end
    
    ------------------------------------------------------------------
    -- Action events
    ------------------------------------------------------------------
    function precast(spell,abil)
        if spell.action_type == 'Magic' then
    		if buffactive['Valiance'] then
    			equip(sets.precast.FC.Inspire)
    		elseif buffactive['Vallation'] then
    			equip(sets.precast.FC.Inspire)
    		else
    			equip(sets.precast.FC)			
    		end
    	end	
            --prevents Valiance/Vallation/Liement from being prevented by each other (cancels whichever is active)
        if spell.name == 'Valiance' or spell.name == 'Vallation' or spell.name == 'Liement' then
            if buffactive['Valiance'] then
                cast_delay(0.2)
                windower.ffxi.cancel_buff(535)
            elseif buffactive['Vallation'] then
                cast_delay(0.2)
                windower.ffxi.cancel_buff(531)
            elseif buffactive['Liement'] then
                cast_delay(0.2)
                windower.ffxi.cancel_buff(537)
            end
        end                                                                          
    end
    
    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)
        if spell.english == 'Lunge' or spell.english == 'Swipe' then
            local obi = get_obi(get_rune_obi_element())
            if obi then
                equip({waist=obi})
            end
        end
    end
    
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- Customization hooks for idle and melee sets, after they've been automatically constructed.
    -------------------------------------------------------------------------------------------------------------------
    function customize_idle_set(idleSet)
        if state.Buff.Battuta then
            idleSet = set_combine(idleSet, sets.Battuta)
    	elseif state.Buff.Embolden then
    		idleSet = set_combine(idleSet, sets.Embolden)
    	end
    	
        return idleSet
    end
    
    function customize_melee_set(meleeSet)
        if state.Buff.Battuta then
            meleeSet = set_combine(meleeSet, sets.Battuta)
    	elseif state.Buff.Embolden then
    		meleeSet = set_combine(meleeSet, sets.Embolden)
        end
     
        return meleeSet
    end
    
    function customize_defense_set(defenseSet)
        if state.Buff.Battuta then
            defenseSet = set_combine(defenseSet, sets.Battuta)
    	elseif state.Buff.Embolden then
    		defenseSet = set_combine(defenseSet, sets.Embolden)
        end
     
        return defenseSet
    end
    -------------------------------------------------------------------------------------------------------------------
    -- General hooks for other events.
    -------------------------------------------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------
    
    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------
    function job_buff_change(buff,gain)
        if buff == 'Battuta' and not gain then
            status_change(player.status)
    	elseif buff == 'Embolden' and not gain then
    		status_change(player.status)
        end
    end
    
    
    function get_rune_obi_element()
        weather_rune = buffactive[elements.rune_of[world.weather_element] or '']
        day_rune = buffactive[elements.rune_of[world.day_element] or '']
        
        local found_rune_element
        
        if weather_rune and day_rune then
            if weather_rune > day_rune then
                found_rune_element = world.weather_element
            else
                found_rune_element = world.day_element
            end
        elseif weather_rune then
            found_rune_element = world.weather_element
        elseif day_rune then
            found_rune_element = world.day_element
        end
        
        return found_rune_element
    end
    
    function get_obi(element)
        if element and elements.obi_of[element] then
            return (player.inventory[elements.obi_of[element]] or player.wardrobe[elements.obi_of[element]]) and elements.obi_of[element]
        end
    end
    
    
    -- Get a count of the number of runes of a given type
    function rune_count(rune)
        local count = 0
        local current_time = os.time()
        for _,entry in pairs(rune_timers) do
            if entry.rune == rune and entry.expires > current_time then
                count = count + 1
            end
        end
        return count
    end

  2. #322
    Relic Weapons
    Join Date
    Jul 2008
    Posts
    384
    BG Level
    4
    FFXI Server
    Asura

    Nevermind, I got it.

  3. #323
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    Evening,

    I'm having issues with my F5 bind toggle. This is in my lua at line 393 to line 414. The way I thought I wrote it, when I press my toggle, it will check to see if my subjob is dnc or nin, and if it is, it'll cycle between my dual wield weapon sets, else if my sub isn't dnc or nin, it'll cycle between my single wield weapon sets. For some reason however, it's only cycling between my dual wield weapon sets. These sets can be found from line 209 to line 223. I use the same argument to check for subs before equipping the correct weapon sets for my aftercast, my update_status and my status_change, those of which can be found from lines 313 to 390. Can someone please tell me what I'm doing wrong here? Pastebin below.

    https://pastebin.com/LnerJvtv

  4. #324
    a p. sweet dude
    Pens win! Pens Win!!! PENS WIN!!!!!

    Join Date
    Jul 2010
    Posts
    22,223
    BG Level
    10

    Haven't played around with Gearswap much yet, but I think your problem is the way you're trying to do your comparison. In most programming languages, you can't really compare one value to multiple like you're trying to do there. Each clause needs to be a complete comparison. Meaning,

    Code:
    if player.sub_job == 'Nin' or 'Dnc' then
    Actually needs to look like this:

    Code:
    if player.sub_job == 'NIN' or player.sub_job == 'DNC' then

  5. #325
    RIDE ARMOR
    Join Date
    Feb 2017
    Posts
    19
    BG Level
    1
    FFXI Server
    Bismarck

    That was exactly the issue! Thank you!

  6. #326
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Edit:
    Omg found the error, was so silly.
    Capital "I" on the "if".

    I'm ashamed of myself, sorry >_>

  7. #327
    E before O except before E-I-E-I-O.
    Join Date
    May 2008
    Posts
    138
    BG Level
    3
    FFXIV Character
    Kyleen Garaka
    FFXIV Server
    Sargatanas
    FFXI Server
    Phoenix

    So something started happening to my luas last night where my ambu capes stopped swapping. I decided to do an export to see if there was an issue and it seems like all of my Resin augments on my ambu capes have:

    back={ name="Intarabus's Cape", augments={'CHR+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Fast Cast"+10','System: 1 ID: 1155 Val: 4',}},

    If I change it in my lua to what it says here, it still doesn't work though.. Nobody else I know is having this problem however.

  8. #328
    New Merits
    Join Date
    Sep 2007
    Posts
    224
    BG Level
    4
    FFXI Server
    Asura

    Edit: Figured it out.

  9. #329
    Smells like Onions
    Join Date
    May 2019
    Posts
    2
    BG Level
    0

    If there are whole sets I don't have and don't need to use right now, how much of them can I delete before it breaks everything? For example if I have this in a lua:


    Code:
    	sets.midcast["Garland of Bliss"] = {
    		head="Inyanga Tiara +2",
    		neck="Sanctity Necklace",
    		ear1="Dignitary's Earring",
    		ear2="Gwati Earring",
    		body="Inyanga Jubbah +2",
    		hands="Inyanga Dastanas +2",
    		ring1="Stikini Ring +1",
    		ring2="Stikini Ring +1",
    		back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
    		waist="Eschan Stone",
    		legs="Inyanga Shalwar +2",
    		feet="Inyanga Crackows +2"
    	}
    Can I just delete this whole block?
    Or do I have to delete each line like "waist="Eschan Stone"," and leave the "sets.midcast["Garland of Bliss"] = {}" intact?
    Or do I have to copy and paste some standard gear set into each of the dozens of unneeded sets?

    Edit: Yes, obviously I copy/pasted the wrong line before.

  10. #330

    Quote Originally Posted by gx240 View Post
    If there are whole sets I don't have and don't need to use right now, how much of them can I delete before it breaks everything? For example if I have this in a lua:


    Code:
    	sets.midcast["Garland of Bliss"] = {
    		head="Inyanga Tiara +2",
    		neck="Sanctity Necklace",
    		ear1="Dignitary's Earring",
    		ear2="Gwati Earring",
    		body="Inyanga Jubbah +2",
    		hands="Inyanga Dastanas +2",
    		ring1="Stikini Ring +1",
    		ring2="Stikini Ring +1",
    		back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
    		waist="Eschan Stone",
    		legs="Inyanga Shalwar +2",
    		feet="Inyanga Crackows +2"
    	}
    Can I just delete this whole block?
    Or do I have to delete each line like "waist="Eschan Stone"," and leave the "sets.midcast.Nuke = {}" intact?
    Or do I have to copy and paste some standard gear set into each of the dozens of unneeded sets?
    if it is a file that is pre-made file or if you plan to get the gear in the future it is better to leave it as is because it could cause errors if removed

    "Or do I have to delete each line like "waist="Eschan Stone"," and leave the "sets.midcast.Nuke = {}" intact?"
    this makes no sense as you never added any code about sets.midcast.Nuke you should have asked if it is better to leave sets.midcast["Garland of Bliss"] = {} intact
    in the case of the latter it depends on the code that access it

  11. #331
    i should really shut up
    You can safely ignore me I am a troll

    Join Date
    Sep 2011
    Posts
    6,750
    BG Level
    8
    FFXI Server
    Asura

    .

  12. #332
    Insert witty title here
    Join Date
    Jun 2007
    Posts
    1,193
    BG Level
    6
    FFXI Server
    Phoenix

    Trying to get my COR down to 6 macros for rolls/qd. I've seen Arislan's COR LUA and use the select-a-QD portion, was hoping to see something like that to cycle through different phantom rolls.

    The relevant code for the QD's:
    Code:
    --  gs c qd                         Uses the currently configured shot on the target, with either <t> or
    --                                  <stnpc> depending on setting.
    --  gs c qd t                       Uses the currently configured shot on the target, but forces use of <t>.
    --
    --  gs c cycle mainqd               Cycles through the available steps to use as the primary shot when using
    --                                  one of the above commands.
    --  gs c cycle altqd                Cycles through the available steps to use for alternating with the
    --                                  configured main shot.
    --  gs c toggle usealtqd            Toggles whether or not to use an alternate shot.
    --  gs c toggle selectqdtarget      Toggles whether or not to use <stnpc> (as opposed to <t>) when using a shot.
    
    
    function job_self_command(cmdParams, eventArgs)
        if cmdParams[1] == 'qd' then
            if cmdParams[2] == 't' then
                state.IgnoreTargetting:set()
            end
    
            local doqd = ''
            if state.UseAltqd.value == true then
                doqd = state[state.Currentqd.current..'qd'].current
                state.Currentqd:cycle()
            else
                doqd = state.Mainqd.current
            end
    
            send_command('@input /ja "'..doqd..'" <t>')
        end
    
        gearinfo(cmdParams, eventArgs)
    end

  13. #333
    Smells like Onions
    Join Date
    May 2019
    Posts
    3
    BG Level
    0

    I've found the following code snippet that I'm trying to incorporate into my existing GearSwap setup. I've added the two pieces that reference this to what I believe are the appropriate files, but nothing seems to happen when I activate it. I had a friend send me his GearSwap folder that has this snippet in it, and it works. I'm trying to figure out what is going wrong when I try to add it to mine. Any help is appreciated. I'm very new to GearSwap, so I'm not sure what other information would be needed.


    This segment is in my Utility.lua file, along with the appropriate state added to my Include.lua

    Code:
    function check_cleanup()
    	if state.AutoCleanupMode.value then
    		if player.inventory['Bead Pouch'] then
    			send_command('input /item "Bead Pouch" <me>')
    			tickdelay = os.clock() + 2.4
    			return true
    		elseif player.inventory['Silt Pouch'] then
    			send_command('input /item "Silt Pouch" <me>')
    			tickdelay = os.clock() + 2.4
    			return true
    		end
            end
    end

  14. #334

    Quote Originally Posted by lossolsun View Post
    I've found the following code snippet that I'm trying to incorporate into my existing GearSwap setup. I've added the two pieces that reference this to what I believe are the appropriate files, but nothing seems to happen when I activate it. I had a friend send me his GearSwap folder that has this snippet in it, and it works. I'm trying to figure out what is going wrong when I try to add it to mine. Any help is appreciated. I'm very new to GearSwap, so I'm not sure what other information would be needed.


    This segment is in my Utility.lua file, along with the appropriate state added to my Include.lua

    ...
    look for tickdelay in your friends code

  15. #335
    Smells like Onions
    Join Date
    May 2019
    Posts
    3
    BG Level
    0

    Tickdelay is in multiple places in the code. What specifically am I looking for? I found one part that I thought would work, but it didn't, and didn't have any items to use to be able to test it until today.

    P.S. Thanks for your help dlsmd.

  16. #336

    Quote Originally Posted by lossolsun View Post
    Tickdelay is in multiple places in the code. What specifically am I looking for? I found one part that I thought would work, but it didn't, and didn't have any items to use to be able to test it until today.

    P.S. Thanks for your help dlsmd.
    all of the if/then/else and in the exact same spots

  17. #337
    Smells like Onions
    Join Date
    May 2019
    Posts
    3
    BG Level
    0

    Thanks. I'll give that a go and report my results.

  18. #338

    i'm using the cor.lua file that was on kinematics github.
    the problem i'm having is its not changing to the correct set when i'm dualwielding.
    i want it to change to engaged.melee.dw, but its equipping engaged.melee for some reason.

    Spoiler: show

    -------------------------------------------------------------------------------------------------------------------
    -- Setup functions for this job. Generally should not be modified.
    -------------------------------------------------------------------------------------------------------------------

    --[[
    gs c toggle LuzafRing -- Toggles use of Luzaf Ring on and off

    Offense mode is melee or ranged. Used ranged offense mode if you are engaged
    for ranged weaponskills, but not actually meleeing.

    Weaponskill mode, if set to 'Normal', is handled separately for melee and ranged weaponskills.
    --]]


    -- 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()
    -- Whether to use Luzaf's Ring
    state.LuzafRing = M(false, "Luzaf's Ring")
    -- Whether a warning has been given for low ammo
    state.warned = M(false)

    define_roll_values()
    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.OffenseModeptions('Melee', 'Acc', 'Ranged')
    state.RangedModeptions('Normal', 'Acc')
    state.WeaponskillModeptions('Normal', 'Acc', 'Att', 'Mod')
    state.CastingModeptions('Normal', 'Resistant')
    state.IdleModeptions('Normal', 'PDT', 'Refresh')

    gear.RAbullet = "Adlivun Bullet"
    gear.WSbullet = "decimating Bullet"
    gear.MAbullet = "Bronze Bullet"
    gear.QDbullet = "Adlivun Bullet"
    options.ammo_warning_limit = 15

    -- Additional local binds
    send_command('bind ^` input /ja "Double-up" <me>')
    send_command('bind !` input /ja "Bolter\'s Roll" <me>')

    update_combat_form()
    select_default_macro_book()
    end


    -- Called when this job file is unloaded (eg: job change)
    function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
    end

    -- Define sets and vars used by this job file.
    function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------

    -- Precast Sets

    -- Precast sets to enhance JAs

    sets.precast.JA['Triple Shot'] = {body="chasseur's frac"}
    sets.precast.JA['Snake Eye'] = {legs="Lanun trews +1"}
    sets.precast.JA['Wild Card'] = {feet="Lanun Bottes +1"}
    sets.precast.JA['Random Deal'] = {body="Lanun Frac +1"}


    sets.precast.CorsairRoll = {head="Lanun Tricorne +1",hands="chasseur's gants"}

    sets.precast.CorsairRoll["Caster's Roll"] = set_combine(sets.precast.CorsairRoll, {legs="chasseur's Culottes"})
    sets.precast.CorsairRoll["Courser's Roll"] = set_combine(sets.precast.CorsairRoll, {feet="chasseur's Bottes "})
    sets.precast.CorsairRoll["Blitzer's Roll"] = set_combine(sets.precast.CorsairRoll, {head="chasseur's Tricorne"})
    sets.precast.CorsairRoll["Tactician's Roll"] = set_combine(sets.precast.CorsairRoll, {body="chasseur's Frac"})
    sets.precast.CorsairRoll["Allies' Roll"] = set_combine(sets.precast.CorsairRoll, {hands="chasseur's Gants"})

    sets.precast.LuzafRing = {ring2="Luzaf's Ring"}
    sets.precast.FoldDoubleBust = {hands="Lanun Gants +1"}

    sets.precast.CorsairShot = {head="Blood Mask"}


    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
    head="Whirlpool Mask",
    body="Iuitl Vest",hands="Iuitl Wristbands",
    legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells

    sets.precast.FC = {head="Haruspex Hat",ear2="Loquacious Earring",hands="Thaumas Gloves",ring1="Prolix Ring"}

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})


    sets.precast.RA = {ammo=gear.RAbullet,
    head="chasseur's Tricorne",
    body="Laksamana's Frac",hands="Lanun Gants",
    back="Navarch's Mantle",waist="Impulse Belt",legs="Nahtirah Trousers",feet="meghanada jambeaux +1"}


    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
    head="lanun tricorne +1",neck="combatant's torque",ear1="ishvara earring",ear2="volley Earring",
    body="laksamana's frac +1",hands="meghanada gloves +1",ring1="llabrat Ring",ring2="dumakulem's Ring",
    back="gunslinger's cape",waist="kwahu kachina belt",legs="meghanada chausses +1",feet="meghanada jambeaux +1"}


    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Evisceration'] = sets.precast.WS

    sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})

    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {legs="Nahtirah Trousers"})

    sets.precast.WS['Last Stand'] = {ammo=gear.WSbullet,
    ring2="garuda Ring",back="ik cape"}

    sets.precast.WS['Last Stand'].Acc = {ammo=gear.WSbullet,
    head="Laksamana's Hat",neck=gear.ElementalGorget,ear1="Clearview Earring",ear2="Moonshade Earring",
    body="Laksamana's Frac",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Stormsoul Ring",
    back="Libeccio Mantle",waist=gear.ElementalBelt,legs="Thurandaut Tights +1",feet="Laksamana's Bottes"}


    sets.precast.WS['Wildfire'] = {ammo=gear.MAbullet,
    head="lanun tricorne +1",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="lanun frac +1",hands="meghanada gloves +1",ring1="llabrat Ring",ring2="acumen Ring",
    back="gunslinger's Cape",waist="salire belt",legs="laksamana's trews +1",feet="adhemar gamashes"}

    sets.precast.WS['Wildfire'].Brew = {ammo=gear.MAbullet,
    head="Wayfarer Circlet",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Manibozho Jerkin",hands="Iuitl Wristbands",ring1="Stormsoul Ring",ring2="Demon's Ring",
    back="Toro Cape",waist=gear.ElementalBelt,legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.precast.WS['Leaden Salute'] = sets.precast.WS['Wildfire']


    -- Midcast Sets
    sets.midcast.FastRecast = {
    head="Whirlpool Mask",
    body="Iuitl Vest",hands="Iuitl Wristbands",
    legs="Manibozho Brais",feet="Iuitl Gaiters +1"}

    -- Specific spells
    sets.midcast.Utsusemi = sets.midcast.FastRecast

    sets.midcast.CorsairShot = {ammo=gear.QDbullet,
    head="Blood Mask",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Lanun Frac +1",hands="Schutzen Mittens",ring1="Hajduk Ring",ring2="Demon's Ring",
    back="Toro Cape",waist="Aquiline Belt",legs="Iuitl Tights",feet="Lanun Bottes +1"}

    sets.midcast.CorsairShot.Acc = {ammo=gear.QDbullet,
    head="Laksamana's Hat +1",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
    body="Lanun Frac +1",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
    back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.midcast.CorsairShot['Light Shot'] = {ammo=gear.QDbullet,
    head="Laksamana's Hat +1",neck="Stoicheion Medal",ear1="Lifestorm Earring",ear2="Psystorm Earring",
    body="Lanun Frac +1",hands="Schutzen Mittens",ring1="Stormsoul Ring",ring2="Sangoma Ring",
    back="Navarch's Mantle",waist="Aquiline Belt",legs="Iuitl Tights",feet="Iuitl Gaiters +1"}

    sets.midcast.CorsairShot['Dark Shot'] = sets.midcast.CorsairShot['Light Shot']


    -- Ranged gear
    sets.midcast.RA = {ammo=gear.RAbullet,
    head="Lanun Tricorne +1",neck="Ocachi Gorget",ear1="Clearview Earring",ear2="Volley Earring",
    body="Laksamana's Frac +1",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Stormsoul Ring",
    back="Terebellum Mantle",waist="Commodore Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    sets.midcast.RA.Acc = {ammo=gear.RAbullet,
    head="Laksamana's Hat +1",neck="Huani Collar",ear1="Clearview Earring",ear2="Volley Earring",
    body="Laksamana's Frac +1",hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Beeline Ring",
    back="Libeccio Mantle",waist="Commodore Belt",legs="Thurandaut Tights +1",feet="Laksamana's Bottes +1"}


    -- Sets to return to when not performing an action.

    -- Resting sets
    sets.resting = {neck="Wiglen Gorget",ring1="Sheltered Ring",ringddddddd2="Paguroidea Ring"}


    -- Idle sets
    sets.idle = {ammo=gear.RAbullet,
    head="meghanada visor +1",neck="orichi nodowa",ear1="vision earring",ear2="Volley Earring",
    body="meghanada cuirie",hands="meghanada gloves +1",ring1="defending Ring",ring2="chirich Ring",
    back="iximulew cape",waist="Flume Belt",legs="crimson cuisses",feet="meghanada jambeaux +1"}

    sets.idle.Town = {legs="crimson cuisses"}

    -- Defense sets
    sets.defense.PDT = {
    head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
    back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}

    sets.defense.MDT = {
    head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2="Shadow Ring",
    back="Engulfer Cape",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}


    sets.Kiting = {feet="crimson cuisses"}

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion

    -- Normal melee group
    sets.engaged.Melee = {ammo=gear.RAbullet,
    head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
    back="Atheling Mantle",waist="Windbuffet Belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}

    sets.engaged.Acc = {ammo=gear.RAbullet,
    head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
    back="Atheling Mantle",waist="isa belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}

    sets.engaged.Melee.DW = {main="kaja knife", sub="eletta sword", ammo=gear.RAbullet,
    head="adhemar bonnet",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
    body="meghanada cuirie",hands="meghanada gloves +1",ring1="petrov Ring",ring2="Epona's Ring",
    back="bleating Mantle",waist="twilight Belt",legs="meghanada chausses +1",feet="meghanada jambeaux +1"}

    sets.engaged.Acc.DW = {ammo=gear.RAbullet,
    head="Whirlpool Mask",neck="Asperity Necklace",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Rajas Ring",ring2="Epona's Ring",
    back="Atheling Mantle",waist="chaac belt",legs="Manibozho Brais",feet="Iuitl Gaiters +1"}


    sets.engaged.Ranged = {ammo=gear.RAbullet,
    head="Whirlpool Mask",neck="Twilight Torque",ear1="Clearview Earring",ear2="Volley Earring",
    body="Iuitl Vest",hands="Iuitl Wristbands",ring1="Defending Ring",ring2=gear.DarkRing.physical,
    back="Shadow Mantle",waist="Flume Belt",legs="Nahtirah Trousers",feet="Iuitl Gaiters +1"}
    end

    -------------------------------------------------------------------------------------------------------------------
    -- 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)
    -- Check that proper ammo is available if we're using ranged attacks or similar.
    if spell.action_type == 'Ranged Attack' or spell.type == 'WeaponSkill' or spell.type == 'CorsairShot' then
    do_bullet_checks(spell, spellMap, eventArgs)
    end

    -- gear sets
    if (spell.type == 'CorsairRoll' or spell.english == "Double-Up") and state.LuzafRing.value then
    equip(sets.precast.LuzafRing)
    elseif spell.type == 'CorsairShot' and state.CastingMode.value == 'Resistant' then
    classes.CustomClass = 'Acc'
    elseif spell.english == 'Fold' and buffactive['Bust'] == 2 then
    if sets.precast.FoldDoubleBust then
    equip(sets.precast.FoldDoubleBust)
    eventArgs.handled = true
    end
    end
    end


    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_aftercast(spell, action, spellMap, eventArgs)
    if spell.type == 'CorsairRoll' and not spell.interrupted then
    display_roll_info(spell)
    end
    end

    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements standard library decisions.
    -------------------------------------------------------------------------------------------------------------------

    -- Return a customized weaponskill mode to use for weaponskill sets.
    -- Don't return anything if you're not overriding the default value.
    function get_custom_wsmode(spell, spellMap, default_wsmode)
    if buffactive['Transcendancy'] then
    return 'Brew'
    end
    end


    -- Called by the 'update' self-command, for common needs.
    -- Set eventArgs.handled to true if we don't want automatic equipping of gear.



    function job_update(cmdParams, eventArgs)
    if newStatus == 'Engaged' and player.equipment.main == 'Chatoyant Staff' then
    state.OffenseMode:set('Ranged')
    end
    end


    -- Set eventArgs.handled to true if we don't want the automatic display to be run.
    function display_current_job_state(eventArgs)
    local msg = ''

    msg = msg .. 'Off.: '..state.OffenseMode.current
    msg = msg .. ', Rng.: '..state.RangedMode.current
    msg = msg .. ', WS.: '..state.WeaponskillMode.current
    msg = msg .. ', QD.: '..state.CastingMode.current

    if state.DefenseMode.value ~= 'None' then
    local defMode = state[state.DefenseMode.value ..'DefenseMode'].current
    msg = msg .. ', Defense: '..state.DefenseMode.value..' '..defMode
    end

    if state.Kiting.value then
    msg = msg .. ', Kiting'
    end

    if state.PCTargetMode.value ~= 'default' then
    msg = msg .. ', Target PC: '..state.PCTargetMode.value
    end

    if state.SelectNPCTargets.value then
    msg = msg .. ', Target NPCs'
    end

    msg = msg .. ', Roll Size: ' .. ((state.LuzafRing.value and 'Large') or 'Small')

    add_to_chat(122, msg)

    eventArgs.handled = true
    end


    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------

    function define_roll_values()
    rolls = {
    ["Corsair's Roll"] = {lucky=5, unlucky=9, bonus="Experience Points"},
    ["Ninja Roll"] = {lucky=4, unlucky=8, bonus="Evasion"},
    ["Hunter's Roll"] = {lucky=4, unlucky=8, bonus="Accuracy"},
    ["Chaos Roll"] = {lucky=4, unlucky=8, bonus="Attack"},
    ["Magus's Roll"] = {lucky=2, unlucky=6, bonus="Magic Defense"},
    ["Healer's Roll"] = {lucky=3, unlucky=7, bonus="Cure Potency Received"},
    ["Puppet Roll"] = {lucky=4, unlucky=8, bonus="Pet Magic Accuracy/Attack"},
    ["Choral Roll"] = {lucky=2, unlucky=6, bonus="Spell Interruption Rate"},
    ["Monk's Roll"] = {lucky=3, unlucky=7, bonus="Subtle Blow"},
    ["Beast Roll"] = {lucky=4, unlucky=8, bonus="Pet Attack"},
    ["Samurai Roll"] = {lucky=2, unlucky=6, bonus="Store TP"},
    ["Evoker's Roll"] = {lucky=5, unlucky=9, bonus="Refresh"},
    ["Rogue's Roll"] = {lucky=5, unlucky=9, bonus="Critical Hit Rate"},
    ["Warlock's Roll"] = {lucky=4, unlucky=8, bonus="Magic Accuracy"},
    ["Fighter's Roll"] = {lucky=5, unlucky=9, bonus="Double Attack Rate"},
    ["Drachen Roll"] = {lucky=3, unlucky=7, bonus="Pet Accuracy"},
    ["Gallant's Roll"] = {lucky=3, unlucky=7, bonus="Defense"},
    ["Wizard's Roll"] = {lucky=5, unlucky=9, bonus="Magic Attack"},
    ["Dancer's Roll"] = {lucky=3, unlucky=7, bonus="Regen"},
    ["Scholar's Roll"] = {lucky=2, unlucky=6, bonus="Conserve MP"},
    ["Bolter's Roll"] = {lucky=3, unlucky=9, bonus="Movement Speed"},
    ["Caster's Roll"] = {lucky=2, unlucky=7, bonus="Fast Cast"},
    ["Courser's Roll"] = {lucky=3, unlucky=9, bonus="Snapshot"},
    ["Blitzer's Roll"] = {lucky=4, unlucky=9, bonus="Attack Delay"},
    ["Tactician's Roll"] = {lucky=5, unlucky=8, bonus="Regain"},
    ["Allies's Roll"] = {lucky=3, unlucky=10, bonus="Skillchain Damage"},
    ["Miser's Roll"] = {lucky=5, unlucky=7, bonus="Save TP"},
    ["Companion's Roll"] = {lucky=2, unlucky=10, bonus="Pet Regain and Regen"},
    ["Avenger's Roll"] = {lucky=4, unlucky=8, bonus="Counter Rate"},
    }
    end

    function display_roll_info(spell)
    rollinfo = rolls[spell.english]
    local rollsize = (state.LuzafRing.value and 'Large') or 'Small'

    if rollinfo then
    add_to_chat(104, spell.english..' provides a bonus to '..rollinfo.bonus..'. Roll size: '..rollsize)
    add_to_chat(104, 'Lucky roll is '..tostring(rollinfo.lucky)..', Unlucky roll is '..tostring(rollinfo.unlucky)..'.')
    end
    end


    -- Determine whether we have sufficient ammo for the action being attempted.
    function do_bullet_checks(spell, spellMap, eventArgs)
    local bullet_name
    local bullet_min_count = 1

    if spell.type == 'WeaponSkill' then
    if spell.skill == "Marksmanship" then
    if spell.element == 'None' then
    -- physical weaponskills
    bullet_name = gear.WSbullet
    else
    -- magical weaponskills
    bullet_name = gear.MAbullet
    end
    else
    -- Ignore non-ranged weaponskills
    return
    end
    elseif spell.type == 'CorsairShot' then
    bullet_name = gear.QDbullet
    elseif spell.action_type == 'Ranged Attack' then
    bullet_name = gear.RAbullet
    if buffactive['Triple Shot'] then
    bullet_min_count = 3
    end
    end

    local available_bullets = player.inventory[bullet_name] or player.wardrobe[bullet_name]

    -- If no ammo is available, give appropriate warning and end.
    if not available_bullets then
    if spell.type == 'CorsairShot' and player.equipment.ammo ~= 'empty' then
    add_to_chat(104, 'No Quick Draw ammo left. Using what\'s currently equipped ('..player.equipment.ammo..').')
    return
    elseif spell.type == 'WeaponSkill' and player.equipment.ammo == gear.RAbullet then
    add_to_chat(104, 'No weaponskill ammo left. Using what\'s currently equipped (standard ranged bullets: '..player.equipment.ammo..').')
    return
    else
    add_to_chat(104, 'No ammo ('..tostring(bullet_name)..') available for that action.')
    eventArgs.cancel = true
    return
    end
    end

    -- Don't allow shooting or weaponskilling with ammo reserved for quick draw.
    if spell.type ~= 'CorsairShot' and bullet_name == gear.QDbullet and available_bullets.count <= bullet_min_count then
    add_to_chat(104, 'No ammo will be left for Quick Draw. Cancelling.')
    eventArgs.cancel = true
    return
    end

    -- Low ammo warning.
    if spell.type ~= 'CorsairShot' and state.warned.value == false
    and available_bullets.count > 1 and available_bullets.count <= options.ammo_warning_limit then
    local msg = '***** LOW AMMO WARNING: '..bullet_name..' *****'
    --local border = string.repeat("*", #msg)
    local border = ""
    for i = 1, #msg do
    border = border .. "*"
    end

    add_to_chat(104, border)
    add_to_chat(104, border)
    add_to_chat(104, msg)
    add_to_chat(104, border)

    state.warned:set()
    elseif available_bullets.count > options.ammo_warning_limit and state.warned then
    state.warned:reset()
    end
    end



    function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == 'empty' then
    state.CombatForm:reset()
    else
    state.CombatForm:set('DW')
    end
    end

    -- Select default macro book on initial load or subjob change.
    function select_default_macro_book()
    set_macro_page(1, 17)
    end


  19. #339
    Banned.

    Join Date
    Sep 2019
    Posts
    2
    BG Level
    0

    Gearswap Help Thread 2 this time it makes sense

    My friend have got an email that he has won the lottery of Indian rupees one crore from Microsoft/MSN lottery & they have ask for the bank account number . Is this a scam?

  20. #340

    Quote Originally Posted by RaulGot View Post
    My friend have got an email that he has won the lottery of Indian rupees one crore from Microsoft/MSN lottery & they have ask for the bank account number . Is this a scam?
    why would you ask here

    but yes it is
    1.Microsoft/MSN is a us company so they would use USD (U.S. Dollars)
    2.Microsoft/MSN does not do this kind of contest

Quick Reply Quick Reply

  • Decrease Size
    Increase Size
  • Remove Text Formatting
  • Insert Link Insert Image Insert Video
  • Wrap [QUOTE] tags around selected text
  • Insert NSFW Tag
  • Insert Spoiler Tag

Similar Threads

  1. Gearswap Help Thread!
    By JSHidaka in forum FFXI: Everything
    Replies: 6035
    Last Post: 2018-05-06, 17:15
  2. Randomerest Question Thread III: This Time It's Random
    By isladar in forum FFXI: Everything
    Replies: 868
    Last Post: 2009-08-18, 12:03