Item Search
     
BG-Wiki Search
Page 101 of 302 FirstFirst ... 51 91 99 100 101 102 103 111 151 ... LastLast
Results 2001 to 2020 of 6036

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

  1. #2001
    Cerberus
    Join Date
    Jun 2010
    Posts
    461
    BG Level
    4

    Wanted to see if Anyone has wrote in creation of timers for mythic and empy Aftermath 1,2,3?

    Looking for when say aftermath 3 buff is gained with mythic an onscreen timer would count down reaming time.
    I know I saw someone with it coded in few months ago but I cant recall where.
    Tried to figure it out on my own but unclear on the best way to handle the creation and since empy and mythic aftermath times are different if there was a universal rule that would cover either.
    Any help would be welcomed.
    Thank you.

  2. #2002
    So hard we fuck rocks
    Join Date
    Jan 2009
    Posts
    3,043
    BG Level
    7
    FFXI Server
    Sylph

    https://github.com/ShepardG/FFXI-Gearswap

    So here's my current GEO lua file. It's not pretty, and i'm missing some melee stuff, but it's pretty much Mote's file, with some stuff added in that i basically pieced together from his documentation and other GS's.

    Was hoping to get some pointers on what isn't functioning, or what is just spaghetti. It seems to be working decently in game, but I'm sure i made some mistakes, and have wasted/unused sets/rules/etc.
    Any pointers would be appreciated, and thanks Mote for making this game bearable to play lol. You need a paypal button.

    After ya'll school me, i'll make the changes and then see if it can be published to in the GS directory file for others to use.
    v/r

  3. #2003
    Very Sexy Nerd
    Join Date
    Oct 2005
    Posts
    8,734
    BG Level
    8
    FFXI Server
    Carbuncle

    Quote Originally Posted by JSHidaka View Post
    I was thinking more, after you determine that there is a sc, just set a variable with the element(a variable that will reset for the time the Mb windows is open) then if you cast an spell, check if it will MB(with the element you got in the variable) if not change spell to one that will.

    And wasn't thinking about packets, was more an event that activate with text.

    I now in paper "works", in practice, no idea, I'm not that lazy to need something like that.
    That wouldn't be too difficult to do. Skillchains should be mapped somewhere on the action packet in the wiki. Just write an event for it in your gearswap and it should work.

    (I think, anyway. )

  4. #2004
    Smells like Onions
    Join Date
    Oct 2011
    Posts
    5
    BG Level
    0

    Hi, I'm new to Gearswap

    I've managed to work out my BRD lua but for the life of me I can't seem to be my SCH lua to work. It's basically the one from Kinematics with some tweaks.
    It seems to handle sublimation gear swapping well but it doesn't swap for anything else like cures/nukes/helix etc.

    Any help would be greatly appreciated!

    Spoiler: show
    -------------------------------------------------------------------------------------------------------------------
    -- 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.

    --[[
    Custom commands:

    Shorthand versions for each strategem type that uses the version appropriate for
    the current Arts.

    Light Arts Dark Arts

    gs c scholar cost Penury Parsimony
    gs c scholar speed Celerity Alacrity
    gs c scholar aoe Accession Manifestation
    gs c scholar power Rapture Ebullience
    gs c scholar duration Perpetuance
    gs c scholar accuracy Altruism Focalization
    gs c scholar enmity Tranquility Equanimity
    gs c scholar skillchain Immanence
    gs c scholar addendum Addendum: White Addendum: Black
    --]]



    -- 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()
    state.Buff.Sublimation = buffactive['Sublimation: Activated'] or false

    addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
    "Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}

    update_active_strategems()
    end


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

    state.OffenseMode = 'None'
    state.Defense.PhysicalMode = 'PDT'


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


    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    if binds_on_unload then
    binds_on_unload()
    end
    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['Tabula Rasa'] = {legs="Pedagogy Pants"}


    -- Fast cast sets for spells

    sets.precast.FC = {ammo="",
    head="Nahtirah Hat",ear2="Loquacious Earring",
    body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
    back="Swith Cape",waist="",legs="Orvail Pants +1",feet="Academic's Loafers +1"}

    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})

    sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})

    sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris",back="Pahtli Cape"})

    sets.precast.FC.Curaga = sets.precast.FC.Cure

    sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})


    -- Midcast Sets

    sets.midcast.FastRecast = {ammo="Incantor Stone",
    head="Nahtirah Hat",ear2="Loquacious Earring",
    body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",
    back="Swith Cape",waist="Goading Belt",legs="",feet="Academic's Loafers"}

    sets.midcast.Cure = {main="Chatoyant Staff",sub="Curatio Grip",ammo="Incantor Stone",
    head="Gende. Caubeen",neck="Savant's Chain",ear1="Lifestorm Earring",ear2="Beatific Earring",
    body="Gendewitha Bliaut",hands="Pedagogy Bracers",ring1="Sirona's Ring",ring2="Ephedra Ring",
    back="Twilight Cape",waist="Korin Obi",legs="Academic's Pants",feet="Argute Loafers +2"}

    sets.midcast.CureWithLightWeather = {main="Chatoyant Staff",sub="Curatio Grip",ammo="Incantor Stone",
    head="Gende. Caubeen",neck="Savant's Chain",ear1="Lifestorm Earring",ear2="Beatific Earring",
    body="Gendewitha Bliaut",hands="Pedagogy Bracers",ring1="Sirona's Ring",ring2="Ephedra Ring",
    back="Twilight Cape",waist="Korin Obi",legs="Academic's Pants",feet="Argute Loafers +2"}

    sets.midcast.Curaga = sets.midcast.Cure

    sets.midcast.Regen = {main="Bolelabunga",head="Savant's Bonnet +2"}

    sets.midcast.Cursna = {
    neck="Malison Medallion",
    hands="Hieros Mittens",ring1="Ephedra Ring",
    feet="Gendewitha Galoshes"}

    sets.midcast['Enhancing Magic'] = {ammo="Savant's Treatise",
    head="Savant's Bonnet +2",neck="",
    body="Pedagogy Gown +1",hands="Ayao's Gages",
    waist="Olympus Sash",legs="Academic's Pants"}

    sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})

    sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'], {feet="Pedagogy Loafers"})


    -- Custom spell classes
    sets.midcast.MndEnfeebles = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
    head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.IntEnfeebles = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
    head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles

    sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Incantor Stone",
    head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.Kaustra = {main="Lehbrailg +2",sub="Wizzan Grip",ammo="Witchstone",
    head="Hagondes Hat",neck="Stoicheion Medal",ear1="Hecate's Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Strendu Ring",
    back="Toro Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Incantor Stone",
    head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Excelsis Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Goading Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}

    sets.midcast.Aspir = sets.midcast.Drain

    sets.midcast.Stun = {main="Coeus",sub="Mephitis Grip",ammo="Incantor Stone",
    head="Nahtirah Hat",neck="Dark Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
    body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
    back="Refraction Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}



    -- Elemental Magic sets are default for handling low-tier nukes.
    sets.midcast['Elemental Magic'] = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}

    sets.midcast['Elemental Magic'].Resistant = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}


    -- Custom classes for high-tier nukes.
    sets.midcast.HighTierNuke = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}

    sets.midcast.HighTierNuke.Resistant = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}


    -- Sets for helixes
    sets.midcast.Helix = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}

    sets.midcast.Helix.Resistant = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}


    sets.midcast.Impact = {main="Coeus",sub="Vivid Strap +1",ammo="Savant's Treatise",
    head="Hagondes Hat",neck="Savant's Chain",ear1="Novio Earring",ear2="Friomisi Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Prolix Ring",ring2="Strendu Ring",
    back="Bookworm's Cape",waist="Olympus Sash",legs="Hagondes Pants",feet="Gendewitha Galoshes"}


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

    -- Resting sets
    sets.resting = {main="Chatoyant Staff",sub="Mephitis Grip",
    head="Nefer Khat +1",neck="Wiglen Gorget",
    body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    waist="Austerity Belt",legs="Nares Trews",feet="Serpentes Sabots"}


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

    sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Incantor Stone",
    head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Umbra Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

    sets.idle.Field = {main="Owleyes",sub="Genbu's Shield",ammo="Incantor Stone",
    head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Umbra Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}


    sets.idle.Field.Stun = {main="Owleyes",sub="Genbu's Shield",ammo="Incantor Stone",
    head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Umbra Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}


    -- Defense sets

    sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
    head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
    back="Umbra Cape",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
    head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
    body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Shadow Ring",
    back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}

    sets.Kiting = {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

    -- Normal melee group
    sets.engaged = {
    head="Zelus Tiara",
    body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",
    waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}



    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    sets.buff['Ebullience'] = {head="Savant's Bonnet +2"}
    sets.buff['Rapture'] = {head="Savant's Bonnet +2"}
    sets.buff['Perpetuance'] = {hands="Savant's Bracers +2"}
    sets.buff['Immanence'] = {hands="Savant's Bracers +2"}
    sets.buff['Penury'] = {legs="Savant's Pants +2"}
    sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
    sets.buff['Celerity'] = {feet="Pedagogy Loafers"}
    sets.buff['Alacrity'] = {feet="Pedagogy Loafers"}

    sets.buff['Klimaform'] = {feet="Savant's Loafers +2"}

    sets.buff.FullSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown +1"}

    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


    -- 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
    equip(sets.midcast.FastRecast)
    end
    end

    -- Run after the general midcast() is done.
    function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
    apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
    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 not spell.interrupted then
    if state.Buff[spell.english] ~= nil then
    state.Buff[spell.english] = true
    end
    end
    end


    -------------------------------------------------------------------------------------------------------------------
    -- Customization hooks for idle and melee sets, after they've been automatically constructed.
    -------------------------------------------------------------------------------------------------------------------

    -- 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' then
    if world.weather_element == 'Light' then
    return 'CureWithLightWeather'
    end
    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 state.Buff.Sublimation then
    if state.IdleMode == 'Normal' then
    idleSet = set_combine(idleSet, sets.buff.FullSublimation)
    end
    end

    return idleSet
    end

    -------------------------------------------------------------------------------------------------------------------
    -- General hooks for other events.
    -------------------------------------------------------------------------------------------------------------------

    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
    if buff == "Sublimation: Activated" then
    state.Buff.Sublimation = gain
    handle_equipping_gear(player.status)
    elseif state.Buff[buff] ~= nil then
    state.Buff[buff] = gain
    end
    end


    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------

    -- Called for direct player commands.
    function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'scholar' then
    handle_strategems(cmdParams)
    eventArgs.handled = true
    end
    end


    -- Called by the 'update' self-command.
    function job_update(cmdParams, eventArgs)
    if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
    buffactive['addendum: white'] or buffactive['addendum: black']) then
    if state.IdleMode == 'Stun' then
    send_command('@input /ja "Dark Arts" <me>')
    else
    send_command('@input /ja "Light Arts" <me>')
    end
    end

    update_active_strategems()
    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.
    -------------------------------------------------------------------------------------------------------------------

    -- Reset the state vars tracking strategems.
    function update_active_strategems()
    state.Buff['Ebullience'] = buffactive['Ebullience'] or false
    state.Buff['Rapture'] = buffactive['Rapture'] or false
    state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
    state.Buff['Immanence'] = buffactive['Immanence'] or false
    state.Buff['Penury'] = buffactive['Penury'] or false
    state.Buff['Parsimony'] = buffactive['Parsimony'] or false
    state.Buff['Celerity'] = buffactive['Celerity'] or false
    state.Buff['Alacrity'] = buffactive['Alacrity'] or false

    state.Buff['Klimaform'] = buffactive['Klimaform'] or false
    end


    -- Equip sets appropriate to the active buffs, relative to the spell being cast.
    function apply_grimoire_bonuses(spell, action, spellMap)
    if state.Buff.Perpetuance and spell.skill == 'Enhancing Magic' then
    equip(sets.buff['Perpetuance'])
    end
    if state.Buff.Rapture and spellMap == 'Cure' or spellMap == 'Curaga' then
    equip(sets.buff['Rapture'])
    end
    if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
    if state.Buff.Ebullience and spell.english ~= 'Impact' then
    equip(sets.buff['Ebullience'])
    end
    if state.Buff.Immanence then
    equip(sets.buff['Immanence'])
    end
    if state.Buff.Klimaform and spell.element == world.weather_element then
    equip(sets.buff['Klimaform'])
    end
    end

    if state.Buff.Penury then equip(sets.buff['Penury']) end
    if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
    if state.Buff.Celerity then equip(sets.buff['Celerity']) end
    if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
    end


    -- General handling of strategems in an Arts-agnostic way.
    -- Format: gs c scholar <strategem>
    function handle_strategems(cmdParams)
    -- cmdParams[1] == 'scholar'
    -- cmdParams[2] == strategem to use

    if not cmdParams[2] then
    add_to_chat(123,'Error: No strategem command given.')
    return
    end
    local strategem = cmdParams[2]:lower()

    if buffactive['light arts'] or buffactive['addendum: white'] then
    if strategem == 'cost' then
    send_command('@input /ja Penury <me>')
    elseif strategem == 'speed' then
    send_command('@input /ja Celerity <me>')
    elseif strategem == 'aoe' then
    send_command('@input /ja Accession <me>')
    elseif strategem == 'power' then
    send_command('@input /ja Rapture <me>')
    elseif strategem == 'duration' then
    send_command('@input /ja Perpetuance <me>')
    elseif strategem == 'accuracy' then
    send_command('@input /ja Altruism <me>')
    elseif strategem == 'enmity' then
    send_command('@input /ja Tranquility <me>')
    elseif strategem == 'skillchain' then
    add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
    elseif strategem == 'addendum' then
    send_command('@input /ja "Addendum: White" <me>')
    else
    add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
    end
    elseif buffactive['dark arts'] or buffactive['addendum: black'] then
    if strategem == 'cost' then
    send_command('@input /ja Parsimony <me>')
    elseif strategem == 'speed' then
    send_command('@input /ja Alacrity <me>')
    elseif strategem == 'aoe' then
    send_command('@input /ja Manifestation <me>')
    elseif strategem == 'power' then
    send_command('@input /ja Ebullience <me>')
    elseif strategem == 'duration' then
    add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
    elseif strategem == 'accuracy' then
    send_command('@input /ja Focalization <me>')
    elseif strategem == 'enmity' then
    send_command('@input /ja Equanimity <me>')
    elseif strategem == 'skillchain' then
    send_command('@input /ja Immanence <me>')
    elseif strategem == 'addendum' then
    send_command('@input /ja "Addendum: Black" <me>')
    else
    add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
    end
    else
    add_to_chat(123,'No arts has been activated yet.')
    end
    end


    -- Gets the current number of available strategems based on the recast remaining
    -- and the level of the sch.
    function get_current_strategem_count()
    -- returns recast in seconds.
    local allRecasts = windower.ffxi.get_ability_recasts()
    local stratsRecast = allRecasts[231]

    local maxStrategems

    if player.main_job_level >= 90 then
    maxStrategems = 5
    elseif player.main_job_level >= 70 then
    maxStrategems = 4
    elseif player.main_job_level >= 50 then
    maxStrategems = 3
    elseif player.main_job_level >= 30 then
    maxStrategems = 2
    elseif player.main_job_level >= 10 then
    maxStrategems = 1
    else
    maxStrategems = 0
    end

    local fullRechargeTime = 4*60

    local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)

    return currentCharges
    end


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

    Something new happened to me for the first time.
    I have an in-game macro with:
    /ja Nightingale
    /wait 1
    /ja Troubadour

    For the first time Gearswap didn't precast correctly the body for Troubadour, with the result that Nightingale lasted 30 seconds more.
    It never happened before to me. What could the cause be? Lag? Something else?
    Want to check the code maybe to see if something can be improved/changed in that regard?

    http://pastebin.com/GX1Yiyv9

  6. #2006
    BG Content
    Join Date
    Jul 2007
    Posts
    22,371
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Did you upgrade your body to +1 recently?

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

    Nope, working good. In these 2 runs I used that macro 6 times and it happened only once.
    I didn't touch the Lua or anything.

  8. #2008
    BG Content
    Join Date
    Jul 2007
    Posts
    22,371
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Hmm... don't know then.

  9. #2009
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    now after the update... sometimes(in dinamis atm).. I press my WS macro.. and It only boost... the WS doesnt go... found the problem I need the function buff_change(status,gain_or_loss) for this to work auto.. and using debugmode
    Is buffgain/lost not triggering for boost...

  10. #2010
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    I'm actually going to make some changes on my state.Buff tracking code. Instead of not making any assumption about the buff until aftercast is run, and then setting based on spell.interrupted, I was going to set state.Buff to true on precast, and then reevaluate it based on spell.interrupted on aftercast. There's some instances where I'm not completely sure aftercast is being hit before the next action.

    Basically, this is just a more paranoid version of the conversion from buff_change checks to aftercast checks, but instead of "set to true when we -know- the buff is present, rather than waiting for notification", it's "assume it's true by default, and then adjust when we know whether it's true or not".


    As for your question, JSHidaka -- well, I really don't understand the question. I see buff_change called when I use Boost. The rest of the question doesn't really make sense.

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

    Quote Originally Posted by Byrthnoth View Post
    Hmm... don't know then.
    Supposing there's nothing wrong in the LUA I wrote then can we hypothize a very bad lagspike at the wrong moment?

  12. #2012
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    Quote Originally Posted by Motenten View Post
    I'm actually going to make some changes on my state.Buff tracking code. Instead of not making any assumption about the buff until aftercast is run, and then setting based on spell.interrupted, I was going to set state.Buff to true on precast, and then reevaluate it based on spell.interrupted on aftercast. There's some instances where I'm not completely sure aftercast is being hit before the next action.

    Basically, this is just a more paranoid version of the conversion from buff_change checks to aftercast checks, but instead of "set to true when we -know- the buff is present, rather than waiting for notification", it's "assume it's true by default, and then adjust when we know whether it's true or not".


    As for your question, JSHidaka -- well, I really don't understand the question. I see buff_change called when I use Boost. The rest of the question doesn't really make sense.
    http://i93.photobucket.com/albums/l5...605_175637.png

    well it doesn't for me. and there is no more updates, probably you are in -Dev, I'm not.

  13. #2013
    RIDE ARMOR
    Join Date
    Nov 2009
    Posts
    21
    BG Level
    1
    FFXI Server
    Asura

    Quote Originally Posted by Motenten View Post
    I'm actually going to make some changes on my state.Buff tracking code. Instead of not making any assumption about the buff until aftercast is run, and then setting based on spell.interrupted, I was going to set state.Buff to true on precast, and then reevaluate it based on spell.interrupted on aftercast. There's some instances where I'm not completely sure aftercast is being hit before the next action.

    Basically, this is just a more paranoid version of the conversion from buff_change checks to aftercast checks, but instead of "set to true when we -know- the buff is present, rather than waiting for notification", it's "assume it's true by default, and then adjust when we know whether it's true or not".


    As for your question, JSHidaka -- well, I really don't understand the question. I see buff_change called when I use Boost. The rest of the question doesn't really make sense.
    I know if I pianissimo then sing very quickly, it won't use target change rules that check if pianissimo is active. My current work around is to activate a pianissimo variable toggle in my pianissimo macro and check that value instead.

  14. #2014
    Sea Torques
    Join Date
    Jun 2012
    Posts
    570
    BG Level
    5
    FFXI Server
    Asura
    WoW Realm
    The Scryers

    and other "buff" are bypassing randomly the "buff_change"... Regen 5, Enfire, Protect V, sometimes works others doesn't... so something is broken w/ the new luacore

    EDIT...

    Luacore just got updated.. and everything looks "normal"

  15. #2015
    BG Content
    Join Date
    Jul 2007
    Posts
    22,371
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Yeah, Arcon reverted it. He is trying to update LuaCore so that the buff_gain and buff_loss events fire even when you gain or lose a buff that you already have.

  16. #2016
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by nikia View Post
    Wanted to see if Anyone has wrote in creation of timers for mythic and empy Aftermath 1,2,3?

    Looking for when say aftermath 3 buff is gained with mythic an onscreen timer would count down reaming time.
    I know I saw someone with it coded in few months ago but I cant recall where.
    Tried to figure it out on my own but unclear on the best way to handle the creation and since empy and mythic aftermath times are different if there was a universal rule that would cover either.
    Any help would be welcomed.
    Thank you.
    I've built this in my utilities include. It should work for any REM weapon, though it assumes mythics are at least level 80.

    It's been pushed to my Mote-libs repository, but not pushed to the general Windower launcher update. If you want to test it out, get the latest Mote-Mappings and Mote-Utility, and then add the following function calls to your job_precast and job_aftercast functions:

    Code:
    function job_precast(spell, action, spellMap, eventArgs)
    	custom_aftermath_timers_precast(spell)
    end
    
    function job_aftercast(spell, action, spellMap, eventArgs)
    	custom_aftermath_timers_aftercast(spell)
    end

  17. #2017
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by beaute View Post
    The hash is: TMjLkjLj
    What part of the include(s) is relevant to job abilities? I could try to debug it if I knew where to start.
    OK, I've reviewed your file several times, and still can't find anything wrong.

    For debugging, I'd start by adding add_to_chat() functions in job_precast() and job_post_precast(). Make sure they're getting called, and that the spell information is correct (try print_set(spell, 'spell')). Add additional checks in job_aftercast() to see if it's reaching there, and that the spell completed. Expand beyond that based on the information you find.

    If all else fails, make sure you've run the launcher and are fully updated, and then download a fresh copy of the thf lua file. Make a sidecar (thf_gear.lua) file, and put all your gear changes in that. (See documentation on sidecar files.)

  18. #2018
    RIDE ARMOR
    Join Date
    Dec 2009
    Posts
    15
    BG Level
    1

    Hi,

    I'm pretty new to gearswap, used to use spellcast so my lack of lua knowledge isn't too good. With my mnk.xml I used to be able to lock my body to Tantra Cyclas +2 for the duration of Impetus, the code used to look like this:

    Code:
    <if buffactive="Impetus">
                <equip when="all">
                <body lock="yes">Tantra Cyclas +2</body>
                </equip>
            </if>
    Then I would have Autoexe kick in with:

    Code:
    <register event="gainbuff_Impetus" silent="true">sc set Impetus</register></register>
    And then:

    Code:
    <register event="losebuff_Impetus" silent="true">sc set Engaged</register>
    Which would switch my body back to my tp body.
    Is there anyway to replicate this with gearswap?

    I've tried this:

    Code:
    function buff_change(status,gain_or_loss)
        if status == "Impetus" then
    		if gain_or_loss then
    			equip(sets.TP.Impetus)
    			send_command('@wait .5;gs disable body')
                add_to_chat(121,'>!===EQUIPPING TANTRA CYCLAS +2===!<')			
            else
    			send_command('gs enable body')
                add_to_chat(121,'>!===IMPETUS DOWN===!<')
                equip(sets.TP)			
    		end
        end
    end
    This works in a sense to lock the body during Impetus which is great, however I cannot get it to equip my Impetus down set. If I take
    Code:
    send_command('@wait .5;gs disable body')
    code away it reverts back to Impetus down set but of course it wont lock the body during Impetus.
    I should clarify that I'm using a very simple lua file with no includes etc.

    I would be grateful for any help/suggestions.

  19. #2019
    Cerberus
    Join Date
    Jun 2010
    Posts
    461
    BG Level
    4

    Quote Originally Posted by Motenten View Post
    I've built this in my utilities include. It should work for any REM weapon, though it assumes mythics are at least level 80.

    It's been pushed to my Mote-libs repository, but not pushed to the general Windower launcher update. If you want to test it out, get the latest Mote-Mappings and Mote-Utility, and then add the following function calls to your job_precast and job_aftercast functions:

    Code:
    function job_precast(spell, action, spellMap, eventArgs)
    	custom_aftermath_timers_precast(spell)
    end
    
    function job_aftercast(spell, action, spellMap, eventArgs)
    	custom_aftermath_timers_aftercast(spell)
    end
    Thanks for posting I looked it over and it gave me an idea, wanted to run it past you please.
    I tend to shy away from includes since I only really play 4 jobs and anything commonly shared I can just easily adjust across 4 files.
    So with that in mind I wanted to bake the logic into individual files, this is what I came up with, any input would be nice.

    So gaining/losing buff will be the handle for timer creation and deletion.
    Code:
    function buff_change(buff,g_or_l)
        -- Used with Timers Plugin to create and delete custom timers for aftermath leverls
        if buff == 'Aftermath: Lv.1' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.1" 30 down abilities/00027.png')
        elseif buff == 'Aftermath: Lv.2' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.2" 60 down abilities/00027.png')
        elseif buff == 'Aftermath: Lv.3' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.3" 90 down abilities/00027.png')
        end
        if buff == 'Aftermath: Lv.1' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.1"')
        elseif buff == 'Aftermath: Lv.2' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.2"')
        elseif buff == 'Aftermath: Lv.3' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.3"')
        end
    end
    In Precast this will re-create the Lv1 timer since that can overwrite itself.
    Code:
        -- Since Aftermath: Lv.1 can overwrite itself this will delete and re-create this specific timer
        if spell.name == 'Rudra\'s Storm' and player.equipment.main == 'Twashtar' and player.tp < 200 and player.tp > 100 and buffactive['Aftermath: Lv.1'] then
            send_command('timers d "Aftermath: Lv.1"')
            send_command('timers c "Aftermath: Lv.1" 30 down abilities/00027.png')
        end
    The above was tested on a friends DNC.lua and seems to work fine, I added the player.equipment.main check to determine if empy or mythic aftermath.

    Does this seem like a decent(hopefully well formed) way of doing the call/logic?
    If it is well formed I will just expand as needed.

    Thank you for your time, I am grateful.

  20. #2020
    Chram
    Join Date
    Sep 2007
    Posts
    2,526
    BG Level
    7
    FFXI Server
    Fenrir

    Quote Originally Posted by nikia
    I tend to shy away from includes since I only really play 4 jobs and anything commonly shared I can just easily adjust across 4 files.
    I code with the principal that if it's possible for code to be shared, it ought to be refactored, and if it can be shared by multiple (ie: more than 1) files, it ought to be in an include.

    Quote Originally Posted by nikia
    So gaining/losing buff will be the handle for timer creation and deletion.
    That works well for Empys and Mythics, but fails with Relics because Relic aftermath duration scales with TP, rather than only being tied to the specific tier.

    It also would fail in the edge case of a sam with Mura+Yoichi, since it doesn't identify whether it's a Mythic or Relic aftermath.

    However, if you know neither of those will be the case, can skip past that issue.

    Quote Originally Posted by nikia
    Code:
    function buff_change(buff,g_or_l)
        -- Used with Timers Plugin to create and delete custom timers for aftermath leverls
        if buff == 'Aftermath: Lv.1' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.1" 30 down abilities/00027.png')
        elseif buff == 'Aftermath: Lv.2' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.2" 60 down abilities/00027.png')
        elseif buff == 'Aftermath: Lv.3' and player.equipment.main == 'Twashtar' and g_or_l == true then
            send_command('timers c "Aftermath: Lv.3" 90 down abilities/00027.png')
        end
        if buff == 'Aftermath: Lv.1' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.1"')
        elseif buff == 'Aftermath: Lv.2' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.2"')
        elseif buff == 'Aftermath: Lv.3' and player.equipment.main == 'Twashtar' and g_or_l == false then
            send_command('timers d "Aftermath: Lv.3"')
        end
    end
    Somewhat redundantly built. I'd rework it as:

    Code:
    function buff_change(buff, gain)
        -- Used with Timers Plugin to create and delete custom timers for aftermath levels
        if player.equipment.main == 'Twashtar' and buff:startswith('Aftermath') then
            local times = {["Aftermath: Lv.1"]=30, ["Aftermath: Lv.2"]=60, ["Aftermath: Lv.3"]=90}
            
            if gain then
                send_command('timers c "'..buff..'" '..tostring(times[buff])..' down abilities/00027.png')
            else
                send_command('timers d "'..buff..'"')
            end
        end
    end
    Generally, you do not want to check the same condition more than once. I'd probably also try to move the 'times' table to a higher scope (such as file initialization) so it doesn't have to be recreated every time through this function.

    In Precast this will re-create the Lv1 timer since that can overwrite itself.
    Workable as long as you ignore issues of failed weaponskills (out of range, slept, stunned, etc).

Page 101 of 302 FirstFirst ... 51 91 99 100 101 102 103 111 151 ... LastLast

Similar Threads

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