Item Search
     
BG-Wiki Search
Page 210 of 302 FirstFirst ... 160 200 208 209 210 211 212 220 260 ... LastLast
Results 4181 to 4200 of 6036

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

  1. #4181
    Ridill
    Join Date
    Oct 2006
    Posts
    18,369
    BG Level
    9
    FFXIV Character
    Sath Fenrir
    FFXIV Server
    Cactuar
    FFXI Server
    Fenrir

    Quote Originally Posted by Tantalus View Post
    Anyone having an issue where SOMETIMES it doesn't swap back to your TP set after a weaponskill? Sometimes it does, sometimes it doesnt.
    Was having this issue last week with ready moves sometimes.

    Ended up just mashing my idle button after everything. Dunno if it changed.

  2. #4182
    Smells like Onions
    Join Date
    Mar 2013
    Posts
    3
    BG Level
    0

    I was wondering if anyone could help me with this PLD LUA, modified it from a RUN LUA. I'm getting a " PLD.lua:80: attempt to index field 'precast' (a nil value) " error.

    Spoiler: show


    --[[

    Written 01/01/2015 by Quixacotl. Credit to Motenten for some elements used here.

    You have several options for inputting commands to suit your playstyle; Hotkeys, Cycle and Jump straight to any mode.

    Keybinds:
    F9 - Cycles through 5 different mode groups: Town, DD, DD Accuracy, Physical Defense, and Magic Defense.
    F10 - Turns on PDT mode.
    F11 - Turns on MDT mode.
    F12 - Toggles Repulse Mantle on/off.
    Delete = Hitting the delete button Resets everything back to default.

    Custom Commands:
    //gs c cycle in chatlog or /console gs c cycle for macros.
    Useage: Cycles through 5 different mode groups:
    Town, DD, DD Accuracy, Physical Defense, and Magic Defense.

    Shortcut Commands (allows you to jump straight to any mode):
    //gs c town
    //gs c dd
    //gs c acc
    //gs c pdt
    //gs c mdt

    Gearswap Commands you should know:
    //lua load gearswap
    //lua unload gearswap
    //gs reload - (useful when editing these scripts while in-game)

    --]]

    send_command('bind f9 gs c cycle')
    send_command('bind f10 gs c pdt')
    send_command('bind f11 gs c mdt')
    send_command('bind f12 gs c repulse')
    send_command('bind delete gs reload')

    -- Called when this job file is unloaded (eg: job change)
    function user_unload()
    send_command('unbind f9')
    send_command('unbind f10')
    send_command('unbind f11')
    send_command('unbind f12')
    send_command('unbind delete')
    end

    function get_sets()
    ----------------------------------------------------------------
    -- Gear that needs to be equipped for the duration of a buff. --
    ----------------------------------------------------------------
    sets.buff = {}
    sets.buff['Swordplay'] = {hands="Futhark Mitons +1"}

    --------------------------------------------
    -- City areas for town gear and behavior. --
    --------------------------------------------
    areas = {}
    areas.Cities = S{
    "Eastern Adoulin", "Western Adoulin",
    "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno",
    "Port Windurst", "Windurst Waters", "Windurst Woods",
    "Windurst Walls", "Heavens Tower",
    "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria",
    "Port Bastok", "Bastok Markets",
    "Bastok Mines", "Metalworks",
    "Aht Urhgan Whitegate", "Tavanazian Safehold",
    "Nashmau", "Selbina",
    "Mhaura", "Norg", "Kazham"}

    ----------------------
    -- Weaponskill sets --
    ----------------------
    sets.precast.WS ={ammo="",
    head="Yaoyotl Helm", neck="Asperity Necklace",
    ear1="Bladeborn Earring", ear2="Steelflash Earring",
    body="Chev Cuirass", hands="Phorcys Mitts",
    ring1="K'ayres Ring", ring2="Rajas Ring",
    back="Bleating Mantle", waist="Windbuffet Belt +1",
    legs="Chevalier's Cuisses", feet="Chev. Sabatons",}

    sets.precast.Resolution = set_combine(sets.precast.WS,{neck="Soil Gorget", waist="Soil Belt"})

    sets.WS['Requiescat'] = set_combine(sets.WS,{
    neck="Soil Gorget"})

    sets.WS['Vorpal Blade'] = set_combine(sets.WS, {
    neck="Soil Gorget"})

    sets.precast['Chant du Cygne'] = set_combine(sets.precast.WS,{
    ring1="Thundersoul Ring",})

    sets.Enmity = {ammo="",
    head="Rev. Coronet ", neck="Invidia Torque",
    ear1="Friomisi Earring", ear2="Pluto's Pearl",
    body="Emet Harness", hands="Cab. Gauntlets",
    ring1="Supershear Earring", ring2="Vexer Ring +1",
    back="Earthcry Mantle", waist="Creed Baudrier",
    legs="Rev. Breeches", feet="Cab. Leggings +1"}

    ------------------
    -- Precast Sets --
    ------------------
    sets.precast = {}
    sets.precast.FastCast = {head="Chevalier's Armet",
    ear1="Loquac. Earring",
    legs="Enif Cosciales"}

    sets.precast.Waltz = {head="Yaoyotl Helm",
    body="Reverance Surcoat", hands="Chev. Gauntlets",
    legs="Rev. Breeches", feet="Rev. Leggings"}

    sets.precast.Step = {}
    sets.precast['Animated Flourish'] = sets.Enmity


    ------------------
    -- Midcast Sets --
    ------------------
    sets.midcast = {}
    sets.midcast.FastRecast = {ammo="Impatiens",
    head="Chevalier's Armet", neck="Twilight Torque",
    ear1="Loquac. Earring", ear2="Creed Earring",
    body="Reverance Surcoat", hands="Chev. Gauntlets",
    ring1="Dark Ring", ring1="Dark Ring",
    back="Mollusca Mantle", waist="Phasmida Belt",
    legs="Enif Cosciales", feet="Chev. Sabatons", }

    sets.midcast['Enhancing Magic'] = set_combine(sets.midcast.FastRecast, {
    legs="Rev. Breeches", })

    sets.midcast['Divine Magic'] = set_combine(sets.midcast.FastRecast)

    --------------------
    -- AfterCast Sets --
    --------------------

    -----------------
    -- Status Sets --
    -----------------
    sets.Resting = {
    head="Twilight Helm", neck="Parade Gorget", ear2="Creed Earring", ring1="Sheltered Ring",
    body="Ogier's Surcoat", ring2="Paguroidea Ring", hand="Ogier's Gauntlets", }

    ---------------
    -- Idle Sets --
    ---------------

    Idle_Set_Names = {"Town","DD","DD Accuracy","Physical Defense","Magic Defense"}

    sets.Idle = {ammo="Ginsen",
    head="Yaoyotl Helm", neck="Creed Collar",
    ear1="Ethereal Earring", ear2="Creed Earring",
    body="Reverance Surcoat",
    hands="Chev. Gauntlets",
    ring1="Sheltered Ring", ring2="Rajas Ring",
    back="Bleating Mantle", waist="Nierenschutz",
    legs="Rev. Breeches", feet="Chev. Sabatons"}

    sets.Idle.Town = {}

    sets.Idle.DD = {ammo="Ginsen",
    head="Yaoyotl Helm", neck="Creed Collar",
    ear1="Ethereal Earring", ear2="Creed Earring",
    body="Reverance Surcoat",
    hands="Chev. Gauntlets",
    ring1="Sheltered Ring", ring2="Rajas Ring",
    back="Bleating Mantle", waist="Nierenschutz",
    legs="Rev. Breeches", feet="Chev. Sabatons"}

    sets.Idle['DD Accuracy'] = {ammo="Ginsen",
    head="Yaoyotl Helm", neck="Creed Collar",
    ear1="Ethereal Earring", ear2="Creed Earring",
    body="Reverance Surcoat",
    hands="Chev. Gauntlets",
    ring1="Sheltered Ring", ring2="Rajas Ring",
    back="Bleating Mantle", waist="Nierenschutz",
    legs="Rev. Breeches", feet="Chev. Sabatons"}

    sets.Idle['Physical Defense'] = {ammo="",
    head="Rev. Coronet", neck="Twilight Torque",
    ear1="Ethereal Earring", ear2="Creed Earring",
    body="Reverance Surcoat", hands="Rev. Gauntlets",
    ring1="Dark Ring", ring2="Dark Ring",
    back="Shadow Mantle", waist="Nierenschutz",
    legs="Rev. Breeches", feet="Rev. Leggings"}

    -- ShellV, Defending Ring and Mollusca is enough to cap MDT for Rune Fencer. --

    sets.Idle['Magic Defense'] = set_combine(sets.Idle['Physical Defense'],{
    ammo="Demonry Stone",
    ring1="Defending Ring", ring2=DarkRing.mdt,
    back="Engulfer Cape +1", waist="Creed Baudrier",
    feet="Cab. Leggings"})

    ------------------
    -- Engaged Sets --
    ------------------

    TP_Set_Names = {"Town","DD","DD Accuracy","Physical Defense","Magic Defense"}

    sets.TP = {}
    sets.TP.Town = set_combine(sets.Idle.Town, {})

    sets.TP.DD = set_combine(sets.Idle.DD, {})

    sets.TP['DD Accuracy'] = set_combine(sets.Idle['DD Accuracy'], {})

    sets.TP['Physical Defense'] = set_combine(sets.Idle['Physical Defense'], {})

    sets.TP['Magic Defense'] = set_combine(sets.Idle['Magic Defense'], {})


    -------------
    -- JA Sets --
    -------------
    sets.JA = {}
    sets.JA["Invincible"] = set_combine(sets.Enmity,{legs="Valor Breeches +2"})
    sets.JA["Holy Circle"] = set_combine(sets.Enmity,{feet="Rev. Leggings"})
    sets.JA["Shield Bash"] = set_combine(sets.Enmity,{
    hands="Cab. Gauntlets",
    feet="Rev. Leggings"
    })

    sets.JA["Sentinel"] = set_combine(sets.Enmity,{feet="Cab. Leggings"})
    sets.JA["Rampart"] = {ammo="Brigantia Pebble",
    head="Cab. Coronet",
    body="Reverance Surcoat",
    hands="Rev. Gauntlets",
    back="Iximulew Cape",
    waist="Creed Baudrier",
    legs="Rev. Breeches",
    feet="Rev. Leggings"}

    sets.JA["Fealty"] = set_combine(sets.Enmity,{body="Cab. Surcoat"})
    sets.JA["Divine Emblem"] = set_combine(sets.Enmity,{feet="Chev. Sabatons"})
    sets.JA["Cover"] = {head="Rev. Coronet",body="Cab. Surcoat"}
    sets.JA["Palisade"] = set_combine(sets.Enmity)

    sets.JA["Provoke"] = set_combine(sets.Enmity)
    sets.JA["Warcry"] = set_combine(sets.Enmity)
    sets.JA["Souleater"] = set_combine(sets.Enmity)
    sets.JA["Last Resort"] = set_combine(sets.Enmity)
    sets.JA['Animated Flourish'] = set_combine(sets.Enmity)
    sets.JA["Chivalry"] = {ammo="Aqua Sachet",
    head="Cab. Coronet", neck="Aife's Medal",
    body="Reverance Surcoat", hands="Cab. Gauntlets",
    ring1="Aqua Ring", ring2="Aquasoul Ring",
    back="Mubvum. Mantle", waist="Cascade Belt",
    legs="Rev. Breeches", feet="Mikinaak Greaves"}

    -- Flourish --
    sets.Flourish = {}
    sets.Repulse = {back="Repulse Mantle"}
    -----------------------------------
    -- Variables and notes to myself --
    -----------------------------------

    Mode_Index = 1
    Repulse = 'false'

    send_command('input /macro book 3;wait .1;input /macro set 2')
    end

    function precast(spell,action)
    if spell.action_type == 'Magic' then
    equip(sets.precast.FastCast)
    elseif sets.WS[spell.name] then
    equip(sets.WS[spell.name])
    elseif spell.type=="JobAbility" then
    if sets.JA[spell.name] then
    equip(sets.JA[spell.name])
    end
    elseif spell.type=="WeaponSkill" then
    equip(sets.WS)
    elseif spell.name:contains('Waltz') then
    equip(sets.precast.Waltz)
    elseif spell.name:contains('Step') then
    equip(sets.precast.Step)
    end
    end

    function midcast(spell,action)
    if sets.midcast[spell.name] and not spell.interrupted then
    equip(sets.midcast[spell.name])
    elseif spell.name == 'Flash' then
    equip(sets.Enmity)
    elseif spell.name == 'Sneak' or spell.name == 'Spectral Jig' or spell.name:startswith('Monomi') and spell.target.type == 'SELF' then
    send_command('cancel 71')
    elseif sets.midcast[spell.skill] then
    equip(sets.midcast[spell.skill])
    end
    end

    function aftercast(spell,action)
    update_gear()
    end

    function status_change(new,action)
    update_gear()
    end

    -- Called when a player gains or loses a buff. --
    function buff_change(buff,gain)
    if buff == "Swordplay" then update_gear() end
    end

    function self_command(command)
    if command:lower() == 'cycle' then
    Mode_Index = Mode_Index +1
    if Mode_Index > #Idle_Set_Names then
    Mode_Index = 1
    end
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'mdt' then
    Mode_Index = 5
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'pdt' then
    Mode_Index = 4
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'acc' then
    Mode_Index = 3
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'dd' then
    Mode_Index = 2
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'town' then
    Mode_Index = 1
    add_to_chat(8,'----- Gear Mode changed to '..Idle_Set_Names[Mode_Index]..' -----')
    update_gear()
    elseif command:lower() == 'repulse' then
    if Repulse == 'false' then
    Repulse = 'true'
    add_to_chat(8,'----- Changed to Repulse Mantle -----')
    elseif Repulse == 'true' then
    Repulse = 'false'
    end
    update_gear()
    end
    end

    function update_gear()
    if player.status == 'Engaged' then
    equip(sets.TP[TP_Set_Names[Mode_Index]])
    elseif player.status == 'Idle' then
    if areas.Cities:contains(world.area) then
    add_to_chat(8,'----- You are at '..world.area..'. Town gear equipped! -----')
    add_to_chat(8,'----- Hotkeys: F9 cycle, F10 PDT, F11 MDT, F12 Repulse, Delete Reset. -----')
    equip(sets.Idle.Town)
    else
    send_command('input /lockstyle on')
    equip(sets.Idle[Idle_Set_Names[Mode_Index]])
    end
    else
    equip(sets.Resting)
    end

    if buffactive['Swordplay'] then equip(sets.buff['Swordplay']) end
    if Repulse == 'true' then equip(sets.Repulse) end
    end

  3. #4183
    Pens win! Pens Win!!! PENS WIN!!!!!
    Sweaty Dick Punching Enthusiast

    Join Date
    Oct 2007
    Posts
    2,187
    BG Level
    7

    Looking to lock a body piece(Chasseur's Frac) when triple shot is active.

    How would I write that into my lua?

  4. #4184
    BG Content
    Join Date
    Jul 2007
    Posts
    22,372
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    Put:
    Code:
    sets.precast = {}
    Before the line that throws the error, but if that is a motenten template then maybe you are doing something wrong.

  5. #4185
    Old Merits
    Join Date
    Sep 2010
    Posts
    1,094
    BG Level
    6
    FFXI Server
    Ragnarok

    The . in a set name indicates a.. subtable? I guess you'd call it. For sets.precast.WS to be made, sets.precast must already exist. you're using sets.precast.WS before sets.precast is established. Which is what's throwing that error.

    Actually... looking closer those set names are really inconsistent. Your WS rules use sets.WS, as do some of your WS set names. But some WS are using set.precast.spellname which would make them get handled by your general precast rules not your WS specific rules.

    Remove the .precast from your WS sets and that error should stop. Also, the resolution set needs to be sets.WS.Resolution.

    And finally, use code tags. It's a lot easier to read. It's still fine to put that in a spoiler though.

  6. #4186
    Smells like Onions
    Join Date
    Mar 2013
    Posts
    3
    BG Level
    0

    Perfect, thanks for the help. Got it working.

  7. #4187
    Smells like Onions
    Join Date
    May 2015
    Posts
    1
    BG Level
    0

    I'm running on a fresh install of windower4 and gearswap trying to run the basic skillup script. However, when I try to cast a spell to get it going my game freezes and I get a "stopping skillup" notification. The box that typically has data in it is just a black box sitting in the the middle of my screen and when I scroll over it it also freezes the game. Any thoughts on this?

  8. #4188
    First invited, last in the zone.
    Join Date
    Sep 2008
    Posts
    1,448
    BG Level
    6
    FFXI Server
    Lakshmi

    Quote Originally Posted by Falkirk View Post
    It's spell.type == "Monster".
    Wouldn't it be better to just specify spell.name == "Ready" ? Otherwise you'd e.g. swap axes when you used Sic, no?

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

    There's no spell called "Ready".

  10. #4190
    Salvage Bans
    Join Date
    Jun 2007
    Posts
    771
    BG Level
    5

    Quote Originally Posted by Byrthnoth View Post
    It seems to be in high latency or high lag situations.

  11. #4191
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Falkirk View Post
    There's no spell called "Ready".
    Ready is a job ability not a spell
    Ready has these
    spell.name == "Ready"
    spell.type == "PetCommand"
    spell.skill == "Ability"

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

    The context is important here:

    He wants to make a precast for Ready moves (i.e. when he uses /pet "Fireball" <me>). The simple way to accomplish that is to check for spell.type == "Monster", since BSTs don't actually use a "Ready" JA.

  13. #4193
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    -- Nevermind, I found option in the forums settings for it --

  14. #4194
    RIDE ARMOR
    Join Date
    Aug 2009
    Posts
    12
    BG Level
    1
    FFXI Server
    Shiva
    WoW Realm
    Hellscream

    I could use a bit of help, I'm newly back to ffxi and trying to set up gearswap for the first time. I used Kinematics as a template and tried to just copy in gear I had available. When I log in game with this I can load and unload gearswap with no error messages, but I'm also not getting any response at all in game from gearswap. //gs reload doesn't bring up any messages at all, and no gear is changed etc.

    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.

    -- 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.CombatForm = get_combat_form()

    state.Buff = {}
    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', 'Acc', 'Multi'}
    options.DefenseModes = {'Normal', 'PDT', 'Reraise'}
    options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
    options.CastingModes = {'Normal'}
    options.IdleModes = {'Normal'}
    options.RestingModes = {'Normal'}
    options.PhysicalDefenseModes = {'PDT', 'Reraise'}
    options.MagicalDefenseModes = {'MDT'}

    state.Defense.PhysicalMode = 'PDT'

    -- Additional local binds
    send_command('bind ^` input /ja "Hasso" <me>')
    send_command('bind !` input /ja "Seigan" <me>')

    select_default_macro_book(1, 16)
    end


    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    if binds_on_unload then
    binds_on_unload()
    end

    send_command('unbind ^`')
    send_command('unbind !-')
    end


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

    -- Precast Sets
    -- Precast sets to enhance JAs
    sets.precast.JA.Angon = {ammo="Angon",hands="Gorney moufles +1"}
    sets.precast.JA.Jump = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Vishap Mail +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.JA['Ancient Circle'] = {legs="Gor. brayettes +1"}
    sets.precast.JA['High Jump'] = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Vishap Mail +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.JA['Soul Jump'] = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.JA['Spirit Jump'] = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.JA['Super Jump'] = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.JA['Spirit Link'] = {hands="Lnc. Vmbrc. +2"}
    sets.precast.JA['Call Wyvern'] = {body="Wyrm Mail +2"}
    sets.precast.JA['Deep Breathing'] = {hands="Gorney moufles +1"}
    sets.precast.JA['Spirit Surge'] = {body="Wyrm Mail +2"}


    -- Healing Breath sets
    sets.HB = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.HB.Pre = {head="Gorney morion +1"}
    sets.HB.Mid = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}

    -- Waltz set (chr and vit)
    sets.precast.Waltz = {ammo="Sonia's Plectrum",
    head="Yaoyotl Helm",
    body="Mikinaak Breastplate",hands="Buremte Gloves",ring1="Spiral Ring",
    back="Letalis Mantle",legs="Cizin Breeches",feet="Karieyh Sollerets +1"}

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

    sets.midcast.Breath =
    set_combine(
    sets.midcast.FastRecast,
    { head="Vishap Armet +1" })

    -- Fast cast sets for spells

    sets.precast.FC = {head="Vishap Armet +1", neck="Orunmila's Torque",ear2="Loquacious Earring"}

    -- Midcast Sets
    sets.midcast.FastRecast = {
    head="Vishap Armet +1",
    body="Mikinaak Breastplate",hands="Cizin Mufflers",
    legs="Cizin Breeches",feet="Karieyh Sollerets +1"}

    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {}

    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {})

    sets.precast.WS = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Moonshade earring",ear2="Brutal Earring",
    body="Vishap mail +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}
    sets.precast.WS.Acc = set_combine(sets.precast.WS, {head="Gorney morion +1",back="Atheling Mantle"})

    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Stardiver'] = set_combine(sets.precast.WS, {neck="Chivalrous Chain",waist="Zoran's belt"})
    sets.precast.WS['Stardiver'].Acc = set_combine(sets.precast.WS.Acc, {neck="Chivalrous Chain",waist="Zoran's belt"})
    sets.precast.WS['Stardiver'].Mod = set_combine(sets.precast.WS['Stardiver'], {neck="Chivalrous Chain",waist="Zoran's belt"})

    sets.precast.WS['Drakesbane'] = set_combine(sets.precast.WS, {neck="Chivalrous Chain"})
    sets.precast.WS['Drakesbane'].Acc = set_combine(sets.precast.WS.Acc, {neck="Chivalrous Chain"})
    sets.precast.WS['Drakesbane'].Mod = set_combine(sets.precast.WS['Drakesbane'], {waist="Zoran's belt"})



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

    -- Resting sets
    sets.resting = {head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"}


    -- Idle sets
    sets.idle = {}

    -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    sets.idle.Town = {main="Homestead Lance", sub="Pole Grip",ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.idle.Field = {
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.idle.Weak = {
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    -- Defense sets
    sets.defense.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.defense.Reraise = {
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.defense.MDT = {ammo="Demonry Stone",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Lncr. Plackart +2",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.Kiting = {legs="Crimson Cuisses"}


    -- Engaged sets

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

    -- Normal melee group
    sets.engaged = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Acc = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Multi = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Multi.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Multi.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Acc.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Acc.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"

    -- Melee sets for in Adoulin, which has an extra 2% Haste from Ionis.
    sets.engaged.Adoulin = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Acc = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Multi = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Multi.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Multi.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Acc.PDT = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +1"
    sets.engaged.Adoulin.Acc.Reraise = {ammo="Angon",
    head="Gorney morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring+1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney moufles+1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's belt",legs="Gor. brayettes +1",feet="Gor. Sollerets +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 target handling to be done.
    function job_pretarget(spell, action, spellMap, eventArgs)

    end

    -- 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.action_type == 'Magic' then
    equip(sets.precast.FC)
    end
    end

    -- Run after the default precast() is done.
    -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
    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
    equip(sets.midcast.FastRecast)
    if player.hpp < 51 then
    classes.CustomClass = "Breath" -- This would cause it to look for sets.midcast.Breath
    end
    end
    end

    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)

    -- if state.DefenseMode == 'Reraise' or
    -- (state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
    -- equip(sets.Reraise)
    -- 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 spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' then
    equip(sets.HB.Mid)
    end
    end

    -- Run after the default pet midcast() is done.
    -- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
    function job_pet_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)
    if state.DefenseMode == 'Reraise' or
    (state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
    end
    end

    -- Run after the default aftercast() is done.
    -- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
    function job_post_aftercast(spell, action, spellMap, eventArgs)

    end

    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_pet_aftercast(spell, action, spellMap, eventArgs)

    end

    -- Run after the default pet aftercast() is done.
    -- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
    function job_pet_post_aftercast(spell, action, spellMap, eventArgs)

    end


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

    -- Called before the Include starts constructing melee/idle/resting sets.
    -- Can customize state or custom melee class values at this point.
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_handle_equipping_gear(status, eventArgs)

    end

    -- Return a customized weaponskill mode to use for weaponskill sets.
    -- Don't return anything if you're not overriding the default value.
    function get_custom_wsmode(spell, action, spellMap)

    end

    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
    return idleSet
    end

    -- Modify the default melee set after it was constructed.
    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, eventArgs)

    end

    -- Called when the player's pet's status changes.
    function job_pet_status_change(newStatus, oldStatus, eventArgs)

    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)

    end

    function job_update(cmdParams, eventArgs)
    --state.CombatForm = get_combat_form()
    end
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------

    -- Called for custom player commands.
    function job_self_command(cmdParams, eventArgs)

    end

    --function get_combat_form()
    -- if areas.Adoulin:contains(world.area) and buffactive.ionis then
    -- return 'Adoulin'
    -- 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.CustomMeleeGroups:clear()
    if areas.Adoulin:contains(world.area) and buffactive.ionis then
    classes.CustomMeleeGroups:append('Adoulin')
    end
    end

    -- Job-specific toggles.
    function job_toggle(field)

    end

    -- Request job-specific mode lists.
    -- Return the list, and the current value for the requested field.
    function job_get_mode_list(field)

    end

    -- Set job-specific mode values.
    -- Return true if we recognize and set the requested field.
    function job_set_mode(field, val)

    end

    -- Handle auto-targetting based on local setup.
    function job_auto_change_target(spell, action, spellMap, eventArgs)

    end

    -- Handle notifications of user state values being changed.
    function job_state_change(stateField, newValue)

    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.
    -------------------------------------------------------------------------------------------------------------------
    function select_default_macro_book()
    set_macro_page(1, 16)
    end



    Any help with what I'm doing wrong would be appreciated.

  15. #4195
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Falkirk View Post
    The context is important here:

    He wants to make a precast for Ready moves (i.e. when he uses /pet "Fireball" <me>). The simple way to accomplish that is to check for spell.type == "Monster", since BSTs don't actually use a "Ready" JA.
    Fireball has
    spell.name == "Fireball"
    spell.type == "Monster"
    spell.skill == "Ability"

    if he wants to do it when his player uses the /pet "Fireball" <me> command
    --this will only work until the player finishes his cast
    Code:
    function precast(spell)
        if spell.name == "Fireball" then
            --do something
        end
    end
    now if he just want to do something when his pet actually uses Fireball
    --this will work untill the pet finishes its cast
    Code:
    function pet_midcast(spell)
        if spell.name == "Fireball" then
            --do something
        end
    end
    the order that things happen when using pet abilities is:
    1.use command
    2.precast
    3.aftercast
    4.pet_midcast -- the line in chat that says pet readies <ability>
    5.pet_aftercast -- the line in chat that says pet uses <ability>

  16. #4196
    Smells like Onions
    Join Date
    May 2015
    Posts
    1
    BG Level
    0

    So I've been trying to get GearSwap to work at all, and I've swapped my gear into Mote's THF Lua. Lo and behold, it's broken as hell. It won't swap into the various sets at all, it seems intent on throwing on my idle and TH set at the same time and just staying there, doesn't swap to TP or WS sets. Any idea what could possibly be causing it?

    Google doesn't find anything, and I've wasted a few hours trying to figure out what in the hell could be causing it.

  17. #4197
    RIDE ARMOR
    Join Date
    Aug 2009
    Posts
    12
    BG Level
    1
    FFXI Server
    Shiva
    WoW Realm
    Hellscream

    So I went and found another template, tried to input my gear into that one, getting an error User File problem: filepath every time I try to load it. Here's the new template as well, any help with what I'm doing wrong with either this one or the previous posted template would be 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.

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


    -- Setup vars that are user-independent.
    function job_setup()
    get_combat_form()
    include('Mote-TreasureHunter')
    state.TreasureMode:set('Tag')

    state.CapacityMode = M(false, 'Capacity Point Mantle')

    -- list of weaponskills that make better use of otomi helm in low acc situations
    wsList = S{'Drakesbane'}

    state.Buff = {}
    -- JA IDs for actions that always have TH: Provoke, Animated Flourish
    info.default_ja_ids = S{35, 204}
    -- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
    info.default_u_ja_ids = S{201, 202, 203, 205, 207}
    end


    -- Setup vars that are user-dependent. Can override this function in a sidecar file.
    function user_setup()
    -- Options: Override default values
    state.OffenseModeptions('Normal', 'Mid', 'Acc')
    state.HybridModeptions('Normal', 'PDT', 'Reraise')
    state.WeaponskillModeptions('Normal', 'Mid', 'Acc')
    state.PhysicalDefenseModeptions('PDT', 'Reraise')
    state.MagicalDefenseModeptions('MDT')

    war_sj = player.sub_job == 'WAR' or false

    select_default_macro_book(1, 16)
    send_command('bind != gs c toggle CapacityMode')
    send_command('bind ^= gs c cycle treasuremode')
    send_command('bind ^[ input /lockstyle on')
    send_command('bind ![ input /lockstyle off')
    end


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


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

    -- Precast Sets
    -- Precast sets to enhance JAs
    sets.precast.JA.Angon = {ammo="Angon",hands="Gorney Moufles +1"}
    sets.CapacityMantle = {back="Atheling Mantle"}
    sets.Berserker = {neck="Chivalrous Chain"}
    sets.WSDayBonus = { head="Gorney Morion +1" }

    sets.precast.JA.Jump = {
    ammo="Angon",
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring +1",ear2="Brutal Earring",
    body="Vishap Mail",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Gor. Brayettes +1",feet="Gor. Sollerets +1"}

    sets.precast.JA['Ancient Circle'] = { legs="Gor. Brayettes +1" }
    sets.TreasureHunter = {waist="Zoran's Belt"}

    sets.precast.JA['High Jump'] = set_combine(sets.precast.JA.Jump, {
    })
    sets.precast.JA['Soul Jump'] = set_combine(sets.precast.JA.Jump, {
    legs="Lancer's Cuissots +2",
    body="Lancer's Plackart +2"
    })
    sets.precast.JA['Spirit Jump'] = set_combine(sets.precast.JA.Jump, {
    legs="Lancer's Cuissots +2",
    body="Lancer's Plackart +2",
    feet="Lancer's Schynbalds +2"})
    sets.precast.JA['Super Jump'] = sets.precast.JA.Jump

    sets.precast.JA['Spirit Link'] = {hands="Lancer's Vambraces +2", head="Gorney Morion +1"}
    sets.precast.JA['Call Wyvern'] = {body="Wym. Mail +2"}
    sets.precast.JA['Deep Breathing'] = {head="Petroslaver Armet"}

    sets.precast.JA['Spirit Surge'] = { --body="Wyrm Mail +2"
    }

    -- Healing Breath sets
    sets.HB = {ammo="Angon",
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring +1",ear2="Brutal Earring",
    body="Vishap Mail",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Gor. Brayettes +1",feet="Gor. Sollerets +1"}

    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
    head="Gorney Morion +1",
    body="Vishap Mail +1",hands="Gorney Moufles +1",ring1="Rajas Ring",
    back="Atheling Mantle",legs="Gor. Brayettes +1",feet="Gor. Sollerets +1"}

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

    -- Fast cast sets for spells
    sets.precast.FC = {
    ammo="Angon",
    head="Gorney Morion +1",
    ear1="Ghillie Earring +1",
    hands="Gorney Moufles +1",
    ring1="Rajas Ring"
    }

    -- Midcast Sets
    sets.midcast.FastRecast = {
    head="Gorney Morion +1",
    neck="Chivalrous Chain",
    hands="Gorney Moufles +1",
    body="Gorney Haubert +1",
    ring1="Rajas Ring",
    ring2="Tyrant's Ring",
    back="Atheling Mantle",
    waist="Zoran's Belt",
    legs="Gor. Brayettes +1",
    feet="Gor. Sollerets +1",
    }

    sets.midcast.Breath = set_combine(sets.midcast.FastRecast, { head="PteroslaverPteroslaver Armet" })
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {}

    sets.precast.WS = {
    ammo="Angon",
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Moonshade Earring",ear2="Brutal Earring",
    body="Vishap Mail",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Gor. Brayettes +1",feet="Gor. Sollerets +1"}

    sets.precast.WS.Acc = set_combine(sets.precast.WS, {
    back="Atheling Mantle",
    head="Gorney Morion +1",
    legs="Gorney Brayettes +1"
    })

    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Stardiver'] = set_combine(sets.precast.WS, {
    neck="Chivalrous Chain",
    back="Atheling Mantle",
    waist="Light Belt"
    })
    sets.precast.WS['Stardiver'].Mid = set_combine(sets.precast.WS['Stardiver'], {
    head="Gorney Morion +1",
    hands="Gorney Moufles +1",
    back="Atheling Mantle",
    })
    sets.precast.WS['Stardiver'].Acc = set_combine(sets.precast.WS.Acc, {neck="Chivalrous Chain",waist="Light Belt"})

    sets.precast.WS["Camlann's Torment"] = set_combine(sets.precast.WS, {
    neck="Chivalrous Chain",
    body="Vishap Mail +1",
    back="Atheling Mantle",
    waist="Zoran's Belt",
    feet="Gor. Sollerets +1"
    })
    sets.precast.WS["Camlann's Torment"].Mid = set_combine(sets.precast.WS["Camlann's Torment"], {
    head="Gorney Morion +1",
    ear1="Moonshade Earring",
    ear2="Brutal Earring",
    back="Atheling Mantle"
    })
    sets.precast.WS["Camlann's Torment"].Acc = set_combine(sets.precast.WS["Camlann's Torment"].Mid, {})

    sets.precast.WS['Drakesbane'] = set_combine(sets.precast.WS, {
    neck="Chivalrous Chain",
    hands="Gorney Moufles +1",
    back="Atheling Mantle",
    waist="Zoran's Belt"
    })
    sets.precast.WS['Drakesbane'].Mid = set_combine(sets.precast.WS['Drakesbane'], {
    back="Atheling Mantle",
    head="Gorney Morion +1"
    })
    sets.precast.WS['Drakesbane'].Acc = set_combine(sets.precast.WS['Drakesbane'].Mid, {hands="Mikinaak Gauntlets"})


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

    -- Resting sets
    sets.resting = {
    head="Gorney Morion +1",
    neck="Chivalrous Chain",
    ear1="Ghillie Earring +1",
    ear2="Brutal Earring",
    body="Gorney Haubert +1",
    hands="Gorney Moufles +1",
    ring1="Rajas Ring",
    ring2="Tyrant's Ring",
    back="Atheling Mantle",
    legs="Crimson Cuisses",
    feet="Gor. Sollerets +1"
    }


    -- Idle sets
    sets.idle = {}

    -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    sets.idle.Town = {
    ammo="Angon",
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring +1",ear2="Brutal Earring",
    body="Vishap Mail",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.idle.Field = set_combine(sets.idle.Town, {
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring +1",ear2="Brutal Earring",
    body="Vishap Mail",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Crimson Cuisses",feet="Gor. Sollerets +1"}

    sets.idle.Regen = set_combine(sets.idle.Field, {
    head="Gorney Morion +1",
    body="Twilight Mail"})

    sets.idle.Weak = set_combine(sets.idle.Field, {
    head="Gorney Morion +1",
    body="Twilight Mail",
    })

    -- Defense sets
    sets.defense.PDT = {
    head="Gorney Morion +1",
    neck="Chivalrous Chain",
    ear1="Ghillie Earring +1",
    ear2="Brutal Earring",
    body="Gorney Haubert +1",
    hands="Gorney Moufles +1",
    ring1="Rajas Ring",
    ring2="Tyrant's Ring",
    back="Atheling Mantle",
    legs="Crimson Cuisses",
    feet="Gor. Sollerets +1"
    }

    sets.defense.Reraise = set_combine(sets.defense.PDT, {
    head="Gorney Morion +1",
    body="Twilight Mail"
    })

    sets.defense.MDT = sets.defense.PDT

    sets.Kiting = {legs="Crimson Cuisses"}

    sets.Reraise = {head="Gorney Morion +1",body="Twilight Mail"}

    -- 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="Angon",
    head="Gorney Morion +1",neck="Chivalrous Chain",ear1="Ghillie Earring +1",ear2="Brutal Earring",
    body="Gorney Haubert +1",hands="Gorney Moufles +1",ring1="Rajas Ring",ring2="Tyrant's Ring",
    back="Atheling Mantle",waist="Zoran's Belt",legs="Gor. Brayettes +1",feet="Gor. Sollerets +1"}

    sets.engaged.Mid = set_combine(sets.engaged, {
    head="Gorney Morion +1",
    ear1="Ghillie Earring +1",
    ring2="Tyrant's Ring"
    })

    sets.engaged.Acc = set_combine(sets.engaged.Mid, {
    neck="Chivalrous Chain",
    hands="Gorney Moufles +1",
    waist="Zoran's Belt",
    ring1="Rajas Ring",
    back="Atheling Mantle"
    })

    sets.engaged.PDT = set_combine(sets.engaged, {
    head="Gorney Morion +1",
    neck="Chivalrous Chain",
    body="Gorney Haubert +1",
    ring2="Tyrant's Ring",
    hands="Gorney Moufles +1",
    back="Atheling Mantle",
    legs="Gor. Brayettes +1",
    feet="Gor. Sollerets +1"
    })
    sets.engaged.Mid.PDT = set_combine(sets.engaged.Mid, {
    head="Gorney Morion +1",
    ring2="Tyrant's Ring",
    body="Gorney Haubert +1",
    hands="Gorney Moufles +1",
    back="Atheling Mantle",
    legs="Gor. Brayettes +1",
    })
    sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {
    head="Gorney Morion +1",
    ring2="Tyrant's Ring",
    body="Gorney Haubert +1",
    hands="Gorney Moufles +1",
    back="Atheling Mantle",
    legs="Gor. Brayettes +1",
    })

    sets.engaged.War = set_combine(sets.engaged, {
    --head="Gorney Morion +1",
    feet="Gor. Sollerets +1",
    ring2="Tyrant's Ring"
    })
    sets.engaged.War.Mid = sets.engaged.Mid

    sets.engaged.Reraise = set_combine(sets.engaged, {
    head="Gorney Morion +1",
    body="Twilight Mail"
    })

    sets.engaged.Acc.Reraise = sets.engaged.Reraise

    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 target handling to be done.
    function job_pretarget(spell, action, spellMap, eventArgs)
    if spell.english == "Spirit Jump" then
    if not pet.isvalid then
    cancel_spell()
    send_command('Jump')
    end
    elseif spell.english == "Soul Jump" then
    if not pet.isvalid then
    cancel_spell()
    send_command("High Jump")
    end
    end
    end

    -- 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 default precast() is done.
    -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
    function job_post_precast(spell, action, spellMap, eventArgs)
    if player.hpp < 51 then
    classes.CustomClass = "Breath"
    end

    end


    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
    equip(sets.midcast.FastRecast)
    if player.hpp < 51 then
    classes.CustomClass = "Breath"
    end
    end
    end

    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)
    end

    function job_pet_precast(spell, action, spellMap, eventArgs)
    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 spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' or spell.english == 'Steady Wing' or spell.english == 'Smiting Breath' then
    equip(sets.HB)
    end
    end

    -- Run after the default pet midcast() is done.
    -- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
    function job_pet_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)
    if state.HybridMode.value == 'Reraise' or
    (state.HybridMode.value == 'Physical' and state.PhysicalDefenseMode.value == 'Reraise') then
    equip(sets.Reraise)
    end
    end

    -- Run after the default aftercast() is done.
    -- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
    function job_post_aftercast(spell, action, spellMap, eventArgs)

    end

    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_pet_aftercast(spell, action, spellMap, eventArgs)

    end

    -- Run after the default pet aftercast() is done.
    -- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
    function job_pet_post_aftercast(spell, action, spellMap, eventArgs)

    end


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

    -- Called before the Include starts constructing melee/idle/resting sets.
    -- Can customize state or custom melee class values at this point.
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_handle_equipping_gear(status, eventArgs)

    end

    -- Return a customized weaponskill mode to use for weaponskill sets.
    -- Don't return anything if you're not overriding the default value.
    function get_custom_wsmode(spell, action, spellMap)

    end

    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
    if player.hpp < 90 then
    idleSet = set_combine(idleSet, sets.idle.Regen)
    end
    return idleSet
    end

    -- Modify the default melee set after it was constructed.
    function customize_melee_set(meleeSet)
    if state.TreasureMode.value == 'Fulltime' then
    meleeSet = set_combine(meleeSet, sets.TreasureHunter)
    end
    if state.CapacityMode.value then
    meleeSet = set_combine(meleeSet, sets.CapacityMantle)
    end
    return meleeSet
    end

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

    -- Called when the player's status changes.
    function job_status_change(newStatus, oldStatus, eventArgs)

    end

    -- Called when the player's pet's status changes.
    function job_pet_status_change(newStatus, oldStatus, eventArgs)

    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)
    if string.lower(buff) == "sleep" and gain and player.hp > 200 then
    equip(sets.Berserker)
    else
    if not midaction() then
    handle_equipping_gear(player.status)
    end
    end
    end

    function job_update(cmdParams, eventArgs)
    war_sj = player.sub_job == 'WAR' or false
    classes.CustomMeleeGroups:clear()
    th_update(cmdParams, eventArgs)
    get_combat_form()
    end
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------

    -- Called for custom player commands.
    function job_self_command(cmdParams, eventArgs)

    end

    function get_combat_form()
    --if areas.Adoulin:contains(world.area) and buffactive.ionis then
    -- state.CombatForm:set('Adoulin')
    --end

    if war_sj then
    state.CombatForm:set("War")
    else
    state.CombatForm:reset()
    end
    end


    -- Job-specific toggles.
    function job_toggle(field)

    end

    -- Handle auto-targetting based on local setup.
    function job_auto_change_target(spell, action, spellMap, eventArgs)

    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.
    -------------------------------------------------------------------------------------------------------------------
    -- State buff checks that will equip buff gear and mark the event as handled.
    function check_buff(buff_name, eventArgs)
    if state.Buff[buff_name] then
    equip(sets.buff[buff_name] or {})
    if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
    equip(sets.TreasureHunter)
    end
    eventArgs.handled = true
    end
    end
    -- Check for various actions that we've specified in user code as being used with TH gear.
    -- This will only ever be called if TreasureMode is not 'None'.
    -- Category and Param are as specified in the action event packet.
    function th_action_check(category, param)
    if category == 2 or -- any ranged attack
    --category == 4 or -- any magic action
    (category == 3 and param == 30) or -- Aeolian Edge
    (category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
    (category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
    then return true
    end
    end
    -- Select default macro book on initial load or subjob change.
    function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'WAR' then
    set_macro_page(1, 10)
    elseif player.sub_job == 'WHM' then
    set_macro_page(1, 10)
    else
    set_macro_page(1, 10)
    end
    end

  18. #4198
    Hydra
    Join Date
    Feb 2005
    Posts
    141
    BG Level
    3
    FFXI Server
    Shiva

    EDIT Nvm

  19. #4199
    Relic Shield
    Join Date
    Jun 2007
    Posts
    1,693
    BG Level
    6
    FFXIV Character
    Zimt Zucker
    FFXIV Server
    Sargatanas

    Does anyone have an up-to-date DRK.lua? I grabbed the one listed in the Gearswap Shop thread and put my gear into it, but I'm getting a message that it's out-of-date.

    I'm lua-illiterate, and I'm having a hard time telling what's different between the other job .luas I use and the DRK .lua to make it out-of-date.

    Here's my current version: http://pastebin.com/i8XkdXDe

  20. #4200
    BG Content
    Join Date
    Jul 2007
    Posts
    22,372
    BG Level
    10
    FFXI Server
    Lakshmi
    Blog Entries
    1

    GearSwap never generates an "out of date" message, user files either work or they don't.

    Motenten released a second include version at some point, and now v1 includes give an "out of date" message. So, if you get an "out of date" message then it's because you're still using the first version of his includes.

Page 210 of 302 FirstFirst ... 160 200 208 209 210 211 212 220 260 ... LastLast

Similar Threads

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