SHARE
TWEET

Untitled

a guest Apr 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.  
  3. 8888888b.                888     888b     d888                            
  4. 888   Y88b               888     8888b   d8888                            
  5. 888    888               888     88888b.d88888                            
  6. 888   d88P  .d88b.   .d88888     888Y88888P888  8888b.   .d88b.   .d88b.  
  7. 8888888P"  d8P  Y8b d88" 888     888 Y888P 888     "88b d88P"88b d8P  Y8b
  8. 888 T88b   88888888 888  888     888  Y8P  888 .d888888 888  888 88888888
  9. 888  T88b  Y8b.     Y88b 888     888   "   888 888  888 Y88b 888 Y8b.    
  10. 888   T88b  "Y8888   "Y88888     888       888 "Y888888  "Y88888  "Y8888  
  11.                                                              888          
  12.                                                         Y8b d88P          
  13.                                                          "Y88P"          
  14. ]]
  15.  
  16. windower.add_to_chat(123,[[Red Mage Lua Author: Byrne #7894 (Discord))]])
  17. windower.add_to_chat(160,[[Movement speed by default will not equip when engaged, Press F1 to handle auto-kiting while engaged.]])
  18. --windower.add_to_chat(123,[[   <> It is reccommended you use User-Global.lua at https://github.com/Byrne119/Gearswap ]]) --Right click and save link as...
  19. --windower.add_to_chat(123,[[   <> if you have done this, put -- before lines 18 and 19. Remove -- before sharing!]])
  20. include('organizer-lib')
  21.  
  22.  
  23. -------------------------------------------------------------------------------------------------------------------
  24. -- Setup functions for this job.  Generally should not be modified.
  25. -------------------------------------------------------------------------------------------------------------------
  26.  
  27. -- Initialization function for this job file.
  28. function get_sets()
  29.     mote_include_version = 2
  30.  
  31.     -- Load and initialize the include file.
  32.     include('Mote-Include.lua')
  33.  
  34. end
  35.  
  36.  
  37. --================================================--
  38. --                                                --
  39. --      |     |        ,---.     |                --
  40. --      |,---.|---.    `---.,---.|--- .   .,---.  --
  41. --      ||   ||   |        ||---'|    |   ||   |  --
  42. --  `---'`---'`---'    `---'`---'`---'`---'|---'  --
  43. --                                         |      --
  44. --                                                --
  45. --================================================--
  46.  
  47. function job_setup()
  48. setupTextWindow(1525, 1138)
  49. --[[These numbers determine where your table will show update
  50. This is affected both by your resolution and your scaling mode so
  51. you may need to lower these numbers quite significantly depending
  52. on your settings.  Start with 100,100, and reload the file to find
  53. where the box moves as you edit it.  Unfortunately I am not certain
  54. how to make this context box draggable.]]
  55. end
  56.  
  57. --====================================================--
  58. --                                                    --
  59. --  .   .                   ,---.     |               --
  60. --  |   |,---.,---.,---.    `---.,---.|--- .   .,---. --
  61. --  |   |`---.|---'|            ||---'|    |   ||   | --
  62. --  `---'`---'`---'`        `---'`---'`---'`---'|---' --
  63. --                                              |     --
  64. --                                                    --
  65. --====================================================--
  66.  
  67. function user_setup()
  68.     state.OffenseMode:options('Normal', 'DT')
  69.     state.WeaponLockMode = M('Unlocked', 'Locked')
  70.     state.IdleMode:options('Normal', 'Town')
  71.     state.CastingMode:options('Normal', 'Burst')
  72.     state.Enfeeb = M('Accuracy', 'Potency', 'Skill')
  73.     state.ZoneRing = M('None','Warp', 'Holla', 'Dem', 'Mea')
  74.     state.DynaMode = M('None', 'RP_Farm')
  75.     state.EngagedMoving = M('Disabled','Enabled')
  76.     state.DoomMode = M('OFF', 'Doom')
  77.     state.SanguineBlade = M('None', 'MAB')
  78.  
  79.     state.Moving = M('false', 'true')
  80.    
  81.     select_default_macro_book()
  82.  
  83.     send_command('bind f7 gs c cycle SanguineBlade')
  84.     send_command('bind f1 gs c cycle EngagedMoving')
  85.     send_command('bind f9 gs c cycle OffenseMode')
  86.     send_command('bind ^f9 gs c cycle CastingMode')
  87.     send_command('bind f10 gs c cycle IdleMode')
  88.     send_command('bind f11 gs c cycle Enfeeb')
  89.     send_command('bind f12 gs c cycle WeaponLockMode')
  90.     send_command('bind f5 gs c cycle ZoneRing')
  91.     send_command('bind f6 gs equip sets.default_melee_weapons;wait 0.2;gs c set WeaponLockMode Locked')
  92.     send_command('bind f8 gs c set WeaponLockMode Unlocked;wait 0.2;input //gs equip sets.default_melee_weapons;wait 0.2;gs c set WeaponLockMode Locked')
  93.    
  94.     select_default_macro_book()
  95. end
  96.  
  97.  
  98.  
  99. --=================================--
  100. --  _  _ _  _ _    ____ ____ ___   --
  101. --  |  | |\ | |    |  | |__| |  \  --
  102. --  |__| | \| |___ |__| |  | |__/  --
  103. --                                 --
  104. --=================================--
  105.  
  106. function user_unload()
  107.  
  108.         send_command('unbind ^f9')
  109.         send_command('unbind ^f10')
  110.         send_command('unbind ^f11')
  111.         send_command('unbind ^f12')
  112.         send_command('unbind f8')
  113.        
  114.         send_command('unbind !f9')
  115.         send_command('unbind !f10')
  116.         send_command('unbind !f11')
  117.         send_command('unbind !f12')
  118.  
  119.         send_command('unbind f9')
  120.         send_command('unbind f10')
  121.         send_command('unbind f11')
  122.         send_command('unbind f12')
  123.         send_command('unbind f5')
  124.         send_command('unbind f1')
  125.        
  126.         send_command('unbind -')
  127.         send_command('unbind =')
  128.         enable('neck')
  129.         enable('main')
  130.         enable('sub')
  131.         enable('range')
  132. end
  133.  
  134. -- Define sets and vars used by this job file.
  135.  
  136.  
  137. --=============================================--
  138. --                                             --
  139. --   ..|'''.|  '||''''|      |     '||''|.     --
  140. --  .|'     '   ||  .       |||     ||   ||    --
  141. --  ||    ....  ||''|      |  ||    ||''|'     --
  142. --  '|.    ||   ||        .''''|.   ||   |.    --
  143. --   ''|...'|  .||.....| .|.  .||. .||.  '|'   --
  144. --                                             --
  145. --=============================================--
  146.  
  147.  
  148. function init_gear_sets()
  149.  
  150. --==================================================--
  151. --  ____                                       _    --
  152. -- |  _ \   _ __    ___    ___    __ _   ___  | |_  --
  153. -- | |_) | | '__|  / _ \  / __|  / _` | / __| | __| --
  154. -- |  __/  | |    |  __/ | (__  | (_| | \__ \ | |_  --
  155. -- |_|     |_|     \___|  \___|  \__,_| |___/  \__| --
  156. --==================================================--
  157.  
  158.  
  159.     sets.precast.JA['Chainspell'] = {body="Vitiation Tabard +3"}
  160.    
  161.     --Red Mage gets plenty of Fast Cast through traits and gear
  162.     --So I would reccomend avoiding quick cast due to equipping errors.
  163.     sets.precast.FC = {
  164.         main="Crocea Mors",
  165.         sub="Ammurapi Shield",
  166.         ammo="Sapience Orb",
  167.         head="Carmine Mask +1",
  168.         ear2="Loquacious Earring",
  169.         body="Vitiation Tabard +3",
  170.         neck="Orunmila's Torque",
  171.         hands="Leyline Gloves",
  172.         ring1="Prolix Ring",
  173.         ring2="Kishar Ring",
  174.         back="Swith Cape +1",
  175.         waist="Flume Belt +1",
  176.         legs="Psycloth Lappas",
  177.         feet="Carmine Greaves +1"}
  178.    
  179.     --don't play with the name of this set, it breaks very easily. (Libraries problem)
  180.     sets.precast.FC.Impact = set_combine(sets.precast.FC, {
  181.         main="Crocea Mors",
  182.         sub="Ammurapi Shield",
  183.         ammo="Sapience Orb",
  184.         head=empty,
  185.         body="Twilight Cloak",
  186.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  187.         legs={ name="Psycloth Lappas", augments={'MP+80','Mag. Acc.+15','"Fast Cast"+7',}},
  188.         feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
  189.         neck="Orunmila's Torque",
  190.         waist="Flume Belt +1",
  191.         left_ear="Etiolation Earring",
  192.         right_ear="Loquac. Earring",
  193.         left_ring="Prolix Ring",
  194.         right_ring="Kishar Ring",
  195.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},})
  196.        
  197.     --[[this set needs to be a clone of sets.precast.FC.Impact
  198.         I know this setup seems insane and unneccessary, but Impact requires
  199.         the Twilight cloak to be equipped to begin casting unlike other spells
  200.         and as such I must define sets.precast.FC.Impact to sets.precast.FC.ImpactQC
  201.         to check for Chainspell or Spontaneity, then I must redefine it to
  202.         This set when you cast it next without those buffs active.
  203.         It's complicated, but I promise it's neccessary.
  204.         Also, do not make this a setcombine with the previous Impact FC set
  205.         or it will defeat it's purpose.]]
  206.    
  207.     sets.precast.FC.Impact2 = {
  208.         main="Crocea Mors",
  209.         sub="Ammurapi Shield",
  210.         ammo="Sapience Orb",
  211.         head=empty,
  212.         body="Twilight Cloak",
  213.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  214.         legs={ name="Psycloth Lappas", augments={'MP+80','Mag. Acc.+15','"Fast Cast"+7',}},
  215.         feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
  216.         neck="Orunmila's Torque",
  217.         waist="Flume Belt +1",
  218.         left_ear="Etiolation Earring",
  219.         right_ear="Loquac. Earring",
  220.         left_ring="Prolix Ring",
  221.         right_ring="Kishar Ring",
  222.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},}
  223.        
  224.     sets.precast.FC.ImpactQC = {
  225.         main="Crocea Mors",
  226.         sub="Ammurapi Shield",
  227.         range="Kaja Bow",
  228.         head=empty,
  229.         body="Twilight Cloak",
  230.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  231.         legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','Enmity-2','INT+6','Mag. Acc.+14','"Mag.Atk.Bns."+3',}},
  232.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  233.         neck="Dls. Torque +2",
  234.         waist="Luminary Sash",
  235.         left_ear="Digni. Earring",
  236.         right_ear="Regal Earring",
  237.         left_ring="Stikini Ring",
  238.         right_ring="Stikini Ring",
  239.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},}
  240.  
  241.     sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {waist="Siegel Sash"})
  242.    
  243.     sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Tamaxchi"})
  244.        
  245.  
  246. --==================================================--
  247. --   __  __   _       _                        _    --
  248. --  |  \/  | (_)     | |                      | |   --
  249. --  | \  / |  _    __| |   ___    __ _   ___  | |_  --
  250. --  | |\/| | | |  / _` |  / __|  / _` | / __| | __| --
  251. --  | |  | | | | | (_| | | (__  | (_| | \__ \ | |_  --
  252. --  |_|  |_| |_|  \__,_|  \___|  \__,_| |___/  \__| --
  253. --                                                  --
  254. --==================================================--
  255.        
  256.        
  257.     sets.midcast.FastRecast = {}
  258.  
  259.     sets.midcast.Cure = {
  260.         main="Tamaxchi",
  261.         head="Gendewitha Caubeen +1",
  262.         neck="Incanter's Torque",
  263.         ear1="Mendicant's Earring",
  264.         ear2="Loquacious Earring",
  265.         body="Vrikodara Jupon",
  266.         hands="Telchine Gloves",
  267.         ring1="Dark Ring",
  268.         ring2="Defending Ring",
  269.         back="Solemnity Cape",
  270.         waist="Flume Belt +1",
  271.         legs="Atrophy Tights +3",
  272.         feet="Medium's Sabots"}
  273.  
  274.     sets.midcast.Cursna = {
  275.         head="Gendewitha Caubeen +1",
  276.         neck="Malison Medallion",
  277.         ear1="Roundel Earring",
  278.         ear2="Loquacious Earring",
  279.         body="Vrikodara Jupon",
  280.         hands="Serpentes Cuffs",
  281.         ring1="Ephedra Ring",
  282.         ring2="Ephedra Ring",
  283.         back="Ghostfyre Cape",
  284.         waist="Witful Belt",
  285.         legs="Atrophy Tights +3",
  286.         feet="Gendewitha Galoshes"}
  287.        
  288.     sets.midcast.Curaga = sets.midcast.Cure
  289.    
  290.     sets.midcast.CureSelf = set_combine(sets.midcast.Cure, {
  291.         ring1="Dark Ring",
  292.         ring2="Kunaji Ring",
  293.         hands="Buremte gloves",
  294.         waist="Gishdubar Sash"})
  295.        
  296.     sets.midcast['Enhancing Magic'] = {
  297.         main="Pukulatmuj +1",
  298.         sub="Ammurapi Shield",
  299.         ammo="Regal Gem",
  300.         head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +9',}},
  301.         body="Vitiation Tabard +3",
  302.         hands="Atrophy Gloves +3",
  303.         legs="Telchine Braconi",
  304.         feet="Leth. Houseaux +1",
  305.         neck="Incanter's Torque",
  306.         waist="Olympus Sash",
  307.         left_ear="Andoaa Earring",
  308.         right_ear="Regal Earring",
  309.         left_ring="Stikini Ring",
  310.         right_ring="Stikini Ring",
  311.         back="Ghostfyre cape",}
  312.        
  313.     sets.midcast['Enhancing Magic'].SelfDuration = {
  314.         main={ name="Colada", augments={'Enh. Mag. eff. dur. +3','Mag. Acc.+18','DMG:+1',}},
  315.         sub="Ammurapi Shield",
  316.         ammo="Regal Gem",
  317.         head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +9',}},
  318.         body="Vitiation Tabard +3",
  319.         hands="Atrophy Gloves +3",
  320.         legs="Telchine Braconi",
  321.         feet="Leth. Houseaux +1",
  322.         neck="Duelist's Torque +2",
  323.         waist="Olympus Sash",
  324.         left_ear="Andoaa Earring",
  325.         right_ear="Regal Earring",
  326.         left_ring="Stikini Ring",
  327.         right_ring="Stikini Ring",
  328.         back="Ghostfyre cape",
  329.     }
  330.  
  331.     sets.midcast['Enhancing Magic'].Skill = {
  332.         main="Pukulatmuj +1",
  333.         sub="Arendsi Fleuret",
  334.         ammo="Regal Gem",
  335.         head="Befouled Crown",
  336.         body="Vitiation Tabard +3",
  337.         hands="Vitiation Gloves +3",
  338.         legs="Atrophy Tights +3",
  339.         feet="Leth. Houseaux +1",
  340.         neck="Incanter's Torque",
  341.         waist="Olympus Sash",
  342.         left_ear="Andoaa Earring",
  343.         right_ear="Regal Earring",
  344.         left_ring="Stikini Ring",
  345.         right_ring="Stikini Ring",
  346.         back="Ghostfyre Cape",}
  347.    
  348.     sets.midcast.Phalanx = set_combine(sets.midcast['Enhancing Magic'].Skill, {})
  349.    
  350.     sets.midcast.PhalanxSelf = set_combine(sets.midcast.Phalanx, {
  351.         main="Egeking",
  352.         head={ name="Taeon Chapeau", augments={'Spell interruption rate down -9%','Phalanx +3',}},
  353.         body={ name="Taeon Tabard", augments={'Accuracy+19 Attack+19','Spell interruption rate down -10%','Phalanx +3',}},
  354.         hands={ name="Taeon Gloves", augments={'Accuracy+21','Spell interruption rate down -9%','Phalanx +3',}},
  355.         legs={ name="Taeon Tights", augments={'Spell interruption rate down -10%','Phalanx +3',}},
  356.         feet={ name="Taeon Boots", augments={'Accuracy+23','Spell interruption rate down -8%','Phalanx +3',}},
  357.         waist="Sanctuary Obi",
  358.         })
  359.        
  360.     sets.midcast['Enhancing Magic'].GainSpell = set_combine(sets.midcast['Enhancing Magic'].SelfDuration, {hands="Vitiation gloves +3"})
  361.        
  362.     sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'].SelfDuration, {
  363.         body="Atrophy Tabard +3",
  364.         head="Amalric Coif",
  365.         legs="Lethargy Fuseau +1",
  366.         waist="Gishdubar sash"})
  367.  
  368.     sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
  369.         waist="Siegel Sash",
  370.         neck="Nodens Gorget",
  371.         hands="Stone Mufflers",
  372.         legs="Haven hose",
  373.         ear2="Earthcry Earring"})
  374.    
  375.     sets.midcast.Aquaveil = {
  376.         main="Pukulatmuj +1",
  377.         sub="Ammurapi Shield",
  378.         ammo="Regal Gem",
  379.         head="Chironic Hat",
  380.         body="Vitiation Tabard +3",
  381.         hands="Vitiation Gloves +3",
  382.         legs="Atrophy Tights +3",
  383.         feet="Leth. Houseaux +1",
  384.         neck="Incanter's Torque",
  385.         waist="Olympus Sash",
  386.         left_ear="Andoaa Earring",
  387.         right_ear="Regal Earring",
  388.         left_ring="Stikini Ring",
  389.         right_ring="Stikini Ring",
  390.         back="Ghostfyre Cape",}
  391.    
  392.     --Repose for WHM sub; this spell is not enfeebling magic so use M.acc and divine skill.
  393.     sets.midcast.Repose = {
  394.         main="Crocea Mors",
  395.         sub="Ammurapi Shield",
  396.         ammo="Regal Gem",
  397.         head={ name="Chironic Hat", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','"Conserve MP"+2','MND+5','Mag. Acc.+15','"Mag.Atk.Bns."+2',}},
  398.         body="Atrophy Tabard +3",
  399.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  400.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  401.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  402.         neck="Dls. Torque +2",
  403.         waist="Luminary Sash",
  404.         left_ear="Digni. Earring",
  405.         right_ear="Regal Earring",
  406.         left_ring="Stikini Ring",
  407.         right_ring="Stikini Ring",
  408.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},}
  409.    
  410.     --set does not need gear; is not referenced.
  411.     sets.midcast['Enfeebling Magic'] = {}
  412.     --Enfeebling sets for Mnd and Int enfeebles will really only change which cape you are using   
  413.     sets.midcast.IntEnfeebles = {back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},}
  414.    
  415.     sets.midcast['Enfeebling Magic'].Accuracy = {
  416.         main="Crocea Mors",
  417.         sub="Ammurapi Shield",
  418.         range=empty,
  419.         ammo="Regal Gem",
  420.         head="Viti. Chapeau +3",
  421.         neck="Duelist's Torque +2",
  422.         ear1="Dignitary's Earring",
  423.         ear2="Regal Earring",
  424.         body="Atrophy Tabard +3",
  425.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  426.         ring1="Stikini ring",
  427.         ring2="Stikini Ring",
  428.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},
  429.         waist="Luminary Sash",
  430.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  431.         feet="Vitiation Boots +3",}
  432.    
  433.     --Accuracy is the ONLY concern for this set, used for boolean spells such as silence. Silence either lands or it doesn't, there is no potency.
  434.     --When using Kaja bow for m.acc, if the set you are combining with uses gem, you must specify empty ammo to prevent misequip.
  435.     sets.midcast['Enfeebling Magic'].MaxAccuracy = {       
  436.         main="Crocea Mors",
  437.         sub="Ammurapi Shield",
  438.         range="Kaja Bow",
  439.         ammo=empty,
  440.         head="Viti. Chapeau +3",
  441.         neck="Duelist's Torque +2",
  442.         ear1="Dignitary's Earring",
  443.         ear2="Regal Earring",
  444.         body="Atrophy Tabard +3",
  445.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  446.         ring1="Stikini ring",
  447.         ring2="Stikini Ring",
  448.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},
  449.         waist="Luminary Sash",
  450.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  451.         feet="Vitiation Boots +3",}
  452.    
  453.     sets.midcast.Sleep = set_combine(sets.midcast['Enfeebling Magic'].MaxAccuracy, {right_ring="Kishar Ring"})
  454.    
  455.     sets.midcast['Enfeebling Magic'].Skill = {    
  456.         main="Crocea Mors",
  457.         sub="Ammurapi Shield",
  458.         ammo="Regal Gem",
  459.         head="Viti. Chapeau +3",
  460.         body="Atrophy Tabard +3",
  461.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  462.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  463.         feet="Vitiation Boots +3",
  464.         neck="Duelist's Torque +2",
  465.         waist="Luminary Sash",
  466.         left_ear="Digni. Earring",
  467.         right_ear="Regal Earring",
  468.         left_ring="Stikini Ring",
  469.         right_ring="Stikini Ring",
  470.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},}
  471.  
  472.     sets.midcast['Enfeebling Magic'].Potency = {    
  473.         main="Crocea Mors",
  474.         sub="Ammurapi Shield",
  475.         ammo="Regal Gem",
  476.         head="Viti. Chapeau +3",
  477.         body="Lethargy Sayon +1",
  478.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  479.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  480.         feet="Vitiation Boots +3",
  481.         neck="Duelist's Torque +2",
  482.         waist="Luminary Sash",
  483.         left_ear="Digni. Earring",
  484.         right_ear="Regal Earring",
  485.         left_ring="Stikini Ring",
  486.         right_ring="Kishar Ring",
  487.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},
  488.         }
  489.    
  490.     sets.Saboteur = set_combine(sets.midcast['Enfeebling Magic'].Potency, {hands="Lethargy Gantherots +1"})
  491.    
  492.     sets.Dia = {head="Vitiation Chapeau +3"}
  493.    
  494.     sets.midcast['Enfeebling Magic'].ParalyzeDuration = {feet="Vitiation Boots +3",}
  495.    
  496.     sets.midcast['Elemental Magic'] = {
  497.         main="Griovolr",
  498.         sub="Niobid Strap",
  499.         ammo="Pemphredo Tathlum",
  500.         head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+8%','Mag. Acc.+2','"Mag.Atk.Bns."+13',}},
  501.         body={ name="Merlinic Jubbah", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Mag. Acc.+12','"Mag.Atk.Bns."+10',}},
  502.         hands="Jhakri Cuffs +2",
  503.         legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Mag. crit. hit dmg. +4%','MND+4','Mag. Acc.+11','"Mag.Atk.Bns."+14',}},
  504.         feet="Vitiation Boots +3",
  505.         neck="Sanctity Necklace",
  506.         waist="Eschan Stone",
  507.         left_ear="Regal Earring",
  508.         right_ear="Friomisi Earring",
  509.         left_ring="Shiva Ring +1",
  510.         right_ring="Shiva Ring +1",
  511.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},}
  512.        
  513.     sets.midcast['Elemental Magic'].Burst = {    
  514.         main="Raetic Staff +1",
  515.         sub="Enki Strap",
  516.         ammo="Pemphredo Tathlum",
  517.         head="Ea Hat",
  518.         body="Ea Houppelande",
  519.         hands="Ea Cuffs",
  520.         legs="Ea Slops",
  521.         feet="Ea Pigaches",
  522.         neck="Mizu. Kubikazari",
  523.         waist="Eschan Stone",
  524.         left_ear="Regal Earring",
  525.         right_ear="Friomisi Earring",
  526.         left_ring="Mujin Band",
  527.         right_ring="Shiva Ring +1",
  528.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},}
  529.    
  530.    
  531.     sets.Obi = {waist="Hachirin-no-Obi",}
  532.    
  533.     --Impact is elemental magic that should STRONGLY favor magic accuracy.
  534.     --The additional stat down effect is far more important than the damage it deals.
  535.     --As elemental magic, it is INT based.
  536.     --When using Kaja bow for m.acc, if the set you are combining with uses gem, you must specify empty ammo to prevent misequip.
  537.     sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {
  538.         main="Crocea Mors",
  539.         sub="Ammurapi Shield",
  540.         range="Kaja Bow",
  541.         ammo=empty,
  542.         head=empty,
  543.         body="Twilight Cloak",
  544.         hands={ name="Kaykaus Cuffs +1", augments={'MP+80','MND+12','Mag. Acc.+20',}},
  545.         legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','Enmity-2','INT+6','Mag. Acc.+14','"Mag.Atk.Bns."+3',}},
  546.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  547.         neck="Dls. Torque +2",
  548.         waist="Luminary Sash",
  549.         left_ear="Digni. Earring",
  550.         right_ear="Regal Earring",
  551.         left_ring="Stikini Ring",
  552.         right_ring="Stikini Ring",
  553.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Fast Cast"+10',}},})
  554.  
  555.     sets.midcast['Dark Magic'] = {
  556.         main="Crocea Mors",
  557.         sub="Ammurapi Shield",
  558.         ammo="Regal Gem",
  559.         head={ name="Chironic Hat", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','"Conserve MP"+2','MND+5','Mag. Acc.+15','"Mag.Atk.Bns."+2',}},
  560.         body="Atrophy Tabard +3",
  561.         hands="Jhakri Cuffs +2",
  562.         legs={ name="Chironic Hose", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','MND+6','Mag. Acc.+14',}},
  563.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  564.         neck="Duelist's Torque +2",
  565.         waist="Luminary Sash",
  566.         left_ear="Digni. Earring",
  567.         right_ear="Regal Earring",
  568.         left_ring="Stikini Ring",
  569.         right_ring="Stikini Ring",
  570.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},}
  571.  
  572.  
  573.     sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Evanescence ring",
  574.         ring2="Archon Ring",
  575.         waist="Fucho-no-Obi",
  576.         head="Pixie Hairpin +1",
  577.         neck="Erra Pendant",
  578.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},})
  579.  
  580.     sets.midcast.Aspir = sets.midcast.Drain
  581.        
  582.     sets.midcast.Utsusemi = {ammo="Incantor Stone",
  583.         head="Carmine Mask +1",
  584.         ear2="Loquacious Earring",
  585.         body="Vitiation Tabard +3",
  586.         hands="Leyline Gloves",
  587.         ring1="Prolix Ring",
  588.         ring2="Kishar Ring",
  589.         back="Swith Cape +1",
  590.         waist="Witful Belt",
  591.         legs="Psycloth Lappas",
  592.         feet="Carmine Greaves +1"} 
  593.        
  594.        
  595. --===============================================================================--    
  596. -- __        __                                               _      _   _   _   --
  597. -- \ \      / /   ___    __ _   _ __     ___    _ __    ___  | | __ (_) | | | |  --
  598. --  \ \ /\ / /   / _ \  / _` | | '_ \   / _ \  | '_ \  / __| | |/ / | | | | | |  --
  599. --   \ V  V /   |  __/ | (_| | | |_) | | (_) | | | | | \__ \ |   <  | | | | | |  --
  600. --    \_/\_/     \___|  \__,_| | .__/   \___/  |_| |_| |___/ |_|\_\ |_| |_| |_|  --
  601. --                             |_|                                               --
  602. --===============================================================================--
  603.  
  604.  
  605.     sets.precast.WS = {
  606.         ammo="Yetshila",
  607.         head="Ayanmo Zucchetto +2",
  608.         body="Ayanmo Corazza +2",
  609.         hands="Atrophy Gloves +3",
  610.         legs={ name="Taeon Tights", augments={'Accuracy+22','"Triple Atk."+2','DEX+9',}},
  611.         feet="Thereoid Greaves",
  612.         neck="Fotia Gorget",
  613.         waist="Fotia Belt",
  614.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  615.         right_ear="Sherida Earring",
  616.         left_ring="Begrudging Ring",
  617.         right_ring="Ilabrat Ring",
  618.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}}
  619.  
  620.     sets.precast.WS['Requiescat'] = {
  621.         ammo="Regal Gem",
  622.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  623.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  624.         hands="Atrophy Gloves +3",
  625.         legs="Atrophy Tights +3",
  626.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  627.         neck="Fotia Gorget",
  628.         waist="Fotia Belt",
  629.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  630.         right_ear="Regal Earring",
  631.         left_ring="Karieyh Ring +1",
  632.         right_ring="Rufescent Ring",
  633.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','"Dbl.Atk."+10',}},}
  634.  
  635.     sets.precast.WS['Sanguine Blade'] = {
  636.         ammo="Pemphredo Tathlum",
  637.         head="Pixie Hairpin +1",
  638.         body={ name="Merlinic Jubbah", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Mag. Acc.+12','"Mag.Atk.Bns."+10',}},
  639.         hands="Jhakri Cuffs +2",
  640.         legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+25 "Mag.Atk.Bns."+25','Mag. crit. hit dmg. +4%','MND+4','Mag. Acc.+11','"Mag.Atk.Bns."+14',}},
  641.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  642.         neck="Sanctity Necklace",
  643.         waist="Eschan Stone",
  644.         left_ear="Regal Earring",
  645.         right_ear="Friomisi Earring",
  646.         left_ring="Karieyh Ring +1",
  647.         right_ring="Archon Ring",
  648.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%',}},}
  649.        
  650.     sets.precast.WS['Sanguine Blade'].MAB = {
  651.         ammo="Pemphredo Tathlum",
  652.         head="Pixie Hairpin +1",
  653.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  654.         hands="Jhakri Cuffs +2",
  655.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  656.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  657.         neck="Sanctity Necklace",
  658.         waist="Eschan Stone",
  659.         left_ear="Regal Earring",
  660.         right_ear="Friomisi Earring",
  661.         left_ring="Karieyh Ring +1",
  662.         right_ring="Archon Ring",
  663.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%',}},}
  664.        
  665.     sets.precast.WS['Red Lotus Blade'] = {
  666.         ammo="Pemphredo Tathlum",
  667.         head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+8%','Mag. Acc.+2','"Mag.Atk.Bns."+13',}},
  668.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  669.         hands="Jhakri Cuffs +2",
  670.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  671.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  672.         neck="Fotia Gorget",
  673.         waist="Fotia Belt",
  674.         left_ear="Moonshade Earring",
  675.         right_ear="Friomisi Earring",
  676.         left_ring="Karieyh Ring +1",
  677.         right_ring="Shiva Ring +1",
  678.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%',}},
  679.     }
  680.    
  681.     sets.precast.WS['Shining Strike'] = {
  682.         ammo="Pemphredo Tathlum",
  683.         head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+8%','Mag. Acc.+2','"Mag.Atk.Bns."+13',}},
  684.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  685.         hands="Jhakri Cuffs +2",
  686.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  687.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  688.         neck="Fotia Gorget",
  689.         waist="Fotia Belt",
  690.         left_ear="Moonshade Earring",
  691.         right_ear="Friomisi Earring",
  692.         left_ring="Karieyh Ring +1",
  693.         right_ring="Shiva Ring +1",
  694.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%',}},
  695.     }
  696.    
  697.     sets.precast.WS['Seraph Blade'] = {
  698.         ammo="Pemphredo Tathlum",
  699.         head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+8%','Mag. Acc.+2','"Mag.Atk.Bns."+13',}},
  700.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  701.         hands="Jhakri Cuffs +2",
  702.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  703.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  704.         neck="Fotia Gorget",
  705.         waist="Fotia Belt",
  706.         left_ear="Moonshade Earring",
  707.         right_ear="Friomisi Earring",
  708.         left_ring="Karieyh Ring +1",
  709.         right_ring="Shiva Ring +1",
  710.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%',}},
  711.     }
  712.  
  713.     sets.precast.WS['Savage Blade'] = {
  714.         ammo="Regal Gem",
  715.         head="Viti. Chapeau +3",
  716.         body="Vitiation Tabard +3",
  717.         hands="Atrophy Gloves +3",
  718.         legs="Jhakri Slops +2",
  719.         feet={ name="Chironic Slippers", augments={'"Conserve MP"+5','Rng.Atk.+10','Weapon skill damage +9%','Accuracy+6 Attack+6',}},
  720.         neck="Caro Necklace",
  721.         waist="Prosilio Belt +1",
  722.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  723.         right_ear="Regal Earring",
  724.         left_ring="Karieyh Ring +1",
  725.         right_ring="Rufescent Ring",
  726.         back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  727.        
  728.        
  729.     sets.precast.WS['True Strike'] = {
  730.         main="Kaja Rod",
  731.         sub="Tauret",
  732.         ammo="Yetshila",
  733.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  734.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  735.         hands="Atrophy Gloves +3",
  736.         legs="Jhakri Slops +2",
  737.         feet={ name="Chironic Slippers", augments={'"Conserve MP"+5','Rng.Atk.+10','Weapon skill damage +9%','Accuracy+6 Attack+6',}},
  738.         neck="Caro Necklace",
  739.         waist="Prosilio Belt +1",
  740.         left_ear="Ishvara Earring",
  741.         right_ear="Sherida Earring",
  742.         left_ring="Karieyh Ring +1",
  743.         right_ring="Rufescent Ring",
  744.         back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  745.        
  746.     sets.precast.WS['Black Halo'] = {
  747.         ammo="Regal Gem",
  748.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  749.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  750.         hands="Atrophy Gloves +3",
  751.         legs="Atrophy Tights +3",
  752.         feet={ name="Chironic Slippers", augments={'"Conserve MP"+5','Rng.Atk.+10','Weapon skill damage +9%','Accuracy+6 Attack+6',}},
  753.         neck="Dls. Torque +2",
  754.         waist="Luminary Sash",
  755.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  756.         right_ear="Regal Earring",
  757.         left_ring="Karieyh Ring +1",
  758.         right_ring="Rufescent Ring",
  759.         back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%',}},} 
  760.    
  761.     sets.precast.WS['Aeolian Edge'] = {
  762.         ammo="Pemphredo Tathlum",
  763.         head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+8%','Mag. Acc.+2','"Mag.Atk.Bns."+13',}},
  764.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  765.         hands="Jhakri Cuffs +2",
  766.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  767.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  768.         neck="Sanctity Necklace",
  769.         waist="Eschan Stone",
  770.         left_ear="Regal Earring",
  771.         right_ear="Friomisi Earring",
  772.         left_ring="Karieyh Ring +1",
  773.         right_ring="Shiva Ring +1",
  774.         back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%',}},}
  775.        
  776.     sets.precast.WS['Death Blossom'] = {
  777.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  778.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  779.         hands="Atrophy Gloves +3",
  780.         legs="Atrophy Tights +3",
  781.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  782.         neck="Fotia Gorget",
  783.         waist="Fotia Belt",
  784.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  785.         right_ear="Regal Earring",
  786.         left_ring="Stikini Ring",
  787.         right_ring="Rufescent Ring",
  788.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  789.    
  790.     sets.precast.WS['Chant Du Cygne'] = {
  791.         ammo="Yetshila",
  792.         head="Ayanmo Zucchetto +2",
  793.         body="Ayanmo Corazza +2",
  794.         hands="Atrophy Gloves +3",
  795.         legs={ name="Taeon Tights", augments={'Accuracy+22','"Triple Atk."+2','DEX+9',}},
  796.         feet="Thereoid Greaves",
  797.         neck="Fotia Gorget",
  798.         waist="Fotia Belt",
  799.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  800.         right_ear="Sherida Earring",
  801.         left_ring="Begrudging Ring",
  802.         right_ring="Ilabrat Ring",
  803.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  804.        
  805.        
  806.     sets.precast.WS['Evisceration'] = {
  807.         main="Tauret",
  808.         sub="Ternion Dagger +1",
  809.         ammo="Yetshila",
  810.         head="Aya. Zucchetto +2",
  811.         body="Ayanmo Corazza +2",
  812.         hands="Atrophy Gloves +3",
  813.         legs={ name="Taeon Tights", augments={'Accuracy+22','"Triple Atk."+2','DEX+9',}},
  814.         feet="Aya. Gambieras +2",
  815.         neck="Fotia Gorget",
  816.         waist="Fotia Belt",
  817.         left_ear="Brutal Earring",
  818.         right_ear="Sherida Earring",
  819.         left_ring="Hetairoi Ring",
  820.         right_ring="Ilabrat Ring",
  821.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  822.  
  823.        
  824. --------------------------------------------------------------------------------------------------------   
  825. ---- _____    ____    _   _   _____    _____   _______   _____    ____    _   _              _      ----
  826. --  / ____|  / __ \  | \ | | |  __ \  |_   _| |__   __| |_   _|  / __ \  | \ | |     /\     | |       --
  827. -- | |      | |  | | |  \| | | |  | |   | |      | |      | |   | |  | | |  \| |    /  \    | |       --
  828. -- | |      | |  | | | . ` | | |  | |   | |      | |      | |   | |  | | | . ` |   / /\ \   | |       --
  829. -- | |____  | |__| | | |\  | | |__| |  _| |_     | |     _| |_  | |__| | | |\  |  / ____ \  | |____   --
  830. --  \_____|  \____/  |_| \_| |_____/  |_____|    |_|    |_____|  \____/  |_| \_| /_/    \_\ |______|  --
  831. ----                                                                                                ----
  832. --------------------------------------------------------------------------------------------------------
  833.        
  834.     sets.buff.ComposureOther = set_combine(sets.midcast['Enhancing Magic'].SelfDuration, {
  835.         main={ name="Colada", augments={'Enh. Mag. eff. dur. +3','Mag. Acc.+18','DMG:+1',}},
  836.         head="Lethargy Chappel +1",
  837.         neck="Duelist's Torque +2",
  838.         body="Vitiation Tabard +3",
  839.         hands="Atrophy Gloves +3",
  840.         legs="Lethargy Fuseau +1",
  841.         feet="Lethargy Houseaux +1"})
  842.        
  843.     sets.Adoulin = {body="Councilor's Garb",}
  844.  
  845.     sets.MoveSpeed = {legs="Carmine Cuisses +1",hands="Buremte Gloves",ammo="Staunch Tathlum +1"}
  846.        
  847.     sets.ConsMP = {body="Seidr Cotehardie"}
  848.  
  849.     sets.Dyna_RP_Farm = {neck="Duelist's Torque +2",}
  850.    
  851.     --Fallback for Macc ammo when we have ranged slot locked (i.e. Meleeing)
  852.     sets.MaccAmmo = {range=empty,ammo="Regal Gem"}
  853.    
  854. --=================================--
  855. --      ___       _   _            --
  856. --     |_ _|   __| | | |   ___     --
  857. --      | |   / _` | | |  / _ \    --
  858. --      | |  | (_| | | | |  __/    --
  859. --     |___|  \__,_| |_|  \___|    --
  860. --=================================--
  861.  
  862.  
  863.     sets.idle.Normal = {    
  864.         main={ name="Colada", augments={'"Refresh"+2','INT+3','Mag. Acc.+2','"Mag.Atk.Bns."+15','DMG:+4',}},
  865.         sub={ name="Beatific Shield +1", augments={'Phys. dmg. taken -3%','HP+30 MP+30',}},
  866.         ammo="Homiliary",
  867.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  868.         body="Jhakri Robe +2",
  869.         hands={ name="Merlinic Dastanas", augments={'Pet: DEX+3','AGI+5','"Refresh"+1','Accuracy+16 Attack+16',}},
  870.         legs="Aya. Cosciales +2",
  871.         feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
  872.         neck="Loricate Torque +1",
  873.         waist="Flume Belt +1",
  874.         left_ear="Etiolation Earring",
  875.         right_ear="Genmei Earring",
  876.         left_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -4%',}},
  877.         right_ring="Defending Ring",
  878.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  879.  
  880.     sets.idle.Town = {
  881.         main="Crocea Mors",
  882.         sub="Ammurapi Shield",
  883.         ammo="Homiliary",
  884.         head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
  885.         body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
  886.         hands={ name="Viti. Gloves +3", augments={'Enhances "Phalanx II" effect',}},
  887.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  888.         feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
  889.         neck="Duelist's Torque +2",
  890.         waist="Flume Belt +1",
  891.         left_ear="Etiolation Earring",
  892.         right_ear="Odnowa Earring +1",
  893.         left_ring="Karieyh Ring +1",
  894.         right_ring="Defending Ring",
  895.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  896.        
  897.  
  898.     sets.latent_refresh = {waist="Fucho-no-obi"}
  899.  
  900. --====================================================--
  901. --     _____   ____      ____           _             --
  902. --    |_   _| |  _ \    / ___|    ___  | |_   ___     --
  903. --      | |   | |_) |   \___ \   / _ \ | __| / __|    --
  904. --      | |   |  __/     ___) | |  __/ | |_  \__ \    --
  905. --      |_|   |_|       |____/   \___|  \__| |___/    --
  906. --====================================================--
  907.    
  908.     sets.default_melee_weapons = {main="Crocea Mors", sub="Tauret",}
  909.    
  910.     sets.engaged = {
  911.         main="Crocea Mors",
  912.         sub="Tauret",
  913.         ammo="Ginsen",
  914.         head="Aya. Zucchetto +2",
  915.         body="Ayanmo Corazza +2",
  916.         hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
  917.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  918.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  919.         neck="Anu Torque",
  920.         waist="Reiki Yotai",
  921.         left_ear="Suppanomimi",
  922.         right_ear="Sherida Earring",
  923.         left_ring="Chirich Ring +1",
  924.         right_ring="Chirich Ring +1",
  925.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},}
  926.        
  927.     sets.engaged.DT = {
  928.         main="Crocea Mors",
  929.         sub={ name="Machaera +3", augments={'TP Bonus +1000',}},
  930.         ammo="Staunch Tathlum +1",
  931.         head="Aya. Zucchetto +2",
  932.         body="Ayanmo Corazza +2",
  933.         hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
  934.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  935.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  936.         neck="Loricate Torque +1",
  937.         waist="Reiki Yotai",
  938.         left_ear="Suppanomimi",
  939.         right_ear="Sherida Earring",
  940.         left_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -4%',}},
  941.         right_ring="Defending Ring",
  942.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},}
  943.  
  944.     sets.engaged.HasteCap = {
  945.         ammo="Ginsen",
  946.         head="Aya. Zucchetto +2",
  947.         body="Ayanmo Corazza +2",
  948.         hands={ name="Carmine Fin. Ga. +1", augments={'Rng.Atk.+20','"Mag.Atk.Bns."+12','"Store TP"+6',}},
  949.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  950.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  951.         neck="Anu Torque",
  952.         waist="Windbuffet Belt +1",
  953.         left_ear="Suppanomimi",
  954.         right_ear="Sherida Earring",
  955.         left_ring="Chirich Ring +1",
  956.         right_ring="Chirich Ring +1",
  957.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},}
  958.        
  959.     sets.engaged.HasteCap.DT = {    
  960.         main="Crocea Mors",
  961.         sub="Tauret",
  962.         ammo="Staunch Tathlum +1",
  963.         head="Aya. Zucchetto +2",
  964.         body="Ayanmo Corazza +2",
  965.         hands="Aya. Manopolas +2",
  966.         legs="Aya. Cosciales +2",
  967.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  968.         neck="Loricate Torque +1",
  969.         waist="Reiki Yotai",
  970.         left_ear="Suppanomimi",
  971.         right_ear="Sherida Earring",
  972.         left_ring="Chirich Ring +1",
  973.         right_ring="Defending Ring",
  974.         back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},}
  975.        
  976.     sets.engaged.Savage_TP_Cape = {back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},}
  977.  
  978. end
  979.  
  980.  
  981. --=================================================================--
  982. --  _____                          _     _                         --
  983. -- |  ___|  _   _   _ __     ___  | |_  (_)   ___    _ __    ___   --
  984. -- | |_    | | | | | '_ \   / __| | __| | |  / _ \  | '_ \  / __|  --
  985. -- |  _|   | |_| | | | | | | (__  | |_  | | | (_) | | | | | \__ \  --
  986. -- |_|      \__,_| |_| |_|  \___|  \__| |_|  \___/  |_| |_| |___/  --
  987. --                                                                 --
  988. --=================================================================--
  989.  
  990.  
  991. function job_precast(spell, action, spellMap, eventArgs)
  992.     if spell.english == 'Refresh' then
  993.         equip(sets.midcast['Enhancing Magic'])
  994.        
  995.     end
  996.     if spell.english == 'Aeolian Edge' then
  997.         equip(sets.precast.WS['Aeolian Edge'])
  998.     end
  999.    
  1000.     if spell.english == 'Impact' then
  1001.         equip(sets.precast.FC.Impact)
  1002.     end
  1003.    
  1004.     if spell.english == 'Impact' and (buffactive['Spontaneity'] or buffactive['Chainspell']) then
  1005.         sets.precast.FC.Impact = sets.precast.FC.ImpactQC
  1006.     elseif spell.english == 'Impact' then
  1007.         sets.precast.FC.Impact = sets.precast.FC.Impact2
  1008.     end
  1009.        
  1010.     if (buffactive['Spontaneity'] or buffactive['Chainspell']) and spell.english ~= "Impact" then
  1011.         eventArgs.handled = true
  1012.     end
  1013.    
  1014.     return
  1015.    
  1016. end
  1017.    
  1018.  
  1019.  
  1020. function job_midcast(spell, action, spellMap, eventArgs)
  1021.  
  1022.    
  1023.     if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
  1024.         if buffactive['Copy Image'] then
  1025.                 windower.ffxi.cancel_buff(66)
  1026.         elseif buffactive['Copy Image (2)'] then
  1027.                 windower.ffxi.cancel_buff(444)
  1028.         elseif buffactive['Copy Image (3)'] then
  1029.                 windower.ffxi.cancel_buff(445)
  1030.         end
  1031.     end
  1032.    
  1033.     if spell.english == 'Impact' then
  1034.         equip(sets.midcast.Impact)
  1035.     end
  1036.    
  1037. end
  1038.  
  1039.  
  1040.  
  1041. function job_post_midcast(spell, action, spellMap, eventArgs)
  1042.  
  1043.  
  1044.     if spell.skill == 'Enfeebling Magic' and state.Enfeeb.Value == 'Accuracy' then
  1045.         equip(sets.midcast['Enfeebling Magic'].Accuracy)
  1046.     elseif spell.skill == 'Enfeebling Magic' and state.Enfeeb.Value == 'Potency' then
  1047.         equip(sets.midcast['Enfeebling Magic'].Potency)
  1048.     end
  1049.    
  1050.     if spell.english == "Dia III" then
  1051.         equip(set_combine(sets.midcast['Enfeebling Magic'].Potency, sets.Dia))
  1052.     end
  1053.  
  1054.    
  1055.     if spell.skill == 'Elemental Magic' and spell.english ~= 'Impact' and (player.mp-spell.mp_cost) < 600 then
  1056.         equip(sets.ConsMP)
  1057.     end
  1058.    
  1059.     if spell.english == 'Sanguine Blade' and state.SanguineBlade.Value == 'MAB' then
  1060.         equip(sets.precast.WS['Sanguine Blade'].MAB)
  1061.     end
  1062.    
  1063.     if spell.skill == 'Elemental Magic' or (spell.type:lower() == 'weaponskill' and (spell.english == 'Sanguine Blade' or spell.english == 'Red Lotus Blade'))
  1064.         and (spell.element == world.weather_element or spell.element == world.day_element) then
  1065.             equip(sets.Obi)
  1066.     end
  1067.    
  1068.     if spell.skill == 'Healing Magic' and (spell.element == world.weather_element or spell.element == world.day_element) and spell.target.type == 'PLAYER' then
  1069.         equip(set_combine(sets.midcast.Cure, sets.Obi))
  1070.     end
  1071.    
  1072.     if spell.english == "Temper" or spell.english == "Temper II" or spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  1073.         equip(sets.midcast['Enhancing Magic'].Skill)
  1074.     end
  1075.    
  1076.     if spell.english == "Frazzle II" or spell.english == "Distract II" or spell.english == "Distract" then
  1077.         equip(sets.midcast['Enfeebling Magic'].Accuracy)
  1078.     end
  1079.    
  1080.     if spell.english == "Frazzle" and state.WeaponLockMode.value ~= 'Locked' then
  1081.         equip(sets.midcast['Enfeebling Magic'].MaxAccuracy)
  1082.     elseif spell.english == "Frazzle" and state.WeaponLockMode.value == 'Locked' then
  1083.         equip(set_combine(sets.midcast['Enfeebling Magic'].MaxAccuracy, sets.MaccAmmo))
  1084.     end
  1085.    
  1086.     if spell.english == "Repose" then
  1087.         equip(sets.midcast.Repose)
  1088.     end
  1089.    
  1090.     if spell.english == "Frazzle III" or (spell.english == "Distract III" and (state.Enfeeb.Value == 'Accuracy' or state.Enfeeb.Value == 'Potency')) then
  1091.         equip(sets.midcast['Enfeebling Magic'].Potency)
  1092.     end
  1093.    
  1094.     if spell.english:startswith('En') then
  1095.         equip(sets.midcast['Enhancing Magic'].Skill)
  1096.     end
  1097.    
  1098.     if spell.english == "Invisible" or spell.english == "Sneak" then
  1099.         equip(sets.midcast['Enhancing Magic'])
  1100.     end
  1101.    
  1102.     if spell.skill == 'Enhancing Magic' and buffactive['Composure'] and spell.target.type == 'PLAYER' then
  1103.         equip(sets.buff.ComposureOther)
  1104.     end
  1105.    
  1106.     if spell.action_type == "Magic" and spellMap == 'Cure' and spell.target.type == 'SELF' then
  1107.         equip(sets.midcast.CureSelf)
  1108.     end
  1109.    
  1110.     if spell.english == "Phalanx" and spell.target.type == 'SELF' then
  1111.         equip(sets.midcast.PhalanxSelf)
  1112.     end
  1113.    
  1114.     if spell.skill == "Enhancing Magic" and
  1115.         spell.english:startswith('Gain') then
  1116.         equip(sets.midcast['Enhancing Magic'].GainSpell)
  1117.     elseif ((spell.english:startswith('Haste') or spell.english:startswith("Flurry")
  1118.         or spell.english == 'Sneak' or spell.english == 'Invisible' or
  1119.         spell.english == 'Deodorize' or spell.english:startswith('Regen')) and spell.target.type == 'SELF') then
  1120.         equip(sets.midcast['Enhancing Magic'].SelfDuration)
  1121.     end
  1122.    
  1123.     if spell.skill == 'Enfeebling Magic' and buffactive['Stymie'] then
  1124.         equip(sets.midcast['Enfeebling Magic'].Potency)
  1125.     end
  1126.    
  1127.     if (spell.english:startswith("Break") or spell.english == 'Bind' or spell.english == 'Dispel'
  1128.         or spell.english == 'Inundation' or spell.english == 'Silence' or spell.english == 'Stun') and state.WeaponLockMode.value ~= 'Locked' then
  1129.         equip(sets.midcast['Enfeebling Magic'].MaxAccuracy)
  1130.     elseif (spell.english:startswith("Break") or spell.english == 'Bind' or spell.english == 'Dispel'
  1131.         or spell.english == 'Inundation' or spell.english == 'Silence' or spell.english == 'Stun') and state.WeaponLockMode.value == 'Locked' then
  1132.         equip(set_combine(sets.midcast['Enfeebling Magic'].MaxAccuracy, sets.MaccAmmo))
  1133.     end
  1134.    
  1135.     if spell.english:startswith("Sleep") then
  1136.         equip(sets.midcast.Sleep)
  1137.     end
  1138.    
  1139.     if (spell.skill == 'Enfeebling Magic' and buffactive['Saboteur']) and not (spell.english:startswith("Break")
  1140.         or spell.english:startswith("Break") or spell.english == 'Bind' or spell.english == 'Dispel'
  1141.         or spell.english == 'Inundation' or spell.english == 'Silence' or spell.english == 'Stun' or spell.english == "Frazzle II" or spell.english == "Distract II" or spell.english == "Distract") then
  1142.             equip(sets.Saboteur)
  1143.     end
  1144.        
  1145.     if spell.skill == 'Enfeebling Magic' or spell.skill == 'Dark Magic' then
  1146.         if spell.type ~= "WhiteMagic" and not (spell.english:startswith('Distract') or spell.english:startswith('Frazzle')) then
  1147.             equip(sets.midcast.IntEnfeebles)
  1148.         end
  1149.     end
  1150.    
  1151.     if spell.english == "Refresh" or spell.english == "Refresh II" or spell.english == "Refresh III" then
  1152.         equip(sets.midcast.Refresh)
  1153.     end
  1154. end
  1155.  
  1156.  
  1157. function job_aftercast(spell, action, spellMap, eventArgs)
  1158.  
  1159.     if not spell.interrupted then
  1160.         if spell.english == "Sleep II" or spell.english == "Sleepga II" then -- Sleep II Countdown --
  1161.             send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  1162.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  1163.             send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  1164.         elseif spell.english == "Break" or spell.english == "Breakga" then -- Break Countdown --
  1165.             send_command('wait 25;input /echo Break Effect: [WEARING OFF IN 5 SEC.]')
  1166.         elseif spell.english == "Paralyze" then -- Paralyze Countdown --
  1167.             send_command('wait 115;input /echo Paralyze Effect: [WEARING OFF IN 5 SEC.]')
  1168.         elseif spell.english == "Slow" then -- Slow Countdown --
  1169.             send_command('wait 115;input /echo Slow Effect: [WEARING OFF IN 5 SEC.]')        
  1170.         end
  1171.     end
  1172.    
  1173.     --if spell.action_type == 'Item' then
  1174.      --   eventArgs.handled = false
  1175.    -- end
  1176.    
  1177.     if spell and spell.name == 'Utsusemi: Ni' then
  1178.         ShadowType = 'Ni'
  1179.     elseif spell and spell.name == 'Utsusemi: Ichi' then
  1180.         ShadowType = 'Ichi'
  1181.     end
  1182.    
  1183. end
  1184.  
  1185. -------------------------------------------------------------------------------------------------------------------
  1186. -- Job-specific hooks for non-casting events.
  1187. -------------------------------------------------------------------------------------------------------------------
  1188.  
  1189. -- Handle notifications of general user state change.
  1190. function job_state_change(stateField, newValue, oldValue)
  1191.  
  1192.     if stateField == 'WeaponLockMode' then
  1193.         if newValue == 'Unlocked' then
  1194.             enable('main','sub','range','ammo')
  1195.         elseif newValue == 'Locked' and (player.equipment.range == 'Ullr' or player.equipment.range == 'Kaja Bow') then
  1196.             disable('main','sub','range','ammo')
  1197.         elseif newValue == 'Locked' then
  1198.             disable('main','sub','range')
  1199.         end
  1200.     end
  1201.    
  1202.     if stateField == 'DynaMode' then
  1203.         if newValue == 'RP_Farm' then
  1204.             equip(sets.Dyna_RP_Farm)
  1205.             if sets.Dyna_RP_Farm.neck and sets.Dyna_RP_Farm.main then
  1206.                 disable('main','neck')
  1207.             elseif sets.Dyna_RP_Farm.main then
  1208.                 disable('main')
  1209.             elseif sets.Dyna_RP_Farm.neck then
  1210.                 disable('neck')
  1211.             end
  1212.         elseif newValue ~= 'RP_Farm' then
  1213.             enable('neck')
  1214.         end
  1215.     end
  1216.  
  1217. end
  1218.  
  1219. function job_get_spell_map(spell, default_spell_map)
  1220. end
  1221. -------------------------------------------------------------------------------------------------------------------
  1222. -- User code that supplements standard library decisions.
  1223. -------------------------------------------------------------------------------------------------------------------
  1224.  
  1225. function job_buff_change(buff, gain)
  1226.     if (buff and gain) or (buff and not gain) then
  1227.         send_command('gs c update')
  1228.     end
  1229. end
  1230.  
  1231.  
  1232. function customize_melee_set(meleeSet)
  1233.  
  1234.     if (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) and state.OffenseMode.Value == 'DT' then
  1235.         meleeSet = set_combine(meleeSet, sets.engaged.HasteCap, sets.engaged.HasteCap.DT)
  1236.     elseif (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) then
  1237.         meleeSet = set_combine(meleeSet, sets.engaged.HasteCap)
  1238.     end
  1239.    
  1240.     if state.ZoneRing.value == 'Warp' then
  1241.         meleeSet = set_combine(meleeSet, {right_ring="Warp Ring"})
  1242.     elseif state.ZoneRing.value == 'Holla' then
  1243.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Holla)"})
  1244.     elseif state.ZoneRing.value == 'Dem' then
  1245.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Dem)"})
  1246.     elseif state.ZoneRing.value == 'Mea' then
  1247.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Mea)"})
  1248.         return meleeSet
  1249.     end
  1250.    
  1251.     if player.equipment.main == 'Sequence' or player.equipment.main == 'Kaja Sword' or player.equipment.main == "Naegling" then
  1252.         meleeSet = set_combine(meleeSet, sets.engaged.Savage_TP_Cape)
  1253.     end
  1254.        
  1255.     if buffactive['Doom'] then
  1256.         meleeSet = set_combine(meleeSet, sets.Doom)
  1257.     end
  1258.    
  1259.     return meleeSet
  1260.    
  1261. end
  1262.  
  1263. -- Modify the default idle set after it was constructed.
  1264. function customize_idle_set(idleSet)
  1265.    
  1266.     if player.mpp < 51 then
  1267.         idleSet = set_combine(idleSet, sets.latent_refresh)
  1268.     elseif state.IdleMode.value == 'PDT' then
  1269.         idleSet = sets.idle.PDT
  1270.     elseif state.IdleMode.value == 'MDT' then
  1271.         idleSet = sets.idle.MDT
  1272.     elseif state.IdleMode.value == 'Normal' then
  1273.         idleSet = sets.idle.Normal
  1274.     end
  1275.    
  1276.     if state.ZoneRing.value == 'Warp' then
  1277.         idleSet = set_combine(idleSet, {right_ring="Warp Ring"})
  1278.     elseif state.ZoneRing.value == 'Holla' then
  1279.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Holla)"})
  1280.     elseif state.ZoneRing.value == 'Dem' then
  1281.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Dem)"})
  1282.     elseif state.ZoneRing.value == 'Mea' then
  1283.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Mea)"})  
  1284.         return idleSet
  1285.     end
  1286.    
  1287.     if buffactive['doom'] then
  1288.         idleSet = set_combine(idleSet, sets.Doom)
  1289.     end
  1290.    
  1291.     return idleSet
  1292.    
  1293. end
  1294.  
  1295. function equip_gear_by_status(status)
  1296.  
  1297. end
  1298.  
  1299. windower.register_event('zone change', function()
  1300.  
  1301.     if state.ZoneRing.Value ~= 'None' then
  1302.         send_command('gs c set ZoneRing None')
  1303.     end
  1304.    
  1305.     if world.area:contains("[D]") and state.DynaMode.Value == 'None' then
  1306.         send_command('gs c set DynaMode RP_Farm')
  1307.     elseif not world.area:contains("[D]") and state.DynaMode.Value == 'RP_Farm' then
  1308.         send_command('gs c set DynaMode None')
  1309.     end
  1310.    
  1311. end)
  1312.  
  1313. mov = {counter=0}
  1314. if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
  1315.     mov.x = windower.ffxi.get_mob_by_index(player.index).x
  1316.     mov.y = windower.ffxi.get_mob_by_index(player.index).y
  1317.     mov.z = windower.ffxi.get_mob_by_index(player.index).z
  1318. end
  1319.  
  1320.  
  1321. moving = false
  1322. windower.raw_register_event('prerender',function()
  1323.     mov.counter = mov.counter + 1;
  1324.     if mov.counter>15 then
  1325.         local pl = windower.ffxi.get_mob_by_index(player.index)
  1326.         if pl and pl.x and mov.x and state.EngagedMoving.Value == 'Disabled' then
  1327.             --we want this to return a false value if these conditions were met, but we drew our weapons whilst moving.
  1328.             --we also want this value to become false if we Disable EngagedMovement while engaged.
  1329.             if state.Moving.value == 'true' and player.status == 'Engaged' then
  1330.                 state.Moving.value = 'false'
  1331.             end
  1332.             if player.status ~= 'Engaged' then
  1333.                 dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  1334.                 if dist > 1 and not moving then
  1335.                     state.Moving.value = 'true'
  1336.                     send_command('gs c update')
  1337.                     if world.area:contains("Adoulin") then
  1338.                         send_command('gs equip sets.Adoulin')
  1339.                     else
  1340.                         send_command('gs equip sets.MoveSpeed')
  1341.                     end
  1342.  
  1343.                     moving = true
  1344.  
  1345.                 elseif dist < 1 and moving then
  1346.                     state.Moving.value = 'false'
  1347.                     send_command('gs c update')
  1348.                     moving = false
  1349.                 end
  1350.             end
  1351.         elseif pl and pl.x and mov.x and state.EngagedMoving.Value == 'Enabled' then
  1352.             dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  1353.             if dist > 1 and not moving then
  1354.                 state.Moving.value = 'true'
  1355.                 send_command('gs c update')
  1356.                 if world.area:contains("Adoulin") then
  1357.                     send_command('gs equip sets.Adoulin')
  1358.                 else
  1359.                     send_command('gs equip sets.MoveSpeed')
  1360.                 end
  1361.  
  1362.                 moving = true
  1363.  
  1364.             elseif dist < 1 and moving then
  1365.                 state.Moving.value = 'false'
  1366.                 send_command('gs c update')
  1367.                 moving = false
  1368.             end
  1369.         end
  1370.         if pl and pl.x then
  1371.             mov.x = pl.x
  1372.             mov.y = pl.y
  1373.             mov.z = pl.z
  1374.         end
  1375.         mov.counter = 0
  1376.     end
  1377.    
  1378. end)
  1379.  
  1380. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  1381.  
  1382. function display_current_job_state(eventArgs)
  1383.     local msg = ""
  1384.  
  1385.     handle_equipping_gear(player.status)
  1386.  
  1387.     add_to_chat(122, msg)
  1388.     eventArgs.handled = true
  1389. end
  1390.  
  1391. --this will disable all add_to_chat, reccomend using Echos.  Alternatively, you can disable this.
  1392. function add_to_chat(command)
  1393.     if handle_unset and command == 'add_to_chat' then
  1394.     end
  1395. end
  1396.  
  1397. -------------------------------------------------------------------------------------------------------------------
  1398. -- Utility functions specific to this job.
  1399. -------------------------------------------------------------------------------------------------------------------
  1400.  
  1401. -- Select default macro book on initial load or subjob change.
  1402. function select_default_macro_book()
  1403.     -- Default macro set/book
  1404.     if player.sub_job == 'BLM' then
  1405.         set_macro_page(10, 5)
  1406.     elseif player.sub_job == 'WHM' then
  1407.         set_macro_page(10, 5)
  1408.     elseif player.sub_job == 'THF' then
  1409.         set_macro_page(10, 5)
  1410.     else
  1411.         set_macro_page(10, 5)
  1412.     end
  1413. end
  1414. ---------------------------------------------------------------------------------------------------
  1415. --This is used to make sure we will attempt to refresh the window every second
  1416. --prerender is actually faster than 1 second as it is called every few milliseconds
  1417. time_start = os.time()
  1418. windower.register_event(
  1419.     "prerender",
  1420.     function()
  1421.         --Items we want to check every second
  1422.         if os.time() > time_start then
  1423.             --We want to keep this reset each time we enter so its called every second
  1424.             time_start = os.time()
  1425.  
  1426.             --Simply refreshes the window
  1427.             refreshWindow()
  1428.         end
  1429.     end
  1430. )
  1431.  
  1432. --Window
  1433. --Default To Set Up the Text Window
  1434.  
  1435. -- Place this in the job_function()
  1436. -- setupTextWindow(1400, 600)
  1437.  
  1438. -- You can toggle this with a command to turn the entire window on and off
  1439. -- visible = false
  1440. visible = true
  1441.  
  1442. function setupTextWindow(pos_x, pos_y)
  1443.     tb_name = "run_gs_helper"
  1444.     bg_visible = true
  1445.     textinbox = " "
  1446.  
  1447.     windower.text.create(tb_name)
  1448.     -- table_name, x, y
  1449.     windower.text.set_location(tb_name, pos_x, pos_y)
  1450.     -- transparency, rgb
  1451.     windower.text.set_bg_color(tb_name, 170, 30, 30, 40)
  1452.     windower.text.set_color(tb_name, 255, 255, 161, 61)
  1453.     windower.text.set_font(tb_name, "Trebuchet MS")
  1454.     windower.text.set_font_size(tb_name, 14)
  1455.     windower.text.set_bold(tb_name, true)
  1456.     windower.text.set_italic(tb_name, false)
  1457.     windower.text.set_text(tb_name, textinbox)
  1458.     windower.text.set_bg_visibility(tb_name, bg_visible)
  1459.     windower.text.set_visibility(tb_name, visible)
  1460. end
  1461.  
  1462. --Hanldles refreshing the current text window
  1463. -- refreshWindow() should be called anytime you perform an action that would change what is on the window
  1464. function refreshWindow()
  1465.     textinbox = " " -- This is what gets drawn on the screen at the end
  1466.     textColorNewLine = "\\cr \n" --Placed at the end of a line to end the color and make a new line after
  1467.     textColorEnd = " \\cr" -- Placed at the end of what you are displaying to end the given color
  1468.     textColor = "\\cs(125, 255, 125)" --RGB color setting
  1469.  
  1470.     if not visible then --If not 'true' then it will hide the window all together
  1471.         textinbox = ""
  1472.         windower.text.set_text(tb_name, textinbox)
  1473.         return
  1474.     end
  1475.  
  1476.     --If you want to Toggle this section uncomment the if and end
  1477.     --You'll need to use a variable like this in user_setup():
  1478.     --state.textHideMode = M(false, "Hide Mode")
  1479.     --then you can toggle it with Mote's
  1480.     -- //gs c toggle textHideMode
  1481.    
  1482.     -- if not state.textHideMode.value then
  1483.    
  1484.         textinbox = textinbox .. drawTitle("  Local Keybinds  ")
  1485.         textinbox = textinbox .. textColor .. "(F8) Equip & Lock Weapons" .. textColorNewLine
  1486.    
  1487.         textinbox = textinbox .. drawTitle("  Current Settings  ") --Draws the title and puts '=', example ====     Mode     ==== around the title passed in
  1488.         textinbox = textinbox .. textColor .. "TP Mode (F9) : " .. tostring(state.OffenseMode.current) .. textColorNewLine
  1489.         textinbox = textinbox .. textColor .. "Casting Mode (CTRL+F9) : " .. tostring(state.CastingMode.current) .. textColorNewLine
  1490.         textinbox = textinbox .. textColor .. "Idle Mode (F10) : " .. tostring(state.IdleMode.current) .. textColorNewLine
  1491.        
  1492.         if state.Enfeeb.value == 'Potency' then
  1493.             textinbox = textinbox .. textColor .. "Enfeebling Mode (F11) : " .. tostring(state.Enfeeb.current) .. textColorNewLine
  1494.         elseif state.Enfeeb.value == 'Accuracy' then
  1495.             textinbox = textinbox .. textColor .. "Enfeebling Mode (F11) : " .. tostring(state.Enfeeb.current) .. textColorNewLine
  1496.         elseif state.Enfeeb.value == 'Skill' then
  1497.             textinbox = textinbox .. textColor .. "Enfeebling Mode (F11) : " .. "\\cs(255, 75, 75)" .. tostring(state.Enfeeb.current) .. textColorNewLine
  1498.         end
  1499.        
  1500.         if state.WeaponLockMode.value == 'Locked' then
  1501.             textinbox = textinbox .. "\\cs(255, 255, 255)" .. "Lock Mode (F12) : " .. "\\cr" .. "\\cs(255, 75, 75)" .. tostring(state.WeaponLockMode.current) .. textColorNewLine
  1502.         elseif state.WeaponLockMode.value == 'Unlocked' then
  1503.             textinbox = textinbox .. "\\cs(255, 255, 255)" .. "Lock Mode (F12) : " .. "\\cr" .. "\\cs(255, 255, 255)" .. tostring(state.WeaponLockMode.current) .. textColorNewLine
  1504.         end
  1505.        
  1506.         if state.SanguineBlade.value == 'MAB' then
  1507.             textinbox = textinbox .. "\\cs(255, 255, 255)" .. "Sanguine Mode (F7) : " .. "\\cr" .. "\\cs(255, 75, 75)" .. tostring(state.SanguineBlade.current) .. textColorNewLine
  1508.         elseif state.SanguineBlade.value == 'None' then
  1509.             textinbox = textinbox .. "\\cs(255, 255, 255)" .. "Sanguine Mode (F7) : " .. "\\cr" .. "\\cs(255, 255, 255)" .. tostring(state.SanguineBlade.current) .. textColorNewLine
  1510.         end
  1511.        
  1512.         if state.ZoneRing.current == 'Warp' then
  1513.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 75, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1514.         elseif state.ZoneRing.current == 'Holla' then
  1515.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 75, 75)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1516.         elseif state.ZoneRing.current == 'Dem' then
  1517.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(0, 175, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1518.         elseif state.ZoneRing.current == 'Mea' then
  1519.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 255, 75)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1520.         elseif state.ZoneRing.current == 'None' then
  1521.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 255, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1522.         end
  1523.         if state.Moving.value == 'false' then
  1524.             textinbox = textinbox .. "Player Moving (Auto) : " .. "\\cs(255, 100, 100)" .. tostring(state.Moving.value) .. "\\cr \n"
  1525.         else
  1526.             textinbox = textinbox .. "Player Moving (Auto) : " .. "\\cs(100, 255, 100)" .. tostring(state.Moving.value) .. "\\cr \n"
  1527.         end
  1528.             textinbox = textinbox .. textColor .. "Engaged Movespeed (F1) : " .. tostring(state.EngagedMoving.current) .. textColorNewLine
  1529.  
  1530.         if state.DynaMode.value == 'RP_Farm' then
  1531.             textinbox = textinbox .. "\\cs(255, 255, 255)" .. "Divergence RP Farm (Auto) : " .. "\\cs(0, 175, 255)" .. "ON" .. textColorNewLine
  1532.         end
  1533.  
  1534.     windower.text.set_text(tb_name, textinbox)
  1535. end
  1536.  
  1537.  
  1538. --Creates the Title for a section in the Text Screen
  1539. function drawTitle(title)
  1540.     return "\\cs(200, 222, 255)" .. pad(tostring(title), 6, ":") .. "\\cr \n"
  1541. end
  1542.  
  1543. --Pads a given chara on both sides (centering with left justification)
  1544. function pad(s, l, c)
  1545.     local srep = string.rep
  1546.     local c = c or " "
  1547.  
  1548.     local res1 = srep(c, l) .. s -- pad to half-length s
  1549.     local res2 = res1 .. srep(c, l) -- right-pad our left-padded string to the full length
  1550.  
  1551.     return res2
  1552. end
  1553.  
  1554. --Takes a condition and returns a given value based on if it is true or false
  1555. function ternary(cond, T, F)
  1556.     if cond then
  1557.         return T
  1558.     else
  1559.         return F
  1560.     end
  1561. end
  1562.  
  1563.  
  1564. ---------------------------------------------------------------------------------------------------
  1565. organizer_items = {
  1566.     echo="Echo Drops",
  1567.     echo2="Echo Drops",
  1568.     pana="Panacea",
  1569.     pana2="Panacea",
  1570.     reme="Remedy",
  1571.     reme2="Remedy",
  1572.     sush2="Sublime Sushi +1",
  1573.     sush1="Sublime Sushi",
  1574.     stew="Marine Stewpot",
  1575.     hall="Hallowed Water",
  1576.     shih="Shihei"}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top