Guest User

Untitled

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