Item Search
     
BG-Wiki Search
Closed Thread
Page 261 of 302 FirstFirst ... 211 251 259 260 261 262 263 271 ... LastLast
Results 5201 to 5220 of 6036

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

  1. #5201

    Quote Originally Posted by Nitefall View Post
    I've been on a break since well since spellcast still worked and am in the process of changing all my old spellcast xml's into lua's for GS...

    Anyway I started off with MNK and I'm using Kinematics mnk lua and just replacing my gear where it goes, hopefully this works, but I came across some things in my SC xml that I was wondering if they could be used with the new GS set up.

    I searched this thread, google and ffxiah and couldn't come up with anything.
    Basically this part of the script when I hit a macro for cure V it would activate this part of the script and write a counter into the chat and boost me t0 12x.
    who knows this may be useless now but just curious


    ...
    yes that can be done

    will it be easy - no
    will i do it for you - no(i dont use or need anything like it)
    will i help if you get stuck - sure i see no reason why i should not

    here is a first push
    if you try to use cure 4 when neither of your jobs is WHM or if your WHM is incapable(i believe, i cant remember off-hand) of casting cure 4 it will get sent to filtered_action

  2. #5202
    Smells like Onions
    Join Date
    May 2016
    Posts
    3
    BG Level
    0

    The cure V macro was just the activation, when that script was running,which was loaded when I switched to mnk, and it saw my mnk try to cast cure5 it would know to run that part of the script. I'm sure you're aware of this but just getting to the point that it would have to have some kind of activator?
    I'm am back to being a complete noob after having made about a dozen spellcast scripts for indivdual jobs so this is going to take me a bit to get back in the swing...
    If you want I can post the whole xml to github, might make it easier?

    Edit: separate question i came across while looking through macros
    My macros with spellcast used to be set up like "/console berzerk" and the game would know to use berzerk but it no longer works. How do i configure my macros to work like they did?

  3. #5203

    Quote Originally Posted by Nitefall View Post
    The cure V macro was just the activation, when that script was running,which was loaded when I switched to mnk, and it saw my mnk try to cast cure5 it would know to run that part of the script. I'm sure you're aware of this but just getting to the point that it would have to have some kind of activator?
    I'm am back to being a complete noob after having made about a dozen spellcast scripts for indivdual jobs so this is going to take me a bit to get back in the swing...
    If you want I can post the whole xml to github, might make it easier?
    you can also use gearswap's built in command system

    Quote Originally Posted by Nitefall View Post
    Edit: separate question i came across while looking through macros
    My macros with spellcast used to be set up like "/console berzerk" and the game would know to use berzerk but it no longer works. How do i configure my macros to work like they did?
    use shortcuts

  4. #5204
    New Spam Forum
    Join Date
    Sep 2007
    Posts
    192
    BG Level
    3
    FFXI Server
    Asura

    I set up two LUA's in the last few months using some pre-scripted LUA's and for some reason they just aren't working right. BLU and BLM. The BLU switched into some idle gear but not all, for instance, and doesn't switch to TP gear at all. I haven't tested the BLM one much, but it had trouble with idle gear immediately when I tested it. The rest of my LUA's work fine, but they're all older.

    The pastebins:
    BLU: http://pastebin.com/bSEXWG1w
    BLM: http://pastebin.com/vD4ezvZK

    Thanks for any help.

    Oh! Oh! Oh! Also, this is not necessarily gearswap related (but might be), but: My macro books change to the wrong fucking books every time I change jobs/subjobs. I'm positive I have them in the right order in my script. What the hell? This happens with all my scripts, even the ones that otherwise work.

  5. #5205
    Hydra
    Join Date
    Feb 2014
    Posts
    131
    BG Level
    3
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by crux View Post
    I set up two LUA's in the last few months using some pre-scripted LUA's and for some reason they just aren't working right. BLU and BLM. The BLU switched into some idle gear but not all, for instance, and doesn't switch to TP gear at all. I haven't tested the BLM one much, but it had trouble with idle gear immediately when I tested it. The rest of my LUA's work fine, but they're all older.

    The pastebins:
    BLU: http://pastebin.com/bSEXWG1w
    BLM: http://pastebin.com/vD4ezvZK

    Thanks for any help.

    Oh! Oh! Oh! Also, this is not necessarily gearswap related (but might be), but: My macro books change to the wrong fucking books every time I change jobs/subjobs. I'm positive I have them in the right order in my script. What the hell? This happens with all my scripts, even the ones that otherwise work.
    The reason your gear isn't swapping in BLU.lua, is due to the way this lua has update_combat_form() setup, combined with the fact that you have sets.engaged.DW assigned as an empty gearset.

    To simplify this problem: your lua thinks sets.engaged is for single wielding only. If you dual wield, it will use sets.engaged.DW, which has no gear assigned.

    This is a common rule that people often place in their GEO.lua, RNG.lua, or COR.lua. Basically, some job that uses shields more often than they dual-wield. (not BLU)

    If you NEVER single wield, and don't care about having a custom set for it, then I would just delete update_combat_form() in both (2) places it's called. delete it from user_setup() and job_update(). You can also delete the function itself, which is near the end of your lua, but it's not necessary if you remove the 2 spots it's being called.

    Or, if you want a custom set for when you single wield, replace your function with this one, and change any sets that reference "DW" to "SW".

    Code:
    function update_combat_form()
        -- Check for H2H or single-wielding
        if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
            state.CombatForm:set('SW')
        else
            state.CombatForm:reset()
        end
    end

    I also recommend validating your sets, and correcting any errors it mentions.
    Code:
    //gs validate
    For example, there's a typo in your White Wind + Healingset that it should alert you about.
    Code:
        sets.midcast['Blue Magic']['White Wind'] = {
            ear1="Telchine Pigaches",
    Also, set names are case sensitive, so this line is incorrect. (should be Acc)
    Code:
        sets.precast.WS.acc = set_combine(sets.precast.WS, {})
    If you look at the very bottom of your lua, you'll find select_default_macro_book(). It's going to use book 7, page 2 by default, so change that to whatever you want.

  6. #5206

    Hello,

    I am trying to get a notifier functioning for geo luopan death/expirations and I could really use some assistance. I got the following code for my geo.lua but it isn't functioning ingame during a pet loss. Can anyone tell me why and what I should change?

    Code:
    --- ..:: Pet Status change ::.. ---
    function pet_change(pet,gain_or_loss)
    status_change(player.status)
    if not gain_or_loss then
    add_to_chat(123,'Your luopan has vanished.')
    windower.play_sound('C:\\Users\\Shirley\\Documents\\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wav')
    end
    end
    Here is my entire geo.lua. It's a mote based job.lua - does this have something to do with why it doesn't work? I don't think the person who gave me that code uses mote's files.
    Spoiler: show
    -----------------------------------------------------3--------------------------------------------------------------
    -- Initialization function that defines sets and variables to be used.
    -------------------------------------------------------------------------------------------------------------------
    -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.

    -- CTRL Numpad Binds --
    send_command('bind ^%numpad4 input /ma "Aquaveil" <me>')
    send_command('bind ^%numpad5 input /ma "Stoneskin" <me>')
    send_command('bind ^%numpad6 input /ma "Blink" <me>')

    -- Windows Keybinds --

    -- Itemizer Addon --
    -- Sack --
    send_command('input //get "Solstice" sack')
    send_command('input //get "Tamaxchi" sack')
    send_command('input //get "Dunna" sack')
    send_command('input //get "Culminus" sack')
    send_command('input //get "Sors shield" sack')
    send_command('input //get "Merlinic hood" sack')
    send_command('input //get "Azimuth hood +1" sack')
    send_command('input //get "Vanya hood" sack')
    send_command('input //get "Bagua tunic +1" sack')
    send_command('input //get "Merlinic dastanas" sack')
    send_command('input //get "Bagua mitaines +1" sack')
    send_command('input //get "Vanya cuffs" sack')
    send_command('input //get "Geomancy mitaines" sack')
    send_command('input //get "Merlinic shalwar" sack')
    send_command('input //get "Geo. pants +1" sack')
    send_command('input //get "Bagua sandals" sack')
    send_command('input //get "Geo. sandals +1" sack')
    send_command('input //get "Vanya clogs" sack')
    send_command('input //get "Mizu. kubikazari" sack')
    send_command('input //get "Sekhmet corset" sack')
    send_command('input //get "Pythia sash" sack')
    send_command('input //get "Tempered cape +1" sack')
    send_command('input //get "Seshaw cape" sack')
    send_command('input //get "Toro cape" sack')
    send_command('input //get "Lifestream cape" sack')
    send_command('input //get "Barkaro. earring" sack')
    send_command('input //get "Novia earring" sack')
    send_command('input //get "Static earring" sack')
    send_command('input //get "Evanescence ring" sack')
    -- Case --
    send_command('input //get "Grapevine cape" case')
    -- Lockstyle --
    send_command('input /lockstyleset 79')
    -- </itemizer> --

    -- Initialization function for this job file.
    function get_sets()
    -- Load and initialize the include file.
    include('Mote-Include.lua')
    end

    -- Setup vars that are user-independent.
    function job_setup()

    end

    -- Setup vars that are user-dependent. Can override this function in a sidecar file.
    function user_setup()
    -- Options: Override default values
    options.OffenseModes = {'None','Normal'}
    options.DefenseModes = {'Normal'}
    options.WeaponskillModes = {'Normal'}
    options.IdleModes = {'Normal', 'PDT'}
    options.RestingModes = {'Normal'}
    options.CastingModes = {'Normal','Resistant','MagicBurst'}
    options.PhysicalDefenseModes = {'PDT'}
    options.MagicalDefenseModes = {'MDT'}

    state.Defense.PhysicalMode = 'PDT'

    -- Default macro set/book
    set_macro_page(1, 18)
    end

    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    if binds_on_unload then
    binds_on_unload()
    end
    -- Itemizer Addon --
    -- Sack --
    send_command('input //put "Solstice" sack')
    send_command('input //put "Tamaxchi" sack')
    send_command('input //put "Dunna" sack')
    send_command('input //put "Culminus" sack')
    send_command('input //put "Sors shield" sack')
    send_command('input //put "Merlinic hood" sack')
    send_command('input //put "Azimuth hood +1" sack')
    send_command('input //put "Vanya hood" sack')
    send_command('input //put "Bagua tunic +1" sack')
    send_command('input //put "Merlinic dastanas" sack')
    send_command('input //put "Bagua mitaines +1" sack')
    send_command('input //put "Vanya cuffs" sack')
    send_command('input //put "Geomancy mitaines" sack')
    send_command('input //put "Merlinic shalwar" sack')
    send_command('input //put "Geo. pants +1" sack')
    send_command('input //put "Bagua sandals" sack')
    send_command('input //put "Geo. sandals +1" sack')
    send_command('input //put "Vanya clogs" sack')
    send_command('input //put "Mizu. kubikazari" sack')
    send_command('input //put "Sekhmet corset" sack')
    send_command('input //put "Pythia sash" sack')
    send_command('input //put "Tempered cape +1" sack')
    send_command('input //put "Seshaw cape" sack')
    send_command('input //put "Toro cape" sack')
    send_command('input //put "Lifestream cape" sack')
    send_command('input //put "Barkaro. earring" sack')
    send_command('input //put "Novia earring" sack')
    send_command('input //put "Static earring" sack')
    send_command('input //put "Evanescence ring" sack')
    -- Case --
    send_command('input //put "Grapevine cape" case')
    end

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

    --~~// Augments Shop \\~~--
    --Fast Cast--
    MerlHeadFC = { name="Merlinic Hood", augments={'"Fast Cast"+6','CHR+10','Mag. Acc.+6','"Mag.Atk.Bns."+3',}}
    MerlHandFC = { name="Merlinic Dastanas", augments={'"Fast Cast"+6','INT+7','Mag. Acc.+4','"Mag.Atk.Bns."+3',}}
    MerlFeetFC = { name="Merlinic Crackows", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','"Fast Cast"+5','INT+4','Mag. Acc.+3','"Mag.Atk.Bns."+11',}}
    --Magic Burst--
    MerlHeadMB = { name="Merlinic Hood", augments={'"Mag.Atk.Bns."+29','Magic burst mdg.+9%','INT+10','Mag. Acc.+5',}}
    MerlLegsMB = { name="Merlinic Shalwar", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Magic Damage +6','INT+15','"Mag.Atk.Bns."+14',}}
    MerlFeetMB = { name="Merlinic Crackows", augments={'Mag. Acc.+8 "Mag.Atk.Bns."+8','Magic burst mdg.+10%',}}
    --Drain/Aspir--
    MerlHandDA = { name="Merlinic Dastanas", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Drain" and "Aspir" potency +8','MND+1','"Mag.Atk.Bns."+13',}}
    MerlLegsDA = { name="Merlinic Shalwar", augments={'"Drain" and "Aspir" potency +9','CHR+6','"Mag.Atk.Bns."+13',}}
    MerlFeetDA = { name="Merlinic Crackows", augments={'Mag. Acc.+21','"Drain" and "Aspir" potency +9','STR+4','"Mag.Atk.Bns."+8',}}

    -- Miscellaneous --
    sets.warpring = {ring2="Warp ring"}

    -- Precast Sets
    -- Precast sets to enhance JAs

    sets.precast.JA['Bolster'] = {body="Bagua Tunic +1"}
    sets.precast.JA['Life Cycle'] = {body="Geo. Tunic +1"}
    sets.precast.JA['Mending Halation'] = {legs="Bagua Pants"}
    sets.precast.JA['Full Circle'] = {head="azimuth hood +1",hands="Bagua Mitaines +1"}
    sets.precast.JA['Radial Arcana'] = {feet="Bagua Sandals"}

    -- Fast cast sets for spells
    sets.precast.FC = {range="Dunna", --78 fc--
    head=MerlHeadFC,neck="Orunmila's torque",ear1="Enchanter earring +1",ear2="Loquacious Earring",
    body="Anhur robe",hands=MerlHandFC,ring1="Weatherspoon ring",ring2="Prolix Ring",
    back="Lifestream cape",waist="Witful belt",legs="geo. Pants +1",feet=MerlFeetFC}

    sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {
    neck="Nodens gorget",})

    sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {})

    sets.precast.FC.Impact = set_combine(sets.precast.FC, {ammo="Impatiens",head=empty,body="Twilight Cloak"})

    sets.precast.FC.Cure = {main="Malevolence",sub="Chanter's shield",range="Dunna",
    head="Amalric coif",neck="Orunmila's torque",ear1="Enchanter earring +1",ear2="Loquacious Earring",
    body="Anhur robe",hands="Merlinic dastanas",ring1="Weatherspoon ring",ring2="Prolix Ring",
    back="Lifestream cape",waist="Witful belt",legs="geo. Pants +1",feet="Merlinic crackows"}

    sets.precast['Elemental Magic'] = {range="Dunna", --83 fc--
    head=MerlHeadFC,neck="Orunmila's torque",ear1="Enchanter earring +1",ear2="Loquacious Earring",
    body="Anhur robe",hands="Bagua mitaines",ring1="Weatherspoon ring",ring2="Prolix Ring",
    back="Lifestream cape",waist="Witful belt",legs="geo. Pants +1",feet=MerlFeetFC}

    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.

    sets.precast.WS = {}

    sets.precast.WS['Flash Nova'] = {}

    sets.precast.WS['Starlight'] = {}

    sets.precast.WS['Moonlight'] = {}

    -- Midcast Sets

    gear.default.obi_waist = "Eschan stone"

    sets.midcast.FastRecast = {main="Malevolence",sub="Chanter's shield",range="Dunna",
    head="Amalric coif",neck="Orunmila's torque",ear1="Enchanter earring +1",ear2="Loquacious Earring",
    body="Anhur robe",hands="Telchine gloves",ring1="Weatherspoon ring",ring2="Prolix Ring",
    back="Lifestream cape",waist="Witful belt",legs="geo. Pants +1",feet="Merlinic crackows"}

    sets.midcast.Geomancy = {main="Solstice",range="Dunna",head="azimuth hood +1",body="Bagua Tunic +1",hands="Geomancy Mitaines",back="Lifestream Cape",}

    sets.midcast.Cure = {main="Tamaxchi",sub="Sors shield",ammo="Esper stone +1",
    head="Vanya hood",neck="Incanter's torque",ear1="Mendi. earring",ear2="Novia earring",
    body="Vanya robe",hands="Vanya cuffs",ring1="Kuchekula ring",ring2="Sirona's ring",
    back="Tempered cape +1",waist="Pythia sash",legs="Vanya slops",feet="Vanya clogs"}

    sets.midcast['Elemental Magic'] = {main="Solstice",sub="Culminus",ammo="Ghastly tathlum",
    head="Amalric coif",neck="Eddy necklace",ear1="Barkarole earring",ear2="Friomisi earring",
    body="Witching robe",hands="Amalric gages",ring1="Shiva ring +1",ring2="Shiva ring +1",
    back="Seshaw cape",waist=gear.ElementalObi,legs="Vanya slops",feet="Vanya clogs"}

    sets.midcast['Elemental Magic'].Resistant = {main="Solstice",sub="Culminus",ammo="Ghastly tathlum",
    head=MerlHeadMB,neck="Eddy necklace",ear1="Barkarole earring",ear2="friomisi Earring",
    body="Merlinic jubbah",hands="Amalric gages",ring1="Shiva ring +1",ring2="Shiva ring +1",
    back="Toro cape",waist=gear.ElementalObi,legs=MerlLegsMB,feet =MerlFeetFC}

    sets.midcast['Elemental Magic'].MagicBurst = {main="Solstice",sub="Culminus",ammo="Ghastly tathlum",
    head=MerlHeadMB,neck="Mizu. kubikazari",ear1="Barkaro. earring",ear2="Friomisi earring",
    body="Merlinic jubbah",hands="Amalric gages",ring1="Shiva ring +1",ring2="Shiva ring +1",
    back="Seshaw cape",waist=gear.ElementalObi,legs="Merlinic shalwar",feet=MerlFeetMB}

    sets.midcast['Stoneskin'] = {neck="Nodens gorget",}

    sets.midcast['Aquaveil'] = {head="Amalric coif"}

    sets.midcast['Refresh'] = {head="Amalric coif",body="Telchine chas.",legs="Telchine braconi",feet="Telchine Pigaches",back="Grapevine cape"}

    sets.midcast['Haste'] = {head="Telchine cap",body="Telchine chas.",legs="Telchine braconi",feet="Telchine Pigaches"}

    sets.midcast.Stun = set_combine(sets.midcast.FastRecast, {})

    sets.midcast['Dark Magic'] = {main="Solstice",ammo="Hydrocera",
    head="Pixie hairpin +1",neck="Incanter's torque",ear1="Barkarole earring",ear2="Gwati earring",
    body="Amalric doublet",hands=MerlHandDA,ring1="Archon ring",ring2="Evanescence ring",
    back="Toro cape",waist="fucho-no-obi",legs=MerlLegsDA,feet=MerlFeetDA}

    sets.midcast['Enfeebling Magic'] = {main="Solstice",ammo="Hydrocera",
    head="Amalric coif",neck="Incanter's torque",ear1="Barkarole earring",ear2="Gwati earring",
    body="Amalric doublet",hands="Amalric gages",ring1="Weather. ring",ring2="Sangoma ring",
    back="Lifestream cape",waist="Eschan stone",legs="Psycloth lappas",feet="Amalric nails"}

    sets.midcast['Enhancing Magic'] = {
    head="Telchine cap",neck="Incanter's torque",
    body="Telchine chas.",hands="Telchine gloves",
    legs="Telchine braconi",feet="Telchine pigaches"}

    sets.midcast.EnhancingDuration = {head="Telchine cap",body="Telchine chas.",legs="Telchine braconi",feet="Telchine Pigaches"}

    sets.midcast.Protectra = {}
    sets.midcast.Shellra = {}

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

    sets.resting = {}

    -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)

    sets.idle = {main="bolelabunga",sub="Genbu's Shield",range="Dunna",
    head="Befouled crown",neck="Loricate torque +1",ear1="Barkarole earring",ear2="Moonshade earring",
    body="Witching robe",hands="Bagua Mitaines +1",ring1="Gelatinous ring +1",ring2="Defending ring",
    back="Umbra cape",waist="Fucho-no-obi",legs="assiduity pants +1",feet="Geomancy sandals +1"}

    sets.idle.Town = set_combine(sets.idle, {body="Councilor's garb"})

    sets.idle.PDT = {main="bolelabunga",sub="Genbu's Shield",range="Dunna",
    head="Hagondes hat +1",neck="Loricate torque +1",ear1="Barkarole earring",ear2="Moonshade earring",
    body="Witching robe",hands="Hagondes cuffs +1",ring1="Gelatinous ring +1",ring2="Defending ring",
    back="Umbra cape",waist="Fucho-no-obi",legs="Assiduity pants +1",feet="Hag. sabots +1"}

    sets.Kiting = {feet="Herald's Gaiters"}

    -- Defense sets

    sets.defense.PDT = set_combine(sets.idle, {body="Councilor's garb"})

    sets.defense.MDT = set_combine(sets.idle, {body="Councilor's garb"})

    -- 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 = {}
    end

    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks that are called to process player actions at specific points in time.
    -------------------------------------------------------------------------------------------------------------------
    -- 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)

    end
    -- Run after the general precast() is done.
    function job_post_precast(spell, action, spellMap, eventArgs)

    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.action_type == 'Magic' then
    -- Default base equipment layer of fast recast.
    equip(sets.midcast.FastRecast)
    end
    end
    -- Run after the general midcast() is done.
    function job_post_midcast(spell, action, spellMap, eventArgs)

    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)

    end

    -------------------------------------------------------------------------------------------------------------------
    -- Customization hooks for idle and melee sets, after they've been automatically constructed.
    -------------------------------------------------------------------------------------------------------------------
    function customize_idle_set(idleSet)
    return idleSet
    end
    function customize_melee_set(meleeSet)
    return meleeSet
    end

    -------------------------------------------------------------------------------------------------------------------
    -- General hooks for other events.
    -------------------------------------------------------------------------------------------------------------------
    -- Called when the player's status changes.
    function job_status_change(newStatus,oldStatus)

    end
    -- 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)
    --handle_equipping_gear(player.status)
    end

    function job_state_change(stateField, newValue, oldValue)
    if stateField == 'OffenseMode' then
    if newValue == 'Normal' then
    disable('main','sub')
    else
    enable('main','sub')
    end
    elseif stateField == 'Reset' then
    if state.OffenseMode == 'None' then
    enable('main','sub')
    end
    end
    end

    --- ..:: Pet Status change ::.. ---
    function pet_change(pet,gain_or_loss)
    status_change(player.status)
    if not gain_or_loss then
    add_to_chat(123,'Your luopan has vanished.')
    windower.play_sound('C:\\Users\\Shirley\\Documents \\Windower4\\addons\\GearSwap\\data\\wav\\Chime.wa v')
    end
    end

    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------
    -- Called for custom player commands.
    function job_self_command(cmdParams, eventArgs)

    end
    -- Called by the 'update' self-command.
    function job_update(cmdParams, eventArgs)

    end
    -- Function to display the current relevant user state when doing an update.
    -- Return true if display was handled, and you don't want the default info shown.
    function display_current_job_state()
    end

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


    Thanks!

  7. #5207

    Quote Originally Posted by Roland_J View Post
    Hello,

    I am trying to get a notifier functioning for geo luopan death/expirations and I could really use some assistance. I got the following code for my geo.lua but it isn't functioning ingame during a pet loss. Can anyone tell me why and what I should change?
    ...

    Thanks!
    motes include uses alot of the gearswap functions
    if you want to see what functions motes include uses checl gearswap/libs/Mote-Include.lua to see what it uses and what it does not
    if it does just put job_ infront of the name
    like job_pet_change(pet, gain, eventArgs)

  8. #5208

    Quote Originally Posted by dlsmd View Post
    motes include uses alot of the gearswap functions
    if you want to see what functions motes include uses checl gearswap/libs/Mote-Include.lua to see what it uses and what it does not
    if it does just put job_ infront of the name
    like job_pet_change(pet, gain, eventArgs)
    I heart you Dlsmd It works! There is so much for me to learn about mote's code structure and how it affects existing gearswap code ; ; I still can't create my own custom commands, for instance. My blu.lua, non-mote, has 'function self_command(command)' and a few functions but that doesn't work with mote. Mote has so many curveball variables thrown in that I don't understand their function and so it limits what I can figure out. I'll list them here.

    --#--s added for the example
    Code:
    -- Called for direct player commands.
    function job_self_command(--1--cmdParams, --2--eventArgs)
        if --3--cmdParams[1]:lower() == 'scholar' then
            handle_strategems(cmdParams)
            eventArgs.handled = true
        end
    end
    Referring to the --#s--
    1) Why is this included? My blu.lua has (command) after self_command. Why is this (#1) needed? If I learn this then I can remove it where it's not necessary and add it where it is necessary. I can do neither at the moment.
    2) Same as #1.
    3) What on earth is cmdParams[1]? Do I have to have 'if cmdParams[1]' in every self command listed?

    Furthermore, even my test fails.
    Code:
    function job_self_command(command)
    if command == 'TEST' then
       add_to_chat(123,'Testing... 1, 2, 3...')
      end
    end
    typing //gs c TEST has no result ingame. I wish this was easier to figure out D:

  9. #5209

    Quote Originally Posted by Roland_J View Post
    Code:
    -- Called for direct player commands.
    function job_self_command(--1--cmdParams, --2--eventArgs)
        if --3--cmdParams[1]:lower() == 'scholar' then
            handle_strategems(cmdParams)
            eventArgs.handled = true
        end
    end
    Referring to the --#s--
    1) Why is this included? My blu.lua has (command) after self_command. Why is this (#1) needed? If I learn this then I can remove it where it's not necessary and add it where it is necessary. I can do neither at the moment.
    2) Same as #1.
    3) What on earth is cmdParams[1]? Do I have to have 'if cmdParams[1]' in every self command listed?
    1. motes include allows you to do multi tiered commands
    example: "gs c run test"
    this would allow you to do this
    if cmdParams[1] == "run" then
    if cmdParams[2] == "test" then
    --do somthing
    elseif cmdParams[2] == "code"
    --do somthing
    end
    elseif cmdParams[1] == "stop" then
    if cmdParams[2] == "test" then
    --do somthing
    elseif cmdParams[2] == "code"
    --do somthing
    end
    end

    2. i have no clue(i dont use motes include)

    3. because mots include splits all commands in to a table you check each level of the commands with cmdParams[a] where a is the level of the command
    and yes motes includes requires this

    even if you want to do this
    Code:
    function job_self_command(command)
      if command == 'TEST' then
        add_to_chat(123,'Testing... 1, 2, 3...')
      end
    end
    you would still need to do it like this
    Code:
    function job_self_command(command)
      if command[1] == 'TEST' then
        add_to_chat(123,'Testing... 1, 2, 3...')
       end
    end

  10. #5210
    Custom Title
    Join Date
    Nov 2008
    Posts
    1,066
    BG Level
    6
    FFXI Server
    Diabolos

    I once called Mote's includes "Masturbatory". Seems like half of all Gearswap questions are still Mote quirks (here and on reddit). They need a warning label of some kind.

  11. #5211
    Cerberus
    Join Date
    Feb 2009
    Posts
    484
    BG Level
    4
    FFXI Server
    Asura

    So I recently came back to healing full time and I've been trying to adopt the light weather with Chatoyant/Obi/Twilight Cape to my WHM. For some reason, my gearswap refuses to equip *any* of those items while light weather is up. Using Kinematics' gearswap as a template.

    Code:
    -------------------------------------------------------------------------------------------------------------------
    -- Setup functions for this job.  Generally should not be modified.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Initialization function for this job file.
    function get_sets()
    	-- 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()
    	state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
    	state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
    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()
    	-- Options: Override default values
    	options.OffenseModes = {'None', 'Normal'}
    	options.DefenseModes = {'Normal'}
    	options.WeaponskillModes = {'Normal'}
    	options.CastingModes = {'Normal', 'Resistant', 'Dire'}
    	options.IdleModes = {'Normal', 'PDT'}
    	options.RestingModes = {'Normal'}
    	options.PhysicalDefenseModes = {'PDT'}
    	options.MagicalDefenseModes = {'MDT'}
    	
    	state.Defense.PhysicalMode = 'PDT'
    	state.OffenseMode = 'None'
    
    	select_default_macro_book()
    	global_on_unload()
    	    send_command('bind f11 game_forceambientlight')
        send_command('bind f12 showfps')
    end
    
    -- Define sets and vars used by this job file.
    function init_gear_sets()
    	--------------------------------------
    	-- Start defining the sets
    	--------------------------------------
    
    	-- Precast Sets
    
    	-- Fast cast sets for spells
    	sets.precast.FC = {ammo="Incantor Stone",
    		head="Nares Cap",neck="Orison Locket",ear2="Loquacious Earring",
    		body="Helios Jacket",hands="Gendewitha Gages",ring1="Prolix Ring",
    		back="Alaunus's Cape",waist="Witful Belt",legs="Orvail Pants",feet="Chelona Boots"}
    		
    	sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
    
    	sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat",neck="Stone Gorget",
    		hands="Carapacho Cuffs",})
    
    	sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Ebers Pantaloons"})
    
    	sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
    
    	sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {main="Tamaxchi",sub="Sors Shield",
    		head="Piety Cap",feet="Cure Clogs",ring2="Prolix Ring",ear1="Nourish. Earring",ear2="Loquacious Earring",back="Pahtli Cape"})
    
    	sets.precast.FC.Curaga = sets.precast.FC.Cure
    	
    	-- Precast sets to enhance JAs
    	sets.precast.JA.Benediction = {body="Piety Briault"}
    	sets.precast.JA.Martyr = {feet="Piety Duckbills"}
    	sets.precast.JA.Devotion = {head="Piety Cap"}
    	
    
    	
    	
    	-- Midcast Sets
    	
    	sets.midcast.FastRecast = {
    		head="Nahtirah Hat",ear2="Loquacious Earring",
    		body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Prolix Ring",
    		back="Alaunus's Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
    	-- Cure sets
    	gear.default.obi_waist = "Pythia Sash +1"
    	gear.default.obi_back = "Orison Cape"
    
    	sets.midcast.CureSolace = {main="Tamaxchi",sub="Sors Shield",ammo="Incantor Stone",
    		head="Vanya Hood",neck="Fylgja Torque",ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Ebers Bliaud",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		back=gear.ElementalCape,waist=gear.ElementalObi,legs="Ebers Pantaloons",feet="Vanya Clogs"}
    
    	sets.midcast.Cure = {main="Tamaxchi",sub="Sors Shield",ammo="Incantor Stone",
    		head="Vanya Hood",neck="Fylgja Torque",ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Ebers Bliaud",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		back=gear.ElementalCape,waist=gear.ElementalObi,legs="Ebers Pantaloons",feet="Vanya Clogs"}
    
    	sets.midcast.Curaga = {main="Tamaxchi",sub="Sors Shield",ammo="Incantor Stone",
    		head="Vanya Hood",neck="Fylgja Torque",ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Ebers Bliaud",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		back=gear.ElementalCape,waist=gear.ElementalObi,legs="Ebers Pantaloons",feet="Vanya Clogs"}
    		
    	sets.midcast.CureWithLightWeather = {main="Chatoyant Staff",ammo="Incantor Stone",
    		head="Vanya Hood",neck="Fylgja Torque",ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Ebers Bliaud",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		back="Twilight Cape",waist="Korin Obi",legs="Ebers Pantaloons",feet="Vanya Clogs"}
            
    
    	sets.midcast.CureMelee = {ammo="Incantor Stone",
    		head="Vanya Hood",neck="Fylgja Torque",ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
    		back=gear.ElementalCape,waist=gear.ElementalObi,legs="Ebers Pantaloons",feet="Vanya Clogs"}
    
    	sets.midcast.Cursna = {main="Beneficus",sub="Genbu's Shield",
    		head="Ebers Cap",neck="Malison Medallion", ear1="Magnetic Earring",ear2="Novia Earring",
    		body="Ebers Bliaud",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Ephedra Ring",
    		back="Alaunus's Cape",waist="Cetl Belt",legs="Theophany Pantaloons +1",feet="Vanya Clogs"}
    
    	sets.midcast.StatusRemoval = {
    		head="Ebers Cap",legs="Ebers Pantaloons"}
    
    	-- 110 total Enhancing Magic Skill; caps even without Light Arts
    	sets.midcast['Enhancing Magic'] = {main="Beneficus",sub="Genbu's Shield",
    		head="Nares Cap",neck="Incanter's Torque",
    		body="Goliard Saio",hands="Augur's Gloves",
    		back="Mending Cape",waist="Siegel Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
    
    	sets.midcast.Stoneskin = {
    		head="Nahtirah Hat",neck="Stone Gorget",ear2="Loquacious Earring",
    		body="Vanir Cotehardie",hands="Dynasty Mitts",
    		back="Swith Cape +1",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    	sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Orison Duckbills +2"}
    
    	sets.midcast.BarElement = {main="Beneficus",sub="Genbu's Shield",
    		head="Ebers Cap",neck="Incanter's Torque",
    		body="Ebers Bliaud",hands="Orison Mitts +2",
    		back="Mending Cape",waist="Olympus Sash",legs="Piety Pantaloons",feet="Orison Duckbills +2"}
    
    	sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
    		body="Piety Briault",hands="Orison Mitts +2",
    		legs="Theophany Pantaloons +1"}
    
    	sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills"}
    
    	sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons"}
    
    
    	sets.midcast['Divine Magic'] = {main="Lehbrailg +2",
    		head="Helios Band",neck="Mizu. Kubikazari",ear1="Hecate's Earring",ear2="Friomisi Earring",
    		body="Helios Jacket ",hands="Helios Gloves",ring1= "Locust Ring",ring2="Mujin Band",
    		back="Toro Cape",waist=gear.ElementalObi,legs="Theophany Pantaloons +1",feet="Helios Boots"}
    
    	sets.midcast['Dark Magic'] = {main="Lehbrailg +2",
    		head="Helios Band",neck="Incanter's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Helios Jacket",hands="Helios Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
    		back="Refraction Cape",waist="Fucho-no-Obi",legs="Bokwus Slops",feet="Helios Boots"}
    
    	-- Custom spell classes
    	sets.midcast.MndEnfeebles = {main="Lehbrailg +2", sub="Achaq Grip",
    		head="Helios Band",neck="Incanter's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Theophany Briault",hands="Piety Mitts",ring1="Aquasoul Ring",ring2="Sangoma Ring",
    		back="Refraction Cape",waist="Pythia Sash +1",legs="Bokwus Slops",feet="Uk'uxkaj Boots"}
    
    	sets.midcast.IntEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
    		head="Helios Band",neck="Incanter's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    		body="Theophany Briault",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
    		back="Refraction Cape",waist="Penitent's Rope",legs="Bokwus Slops",feet="Uk'uxkaj Boots"}
    
    	
    	-- Sets to return to when not performing an action.
    	
    	-- Resting sets
    	sets.resting = {main="Chatoyant Staff", head="Goliard Chapeau",
    		body="Gendewitha Bliaut",hands="Serpentes Cuffs",
    		waist="Austerity Belt",legs="Assid. Pants +1",feet="Chelona Boots"}
    	
    
    	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    	sets.idle = {main="Bolelabunga", sub="Genbu's Shield",ammo="Homiliary",
    		head="Ebers Cap",neck="Twilight Torque",ear1="Moonshade Earring",ear2="Loquacious Earring",
    		body="Piety Briault",hands="Serpentes Cuffs",ring1="Balrahn's Ring",ring2="Prolix Ring",
    		back="Shadow Mantle",waist="Fucho-no-Obi",legs="Assid. Pants +1",feet="Herald's Gaiters"}
    
    	
    
    	-- 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
    	
    	-- Basic set for if no TP weapon is defined.
    	sets.engaged = {
    		head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    		body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
    		back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    
    
    	-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    	sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
    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)
    	if spell.english == "Paralyna" and buffactive.Paralyzed then
    		-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
    		eventArgs.handled = true
    	end
    	
    	if spell.skill == 'Healing Magic' then
    		gear.default.obi_back = "Mending Cape"
    	else
    		gear.default.obi_back = "Orison Cape"
    	end
    end
    
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
    	-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
    	if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
    		equip(sets.buff['Divine Caress'])
    	end
    end
    
    
    function job_get_spell_map(spell, default_spell_map)
        if spell.action_type == 'Magic' then
            if default_spell_map == 'CureSolace' or default_spell_map == 'Curaga' then
                if world.weather_element == 'Light' then
                    return 'CureWithLightWeather'
    			end
    		end
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks for non-casting events.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Handle notifications of general user state change.
    function job_state_change(stateField, newValue, oldValue)
    	if stateField == 'OffenseMode' then
    		if newValue == 'Normal' then
    			disable('main','sub')
    		else
    			enable('main','sub')
    		end
    	elseif stateField == 'Reset' then
    		if state.OffenseMode == 'None' then
    			enable('main','sub')
    		end
    	end
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements standard library decisions.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Custom spell mapping.
    function job_get_spell_map(spell, default_spell_map)
    	if spell.action_type == 'Magic' then
    		if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
    			return "CureMelee"
    		elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
    			return "CureSolace"
    		elseif spell.skill == "Enfeebling Magic" then
    			if spell.type == "WhiteMagic" then
    				return "MndEnfeebles"
    			else
    				return "IntEnfeebles"
    			end
    		end
    	end
    end
    
    
    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.
    -- Return true if display was handled, and you don't want the default info shown.
    function display_current_job_state(eventArgs)
    	local defenseString = ''
    	if state.Defense.Active then
    		local defMode = state.Defense.PhysicalMode
    		if state.Defense.Type == 'Magical' then
    			defMode = state.Defense.MagicalMode
    		end
    
    		defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
    	end
    	
    	local meleeString = ''
    	if state.OffenseMode == 'Normal' then
    		meleeString = 'Melee: Weapons locked, '
    	end
    
    	add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
    		'Kiting: '..on_off_names[state.Kiting])
    
    	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()
    	-- Default macro set/book
    	set_macro_page(10, 1)
    end
    Thoughts? (gear in the sets isn't finalized yet- want to work out the kinks first)

  12. #5212

    Quote Originally Posted by dlsmd View Post
    1. motes include allows you to do multi tiered commands
    ... rest of post removed from quote
    Thank you again dlsmd!

  13. #5213
    Melee Summoner
    Join Date
    Oct 2007
    Posts
    37
    BG Level
    1
    FFXI Server
    Leviathan

    I recently put together another pair of Amalric Gages, path A, but for some reason I can't get them to equip via gearswap. I used /gs export to get their exact name and augments and copy/pasted that into my lua. Using /gs showswaps shows that the correct sets are equipping at the right times, except for the new Amalric Gages. Any thoughts on what might be happening? Also, the same issue is happening on two characters.

    EDIT: So it seems that the issue stems from setting priority. Are there some pieces of gear or some gear slots that don't play nice with that?

  14. #5214
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Gages are hands right? Do you ever equip something that doesnt allow hand slots? You could set the priority to the gages in your set and that should put them over whatever would be blockin them? Do you know how to specify priority? Im not on my ffxi pc to find out.

  15. #5215
    Melee Summoner
    Join Date
    Oct 2007
    Posts
    37
    BG Level
    1
    FFXI Server
    Leviathan

    Somehow it was setting priority that was causing the problem in one way or another. All other gear that I had set priority for was equipping correctly, just not the hands.

  16. #5216

    Quote Originally Posted by Shosei View Post
    Somehow it was setting priority that was causing the problem in one way or another. All other gear that I had set priority for was equipping correctly, just not the hands.
    the only slots that should need to be equiped in a specific order are Main/Sub and Range/Ammo

  17. #5217
    BG Content
    Join Date
    Jul 2007
    Posts
    21,136
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Unless you're combining sets that involve, like, Onca suit or something.

  18. #5218
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    yea or Robes and Headgear. Also when you do the priority thing its the highest number that gets equipped first (just in case FYI there)

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

    Is it possible to set up a cycle for going between Aegis and Ochain? Similar to the offense mode cycle. I just want to switch shield back and forth.

  20. #5220

    Quote Originally Posted by Aja View Post
    Is it possible to set up a cycle for going between Aegis and Ochain? Similar to the offense mode cycle. I just want to switch shield back and forth.
    yes you just need to know what are the rules for changing it

Similar Threads

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