Item Search
     
BG-Wiki Search
Page 81 of 302 FirstFirst ... 31 71 79 80 81 82 83 91 131 ... LastLast
Results 1601 to 1620 of 6036

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

  1. #1601
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Erm, buffactive gives the number of each buff currently active. So if you have three Ignis runes up, buffactive.Ignis is 3. Maybe I just don't understand the problem.

    There is no easily automated way to tell the time remaining on a buff.

  2. #1602
    Melee Summoner
    Join Date
    Jan 2008
    Posts
    31
    BG Level
    1

    Can anyone help me with this please? I'm using Mote's SMN Lua, but it isn't switching into the magical Rage BP gear correctly when using BP's. I've tested using show_swaps :-/ Any ideas?

    Spoiler: show
    -------------------------------------------------------------------------------------------------------------------
    -- Initialization function that defines sets and variables to be used.
    -------------------------------------------------------------------------------------------------------------------

    -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and it's supplementary files) to go with this.

    -- Also, you'll need the Shortcuts addon to handle the auto-targetting of the custom pact commands.

    --[[
    Custom commands:

    gs c petweather
    Automatically casts the storm appropriate for the current avatar, if possible.

    gs c siphon
    Automatically run the process to: dismiss the current avatar; cast appropriate
    weather; summon the appropriate spirit; Elemental Siphon; release the spirit;
    and re-summon the avatar.

    Will not cast weather you do not have access to.
    Will not re-summon the avatar if one was not out in the first place.
    Will not release the spirit if it was out before the command was issued.

    gs c pact [PactType]
    Attempts to use the indicated pact type for the current avatar.
    PactType can be one of:
    cure
    curaga
    buffOffense
    buffDefense
    buffSpecial
    debuff1
    debuff2
    sleep
    nuke2
    nuke4
    bp70
    bp75 (merits and lvl 75-80 pacts)
    astralflow

    --]]


    -- 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["Avatar's Favor"] = buffactive["Avatar's Favor"] or false

    spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
    avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith"}

    magicalRagePacts = S{
    'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgement Bolt','Searing Light','Howling Moon','Ruinous Omen',
    'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
    'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
    'Thunderspark','Burning Strike','Meteorite','Nether Blast','Flaming Crush',
    'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
    'Holy Mist','Lunar Bay','Night Terror','Level ? Holy'}


    pacts = {}
    pacts.cure = {['Carbuncle']='Healing Ruby'}
    pacts.curaga = {['Carbuncle']='Healing Ruby II', ['Garuda']='Whispering Wind', ['Leviathan']='Spring Water'}
    pacts.buffoffense = {['Carbuncle']='Glittering Ruby', ['Ifrit']='Crimson Howl', ['Garuda']='Hastega', ['Ramuh']='Rolling Thunder',
    ['Fenrir']='Ecliptic Growl'}
    pacts.buffdefense = {['Carbuncle']='Shining Ruby', ['Shiva']='Frost Armor', ['Garuda']='Aerial Armor', ['Titan']='Earthen Ward',
    ['Ramuh']='Lightning Armor', ['Fenrir']='Ecliptic Howl', ['Diabolos']='Noctoshield', ['Cait Sith']='Reraise II'}
    pacts.buffspecial = {['Ifrit']='Inferno Howl', ['Garuda']='Fleet Wind', ['Titan']='Earthen Armor', ['Diabolos']='Dream Shroud',
    ['Carbuncle']='Soothing Ruby', ['Fenrir']='Heavenward Howl', ['Cait Sith']='Raise II'}
    pacts.debuff1 = {['Shiva']='Diamond Storm', ['Ramuh']='Shock Squall', ['Leviathan']='Tidal Roar', ['Fenrir']='Lunar Cry',
    ['Diabolos']='Pavor Nocturnus', ['Cait Sith']='Eerie Eye'}
    pacts.debuff2 = {['Shiva']='Sleepga', ['Leviathan']='Slowga', ['Fenrir']='Lunar Roar', ['Diabolos']='Somnolence'}
    pacts.sleep = {['Shiva']='Sleepga', ['Diabolos']='Nightmare', ['Cait Sith']='Mewing Lullaby'}
    pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
    ['Ramuh']='Thunder II', ['Leviathan']='Water II'}
    pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
    ['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
    pacts.bp70 = {['Ifrit']='Flaming Crush', ['Shiva']='Rush', ['Garuda']='Predator Claws', ['Titan']='Mountain Buster',
    ['Ramuh']='Chaotic Strike', ['Leviathan']='Spinning Dive', ['Carbuncle']='Meteorite', ['Fenrir']='Eclipse Bite',
    ['Diabolos']='Nether Blast'}
    pacts.bp75 = {['Ifrit']='Meteor Strike', ['Shiva']='Heavenly Strike', ['Garuda']='Wind Blade', ['Titan']='Geocrush',
    ['Ramuh']='Thunderstorm', ['Leviathan']='Grand Fall', ['Carbuncle']='Holy Mist', ['Fenrir']='Lunar Bay',
    ['Diabolos']='Night Terror', ['Cait Sith']='Level ? Holy'}
    pacts.astralflow = {['Ifrit']='Inferno', ['Shiva']='Diamond Dust', ['Garuda']='Aerial Blast', ['Titan']='Earthen Fury',
    ['Ramuh']='Judgment Bolt', ['Leviathan']='Tidal Wave', ['Carbuncle']='Searing Light', ['Fenrir']='Howling Moon',
    ['Diabolos']='Ruinous Omen', ['Cait Sith']="Altana's Favor"}

    end


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

    state.Defense.PhysicalMode = 'PDT'

    -- Durations for wards we want to create custom timers for.
    durations = {}
    durations['Earthen Armor'] = 232
    durations['Shining Ruby'] = 340
    durations['Dream Shroud'] = 352
    durations['Noctoshield'] = 352
    durations['Inferno Howl'] = 232
    durations['Hastega'] = 352

    -- Icons to use for the timers (from plugins/icons directory)
    timer_icons = {}
    -- 00054 for stoneskin, or 00299 for Titan
    timer_icons['Earthen Armor'] = 'spells/00299.png'
    -- 00043 for protect, or 00296 for Carby
    timer_icons['Shining Ruby'] = 'spells/00043.png'
    -- 00304 for Diabolos
    timer_icons['Dream Shroud'] = 'spells/00304.png'
    -- 00106 for phalanx, or 00304 for Diabolos
    timer_icons['Noctoshield'] = 'spells/00106.png'
    -- 00100 for enfire, or 00298 for Ifrit
    timer_icons['Inferno Howl'] = 'spells/00298.png'
    -- 00358 for hastega, or 00301 for Garuda
    timer_icons['Hastega'] = 'spells/00358.png'


    select_default_macro_book()
    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['Astral Flow'] = {head="Glyphic Horn"}

    sets.precast.JA['Elemental Siphon'] = {feet="Caller's Pigaches +2"} -- back="Conveyance Cape"

    sets.precast.JA['Mana Cede'] = {hands="Caller's Bracers +2"}

    -- Pact delay reduction gear
    sets.precast.BloodPactWard = {ammo="Seraphicaller",head="Evoker's Horn",body="Convoker's Doublet",hands="Glyphic Bracers"}

    sets.precast.BloodPactRage = sets.precast.BloodPactWard

    -- Fast cast sets for spells

    sets.precast.FC = {
    head="Nahtirah Hat",ear2="Loquacious Earring",
    body="Hedera Cotehardie",ring1="Prolix Ring",
    back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Chelona Boots"}

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


    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
    head="Nahtirah Hat",
    body="Hagondes Coat +1",hands="Yaoyotl Gloves",
    back="Pahtli Cape",waist="Cascade Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Myrkr'] = {
    head="Nahtirah Hat",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Convoker's Doublet",hands="Caller's Bracers +2",ring1="Evoker's Ring",ring2="Sangoma Ring",
    back="Pahtli Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Chelona Boots"}


    -- Midcast Sets
    sets.midcast.FastRecast = {
    head="Nahtirah Hat",ear2="Loquacious Earring",
    body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",
    back="Swith Cape +1",waist="Witful Belt",legs="Artsieq Hose",feet="Chelona Boots"}

    sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",
    head="Nahtirah Hat",ear2="Loquacious Earring",
    body="Heka's Kalasiris",hands="Bokwus Gloves",ring1="Prolix Ring",ring2="Sirona's Ring",
    back="Swith Cape +1",waist="Witful Belt",legs="Nares Trews",feet="Hagondes Sabots"}

    sets.midcast.Stoneskin = {waist="Siegel Sash"}

    sets.midcast.Pet.BloodPactWard = {main="Soulscourge",sub="Vox Grip",ammo="Seraphicaller",
    head="Evoker's Horn",neck="Caller's Pendant",
    body="Caller's Doublet +2",hands="Glyphic Bracers",ring1="Evoker's Ring",ring2="Fervor Ring",
    waist="Jaq'ij Sash",legs="Caller's Spats +2"}

    sets.midcast.Pet.PhysicalBloodPactRage = {main="Soulscourge",sub="Vox Grip",ammo="Seraphicaller",
    head="Evoker's Horn",neck="Caller's Pendant",
    body="Convoker's Doublet",hands="Caller's Bracers +2",ring1="Evoker's Ring",ring2="Fervor Ring",
    waist="Jaq'ij Sash",legs="Summoner's Spats",feet="Convoker's Pigaches"}

    sets.midcast.Pet.MagicalBloodPactRage = {main="Eminent Pole",sub="Vox Grip",ammo="Seraphicaller",
    head="Evoker's Horn",neck="Caller's Pendant",
    body="Convoker's Doublet",hands="Glyphic Bracers",ring1="Evoker's Ring",ring2="Fervor Ring",
    back="Tiresias' Cape",waist="Jaq'ij Sash",legs="Caller's Spats +2",feet="Hagondes Sabots"}

    sets.midcast.Pet.Spirit = set_combine(sets.midcast.Pet.BloodPactRage, {legs="Summoner's Spats"})

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

    -- Resting sets
    sets.resting = {main="Chatoyant Staff",sub="Oneiros Grip",ammo="Seraphicaller",
    head="Convoker's Horn",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Pahtli Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Chelona Boots"}

    -- Idle sets
    sets.idle = {main="Bolelabunga",sub="Genbu's Shield",ammo="Seraphicaller",
    head="Caller's Horn +2",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
    back="Kumbira Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

    sets.idle.PDT = {main="Terra's Staff",sub="Oneiros Grip",ammo="Seraphicaller",
    head="Convoker's Horn",neck="Twilight Torque",ear1="Merman's Earring",ear2="Merman's Earring",
    body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Sangoma Ring",
    back="Repulse Mantle",waist="Hierarch Belt",legs="Hagondes Pants",feet="Serpentes Sabots"}

    -- perp costs:
    -- spirits: 7
    -- carby: 11 (5 with mitts)
    -- fenrir: 13
    -- others: 15
    -- avatar's favor: -4/tick

    -- -perp gear:
    -- Patriarch Cane: -3
    -- Glyphic Horn: -4
    -- Caller's Doublet +2: -4
    -- Evoker's Ring: -1
    -- Convoker's Pigaches: -4
    -- total: -16

    sets.idle.Avatar = {main="Patriarch Cane",sub="Genbu's Shield",ammo="Seraphicaller",
    head="Glyphic Horn",neck="Caller's Pendant",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Caller's Doublet +2",hands="Serpentes Cuffs",ring1="Evoker's Ring",ring2="Sangoma Ring",
    back="Kumbira Cape",waist="Hierarch Belt",legs="Ngen Seraweels",feet="Convoker's Pigaches"}

    sets.idle.Spirit = {main="Patriarch Cane",sub="Genbu's Shield",ammo="Seraphicaller",
    head="Convoker's Horn",neck="Caller's Pendant",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Evoker's Ring",ring2="Sangoma Ring",
    back="Tiresias' Cape",waist="Hierarch Belt",legs="Summoner's Spats",feet="Convoker's Pigaches"}

    sets.idle.Town = {main="Bolelabunga",sub="Genbu's Shield",ammo="Seraphicaller",
    head="Convoker's Horn",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hagondes Coat +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Sangoma Ring",
    back="Kumbira Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}

    -- Favor can trade the -4 perp of Glyphic Horn for +2 refresh of Caller's Horn (plus enhance favor).
    sets.idle.Avatar.Favor = {head="Caller's Horn +2"}
    sets.idle.Avatar.Melee = {hands="Regimen Mittens",waist="Kuku Stone",legs="Convoker's Spats"}

    sets.perp = {}
    sets.perp.Day = {hands="Caller's Bracers +2"}
    sets.perp.Weather = {neck="Caller's Pendant",hands="Caller's Bracers +2"}
    -- Carby: Mitts+Conv.feet+Ev.Ring = 0/tick perp. Everything else should be +refresh
    sets.perp.Carbuncle = {main="Bolelabunga",sub="Genbu's Shield",
    head="Convoker's Horn",body="Hagondes Coat +1",hands="Carbuncle Mitts",legs="Nares Trews",feet="Convoker's Pigaches"}
    -- Fenrir: doesn't need full -perp set; trade body for +refresh
    sets.perp.Fenrir = {body="Hagondes Coat +1"}
    sets.perp.Diabolos = {waist="Jaq'ij Sash"}
    sets.perp.Alexander = sets.midcast.Pet.BloodPactWard

    -- Defense sets
    sets.defense.PDT = {main=gear.Staff.PDT,
    head="Hagondes Hat",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hagondes Coat +1",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
    back="Repulse Mantle",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.defense.MDT = {
    head="Hagondes Hat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
    body="Hedera Cotehardie",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
    back="Kumbira Cape",waist="Hierarch Belt",legs="Artsieq Hose",feet="Hagondes Sabots"}

    sets.Kiting = {}

    -- 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 = {ammo="Seraphicaller",
    head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    body="Hedera Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
    back="Kumbira Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
    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.
    function job_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
    equip(sets.midcast.FastRecast)
    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.name] ~= nil then
    state.Buff[spell.name] = true
    end
    end
    end


    -- Runs when a pet initiates an action.
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_pet_midcast(spell, action, spellMap, eventArgs)
    if spirits:contains(pet.name) then
    classes.CustomClass = 'Spirit'
    end
    end


    -- Runs when pet completes an action.
    function job_pet_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
    create_pact_timer(spell)
    end
    end


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

    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
    if pet.isvalid then
    if pet.element == world.day_element then
    idleSet = set_combine(idleSet, sets.perp.Day)
    end
    if pet.element == world.weather_element then
    idleSet = set_combine(idleSet, sets.perp.Weather)
    end
    if sets.perp[pet.name] then
    idleSet = set_combine(idleSet, sets.perp[pet.name])
    end
    if state.Buff["Avatar's Favor"] and avatars:contains(pet.name) then
    idleSet = set_combine(idleSet, sets.idle.Avatar.Favor)
    end
    if pet.status == 'Engaged' then
    idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
    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 state.Buff[buff] ~= nil then
    state.Buff[buff] = gain
    handle_equipping_gear(player.status)
    elseif storms:contains(buff) then
    handle_equipping_gear(player.status)
    end
    end


    -- Called when the player's pet's status changes.
    -- This is also called after pet_change after a pet is released. Check for pet validity.
    function job_pet_status_change(newStatus, oldStatus, eventArgs)
    if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
    handle_equipping_gear(player.status, newStatus)
    end
    end


    -- Called when a player gains or loses a pet.
    -- pet == pet structure
    -- gain == true if the pet was gained, false if it was lost.
    function job_pet_change(petparam, gain)
    classes.CustomIdleGroups:clear()
    if gain then
    if avatars:contains(pet.name) then
    classes.CustomIdleGroups:append('Avatar')
    elseif spirits:contains(pet.name) then
    classes.CustomIdleGroups:append('Spirit')
    end
    else
    select_default_macro_book()
    end
    end


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

    -- Called for custom player commands.
    function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'petweather' then
    handle_petweather()
    eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'siphon' then
    handle_siphoning()
    eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'pact' then
    handle_pacts(cmdParams)
    eventArgs.handled = true
    end
    end

    -- Called by the 'update' self-command, for common needs.
    -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
    function job_update(cmdParams, eventArgs)
    classes.CustomIdleGroups:clear()
    if pet.isvalid then
    if avatars:contains(pet.name) then
    classes.CustomIdleGroups:append('Avatar')
    elseif spirits:contains(pet.name) then
    classes.CustomIdleGroups:append('Spirit')
    end
    end
    end

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

    end

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

    -- Custom spell mapping.
    function job_get_spell_map(spell)
    if spell.type == 'BloodPactRage' then
    if magicalRagePacts:contains(spell.english) then
    return 'MagicalBloodPactRage'
    else
    return 'PhysicalBloodPactRage'
    end
    end
    end


    -- Cast the appopriate storm for the currently summoned avatar, if possible.
    function handle_petweather()
    if player.sub_job ~= 'SCH' then
    add_to_chat(122, "You can not cast storm spells")
    return
    end

    if not pet.isvalid then
    add_to_chat(122, "You do not have an active avatar.")
    return
    end

    local element = pet.element
    if element == 'Thunder' then
    element = 'Lightning'
    end

    if S{'Light','Dark','Lightning'}:contains(element) then
    add_to_chat(122, 'You do not have access to '..elements.storm_of[element]..'.')
    return
    end

    local storm = elements.storm_of[element]

    if storm then
    send_command('@input /ma "'..elements.storm_of[element]..'" <me>')
    else
    add_to_chat(123, 'Error: Unknown element ('..tostring(element)..')')
    end
    end


    -- Custom uber-handling of Elemental Siphon
    function handle_siphoning()
    if areas.Cities:contains(world.area) then
    add_to_chat(122, 'Cannot use Elemental Siphon in a city area.')
    return
    end

    local siphonElement
    local stormElementToUse
    local releasedAvatar
    local dontRelease

    -- If we already have a spirit out, just use that.
    if pet.isvalid and spirits:contains(pet.name) then
    siphonElement = pet.element
    dontRelease = true
    -- If current weather doesn't match the spirit, but the spirit matches the day, try to cast the storm.
    if player.sub_job == 'SCH' and pet.element == world.day_element and pet.element ~= world.weather_element then
    if not S{'Light','Dark','Lightning'}:contains(pet.element ) then
    stormElementToUse = pet.element
    end
    end
    -- If we're subbing /sch, there are some conditions where we want to make sure specific weather is up.
    -- If current (single) weather is opposed by the current day, we want to change the weather to match
    -- the current day, if possible.
    elseif player.sub_job == 'SCH' and world.weather_element ~= 'None' then
    local intense = get_weather_intensity()
    -- We can override single-intensity weather; leave double weather alone, since even if
    -- it's partially countered by the day, it's not worth changing.
    if intense == 1 then
    -- If current weather is weak to the current day, it cancels the benefits for
    -- siphon. Change it to the day's weather if possible (+0 to +20%), or any non-weak
    -- weather if not.
    -- If the current weather matches the current avatar's element (being used to reduce
    -- perpetuation), don't change it; just accept the penalty on Siphon.
    if world.weather_element == elements.weak_to[world.day_element] and
    (not pet.isvalid or world.weather_element ~= pet.element) then
    -- We can't cast lightning/dark/light weather, so use a neutral element
    if S{'Light','Dark','Lightning'}:contains(world.day_e lement) then
    stormElementToUse = 'Wind'
    else
    stormElementToUse = world.day_element
    end
    end
    end
    end

    -- If we decided to use a storm, set that as the spirit element to cast.
    if stormElementToUse then
    siphonElement = stormElementToUse
    elseif world.weather_element ~= 'None' and world.weather_element ~= elements.weak_to[world.day_element] then
    siphonElement = world.weather_element
    else
    siphonElement = world.day_element
    end

    local command = ''
    local releaseWait = 0

    if pet.isvalid and avatars:contains(pet.name) then
    command = command..'input /pet "Release" <me>;wait 1.1;'
    releasedAvatar = pet.name
    releaseWait = 10
    end

    if stormElementToUse then
    command = command..'input /ma "'..elements.storm_of[stormElementToUse]..'" <me>;wait 4;'
    releaseWait = releaseWait - 4
    end

    if not (pet.isvalid and spirits:contains(pet.name)) then
    command = command..'input /ma "'..elements.spirit_of[siphonElement]..'" <me>;wait 4;'
    releaseWait = releaseWait - 4
    end

    command = command..'input /ja "Elemental Siphon" <me>;'
    releaseWait = releaseWait - 1
    releaseWait = releaseWait + 0.1

    if not dontRelease then
    if releaseWait > 0 then
    command = command..'wait '..tostring(releaseWait)..';'
    else
    command = command..'wait 1.1;'
    end

    command = command..'input /pet "Release" <me>;'
    end

    if releasedAvatar then
    command = command..'wait 1.1;input /ma "'..releasedAvatar..'" <me>'
    end

    send_command(command)
    end


    -- Handles executing blood pacts in a generic, avatar-agnostic way.
    -- cmdParams is the split of the self-command.
    -- gs c [pact] [pacttype]
    function handle_pacts(cmdParams)
    if areas.Cities:contains(world.area) then
    add_to_chat(122, 'You cannot use pacts in town.')
    return
    end

    if not pet.isvalid then
    add_to_chat(122,'No avatar currently available. Returning to macro set 4.')
    set_macro_page(1)
    return
    end

    if spirits:contains(pet.name) then
    add_to_chat(122,'Cannot use pacts with spirits.')
    return
    end

    if not cmdParams[2] then
    add_to_chat(123,'No pact type given.')
    return
    end

    local pact = cmdParams[2]:lower()

    if not pacts[pact] then
    add_to_chat(123,'Unknown pact type: '..tostring(pact))
    return
    end

    if pacts[pact][pet.name] then
    if pact == 'astralflow' and not buffactive['astral flow'] then
    add_to_chat(122,'Cannot use Astral Flow pacts without 2hr active.')
    return
    end

    -- Leave out target; let Shortcuts auto-determine it.
    send_command('@input /pet "'..pacts[pact][pet.name]..'"')
    else
    add_to_chat(122,pet.name..' does not have a pact of type ['..pact..'].')
    end
    end


    function create_pact_timer(spell)
    -- Create custom timers for ward pacts.
    if durations and durations[spell.english] then
    local timer_cmd = 'timers c "'..spell.english..'" '..tostring(durations[spell.english])..' down'

    if timer_icons[spell.english] then
    timer_cmd = timer_cmd..' '..timer_icons[spell.english]
    end

    send_command(timer_cmd)
    end
    end

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

  3. #1603
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Byrthnoth View Post
    Erm, buffactive gives the number of each buff currently active. So if you have three Ignis runes up, buffactive.Ignis is 3. Maybe I just don't understand the problem.

    There is no easily automated way to tell the time remaining on a buff.
    ok that i did not know
    but thats because no ware in the documentation does it say that

    all it says is
    Stores the number of a given buff that is active. Keys are the buff names (case insensitive), so buffactive['light arts'] would be nil or 1 depending whether or not you have light arts up.
    so i thought that buffactive.Ignis == 1 or true(with 3 Ignis buffs)
    i thought that "Stores the number of a given buff that is active."meant (for Ignis) 523
    Stores the count of a given buff that is active. would be more accurate

    so if i wanted to check for buffactive.Ignis == 3 it would work??

  4. #1604
    Salvage Bans
    Join Date
    Oct 2010
    Posts
    948
    BG Level
    5
    FFXI Server
    Valefor

    I figured out my issue; it was because I was using spells.type == 'JobAbility'. I looked at the list of spells.type and skill and such when I was idly browsing, and noticed Ward/Effusion/Rune on the list. Because I was trying to find those under JobAbility instead of their respective categories, it was coming up with nothing. I fixed them, and they work properly.

  5. #1605
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Quote Originally Posted by dlsmd View Post
    ok that i did not know
    but thats because no ware in the documentation does it say that

    all it says is
    Stores the number of a given buff that is active. Keys are the buff names (case insensitive), so buffactive['light arts'] would be nil or 1 depending whether or not you have light arts up.
    so i thought that buffactive.Ignis == 1 or true(with 3 Ignis buffs)
    i thought that "Stores the number of a given buff that is active."meant (for Ignis) 523
    Stores the count of a given buff that is active. would be more accurate

    so if i wanted to check for buffactive.Ignis == 3 it would work??
    On the contrary, the statement that you quoted is unambiguous.

    Also, yeah that would work.

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

    Quote Originally Posted by Kensagaku View Post
    Having a bit of trouble on my RUN file (I have problems with every job, don't I?) but this might not be a coding error so much as it is something I'm not understanding properly. Essentially, when I try and use most of my JAs, I don't swap gear properly. I noticed that it only applies to JAs that are under another category; Vivacious Pulse swaps properly, but runes, Lunge/Swipe, and Vallation/Valiance aren't switching gear at all. Is there a way to handle "category" type JAs like this?

    Edit: By Category I mean "Rune Enchantment" "Ward" and "Effusion" in this case.

    My GS: http://pastebin.com/LsT1rn84
    By 'Category', you mean spell.type.

    It checks for runes and lunge and such only after it determines that spell.type == 'JobAbility'. Runes are spell.type == 'Rune', thus the 'JobAbility' check naturally fails.

    Basically, you're saying "Don't look inside this box if this spell isn't of type JobAbility", and then wondering why it doesn't look inside the box when the spell isn't of type JobAbility.

    It looks like you actually want
    Code:
    elseif spell.type == 'JobAbility' then
    to be
    Code:
    elseif spell.action_type == 'Ability' then
    though you'll need to check for spell.type == 'WeaponSkill' beforehand to be sure those are excluded from the Ability block.


    Also, what's with the string.find(spell.english,'Lunge') garbage? Every one that I see is looking for an exact match. That's not what you use string.find() for. All you need to do is check if spell.english == 'Lunge'.

    And the enhancing magic spell checks make my head hurt. Please try this order:

    Code:
    if spell.english == 'Foil' then
    elseif spell.english:startswith('Regen') then
    elseif spell.skill == 'Enhancing Magic' then
    elseif spell.skill == 'Divine Magic' then
    elseif spell.skill == 'Healing Magic' then
    end
    And why are you equipping midcast sets in the precast() function? Actually, almost all of your precast code for magic spells seems nonsensical.

    Code:
    function precast(spell)
        if spell.action_type == 'Magic' then
            equip(sets.precast.fastcast)
        elseif ~other stuff
        end
    end
    
    function midcast(spell)
        if spell.action_type == 'Magic' then
            -- midcast gear stuff
            if spell.english == 'Foil' then
            elseif spell.english:startswith('Regen') then
            elseif spell.skill == 'Enhancing Magic' then
            elseif spell.skill == 'Divine Magic' then
            elseif spell.skill == 'Healing Magic' then
            end
        end
    end
    I also don't understand why you're checking for spells' cast times. Spell cast time isn's a limitation for GearSwap.

    Meh. That's enough griping for now.

  7. #1607
    Salvage Bans
    Join Date
    Oct 2010
    Posts
    948
    BG Level
    5
    FFXI Server
    Valefor

    Pardon. n_n; I'm using what I've learned in bits and pieces from other observations. The spell times were on a SCH example file, hence why I was using it. The others, I wasn't aware of other solutions. I'm using what I can to make it work for the moment, and then tidying it up from that point. I will keep your input in mind, however.

    As for why some of my precasts are using midcast sets, that's because they're generally pretty fast and I just start casting in that set. I keep forgetting how effective GearSwap is in switching even in those short times; I got used to SpellCast being rather slow in that department. That's just a carry-over habit.

    As for my poor ordering, please forgive me. v.v I'm sorta coding as I go, and I'll tidy it up in the end.

  8. #1608
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    In spell cast i could do something like
    if spell=cure
    cmd=input /echo == Just used %spell ! ==

    and it would give me an echo sayin "== Just used Cure ! =="

    MAIN QUESTION: is there a way to do something like %spell in gear swap? i tried spell.name but it didnt work.

    One example i can give is i wanted to do this

    Code:
    if spell.type == 'Scholar' then
    	send_command('@input /recast "spell.name"')
    And spell.name didnt work so i had to make 4 of these lines one for each arts and addendum and put a strategm from their side to get it to work. here is one of them

    Code:
    if spell.type == 'Scholar' and buffactive['Light Arts'] then
    		send_command('@input /recast "Penury"')
    Also i have seen code that uses the @ and that doesnt use the @ what does the @ mean or do in

    Code:
    send_command('@input /recast "Penury"')
    Will probably have a million more basic questions comin in the future as i wander into gearswap. Morts luas are way to complicated for me and I am jsut trying to look at examples and write and figure it out on my own. OH i almost forgot SECOND QUESTION:

    i was having some issues with what spellcast has for basesets... I thot it was working but about an hour of running around with my basically finished whm lua i realized it wasnt working like i thot. for some reason this works for my fast cast sets

    Code:
    ----  Fast Cast  ----	DONE
    	sets.MA.FC = 
    		{ammo="Incantor Stone",lear="Loquacious Earring",hands="Gendewitha Gages",lring="Prolix Ring",back="Swith Cape",waist="Witful Belt",legs="Orvail Pants",feet="Chelona Boots"}
    	sets.MA.FC.Cure = 
    		{head="Cleric's Cap +2",neck="Aceso's Choker",back="Pahtli Cape",legs="Orison Pantaloons +2",feet="Cure Clogs"}
    	sets.MA.FC.Enh = 
    		{waist="Siegel Sash"}
    	sets.MA.FC.Stoneskin = 
    		{head="Umuthi Hat",hands="Carapacho Cuffs",waist="Siegel Sash"}
    Its my understanding that sets.MA.FC.Cure is like using baseset sets.MA.FC or it equips sets.MA.FC.Cure on top of sets.MA.FC in other words. And it appears to work that way but when using this same idea for healing sets i noticed it was not using the baseset slots at all, So i grudgingly put all unused slots from my healing skill into my cure potency set

    Code:
    ----  Healing Skill  ----	DONE
    	sets.MA.Heal = 
    		{sub="Curatio Grip",body="Orison Bliaud +2",hands="Augur's Gloves",lring="Ephedra Ring",rring="Ephedra Ring",back="Tempered Cape",waist="Bishop's Sash",legs="Cleric's Pantaloons +2"}
    	sets.MA.Heal.Cure = 
    		{main="Chatoyant Staff",sub="Curatio Grip",head="Gendewitha Caubeen",lear="Orison Earring",rear="Roundel Earring",body="Orison Bliaud +2",hands="Augur's Gloves",lring="Ephedra Ring",rring="Ephedra Ring",back="Tempered Cape",waist="Bishop's Sash",legs="Orison Pantaloons +2",feet="Piety Duckbills"}
    and bout ten minutes after i did all that i found set_combine which would have made all that easier and less time consuming to do lol, so i used if for my enhancing sets. and it works!

    Code:
    sets.MA.Enhance = 
    		{sub="Fulcio Grip",neck="Enhancing Torque",hands="Dynasty Mitts",back="Merciful Cape",waist="Olympus Sash",legs="Cleric's Pantaloons +2",feet="Orison Duckbills +2"}
    	sets.MA.Enhance.Stoneskin = set_combine(sets.MA.Enhance, 
    		{neck="Stone Gorget",rear="Earthcry Earring",hands="Stone Mufflers",waist="Siegel Sash",legs="Haven Hose"})
    QUESTION: So why does sets.MA.FC.Cure = work as a base set but not sets.MA.Heal.Cure = ? I rather just use the fast cast way instead of the enhancing way.

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

    Quote Originally Posted by Trumpy
    In spell cast i could do something like
    if spell=cure
    cmd=input /echo == Just used %spell ! ==

    and it would give me an echo sayin "== Just used Cure ! =="

    MAIN QUESTION: is there a way to do something like %spell in gear swap? i tried spell.name but it didnt work.
    Either of:

    send_command('input /echo == Just used '..spell.name..' ! ==')
    add_to_chat(122,'== Just used '..spell.name..' ! ==')


    Quote Originally Posted by Trumpy
    Also i have seen code that uses the @ and that doesnt use the @ what does the @ mean or do in
    The @ is a way of ensuring the string is sent exactly, without trying to parse escape codes. However GearSwap inserts the @ automatically with any send_command, so you don't need to do it yourself. The @ symbols just get copied around from various people's files, just because that's the way the original person did it.


    Quote Originally Posted by Trumpy
    Morts luas
    Mote's

    Quote Originally Posted by Trumpy
    Its my understanding that sets.MA.FC.Cure is like using baseset sets.MA.FC or it equips sets.MA.FC.Cure on top of sets.MA.FC in other words.
    Your understanding is wrong.

    In order to do the equivalent of a Spellcast base set, you'd write it like this:

    Code:
    	sets.MA.FC = 
    		{ammo="Incantor Stone",lear="Loquacious Earring",hands="Gendewitha Gages",lring="Prolix Ring",back="Swith Cape",waist="Witful Belt",legs="Orvail Pants",feet="Chelona Boots"}
    	sets.MA.FC.Cure = set_combine(sets.MA.FC,
    		{head="Cleric's Cap +2",neck="Aceso's Choker",back="Pahtli Cape",legs="Orison Pantaloons +2",feet="Cure Clogs"})
    The fact that sets are named in a hierarchical manner is purely an organizational effect. It's done that way so that when you read it, as a human, it's easy to make sense of. It also provides a structure that makes it incredibly easy to auto-select sets based on various criteria. But it in no way combines sets together unless you explicitly tell it to with the set_combine() function.

  10. #1610
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Ok thank you Mote (sorry bout the Mort i have no idea how i typed that lol) So it looks like i will have to go with the way i did the enhancing magic part. any idea why the fast cast sets seem to work like basesets tho despite it shouldnt? According to showswaps it works in fast cast but not the other sets i tried. When i first started i only had the fast casts and since it worked i did the rest like that only to find them not workin on anything not a fastcast set. Ill go ahead and adjust them now to the set_combine method anyway tho.

    Also i saw buff cancelling done two ways and i utilized them both ways with
    Code:
    windower.ffxi.cancel_buff(71)                         --in the precast and 
    send_command('@wait 1.7;cancel 71')            --in the midcast.
    Do they just use the midcast way when they want to delay the cancelling a certain amount of time? is it possible to just use 'Sneak' in place of 71 ?

  11. #1611
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by dlsmd View Post
    what lvl is your whm??
    are you using all of mots files?? are thay the latest versions??
    are you using it from the menu??
    if from menu it must be in(for motes files) job_precast
    if not from menu it can be in (for motes files) job_pretarget(this only works if you type in the spell info or from a macro)
    My whm is 99.
    I d/led his files 2 days ago. I use macros.
    I will try out mote's suggestion when I go back tonight. Thanks for the help.

  12. #1612
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by JSHidaka View Post
    So probably its something inside mote's lua. Make a blank lua with just that in pre target, and test it.
    Thanks, was thinking about doing that as well.

  13. #1613
    Melee Summoner
    Join Date
    May 2014
    Posts
    36
    BG Level
    1
    FFXI Server
    Ragnarok

    Quote Originally Posted by Motenten View Post
    Since you're modifying my files, don't use cancel_spell(), and don't define your own versions of pretarget() or precast(). Both of those will cause problems. You should be using job_pretarget() and job_precast().
    Spoiler: show

    To cancel a spell, use:
    Code:
        eventArgs.cancel = true
    And then insert a return command as appropriate to be sure that you don't run regular code after you've decided to cancel.

    When you created a precast() function it didn't work because you broke the entire include structure.

    And of course, when you cast paralyze you have a send_command() to *again* cast paralyze (which will hit this bit of code, and yet again send the command to cast paralyze, etc). Take that out. If you're casting paralyze, you don't need to send a command to tell it to cast paralyze again.

    If you were testing this by casting on yourself that would also fail. spell.player.type == 'PLAYER' is for every other player *except* yourself. You also need to check for spell.target.type == 'SELF'.

    So, to fix all the problems in your code sample:

    Code:
    function job_precast(spell, action, spellMap, event Args)
        if spell.english == 'Paralyze' and (spell.target.type == 'PLAYER' or spell.target.type == 'SELF') then
            eventArgs.cancel = true
            send_command('input /ma "Paralyna" ' ..spell.target.name)
            return
        end
    end
    Thanks for the help, i will try it later tonight. hope it works.

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

    Quote Originally Posted by Trumpy
    is it possible to just use 'Sneak' in place of 71 ?
    If you've installed the 'cancel' addon, yes. You'll need to use the send_command() version for that.

  15. #1615
    New Merits
    Join Date
    Mar 2007
    Posts
    235
    BG Level
    4
    FFXI Server
    Asura

    Also part of the converters from spellcast to gearswap, currently just using an slightly adjusted lua that byrth included for bard to learn the ropes. However the function to call on elemental fastcast staffs in correlation to element doesn't seem to work.

    http://pastebin.com/AHhbuims

    particularly line 147 to the sets listed at line 31
    Code:
    if sets.precast.FC[tostring(spell_element)] then equip(sets.precast.FC[tostring(spell_element)])

  16. #1616
    D. Ring
    Join Date
    Jul 2008
    Posts
    4,529
    BG Level
    7
    FFXI Server
    Phoenix

    Could anyone post an example of a file making use of augmented gear in gearswap? I think I'm just doing something wrong and misunderstanding.

  17. #1617
    BG Content
    Join Date
    Jul 2007
    Posts
    22,361
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Quote Originally Posted by Darkmagi View Post
    Could anyone post an example of a file making use of augmented gear in gearswap? I think I'm just doing something wrong and misunderstanding.
    Try using "//gs export inventory" while wearing the gear that you're interested in using as an augmented item (or just having it in inventory).

  18. #1618
    D. Ring
    Join Date
    Jul 2008
    Posts
    4,529
    BG Level
    7
    FFXI Server
    Phoenix

    Is there another step other than just putting said augmented item in a gear set? I think that's what I'm missing.

  19. #1619
    Fake Numbers
    Join Date
    Oct 2012
    Posts
    79
    BG Level
    2
    FFXI Server
    Lakshmi

    Having an issue with this specific line of code:

    Code:
    elseif command == 'Barrage' then
    	Barrage_Index = Barrage_Index +1
    	if Barrage Index > #Barrage_Set_Names then Barrage_Index = 1 end
    	add_to_chat(8,'Barrage Set Changed to: '..Barrage_Set_Names[Barrage_Index]..'')
    error : "then" expected near "index".
    The specific line being called on console is:
    Code:
    if Barrage Index > #Barrage_Set_Names then Barrage_Index = 1 end

  20. #1620
    Sea Torques
    Join Date
    Aug 2006
    Posts
    518
    BG Level
    5
    FFXI Server
    Leviathan

    Got it.

Page 81 of 302 FirstFirst ... 31 71 79 80 81 82 83 91 131 ... LastLast

Similar Threads

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