Advertisement
Guest User

wren_brd.lua

a guest
Dec 6th, 2022
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.28 KB | Gaming | 0 0
  1. --[[ *************************************************************
  2.  Wren's BRD gearswap .lua for SuperNova FFXI
  3.  Save as windower/addons/GearSwap/data/BRD.lua
  4.  
  5.   2016-07-27 OC  - First version. Commented to help newbies. :)
  6.   2016-08-01 OC  - Rostrum Pumps
  7.  2016-08-06 OC  - Shadow Mantle, removed Umbra Cape
  8.  2016-08-25 OC  - Sea Capes.  Sheikh Manteel as fast cast
  9.  2016-12-02 OC  - Loquac. Earring, Stone Gorget
  10. ************************************************************* --]]
  11.  
  12.  --[[ ******************************************************
  13.   Gearsets - define the various sets of gear we'll wear.
  14. ****************************************************** --]]
  15.  
  16.  function get_sets()
  17.  
  18.      -- fashion set is for looking nice while lockstyled.
  19.     -- make sure you include your top-row equipment,
  20.     -- especially if you use a ranged or throwing weapon.
  21.     sets.fashion = {
  22.         main        = "Terra's Staff",
  23.         sub         = "Reign Grip",
  24.         range       = "Gjallarhorn",
  25.         head        = empty,
  26.         body        = "Dalmatica +1",
  27.         hands       = "Brd. Cuffs +1",
  28.         legs        = "Byakko's Haidate",
  29.         feet        = "Dance Shoes +1"
  30.     }
  31.  
  32.      -- idle set is worn when we're standing around doing
  33.     -- nothing.  I have a lot of eva gear from my thief
  34.     -- and nin, so I throw that on my bard.
  35.     sets.idle = {
  36.         main        = "Terra's Staff",
  37.         sub         = "Reign Grip",
  38.         range       = "Gjallarhorn",
  39.         head        = "Optical Hat",
  40.         neck        = "Evasion Torque",
  41.         left_ear    = "Melody Earring +1",
  42.         right_ear   = "Melody Earring +1",
  43.         body        = "Dalmatica +1",
  44.         hands       = "Brd. Cuffs +1",
  45.         left_ring   = "Celestial Ring",
  46.         right_ring  = "Shadow Ring",
  47.         back        = "Shadow Mantle",
  48.         waist       = "Scouter's Rope",
  49.         legs        = "Raven Hose",
  50.         feet        = "Dance Shoes +1"
  51.     }
  52.  
  53.      -- fast cast set is for casting quickly.  We put
  54.     -- this on before the spell is begun, then switch
  55.     -- to one of the other sets during cast.
  56.     sets.fc  = {
  57.         sub         = "Vivid Strap +1",
  58.         left_ear    = "Loquac. Earring",
  59.         feet        = "Rostrum Pumps"
  60.     }  
  61.      sets.fcsong = {
  62.         body        = "Sheikh Manteel",
  63.         right_ring  = "Minstrel's Ring"
  64.     }
  65.  
  66.      -- the song set is put on for any song.  Consider
  67.     -- it the "base" for our singing.  It's mostly got
  68.     -- Singing and Wind skills primarily, then Charisma.
  69.     sets.song = {
  70.         main        = "Chanter's Staff",
  71.         sub         = "Reign Grip",
  72.         head        = "Brd. Roundlet +1",
  73.         neck        = "Piper's Torque",
  74.         left_ear    = "Melody Earring +1",
  75.         right_ear   = "Musical Earring",
  76.         body        = "Mahatma Hpl.",
  77.         hands       = "Choral Cuffs +1",
  78.         left_ring   = "Nereid Ring",
  79.         right_ring  = "Minstrel's Ring",
  80.         back        = "Astute Cape",
  81.         waist       = "Gleeman's Belt",
  82.         legs        = "Sheikh Seraweels",
  83.         feet        = "Oracle's Pigaches"
  84.     }
  85.  
  86.      -- when we need to debuff a mob (lullaby, for example)
  87.     -- we throw these items on, ON TOP of our song set.
  88.     -- This gives our debuffs a little more oomph.
  89.     sets.debuff = {
  90.         main        = "Chatoyant Staff",
  91.         sub         = "Light Grip"
  92.     }
  93.  
  94.      -- if we're casting Cures with our /whm, we want as
  95.     -- much Cure potency and Mind as we can get.
  96.     sets.heal = {
  97.         main        = "Chatoyant Staff",
  98.         sub         = "Reign Grip",
  99.         head        = "Goliard Chapeau",
  100.         neck        = "Fylgja Torque +1",
  101.         right_ear   = "Celestial Earring",
  102.         body        = "Mahatma Hpl.",
  103.         hands       = "Bricta's Cuffs",
  104.         left_ring   = "Celestial Ring",
  105.         right_ring  = "Celestial Ring",
  106.         back        = "Altruistic Cape",
  107.         waist       = "Pythia Sash +1",
  108.         legs        = "Mahatma Slops",
  109.         feet        = "Suzaku's Sune-Ate"
  110.     }
  111.  
  112.      -- if we're casting enfeebling magic, such as slow,
  113.     -- we want Enfeebling Skill, MACC, and Mind.
  114.     sets.enfeebling = {
  115.         sub         = "Vivid Strap +1",
  116.         head        = "Ree's Headgear",
  117.         neck        = "Enfeebling Torque",
  118.         right_ear   = "Enfeebling Earring",
  119.         body        = "Mahatma Hpl.",
  120.         hands       = "Oracle's Gloves",
  121.         left_ring   = "Celestial Ring",
  122.         right_ring  = "Celestial Ring",
  123.         back        = "Altruistic Cape",
  124.         waist       = "Pythia Sash +1",
  125.         legs        = "Mahatma Slops",
  126.         feet        = "Avocat Pigaches"
  127.     }
  128.  
  129.      -- our enhancing set is primary for stoneskin.
  130.     -- we want Enhancing skill and Mind.
  131.     sets.enhancing = {
  132.         main        = "Chatoyant Staff",
  133.         sub         = "Reign Grip",
  134.         head        = "Goliard Chapeau",
  135.         neck        = "Enhancing Torque",
  136.         right_ear   = "Augment. Earring",
  137.         body        = "Mahatma Hpl.",
  138.         hands       = "Bricta's Cuffs",
  139.         left_ring   = "Celestial Ring",
  140.         right_ring  = "Celestial Ring",
  141.         back        = "Merciful Cape",
  142.         waist       = "Pythia Sash +1",
  143.         legs        = "Mahatma Slops",
  144.         feet        = "Suzaku's Sune-Ate"
  145.     }
  146.  
  147.      -- we equip our rest set when we /heal for MP.
  148.     -- we want lots of hMP.
  149.     sets.rest = {
  150.         main        = "Chatoyant Staff",
  151.         head        = "Mirror Tiara",
  152.         neck        = "Beak Necklace +1",
  153.         left_ear    = "Antivenom Earring",
  154.         right_ear   = "Relaxing Earring",
  155.         body        = "Mahatma Hpl.",
  156.         hands       = "Oracle's Gloves",
  157.         left_ring   = "Celestial Ring",
  158.         right_ring  = "Celestial Ring",
  159.         back        = "Invigorating Cape",
  160.         waist       = "Qiqirn Sash +1",
  161.         legs        = "Oracle's Braconi",
  162.         feet        = "Goliard Clogs"
  163.     }
  164.  
  165.      -- our yellow set is used to drop HP below 75%
  166.     -- to proc the latent on Minstrel's Ring.
  167.     sets.yellow = {
  168.         main        = "Chanter's Staff",
  169.         sub         = "Light Grip",
  170.         head        = "Zenith Crown +1",
  171.         body        = "Dalmatica +1",
  172.         hands       = "Zenith Mitts +1",
  173.         left_ring   = "Serket Ring",
  174.         waist       = "Scouter's Rope",
  175.         legs        = "Zenith Slacks +1",
  176.         feet        = "Zenith Pumps +1"
  177.     }
  178.  end
  179.  
  180.  --[[ ******************************************************
  181.   Equip functions - put on the sets we defined above, and
  182.  echo a note to our chat log so we know it worked.
  183. ****************************************************** --]]
  184.  
  185.  -- equip idle set
  186.  function equip_idle()
  187.      windower.add_to_chat(8,'[Idle]')
  188.     equip(sets.idle)
  189. end
  190.  
  191. -- equip healing magic set
  192. function equip_heal()
  193.     windower.add_to_chat(8,'[Healing]')
  194.     equip(sets.heal)
  195. end
  196.  
  197. -- equip enhancing magic set
  198. function equip_enhancing(spell)
  199.     windower.add_to_chat(8,'[Enhancing]')
  200.     if spell.name == 'Stoneskin' then
  201.         equip(sets.enhancing,{neck="Stone Gorget"})
  202.     else
  203.          equip(sets.enhancing)
  204.     end
  205.  end
  206.  
  207.  -- equip enfeebling magic set
  208.  function equip_enfeebling()
  209.      windower.add_to_chat(8,'[Enfeebling]')
  210.     equip(sets.enfeebling)
  211. end
  212.  
  213. -- equip hMP set
  214. function equip_rest()
  215.     windower.add_to_chat(8,'[Resting]')
  216.     equip(sets.rest)
  217. end
  218.  
  219. -- midcast for songs
  220. function equip_song(spell)
  221.     windower.add_to_chat(8,'[Bard Song]')
  222.     equip(sets.song)
  223.     if string.find(spell.english,'Elegy') or string.find(spell.english,'Threnody') or string.find(spell.english,'Lullaby') or string.find(spell.english,'Finale') or string.find(spell.english,'Requiem') then
  224.         equip(sets.debuff)
  225.     end
  226.  end
  227.  
  228.  -- equip yellow hp set for a split second, then idle again
  229.  function equip_yellow()
  230.      windower.add_to_chat(8,'[Yellow]')
  231.     equip(sets.yellow)
  232.     send_command('wait .1;gs equip idle')
  233. end
  234.  
  235. --[[ ******************************************************
  236.  Casting functions - these functions run automatically when
  237.  we cast a spell, use a job ability, rest for MP, and so on
  238. ****************************************************** --]]
  239.  
  240.  -- the precast function runs automatically BEFORE we
  241.  -- begin casting a spell or job ability.  For our BRD,
  242.  -- we want to equip fast cast gear prior to casting.
  243.  -- Before you get Gjallarhorn, you'd also swap in your
  244.  -- various intruments here.
  245.  function precast(spell)
  246.      if spell.action_type == 'Magic' then
  247.         equip(sets.fc)
  248.         if spell.type == 'BardSong' then
  249.             equip(sets.fcsong)
  250.         end
  251.      end
  252.  end
  253.  
  254.  -- now that we've already gained the benefit of fast cast,
  255.  -- the midcast function swaps in a new set of gear during
  256.  -- the cast, which will make the spell effect more potent.
  257.  function midcast(spell)
  258.      if spell.skill == 'Healing Magic' then
  259.         equip_heal()
  260.     elseif spell.skill == 'Enfeebling Magic' then
  261.         equip_enfeebling()
  262.     elseif spell.skill == 'Enhancing Magic' then
  263.         equip_enhancing(spell)
  264.     elseif spell.type == 'BardSong' then
  265.         equip_song(spell)
  266.     end
  267.  end
  268.  
  269.  -- we're done with our spell or job ability, so the aftercast
  270.  -- function makes sure we return to our idle gear to benefit
  271.  -- from auto-refresh and evasion.
  272.  function aftercast(spell)
  273.      equip_idle()
  274. end
  275.  
  276. -- the status_change function runs automatically whenever we
  277. -- engage, disengage, kneel, or stand.  As a BRD we use this
  278. -- to equip our +hMP gear when we /heal, and return to our
  279. -- idle gear when we stand up.
  280. function status_change(new,old)
  281.     if new == 'Resting' then
  282.         equip_rest()
  283.     else
  284.          equip_idle()
  285.     end
  286.  end
  287.  
  288.  -- the self_command function can be called from
  289.  -- a Yush or in-game macro.  I call this function
  290.  -- from a keybind in my Yush file, to put on my
  291.  -- yellow HP gearset:
  292.  --
  293.  -- ['Alt+3'] = 'input //gs c Y'
  294.  --
  295.  function self_command(m)
  296.      if m == "Y" then
  297.         equip_yellow()
  298.     end
  299.  end
  300.  
  301.  --[[ ******************************************************
  302.   Code that runs once, when we first swap to our BRD job
  303. ****************************************************** --]]
  304.  send_command('wait 1;gs equip fashion;wait 1;input /lockstyle on;wait 1;gs equip idle')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement