G2A Many GEOs
SHARE
TWEET

DRG.lua 12th Feb, 2020

Spicyryan Mar 21st, 2017 (edited) 3,932 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Built off of my BLU and RUN GSs.
  2. ---Thanks to various sources such as LS members and BlueGartr for the help building this GearSwap.
  3.  
  4. -------------------------------------
  5. ---------                   ---------
  6. ------                         ------
  7. ---         Start of Gear         ---
  8. ------                         ------
  9. ---------                   ---------
  10. -------------------------------------
  11.  
  12. ---------------------------------
  13. --   Start of Augmented Gear   --
  14. ---------------------------------
  15.  
  16. function get_sets()
  17.     maps()
  18.    
  19.     CarmineMask = {}
  20.     CarmineMask.MND = { name = "Carmine Mask +1", augments = { 'Accuracy+12','DEX+12','MND+20', } }
  21.     CarmineMask.FC = { name = "Carmine Mask +1", augments = { 'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4', } }
  22.  
  23.     ValorousMask = {}
  24.     ValorousMask.SCD = { name="Valorous Mask", augments={'Attack+20','Sklchn.dmg.+4%','STR+15','Accuracy+9',}}
  25.     ValorousMask.WSD = { name="Valorous Mask", augments={'Attack+23','Weapon skill damage +4%','STR+10','Accuracy+7',}}
  26.     ValorousMask.DA = { name="Valorous Mask", augments={'Mag. Acc.+11','"Dbl.Atk."+4','STR+15','Accuracy+5',}}
  27.    
  28.     ValorousMitts = {}
  29.     ValorousMitts.SCDAcc = { name="Valorous Mitts", augments={'Accuracy+20','Sklchn.dmg.+4%','STR+13',}}
  30.     ValorousMitts.WSD = { name="Valorous Mitts", augments={'Weapon skill damage +3%','STR+8','Attack+14',}}
  31.    
  32.     AcroGauntlets = {}
  33.     AcroGauntlets.STP = { name="Acro Gauntlets", augments={'Accuracy+20 Attack+20','"Store TP"+6','STR+6 DEX+6',}}
  34.     AcroGauntlets.Breath = { name="Acro Gauntlets", augments={'Pet: Breath+7',}}
  35.    
  36.     TaeonBody = {}
  37.     TaeonBody.FC = { name="Taeon Tabard", augments={'Accuracy+23','"Fast Cast"+5','HP+36',} }
  38.     TaeonBody.SIR = { name="Taeon Tabard", augments = {'Spell interruption rate down -8%','STR+7 VIT+7'} }
  39.    
  40.     ValorousBody = {}
  41.     ValorousBody.STP = { name="Valorous Mail", augments={'"Store TP"+7','DEX+8','Accuracy+15',}}
  42.     ValorousBody.WSD = { name="Valorous Mail", augments={'STR+7','Pet: DEX+7','Weapon skill damage +6%','Mag. Acc.+11 "Mag.Atk.Bns."+11',}}
  43.     ValorousBody.STRDA = { name="Valorous Mail", augments={'Accuracy+23 Attack+23','"Dbl.Atk."+4','STR+10','Attack+8',}}
  44.     ValorousBody.DA = { name="Valorous Mail", augments={'Accuracy+22','"Dbl.Atk."+5','STR+5','Attack+12',}}
  45.    
  46.     ValorousHose = {}
  47.     ValorousHose.STP = { name="Valor. Hose", augments={'Accuracy+21','"Store TP"+8','VIT+6','Attack+15',}}
  48.     ValorousHose.WSD = { name="Valor. Hose", augments={'Weapon skill damage +5%','STR+8','Accuracy+2','Attack+13',}}
  49.     ValorousHose.SCD = { name="Valor. Hose", augments={'Attack+22','Sklchn.dmg.+3%','STR+9','Accuracy+12',}}
  50.    
  51.     ValorousFeet = {}
  52.    
  53.     LustFeet = {}
  54.     LustFeet.STRDA = { name="Lustra. Leggings +1", augments={'Attack+20','STR+8','"Dbl.Atk."+3',}}
  55.  
  56.     Brig = {}
  57.     Brig.STP = { name="Brigantia's Mantle", augments = { 'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Pet: "Regen"+5', } }
  58.     Brig.DATP = { name="Brigantia's Mantle", augments = {'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10', } }
  59.     Brig.STRDA = { name="Brigantia's Mantle", augments = { 'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10', } }
  60.     Brig.WSD = { name = "Brigantia's Mantle", augments = { 'STR+20', 'Accuracy+20 Attack+20', 'Weapon skill damage +10%', } }
  61.     Brig.FCMeva = { name = "Brigantia's Mantle", augments = { 'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10', } }
  62.    
  63. -------------------------------
  64. --   End of Augmented Gear   --
  65. -------------------------------
  66.  
  67.     sets.Idle = {}
  68.     --Idle Sets--
  69.     sets.Idle.index = { 'Standard', 'DT' }
  70.     Idle_ind = 1
  71.     sets.Idle.Standard = {
  72.         ammo = "Staunch Tathlum +1",
  73.         head = ValorousMask.SCD,
  74.         neck = "Loricate Torque +1",
  75.         ear1 = "Etiolation Earring",
  76.         ear2 = "Anastasi Earring",
  77.         body = "Vishap Mail +3",
  78.         hands = "Sulevia's Gauntlets +2",
  79.         ring1 = "Sheltered ring",
  80.         ring2 = "Karieyh Ring +1",
  81.         back = Brig.STP,
  82.         waist = "Flume Belt",
  83.         legs = "Carmine Cuisses +1",
  84.         feet = "Ptero. Greaves +3"
  85.     }
  86.    
  87.     sets.Idle.DT = {
  88.         ammo = "Staunch Tathlum +1",
  89.         head = ValorousMask.SCD,
  90.         neck = "Loricate Torque +1",
  91.         ear1 = "Etiolation Earring",
  92.         ear2 = "Anastasi Earring",
  93.         body = "Arke Corazza",
  94.         hands = "Sulevia's Gauntlets +2",
  95.         ring1 = "Sheltered ring",
  96.         ring2 = "Defending Ring",
  97.         back = Brig.DATP,
  98.         waist = "Flume Belt",
  99.         legs = "Carmine Cuisses +1",
  100.         feet = "Ptero. Greaves +3"
  101.     }
  102.    
  103.     --Dat Waifu--
  104.     sets.Idle.Town = set_combine(sets.Idle.Standard, {
  105.         ring1 = "Matrimony ring",
  106.     })
  107.    
  108.     --Idle Refresh--
  109.     sets.Idle.Refresh = {
  110.         head = "Jumalik Helm",
  111.         body = "Chozoron Coselete"
  112.     }
  113.    
  114.     --Best in slot items depend on Acc and if you have SAMs roll or not.
  115.     --Unless the extra accuracy from something like the Shulmanu Collar comes into play.
  116.    
  117.     -----------
  118.     --TP Sets--
  119.     -----------
  120.     sets.TP = {}
  121.     sets.TP.index = {'CappedHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  122.     TP_ind = 1
  123.  
  124.     sets.TP.CappedHaste = {
  125.         ammo = "Ginsen",
  126.         head = "Flamma Zucchetto +2",
  127.         neck = "Anu Torque",
  128.         ear1 = "Telos Earring",
  129.         ear2 = "Sherida Earring",
  130.         body = "Hjarrandi Breastplate",
  131.         --hands = "Flamma Manopolas +2",
  132.         hands = AcroGauntlets.STP,
  133.         ring1 = "Niqmaddu Ring",
  134.         ring2 = "Petrov Ring",
  135.         back = Brig.DATP,
  136.         waist = "Ioskeha Belt +1",
  137.         legs = ValorousHose.STP,
  138.         feet = "Flamma Gambieras +2"
  139.     }
  140.    
  141.     sets.TP.AccuracyLite = {
  142.         ammo = "Ginsen",
  143.         head = "Flamma Zucchetto +2",
  144.         neck = "Combatant's Torque",
  145.         ear1 = "Telos Earring",
  146.         ear2 = "Sherida Earring",
  147.         body ="Hjarrandi Breastplate",
  148.         --hands = "Flamma Manopolas +2",
  149.         hands = AcroGauntlets.STP,
  150.         ring1 = "Niqmaddu Ring",
  151.         ring2 = "Flamma Ring",
  152.         back = Brig.DATP,
  153.         waist = "Ioskeha Belt +1",
  154.         legs = ValorousHose.STP,
  155.         feet = "Flamma Gambieras +2"
  156.     }
  157.  
  158.     sets.TP.AccuracyMid = {
  159.         ammo = "Ginsen",
  160.         head = "Flamma Zucchetto +2",
  161.         neck = "Combatant's Torque",
  162.         ear1 = "Telos Earring",
  163.         ear2 = "Sherida Earring",
  164.         body ="Hjarrandi Breastplate",
  165.         hands = "Flamma Manopolas +2",
  166.         ring1 = "Niqmaddu Ring",
  167.         ring2 = "Flamma Ring",
  168.         back = Brig.DATP,
  169.         waist = "Ioskeha Belt +1",
  170.         legs = "Pteroslaver Brais +3",
  171.         feet = "Flamma Gambieras +2"
  172.     }
  173.  
  174.     sets.TP.AccuracyFull = {
  175.         ammo = "Amar Cluster",
  176.         head = "Flamma Zucchetto +2",
  177.         neck = "Shulmanu Collar",
  178.         ear1 = "Telos Earring",
  179.         ear2 = "Sherida Earring",
  180.         body = "Vishap Mail +3",
  181.         hands = "Emicho Gauntlets +1",
  182.         ring1 = "Niqmaddu Ring",
  183.         ring2 = "Flamma Ring",
  184.         back = Brig.STP,
  185.         waist = "Ioskeha Belt +1",
  186.         legs = "Pteroslaver Brais +3",
  187.         feet = "Flamma Gambieras +2"
  188.     }
  189.    
  190.      --SAM Roll--
  191.      --Changes gearsets while Samurai Roll is on
  192.    
  193.     sets.SAMRoll = {}
  194.     sets.SAMRoll.index = { 'CappedHaste', 'AccuracyLite', 'AccuracyMid', 'AccuracyFull' }
  195.     SAMRoll_ind = 1 -- In the same rule as the TP Toggle so it toggles it at the same time
  196.  
  197.     sets.SAMRoll.CappedHaste = set_combine(sets.TP.CappedHaste, {        
  198.         neck = "Ganesha's Mala",
  199.         ear1 = "Brutal Earring",
  200.         --body = "Dagon Breastplate",
  201.         hands = "Sulevia's Gauntlets +2",
  202.         back = Brig.DATP,
  203.     })
  204.  
  205.     sets.SAMRoll.AccuracyLite = set_combine(sets.TP.AccuracyLite, {        
  206.         --body = "Dagon Breastplate",
  207.         hands = "Sulevia's Gauntlets +2",
  208.         back = Brig.DATP,
  209.     })
  210.  
  211.     sets.SAMRoll.AccuracyMid = set_combine(sets.TP.AccuracyMid, {        
  212.         neck = "Shulmanu Collar",
  213.         --body = "Dagon Breastplate",
  214.         hands = "Sulevia's Gauntlets +2",
  215.         back = Brig.DATP,
  216.     })
  217.  
  218.     sets.SAMRoll.AccuracyFull = set_combine(sets.TP.AccuracyFull, {        
  219.         neck = "Shulmanu Collar",
  220.         hands = "Sulevia's Gauntlets +2",
  221.         back = Brig.DATP,
  222.     })
  223.    
  224.      --DT Sets--
  225.     sets.DT = {}
  226.     sets.DT.index = { 'DT', 'DTHybrid', 'MDTV', 'MEVA', 'DTPet', 'DTAcc' }
  227.     DT_ind = 1
  228.    
  229.     sets.DT.DT = {
  230.         ammo = "Staunch Tathlum +1",
  231.         head = "Sulevia's Mask +2",
  232.         neck = "Loricate Torque +1",
  233.         ear1 = "Sherida Earring",
  234.         ear2 = "Telos Earring",
  235.         body = "Hjarrandi Breastplate",
  236.         hands = "Sulevia's Gauntlets +2",
  237.         ring1 = "Defending Ring",
  238.         ring2 = "Niqmaddu Ring",
  239.         back = Brig.DATP,
  240.         waist = "Ioskeha Belt +1",
  241.         legs = "Sulevia's Cuisses +2",
  242.         feet = "Flamma Gambieras +2"
  243.     }
  244.    
  245.     sets.DT.DTHybrid = {
  246.         ammo = "Staunch Tathlum +1",
  247.         head = "Flamma Zucchetto +2",
  248.         neck = "Loricate Torque +1",
  249.         ear1 = "Telos Earring",
  250.         ear2 = "Sherida Earring",
  251.         body = "Hjarrandi Breastplate",
  252.         hands = "Sulevia's Gauntlets +2",
  253.         ring1 = "Defending Ring",
  254.         ring2 = "Niqmaddu Ring",
  255.         back = Brig.DATP,
  256.         waist = "Ioskeha Belt +1",
  257.         legs = "Sulevia's Cuisses +2",
  258.         feet = "Flamma Gambieras +2"
  259.     }
  260.     --Shell V on. Need 21% MDT, 19% with sheltered.
  261.         sets.DT.MDTV = {
  262.         ammo = "Staunch Tathlum +1",
  263.         head = "Flamma Zucchetto +2",
  264.         neck = "Warder's Charm +1",
  265.         ear1 = "Eabani Earring",
  266.         ear2 = "Sherida Earring",
  267.         body = ValorousBody.STP,
  268.         hands = "Sulevia's Gauntlets +2",
  269.         ring1 = "Defending Ring",
  270.         ring2 = "Shadow Ring",
  271.         back = Brig.FCMeva,
  272.         waist = "Ioskeha Belt +1",
  273.         legs = "Sulevia's Cuisses +2",
  274.         feet = "Flamma Gambieras +2"
  275.     }
  276.    
  277.     sets.DT.MEVA = {
  278.         ammo = "Staunch Tathlum +1",
  279.         head = "Flamma Zucchetto +2",
  280.         neck = "Warder's Charm +1",
  281.         ear1 = "Eabani Earring",
  282.         ear2 = "Odnowa Earring +1",
  283.         body = "Chozoron Coselete",
  284.         hands = "Leyline Gloves",
  285.         ring1 = "Defending Ring",
  286.         ring2 = "Purity Ring",
  287.         back = Brig.FCMeva,
  288.         waist = "Carrier's Sash",
  289.         legs = "Vishap Brais +3",
  290.         feet = "Flamma Gambieras +2"
  291.     }
  292.    
  293.     sets.DT.DTPet = {
  294.         ammo = "Staunch Tathlum +1",
  295.         head = "Peltast's Mezail +1",
  296.         neck = "Loricate Torque +1",
  297.         ear1 = "Genmei Earring",
  298.         ear2 = "Enmerkar Earring",
  299.         body = "Arke Corazza",
  300.         hands = "Sulevia's Gauntlets +2",
  301.         ring1 = "Defending Ring",
  302.         ring2 = "Gelatinous Ring +1",
  303.         back = "Updraft Mantle",
  304.         waist = "Ioskeha Belt +1",
  305.         legs = "Sulevia's Cuisses +2",
  306.         feet = "Flamma Gambieras +2"
  307.     }
  308.    
  309.     sets.DT.DTAcc = {
  310.         ammo = "Staunch Tathlum +1",
  311.         head = "Flamma Zucchetto +2",
  312.         neck = "Loricate Torque +1",
  313.         ear1 = "Telos Earring",
  314.         ear2 = "Sherida Earring",
  315.         body = "Vishap Mail +3",
  316.         hands = "Sulevia's Gauntlets +2",
  317.         ring1 = "Defending Ring",
  318.         ring2 = "Niqmaddu Ring",
  319.         back = Brig.DATP,
  320.         waist = "Ioskeha Belt +1",
  321.         legs = "Sulevia's Cuisses +2",
  322.         feet = "Flamma Gambieras +2"
  323.     }
  324.    
  325.     sets.WS = {}
  326.  
  327.     sets.Stardiver = {}
  328.  
  329.     sets.Stardiver.index = { 'Attack', 'MidAcc', 'HighAcc' }
  330.     Stardiver_ind = 1
  331.    
  332.     --1118 Acc, Lowest TP set is 1161, be careful--
  333.     sets.Stardiver.Attack = {
  334.         ammo = "Knobkierrie",
  335.         head = "Pteroslaver Armet +3",
  336.         neck = "Fotia Gorget",
  337.         ear1 = "Moonshade Earring",
  338.         ear2 = "Sherida Earring",
  339.         body = "Dagon Breastplate",
  340.         hands = "Sulevia's Gauntlets +2",
  341.         ring1 = "Regal Ring",
  342.         ring2 = "Niqmaddu Ring",
  343.         back = Brig.STRDA,
  344.         waist = "Fotia Belt",
  345.         legs = "Sulevia's Cuisses +2",
  346.         feet = LustFeet.STRDA
  347.     }
  348.    
  349.     sets.Stardiver.MidAcc = {
  350.         ammo = "Amar Cluster",
  351.         head = "Flamma Zucchetto +2",
  352.         neck = "Fotia Gorget",
  353.         ear1 = "Moonshade Earring",
  354.         ear2 = "Sherida Earring",
  355.         body = "Dagon Breastplate",
  356.         hands = "Sulevia's Gauntlets +2",
  357.         ring1 = "Regal Ring",
  358.         ring2 = "Niqmaddu Ring",
  359.         back = Brig.STRDA,
  360.         waist = "Fotia Belt",
  361.         legs = "Sulevia's Cuisses +2",
  362.         feet = "Flamma Gambieras +2"  
  363.     }
  364.  
  365.     sets.Stardiver.HighAcc = {
  366.         ammo = "Amar Cluster",
  367.         head = "Pteroslaver Armet +3",
  368.         neck = "Fotia Gorget",
  369.         ear1 = "Moonshade Earring",
  370.         ear2 = "Sherida Earring",
  371.         body = "Dagon Breastplate",
  372.         hands = "Sulevia's Gauntlets +2",
  373.         ring1 = "Regal Ring",
  374.         ring2 = "Niqmaddu Ring",
  375.         back = Brig.STRDA,
  376.         waist = "Fotia Belt",
  377.         legs = "Vishap Brais +3",
  378.         feet = "Vishap Greaves +3"
  379.     }
  380.  
  381.     sets.Drakesbane = {}
  382.  
  383.     sets.Drakesbane.index = { 'Attack', 'MidAcc', 'HighAcc' }
  384.     Drakesbane_ind = 1
  385.  
  386.     sets.Drakesbane.Attack = {
  387.         ammo = "Knobkierrie",
  388.         head = "Pteroslaver Armet +3",
  389.         neck = "Dragoon's Collar +2",
  390.         ear1 = "Brutal Earring",
  391.         ear2 = "Sherida Earring",
  392.         body = "Hjarrandi Breastplate",
  393.         hands = "Flamma Manopolas +2",
  394.         ring1 = "Niqmaddu Ring",
  395.         ring2 = "Begrudging Ring",
  396.         back = Brig.STRDA,
  397.         waist = "Windbuffet Belt +1",
  398.         legs = "Peltast's Cuissots +1",
  399.         feet = LustFeet.STRDA
  400.     }
  401.    
  402.     sets.Drakesbane.MidAcc = {
  403.         ammo = "Knobkierrie",
  404.         head = "Flamma Zucchetto +2",
  405.         neck = "Dragoon's Collar +2",
  406.         ear1 = "Brutal Earring",
  407.         ear2 = "Sherida Earring",
  408.         body = "Hjarrandi Breastplate",
  409.         hands = "Flamma Manopolas +2",
  410.         ring1 = "Niqmaddu Ring",
  411.         ring2 = "Begrudging Ring",
  412.         back = Brig.STRDA,
  413.         waist = "Ioskeha Belt +1",
  414.         legs = "Peltast's Cuissots +1",
  415.         feet = "Flamma Gambieras +2"
  416.     }
  417.    
  418.     sets.Drakesbane.HighAcc = {
  419.         ammo = "Knobkierrie",
  420.         head = "Flamma Zucchetto +2",
  421.         neck = "Dragoon's Collar +2",
  422.         ear1 = "Brutal Earring",
  423.         ear2 = "Sherida Earring",
  424.         body = "Hjarrandi Breastplate",
  425.         hands = "Flamma Manopolas +2",
  426.         ring1 = "Niqmaddu Ring",
  427.         ring2 = "Regal Ring",
  428.         back = Brig.STRDA,
  429.         waist = "Ioskeha Belt +1",
  430.         legs = "Vishap Brais +3",
  431.         feet = "Vishap Greaves +3"
  432.     }
  433.  
  434.     sets.CamlannsTorment = {}
  435.  
  436.     sets.CamlannsTorment.index = { 'Attack', 'Accuracy' }
  437.     CamlannsTorment_ind = 1
  438.  
  439.     sets.CamlannsTorment.Attack = {
  440.         ammo = "Knobkierrie",
  441.         head = ValorousMask.WSD,
  442.         neck = "Fotia Gorget",
  443.         ear1 = "Ishvara Earring",
  444.         ear2 = "Sherida Earring",
  445.         body = ValorousBody.WSD,
  446.         hands = "Pteroslaver Finger Gauntlets +3",
  447.         ring1 = "Niqmaddu Ring",
  448.         ring2 = "Karieyh Ring +1",
  449.         back = Brig.WSD,
  450.         waist = "Fotia Belt",
  451.         legs = "Vishap Brais +3",
  452.         feet = "Sulevia's Leggings +2"
  453.     }      
  454.                                
  455.     sets.CamlannsTorment.Accuracy = {
  456.         ammo = "Knobkierrie",
  457.         head = ValorousMask.WSD,
  458.         neck = "Fotia Gorget",
  459.         ear1 = "Telos Earring",
  460.         ear2 = "Sherida Earring",
  461.         body = ValorousBody.WSD,
  462.         hands = "Pteroslaver Finger Gauntlets +3",
  463.         ring1 = "Niqmaddu Ring",
  464.         ring2 = "Karieyh Ring +1",
  465.         back = Brig.WSD,
  466.         waist = "Fotia Belt",
  467.         legs = "Vishap Brais +3",
  468.         feet = "Sulevia's Leggings +2"
  469.     }
  470.    
  471.     sets.SonicThrust = {}
  472.  
  473.     sets.SonicThrust.index = { 'Attack', 'Accuracy' }
  474.     SonicThrust_ind = 1
  475.     sets.SonicThrust.Attack = {
  476.         ammo = "Knobkierrie",
  477.         head = ValorousMask.WSD,
  478.         neck = "Fotia Gorget",
  479.         ear1 = "Moonshade Earring",
  480.         ear2 = "Sherida Earring",
  481.         body = ValorousBody.WSD,
  482.         hands = "Pteroslaver Finger Gauntlets +3",
  483.         ring1 = "Niqmaddu Ring",
  484.         ring2 = "Regal Ring",
  485.         back = Brig.WSD,
  486.         waist = "Fotia Belt",
  487.         legs = "Vishap Brais +3",
  488.         feet = "Sulevia's Leggings +2"
  489.     }
  490.    
  491.     sets.SonicThrust.Accuracy = {
  492.         ammo = "Knobkierrie",
  493.         head = ValorousMask.WSD,
  494.         neck = "Fotia Gorget",
  495.         ear1 = "Moonshade Earring",
  496.         ear2 = "Sherida Earring",
  497.         body = "Sulevia's Platemail +2",
  498.         hands = "Pteroslaver Finger Gauntlets +3",
  499.         ring1 = "Niqmaddu Ring",
  500.         ring2 = "Regal Ring",
  501.         back = Brig.WSD,
  502.         waist = "Fotia Belt",
  503.         legs = "Vishap Brais +3",
  504.         feet = "Sulevia's Leggings +2"
  505.     }
  506.  
  507.     sets.LegSweep = {
  508.         ammo = "Pemphredo Tathlum",
  509.         head = "Flamma Zucchetto +2",
  510.         neck = "Fotia Gorget",
  511.         ear1 = "Moonshade Earring",
  512.         ear2 = "Dignitary's Earring",
  513.         body = "Vishap Mail +3",
  514.         hands = "Flamma Manopolas +2",
  515.         ring1 = "Regal Ring",
  516.         ring2 = "Flamma Ring",
  517.         back = Brig.STRDA,
  518.         waist = "Fotia Belt",
  519.         legs = "Pteroslaver Brais +3",
  520.         feet = "Flamma Gambieras +2"
  521.     }
  522.    
  523.     --SC DMG Sets-- 34%
  524.     sets.SCDmg = {
  525.         head = ValorousMask.SCD,
  526.         body = "Sulevia's Platemail +2",
  527.         hands = ValorousMitts.SCDAcc,
  528.         ring2 = "Mujin Band",      
  529.         legs = ValorousHose.SCD,
  530.         feet = "Emicho Gambieras +1"
  531.     }
  532.    
  533.     --When Allies is on, assumes 20% is being given, caps 50%--
  534.     sets.SCDmgAllies = {
  535.         body = "Sulevia's Platemail +2",
  536.         hands = ValorousMitts.SCDAcc,
  537.         ring2 = "Mujin Band",      
  538.         legs = ValorousHose.SCD,
  539.         feet = "Emicho Gambieras +1"
  540.     }
  541.    
  542. -------------------------
  543. --   Blue Magic Sets   --
  544. -------------------------
  545.     sets.BlueMagic = {}
  546.  
  547.     sets.BlueMagic.STR = {
  548.         ammo = "Floestone",
  549.         head = ValorousMask.SCD,
  550.         neck = "Caro Necklace",
  551.         ear1 = "Telos Earring",
  552.         ear2 = "Sherida Earring",
  553.         body = "Sulevia's Platemail +2",
  554.         hands = "Sulevia's Gauntlets +2",
  555.         ring1 = "Shukuyu Ring",
  556.         ring2 = "Regal Ring",
  557.         back = Brig.STRDA,
  558.         waist = "Prosilio Belt +1",
  559.         legs = "Sulevia's Cuisses +2",
  560.         feet = "Sulevia's Leggings +2"
  561.     }
  562.    
  563. --------------------------
  564. --   Curing Magic Set   --
  565. --------------------------
  566.    
  567.     sets.Cures = {
  568.         ammo = "",
  569.         head = "",
  570.         neck = "",
  571.         ear1 = "",
  572.         ear2 = "",
  573.         body = "",
  574.         hands = "",
  575.         ring1 = "",
  576.         ring2 = "",
  577.         back = "",
  578.         waist = "",
  579.         legs = "",
  580.         feet = ""
  581.     }
  582. ----------------------
  583. --   Utility Sets   --
  584. -----------------------
  585. --   Sets for one thing or another.
  586. --   Macro in game with:
  587.  
  588. --   /console gs equip sets.butts.andfronts
  589. --   /console gs c lockgearindex
  590.  
  591.     sets.Utility = {}
  592.  
  593.     sets.Utility.Steps = set_combine(sets.TP.AccuracyFull, {})
  594.  
  595.     sets.Utility.Twilight = {
  596.         head = "Twilight Helm",
  597.         body = "Twilight Mail"
  598.     }
  599.    
  600.     sets.Utility.Doom = {
  601.         ring1 = "Purity Ring",
  602.         ring2 = "Saida Ring",
  603.         waist = "Gishdubar Sash"
  604.     }
  605.    
  606.     sets.WSDayBonus = (set_combine(equipSet,{head="Gavialis Helm"}))
  607.    
  608.     sets.Utility.TH = {
  609.         waist = "Chaac Belt"
  610.     }  
  611.    
  612.     sets.Utility.DomainInvasionTP = {
  613.         body = "Hervor Haubert",
  614.         hands = "Hervor Mouffles"
  615.     }  
  616.    
  617.     sets.Utility.DomainInvasionWS = {
  618.         body = "Hervor Haubert",
  619.         hands = "Hervor Mouffles",
  620.         feet = "Hervor Sollerets"
  621.     }
  622.    
  623.     sets.Utility.DerpDT = {
  624.         ammo = "Staunch Tathlum +1",
  625.         head = "Sulevia's Mask +2",
  626.         neck = "Loricate Torque +1",
  627.         ear1 = "Etiolation Earring",
  628.         ear2 = "Odnowa Earring +1",
  629.         body = "Sulevia's Platemail +2",
  630.         hands = "Sulevia's Gauntlets +2",
  631.         ring1 = "Defending Ring",
  632.         ring2 = "Gelatinous Ring +1",
  633.         back = Brig.FCMeva,
  634.         waist = "Ioskeha Belt +1",
  635.         legs = "Sulevia's Cuisses +2",
  636.         feet = "Flamma Gambieras +2"
  637.     }
  638.    
  639.     --Shell II only--
  640.     sets.Utility.MDTII = {
  641.         ammo = "",
  642.         head = "",
  643.         neck = "",
  644.         ear1 = "",
  645.         ear2 = "",
  646.         body = "",
  647.         hands = "",
  648.         ring1 = "",
  649.         ring2 = "",
  650.         back = "",
  651.         waist = "",
  652.         legs = "",
  653.         feet = ""
  654.     }
  655.  
  656.     --No Shell--
  657.     sets.Utility.MDTNO = {
  658.         ammo = "",
  659.         head = "",
  660.         neck = "",
  661.         ear1 = "",
  662.         ear2 = "",
  663.         body = "",
  664.         hands = "",
  665.         ring1 = "",
  666.         ring2 = "",
  667.         back = "",
  668.         waist = "",
  669.         legs = "",
  670.         feet = ""
  671.     }
  672.  
  673. ---------------------
  674. --   Enmity Set   --
  675. ---------------------
  676.  
  677.     sets.Enmity = {
  678.         ammo = "",
  679.         head = "",
  680.         neck = "",
  681.         ear1 = "",
  682.         ear2 = "",
  683.         body = "",
  684.         hands = "",
  685.         ring1 = "",
  686.         ring2 = "",
  687.         back = "",
  688.         waist = "",
  689.         legs = "",
  690.         feet = ""
  691.     }
  692.    
  693. ------------------------
  694. --   Enhancing Sets   --
  695. ------------------------
  696.    
  697.     sets.Enhancing = {}
  698.    
  699.     sets.Enhancing.Skill = {
  700.         ammo = "",
  701.         head = "",
  702.         neck = "",
  703.         ear1 = "",
  704.         ear2 = "",
  705.         body = "",
  706.         hands = "",
  707.         ring1 = "",
  708.         ring2 = "",
  709.         back = "",
  710.         waist = "",
  711.         legs = "",
  712.         feet = ""
  713.     }
  714.    
  715.     sets.Enhancing.Phalanx = set_combine(sets.Enhancing.Skill, {
  716.     })
  717.    
  718.     sets.Enhancing.Refresh = set_combine(sets.Enhancing.Skill, {
  719.         waist = "Gishdubar Sash",
  720.     })
  721.    
  722.     sets.Enhancing.Regen = set_combine(sets.Enhancing.Skill, {
  723.         --feet = "Taeon Boots",
  724.     })
  725.    
  726.     sets.Enhancing.ProShell = set_combine(sets.Enhancing.Skill, {
  727.         ring2 = "Sheltered Ring",
  728.     })
  729.    
  730. ------------------------
  731. --   Healing Breath   --
  732. ------------------------
  733.  
  734.     sets.HB = {}
  735.     --Midcast Set for HB spell triggers--
  736.     sets.HB.Trigger = {
  737.         ammo = "Staunch Tathlum +1",
  738.         head = "Vishap Armet",
  739.         neck = "Sanctity Necklace",
  740.         ear1 = "Etiolation Earring",
  741.         ear2 = "Eabani Earring",
  742.         body = TaeonBody.FC,
  743.         hands = "Emicho Gauntlets +1",
  744.         ring1 = "Etana Ring",
  745.         ring2 = "Gelatinous Ring +1",
  746.         waist = "Carrier's Sash",
  747.         legs = "Vishap Brais +3",
  748.         back = "Moonbeam Cape"
  749.     }
  750.    
  751.     --The Freshmaker--
  752.     sets.HB.Mentos = {
  753.         head = "Pteroslaver Armet +3",
  754.         ear2 = "Anastasi Earring",
  755.         body = "Acro Surcoat",
  756.         hands = "Despair Finger Gauntlets",
  757.         legs = "Vishap Brais +3",
  758.         feet = "Ptero. Greaves +3",
  759.         back = "Updraft Mantle"
  760.     }
  761.    
  762.     --Elemental Breath--
  763.     sets.HB.Ricola = {
  764.         head = "Pteroslaver Armet +3",
  765.         body = "Acro Surcoat",
  766.         hands = AcroGauntlets.Breath,
  767.         legs = "Acro Breeches",
  768.         feet = "Acro Leggings",
  769.         back = "Updraft Mantle"
  770.     }
  771.    
  772. -------------------------- 
  773. --   Job Ability Sets   --
  774. --------------------------
  775.     sets.JA = {}
  776.  
  777.     sets.JA.SpiritSurge = {
  778.         body = "Pteroslaver Mail +3"
  779.     }
  780.  
  781.     sets.JA.CallWyvern = {
  782.         hands = "Pteroslaver Mail +3"
  783.     }
  784.    
  785.     sets.JA.AncientCircle = {
  786.         legs = "Vishap Brais +3"
  787.     }
  788.    
  789.     sets.JA.SpiritLink = {
  790.         head = "Vishap Armet",
  791.         ear1 = "Pratik Earring",
  792.         hands = "Peltast's Vambraces",
  793.         feet = "Ptero. Greaves +3"
  794.     }
  795.    
  796.     sets.JA.Angon = {
  797.         hands = "Pteroslaver Finger Gauntlets +3"
  798.     }
  799.     --If you actually use DB then you will need to make a buff active rule to make it active--
  800.     sets.JA.DeepBreathing = {
  801.         head = "Pteroslaver Armet +3"
  802.     }
  803.  
  804. ----------------------
  805. --   Precast Sets   --
  806. ----------------------
  807.     sets.precast = {}
  808.    
  809.     sets.precast.FastCast = {}
  810.  
  811.     sets.precast.FastCast.Standard = {
  812.         ammo = "Sapience Orb",
  813.         head = CarmineMask.MND,
  814.         neck = "Orunmila's Torque",
  815.         ear1 = "Etiolation Earring",
  816.         ear2 = "Loquac. Earring",
  817.         body = TaeonBody.FC,
  818.         hands = "Leyline Gloves",
  819.         ring1 = "Prolix Ring",
  820.         ring2 = "Rahab Ring",
  821.         back = Brig.FCMeva,
  822.         legs = "Enif Cosciales",
  823.         feet = "Carmine Greaves +1"
  824.     }
  825.    
  826. end
  827.  
  828. ---End of Gear---------------------------------------------------------------------------------------------------------------------------------------------------------
  829.  
  830. -------------------------------------
  831. ---------                   ---------
  832. ------                         ------
  833. ---         Start of Maps         ---
  834. ------                         ------
  835. ---------                   ---------
  836. -------------------------------------
  837.  
  838. -------------------------
  839. --   BLU Spells List   --
  840. -------------------------
  841.  
  842. function maps()
  843.     PhysicalSpells = S {
  844.         'Bludgeon', 'Body Slam', 'Feather Storm', 'Mandibular Bite', 'Queasyshroom',
  845.         'Screwdriver', 'Sickle Slash', 'Smite of Rage', 'Power Attack',
  846.         'Terror Touch', 'Battle Dance', 'Claw Cyclone', 'Grand Slam',
  847.         'Jet Stream', 'Pinecone Bomb', 'Wild Oats', 'Uppercut'
  848.     }
  849.  
  850.     MagicalSpells = S {}
  851.    
  852.     BlueMagic_Buffs = S {
  853.         'Refueling'
  854.     }
  855.  
  856.     BlueMagic_Healing = S {
  857.         'Healing Breeze', 'Pollen', 'Wild Carrot'
  858.     }
  859.  
  860.     BlueMagic_Enmity = S {
  861.         'Blank Gaze', 'Jettatura', 'Geist Wall', 'Sheep Song', 'Soporific'
  862.     }
  863.    
  864. end
  865.  
  866. ------------------------
  867. --   Sub Mage Table   --
  868. ------------------------
  869.  
  870. mp_jobs = S {"WHM", "BLM", "RDM", "SMN", "BLU", "SCH", "GEO", "PLD", "DRK", "RUN"}
  871.  
  872. --------------------------------
  873. --   Elemental Breath Table   --
  874. --------------------------------
  875.  
  876. ElementalBreath = S { "Flame Breath", "Sand Breath", "Hydro Breath",
  877. "Gust Breath", "Frost Breath", "Lightning Breath", }
  878.  
  879. -------------------------------
  880. --   WS Chart For Gavialis   --
  881. -------------------------------
  882.  
  883. check_ws_day = {
  884. Firesday = S {'Liquefaction','Fusion','Light'},
  885. Earthsday= S {'Scission','Gravitation','Darkness'},
  886. Watersday = S {'Reverberation','Distortion','Darkness'},
  887. Windsday = S {'Detonation','Fragmentation','Light'},
  888. Iceday = S {'Induration','Distortion','Darkness'},
  889. Lightningsday = S {'Impaction','Fragmentation','Light'},
  890. Lightsday = S {'Transfixion','Fusion','Light'},
  891. Darksday = S {'Compression','Gravitation','Darkness'},}
  892.  
  893.  
  894. ---------------------
  895. --   HB Triggers   --
  896. ---------------------
  897. Trigger = S {
  898.     'Power Attack', 'Foot Kick', 'Sprout Smack', 'Helldive', 'Cocoon', 'Wild Carrot',
  899.     'Dia', 'Diaga', 'Dia II', 'Sneak', 'Invisible', 'Cure', 'Cure II', 'Cure III', 'Cure IV', 'Cura',
  900.     'Raise', 'Reraise', 'Poisona', 'Paralyna', 'Blindna', 'Silena', 'Stona', 'Cursna', 'Haste',
  901.     'Regen', 'Regen II', 'Erase', 'Flash'
  902. }
  903.  
  904. ------------------------
  905. --   Town Gear List   --
  906. ------------------------
  907.  
  908. Town = S {
  909.     "Ru'Lude Gardens", "Upper Jeuno", "Lower Jeuno", "Port Jeuno",
  910.     "Port Windurst", "Windurst Waters", "Windurst Woods", "Windurst Walls", "Heavens Tower",
  911.     "Port San d'Oria", "Northern San d'Oria", "Southern San d'Oria", "Chateau d'Oraguille",
  912.     "Port Bastok", "Bastok Markets", "Bastok Mines", "Metalworks",
  913.     "Aht Urhgan Whitegate", "Nashmau",
  914.     "Selbina", "Mhaura", "Norg",  "Kazham", "Tavanazian Safehold",
  915.     "Eastern Adoulin", "Western Adoulin", "Celennia Memorial Library", "Mog Garden"
  916. }
  917.  
  918. ---End of Maps----------------------------------------------------------------------------------------------------------------------------------------------------------
  919.  
  920.  
  921. --------------------------------------
  922. ---------                    ---------
  923. ------                          ------
  924. ---         Start of Rules         ---
  925. ------                          ------
  926. ---------                    ---------
  927. --------------------------------------
  928.  
  929. ----------------------------------------------
  930. --   Macro and Style Change on Job Change   --
  931. ----------------------------------------------
  932. function set_macros(sheet,book)
  933.     if book then
  934.         send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
  935.         return
  936.     end
  937.     send_command('@input /macro set '..tostring(sheet))
  938. end
  939.  
  940. function set_style(sheet)
  941.     send_command('@input ;wait 5.0;input /lockstyleset '..sheet)
  942.     add_to_chat (56, 'Your lockstyle looks like shit, and you should feel bad.')
  943.     add_to_chat (55, 'You are on '..('DRG '):color(5)..''..('btw. '):color(55)..''..('Macros set!'):color(121))
  944.     add_to_chat (23, '"If you are going to LOLDRG, then do it spectacularly"')
  945. end
  946.  
  947. --Page, Book--
  948. set_macros(1,16)
  949. --Use the Lockstyle Number--
  950. set_style(62)
  951. -------------------------------
  952. --         Variables         --
  953. -------------------------------
  954. SetLocked = false --Used to Check if set is locked before changing equipment
  955. LockedEquipSet = {} --Placeholder to store desired lock set
  956. LockGearSet = {}
  957. equipSet = {} --Currently Equiped Gearset
  958. LockGearIndex = false
  959. LockGearIndex = false
  960. TargetDistance = 0
  961. TH = false --TH rule default
  962. DomainInvasion = false
  963. DT = false
  964. SkillchainPending = false
  965. AllowSkillchainGear = true   --Whether or not hte skillchainPending system should be disabled
  966. PetBreathFailover = false
  967. SkillchainTimer = 0
  968.  
  969. ------------------------------------
  970. --         Windower Hooks         --
  971. ------------------------------------
  972.  
  973. function buff_change(n, gain, buff_table)
  974.     local name
  975.     name = string.lower(n)
  976.     if S{"terror","petrification","sleep","stun"}:contains(name) then
  977.         if gain then
  978.             ChangeGear(sets.Utility.DerpDT)
  979.         elseif not has_any_buff_of({"terror","petrification","sleep","stun"}) then
  980.             if player.status == 'Engaged' then
  981.                 if LockGearIndex then
  982.                     ChangeGear(LockGearSet)
  983.                 elseif not LockGearIndex then
  984.                     if DT == true then
  985.                         ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  986.                     elseif SAMRoll == true then
  987.                         ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  988.                     else
  989.                         ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  990.                     end
  991.                 end
  992.             elseif player.status == 'Idle' then
  993.                 if LockGearIndex then
  994.                     ChangeGear(LockGearSet)
  995.                 elseif not LockGearIndex then
  996.                     ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  997.                 end
  998.             end
  999.         end
  1000.     elseif name == "doom" then
  1001.         if gain then
  1002.             ChangeGear(sets.Utility.Doom)
  1003.             send_command('@input /p Doomed {~o~:} !')
  1004.             disable('ring1','ring2','waist')
  1005.         else
  1006.             if player.status == 'Engaged' then
  1007.                 if LockGearIndex then
  1008.                     send_command('@input /p Doom is off {^_^}')
  1009.                     enable('ring1','ring2','waist')
  1010.                     ChangeGear(LockGearSet)
  1011.                 else
  1012.                     send_command('@input /p Doom is off {^_^}')
  1013.                     enable('ring1','ring2','waist')
  1014.                     if DT == true then
  1015.                         ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1016.                     elseif SAMRoll == true then
  1017.                         ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1018.                     else
  1019.                         ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1020.                     end
  1021.                 end
  1022.             elseif player.status == 'Idle' then
  1023.                 if LockGearIndex then
  1024.                     send_command('@input /p Doom is off {^_^}')
  1025.                     enable('ring1','ring2','waist')
  1026.                     ChangeGear(LockGearSet)
  1027.                 else
  1028.                     send_command('@input /p Doom is off {^_^}')
  1029.                     enable('ring1','ring2','waist')
  1030.                     ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1031.                 end
  1032.             end
  1033.         end
  1034.     elseif name == "charm" then
  1035.         if gain then
  1036.             send_command('@input /p Charmed {<3_<3:} !')
  1037.         else
  1038.             send_command('@input /p Charm is off {~_^}')
  1039.         end
  1040.     elseif name == "weakness" then
  1041.         if gain then
  1042.             enable('ring1','ring2','waist')
  1043.         end
  1044.     elseif name == "weakness" and player.status == 'Idle' then
  1045.         if gain then
  1046.             enable('ring1','ring2','waist')
  1047.             ChangeGear(sets.Utility.Twilight)
  1048.         else
  1049.             if player.status == 'Idle' then
  1050.                 if LockGearIndex then
  1051.                     ChangeGear(LockGearSet)
  1052.                 else
  1053.                     ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1054.                 end
  1055.    
  1056.             end
  1057.         end
  1058.     elseif name == "hasso" then
  1059.         if gain then
  1060.         else
  1061.             send_command('gs c -cd Hasso Lost!')
  1062.         end
  1063.     end
  1064.    
  1065.     if name == "samurai roll" then
  1066.         if gain then
  1067.             SAMRoll = true
  1068.              if LockGearIndex then
  1069.                 ChangeGear(LockGearSet)
  1070.             elseif DT == true then
  1071.                 ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1072.             else
  1073.                 if player.status == 'Engaged' then
  1074.                     ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1075.                 end
  1076.             end
  1077.         else
  1078.             SAMRoll = false
  1079.         end
  1080.     end
  1081.    
  1082.     if name == "elvorseal" then
  1083.         if gain then
  1084.             DomainInvasion = true
  1085.         else
  1086.             DomainInvasion = false
  1087.         end
  1088.     end
  1089. end
  1090.  
  1091. function has_any_buff_of(buff_set)--returns true if you have any of the buffs given
  1092.     for i,v in pairs(buff_set) do
  1093.         if buffactive[v] ~= nil then return true end
  1094.     end
  1095. end
  1096.  
  1097. ---------------------------
  1098. --         Binds         --
  1099. ---------------------------
  1100. send_command('bind f9 gs c toggle TP set') -- Hit f9, toggles the sets
  1101. send_command('bind f10 gs c toggle Stardiver set')
  1102. send_command('bind f11 gs c toggle Camlann set')
  1103. send_command('bind f12 gs c toggle Idle set')
  1104. send_command('bind ^f8 input /ws "Leg Sweep" <t>')
  1105. send_command('bind ^f9 input /ws "Stardiver" <t>') -- ^ means cntrl, so hit cntrl + f9
  1106. send_command('bind ^f10 input /ws "Camlann\'s Torment"] <t>')
  1107. send_command('bind ^f11 input /ws "Sonic Thrust" <t>')
  1108. send_command('bind ^f12 input /ws "Drakesbane" <t>')
  1109. send_command('bind !f7 gs c toggle DT set') -- ! means alt. this exists only for toggling outside of this mode being active, otherwise f9
  1110. send_command('bind !f8 gs c toggle DT') -- ! means alt.  DT on or off
  1111. send_command('bind !f9 gs c toggle backwards')
  1112. send_command('bind !f10 gs c AllowSkillchainGear')
  1113. send_command('bind !f11 empty')
  1114. send_command('bind !f12 gs c lockgearindex')
  1115.  
  1116. send_command('bind !e input /item "Echo Drops" <me>')
  1117. send_command('bind !r input /item "Remedy" <me>')
  1118. send_command('bind !p input /item "Panacea" <me>')
  1119. send_command('bind !h input /item "Holy Water" <me>')
  1120. send_command('bind !w input /equip ring2 "Warp Ring"; /echo Warping; wait 11; input /item "Warp Ring" <me>;')
  1121. send_command('bind !q input /equip ring2 "Dim. Ring (Holla)"; /echo Reisenjima; wait 11; input /item "Dim. Ring (Holla)" <me>;')
  1122. send_command('bind !t gs c toggle TH') -- alt + t toggles TH mode
  1123.  
  1124. --Unload Binds
  1125. function file_unload()
  1126.     send_command('unbind ^f8')
  1127.     send_command('unbind ^f9')
  1128.     send_command('unbind ^f10')
  1129.     send_command('unbind ^f11')
  1130.     send_command('unbind ^f12')
  1131.     send_command('unbind !f7')
  1132.     send_command('unbind !f8')
  1133.     send_command('unbind !f9')
  1134.     send_command('unbind !f10')
  1135.     send_command('unbind !f11')
  1136.     send_command('unbind !f12')
  1137.     send_command('unbind f9')
  1138.     send_command('unbind f10')
  1139.     send_command('unbind f11')
  1140.     send_command('unbind f12')
  1141.    
  1142.     send_command('unbind !e')
  1143.     send_command('unbind !r')
  1144.     send_command('unbind !p')
  1145.     send_command('unbind !h')
  1146.     send_command('unbind !w')
  1147.     send_command('unbind !t')
  1148. end
  1149.  
  1150. --------------------------------------
  1151. --         Console Commands         --
  1152. --------------------------------------
  1153. function self_command(command)
  1154.     if command == 'togglelock' then
  1155.         if SetLocked == false then
  1156.             msg("Equipment Set LOCKED !!!")
  1157.         else
  1158.             SetLocked = false
  1159.             msg("Equipment Set UNLOCKED!")
  1160.         end
  1161.     elseif command == 'lockgearindex' then
  1162.         if LockGearIndex == false then
  1163.             LockGearIndex = true
  1164.             LockGearSet = {
  1165.                 ammo = player.equipment.ammo,
  1166.                 head = player.equipment.head,
  1167.                 neck = player.equipment.neck,
  1168.                 ear1 = player.equipment.left_ear,
  1169.                 ear2 = player.equipment.right_ear,
  1170.                 body = player.equipment.body,
  1171.                 hands = player.equipment.hands,
  1172.                 ring1 = player.equipment.left_ring,
  1173.                 ring2 = player.equipment.right_ring,
  1174.                 back = player.equipment.back,
  1175.                 waist = player.equipment.waist,
  1176.                 legs = player.equipment.legs,
  1177.                 feet = player.equipment.feet
  1178.             }
  1179.             msg("Gear Index Locked !!!")
  1180.         else
  1181.             LockGearIndex = false
  1182.             msg("Gear Index Unlocked")
  1183.             if player.status == 'Engaged' then
  1184.                 if DT == true then
  1185.                     ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1186.                 elseif SAMRoll == true then
  1187.                     ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1188.                 else
  1189.                     ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1190.                 end
  1191.             else
  1192.                 ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1193.             end
  1194.         end
  1195.     end
  1196.     if command == 'toggle TP set' then
  1197.         if DT == true then
  1198.             DT_ind = DT_ind + 1
  1199.             if DT_ind > #sets.DT.index then DT_ind = 1 end
  1200.             send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1201.             ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1202.         elseif DT == false then
  1203.         TP_ind = TP_ind + 1
  1204.         SAMRoll_ind = SAMRoll_ind + 1
  1205.         if TP_ind > #sets.TP.index then TP_ind = 1 end
  1206.         if SAMRoll_ind > #sets.SAMRoll.index then SAMRoll_ind = 1 end
  1207.         send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
  1208.             if player.status == 'Engaged' then
  1209.                 if SAMRoll == true then
  1210.                     ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1211.                 else
  1212.                     ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1213.                 end
  1214.             end
  1215.         end
  1216.     elseif command == 'toggle Idle set' then
  1217.         Idle_ind = Idle_ind + 1
  1218.         if Idle_ind > #sets.Idle.index then Idle_ind = 1 end
  1219.         send_command('@input /echo <----- Idle Set changed to ' .. sets.Idle.index[Idle_ind] .. ' ----->')
  1220.         if player.status == 'Idle' then
  1221.             ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1222.         end
  1223.     elseif command == 'toggle Camlann set' then
  1224.         CamlannsTorment_ind = CamlannsTorment_ind + 1
  1225.         SonicThrust_ind = SonicThrust_ind + 1
  1226.         if CamlannsTorment_ind > #sets.CamlannsTorment.index then CamlannsTorment_ind = 1 end
  1227.         send_command('@input /echo <----- Camlanns/Sonic Set changed to ' .. sets.CamlannsTorment.index[CamlannsTorment_ind] .. ' ----->')
  1228.     elseif command == 'toggle Stardiver set' then
  1229.         Stardiver_ind = Stardiver_ind + 1
  1230.         Drakesbane_ind = Drakesbane_ind + 1
  1231.         if Stardiver_ind > #sets.Stardiver.index then Stardiver_ind = 1 end
  1232.         send_command('@input /echo <----- Stardiver/Drakes Set changed to ' .. sets.Stardiver.index[Stardiver_ind] .. ' ----->')
  1233.     elseif command == 'toggle DT set' then
  1234.         DT_ind = DT_ind + 1
  1235.         if DT_ind > #sets.DT.index then DT_ind = 1 end
  1236.         send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1237.             if DT == true then
  1238.                 ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1239.             end
  1240.     elseif command == 'toggle DT' then
  1241.         if DT == true then
  1242.             DT = false
  1243.             send_command('@input /echo <----- DT TP: [Off] ----->')
  1244.         else
  1245.             DT = true
  1246.             send_command('@input /echo <----- DT TP: [On] ----->')
  1247.         end
  1248.         status_change(player.status)
  1249.     elseif command == 'toggle TH' then
  1250.         if TH == true then
  1251.             TH = false
  1252.             send_command('@input /echo <----- Treasure Hunter TP: [Off] ----->')
  1253.         else
  1254.             TH = true
  1255.             send_command('@input /echo <----- Treasure Hunter TP: [On] ----->')
  1256.         end
  1257.         status_change(player.status)
  1258.     elseif command == 'toggle backwards' then
  1259.         if DT == true then
  1260.             DT_ind = DT_ind -1
  1261.             if DT_ind == 0 then
  1262.                 DT_ind = #sets.DT.index
  1263.             end
  1264.         send_command('@input /echo <----- DT Set changed to ' .. sets.DT.index[DT_ind] .. ' ----->')
  1265.         ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1266.         elseif DT == false then
  1267.             TP_ind = TP_ind -1
  1268.             SAMRoll_ind = SAMRoll_ind -1
  1269.             if TP_ind == 0 then
  1270.                 TP_ind = #sets.TP.index
  1271.             end
  1272.             if SAMRoll_ind == 0 then
  1273.                 SAMRoll_ind = #sets.SAMRoll.index
  1274.             end
  1275.             send_command('@input /echo <----- TP Set changed to ' .. sets.TP.index[TP_ind] .. ' ----->')
  1276.             if player.status == 'Engaged' then
  1277.                 if SAMRoll == true then
  1278.                     ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1279.                 else
  1280.                     ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1281.                 end
  1282.             end
  1283.         end
  1284.     elseif command == 'ZoneChange' then
  1285.         IdleState()
  1286.     elseif command == 'AllowSkillchainGear' then
  1287.         AllowSkillchainGear = not AllowSkillchainGear
  1288.         add_to_chat (56, 'Allow use of skillchain damage gear: ' ..tostring(AllowSkillchainGear))
  1289.     elseif command == 'PetBreathFailover' then
  1290.         if PetBreathFailover == true then     --If the PetBreathFailover wasnt reset to false by pet_aftercast then we set it to false here
  1291.             PetBreathFailover = false         --And call ac_global to reset our gear
  1292.             ac_Global()
  1293.         end
  1294.     elseif string.sub(command, 0, 4) == '-cd ' then     --If the first 4 characters of the command are '-cd '
  1295.         add_to_chat (30, string.sub(command, 5, string.len(command)))      --add everything after '-cd ' to a message in the chat
  1296.     end
  1297. end
  1298.  
  1299. --------------------------------------
  1300. --         Character States         --
  1301. --------------------------------------
  1302. function IdleState()
  1303.     if LockGearIndex then
  1304.         ChangeGear(LockGearSet)
  1305.     elseif DT == true then
  1306.         ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1307.     else
  1308.         ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1309.     end
  1310.    
  1311.     if buffactive['Weakness'] then
  1312.         ChangeGear(sets.Utility.Twilight) --Only on during weakened idle, and requires an action after raising to trigger. Use lockgear otherwise.
  1313.     elseif mp_jobs:contains(player.sub_job) and player.mpp < 50 then
  1314.         ChangeGear(sets.Idle.Refresh)
  1315.     else
  1316.         ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
  1317.     end
  1318.    
  1319.     if Town:contains(world.area) and player.mpp < 65 then
  1320.         ChangeGear(set_combine(sets.Idle.Town, sets.Idle.Refresh))
  1321.     elseif Town:contains(world.area) then
  1322.         ChangeGear(sets.Idle.Town) -- Puts on Waifu/Husbando Band
  1323.     end
  1324.    
  1325. end
  1326.  
  1327. windower.raw_register_event('zone change',function()
  1328. windower.send_command('@wait 9; input //gs c ZoneChange')
  1329. end)
  1330.  
  1331. function RestingState()
  1332.  
  1333. end
  1334.  
  1335. function EngagedState()
  1336.     if LockGearIndex then
  1337.         ChangeGear(LockGearSet)
  1338.     elseif not LockGearIndex then
  1339.         if DT == true then
  1340.             ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1341.         elseif  buffactive["Elvorseal"] then
  1342.             DomainInvasion = true
  1343.             ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]], sets.Utility.DomainInvasionTP)) 
  1344.         elseif buffactive["Samurai Roll"] then
  1345.             SAMRoll = true
  1346.             ChangeGear(sets.SAMRoll[sets.SAMRoll.index[SAMRoll_ind]])
  1347.         else
  1348.             SAMRoll = false
  1349.             DomainInvasion = false
  1350.             ChangeGear(sets.TP[sets.TP.index[TP_ind]])
  1351.         end
  1352.     end
  1353. end
  1354.  
  1355. -----------------------------
  1356. --      Spell control      --
  1357. -----------------------------
  1358. unusable_buff = {
  1359.     spell={'Charm','Mute','Omerta','Petrification','Silence','Sleep','Stun','Terror'},
  1360.     ability={'Amnesia','Charm','Impairment','Petrification','Sleep','Stun','Terror'}}
  1361.   --check_recast('ability',spell.recast_id)  check_recast('spell',spell.recast_id)
  1362. function check_recast(typ,id) --if spell can be cast(not in recast) return true
  1363.     local recasts = windower.ffxi['get_'..typ..'_recasts']()
  1364.     if id and recasts[id] and recasts[id] == 0 then
  1365.         return true
  1366.     else
  1367.         return false
  1368.     end
  1369. end
  1370.  --return true if spell/ability is unable to be used at this time
  1371. function spell_control(spell)
  1372.     if spell.type == "Item" then
  1373.         return false
  1374.     --Stops spell if you do not have a target
  1375.     elseif spell.target.name == nil and not spell.target.raw:contains("st") then
  1376.         return true
  1377.     --Stops spell if a blocking buff is active
  1378.     elseif spell.action_type == 'Ability' and spell.type ~= 'WeaponSkill' and (has_any_buff_of(unusable_buff.ability) or not check_recast('ability',spell.recast_id)) then
  1379.         return true
  1380.     elseif spell.type == 'WeaponSkill' and player.tp < 1000 then
  1381.         return true
  1382.     elseif spell.type == 'WeaponSkill' and (has_any_buff_of(unusable_buff.ability)) then
  1383.         msg("Weapon Skill Canceled, Can't")
  1384.         return true
  1385.     elseif spell.action_type == 'Magic' and (has_any_buff_of(unusable_buff.spell)
  1386.       or not check_recast('spell',spell.recast_id)) then
  1387.         return true
  1388.     --Stops spell if you do not have enuf mp/tp to use
  1389.     elseif spell.mp_cost and spell.mp_cost > player.mp and not has_any_buff_of({'Manawell','Manafont'}) then
  1390.         msg("Spell Canceled, Not Enough MP")
  1391.         return true
  1392.     end
  1393.     --Calculate how many finishing moves your char has up to 6
  1394.     local fm_count = 0
  1395.     for i, v in pairs(buffactive) do
  1396.         if tostring(i):startswith('finishing move') or tostring(i):startswith('?????????') then
  1397.             fm_count = tonumber(string.match(i, '%d+')) or 1
  1398.         end
  1399.     end
  1400.     --Stops flourishes if you do not have enough finishing moves
  1401.     local min_fm_for_flourishes = {['Animated Flourish']=1,['Desperate Flourish']=1,['Violent Flourish']=1,['Reverse Flourish']=1,['Building Flourish']=1,
  1402.                                    ['Wild Flourish']=2,['Climactic Flourish']=1,['Striking Flourish']=2,['Ternary Flourish']=3,}
  1403.     if min_fm_for_flourishes[spell.en] then
  1404.         if min_fm_for_flourishes[spell.en] > fm_count and not buffactive[507] then
  1405.             return true
  1406.         end
  1407.     end
  1408.     --Reomves Sneak when casting Spectral Jig
  1409.     if spell.en == 'Spectral Jig' then
  1410.         send_command('cancel 71')
  1411.     end
  1412.     if spell.name == 'Utsusemi: Ichi' and overwrite and buffactive['Copy Image (3)'] then
  1413.         return true
  1414.     end
  1415.     if player.tp >= 1000 and player.target and player.target.distance and player.target.distance > 7 and spell.type == 'WeaponSkill' then
  1416.         msg("Weapon Skill Canceled  Target Out of Range")
  1417.         return true
  1418.     end
  1419. end
  1420.  
  1421. -----------------------------
  1422. --         Precast         --
  1423. -----------------------------
  1424. function pc_JA(spell, act)
  1425.     if spell.english == 'Spirit Surge' then
  1426.         ChangeGear(sets.JA.SpiritSurge)
  1427.     elseif spell.english == 'Call Wyvern' then
  1428.         ChangeGear(sets.JA.CallWyvern)
  1429.     elseif spell.english == 'Ancient Circle' then
  1430.         ChangeGear(sets.JA.AncientCircle)
  1431.     elseif spell.english == 'Spirit Link' then
  1432.         ChangeGear(sets.JA.SpiritLink)
  1433.     elseif spell.english == 'Angon' then
  1434.         ChangeGear(sets.JA.Angon)
  1435.     elseif spell.english == 'Deep Breathing' then
  1436.         ChangeGear(sets.JA.DeepBreathing)
  1437.     elseif spell.english == 'Jump' then
  1438.         ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1439.             ammo = "Ginsen",
  1440.             body = "Pteroslaver Mail +3",
  1441.             hands = "Vis. Fng. Gaunt. +3",
  1442.             back = Brig.STP,
  1443.             legs = "Pteroslaver Brais +2",
  1444.             feet = "Ostro Greaves"}))
  1445.     elseif spell.english == 'High Jump' then
  1446.         ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1447.             ammo = "Ginsen",
  1448.             body = "Pteroslaver Mail +3",
  1449.             hands = "Vis. Fng. Gaunt. +3",
  1450.             back = Brig.STP,
  1451.             legs = "Pteroslaver Brais +2",
  1452.             feet = "Ostro Greaves"}))
  1453.     elseif spell.english == 'Spirit Jump' then
  1454.         ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1455.             ammo = "Ginsen",
  1456.             body = "Pteroslaver Mail +3",
  1457.             hands = "Vis. Fng. Gaunt. +3",
  1458.             back = Brig.STP,
  1459.             legs = "Pteroslaver Brais +2",
  1460.             feet = "Ostro Greaves"}))
  1461.     elseif spell.english == 'Soul Jump' then
  1462.         ChangeGear(set_combine(sets.TP[sets.TP.index[TP_ind]],{
  1463.             ammo = "Ginsen",
  1464.             body = "Vishap Mail +3",
  1465.             hands = "Vis. Fng. Gaunt. +3",
  1466.             back = Brig.STP,
  1467.             legs = ValorousHose.STP,
  1468.             feet = "Ostro Greaves"}))
  1469.     elseif spell.english == 'Steady Wing' then
  1470.         ChangeGear(sets.HB.Mentos)
  1471.     elseif spell.english == 'Provoke' then
  1472.         ChangeGear(sets.JA.Provoke)
  1473.     end
  1474.    
  1475.     IgnoreWS = S {"Penta Thrust"}  -- Excluded from Moonshade TP override rule.
  1476.     BrutalWS = S {"Stardiver", "Drakesbane", "Shattersoul"}
  1477.    
  1478.     if spell.type == 'WeaponSkill' then
  1479.         if spell.english == 'Stardiver' or spell.english == 'Shattersoul' then
  1480.             ChangeGear(sets.Stardiver[sets.Stardiver.index[Stardiver_ind]])
  1481.         elseif spell.english == "Camlann's Torment" or spell.english == 'Retribution' then
  1482.             ChangeGear(sets.CamlannsTorment[sets.CamlannsTorment.index[CamlannsTorment_ind]])
  1483.         elseif spell.english == 'Drakesbane' then
  1484.             ChangeGear(sets.Drakesbane[sets.Drakesbane.index[Drakesbane_ind]])
  1485.         elseif spell.english == 'Sonic Thrust' then
  1486.             ChangeGear(sets.SonicThrust[sets.SonicThrust.index[SonicThrust_ind]])
  1487.         elseif spell.english == 'Leg Sweep' then
  1488.             ChangeGear(sets.LegSweep)
  1489.         end
  1490.         if player.tp > 2025 and player.equipment.main == 'Trishula' and buffactive['TP Bonus'] and not buffactive['Sekkanoki'] then
  1491.             if IgnoreWS:contains(spell.english) then
  1492.                 do return end
  1493.             elseif BrutalWS:contains(spell.english) then
  1494.                 equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1495.                 msg("Brutal Earring equiped !!!!")
  1496.             else
  1497.                 equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1498.                 msg("Ishvara Earring equiped !!!!")
  1499.             end
  1500.         elseif player.tp > 2275 and player.equipment.main == 'Trishula' and not buffactive['Sekkanoki'] then
  1501.             if IgnoreWS:contains(spell.english) then
  1502.                 do return end
  1503.             elseif BrutalWS:contains(spell.english) then
  1504.                 equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1505.                 msg("Brutal Earring equiped !!!!")
  1506.             else
  1507.                 equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1508.                 msg("Ishvara Earring equiped !!!!")
  1509.             end
  1510.         elseif player.tp > 2550 and buffactive['TP Bonus'] and not buffactive['Sekkanoki'] then
  1511.             if IgnoreWS:contains(spell.english) then
  1512.                 do return end
  1513.             elseif BrutalWS:contains(spell.english) then
  1514.                 equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1515.                 msg("Brutal Earring equiped !!!!")
  1516.             else
  1517.                 equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1518.                 msg("Ishvara Earring equiped !!!!")
  1519.             end
  1520.         elseif player.tp > 2775 and not buffactive['Sekkanoki'] then
  1521.             if IgnoreWS:contains(spell.english) then
  1522.                 do return end
  1523.             elseif BrutalWS:contains(spell.english) then
  1524.                 equip(set_combine(equipSet, { ear1 = "Brutal Earring" })) --Watch for ear conflicts between TP sets and WS sets
  1525.                 msg("Brutal Earring equiped !!!!")
  1526.             else
  1527.                 equip(set_combine(equipSet, { ear1 = "Ishvara Earring" }))
  1528.                 msg("Ishvara Earring equiped !!!!")
  1529.             end
  1530.         end
  1531.     end
  1532.    
  1533. if spell.english == 'Stardiver' and Stardiver_ind ~= 1 and (check_ws_day[world.day]:contains(spell.skillchain_a) -- Remove the and _ind ~=1 (not equal) for Gavialis if you don't have Ptero +2/3.
  1534.     or check_ws_day[world.day]:contains(spell.skillchain_b)
  1535.     or check_ws_day[world.day]:contains(spell.skillchain_c)) then
  1536.     ChangeGear(sets.WSDayBonus)
  1537. end
  1538. --Tested, Aeonic AM Doesn't work with Gavialis, but I will keep the extra rule on ice for now below:
  1539. --or (check_ws_day[world.day]:contains("Darkness") and player.equipment.main == 'Trishula' and (buffactive['Aftermath: Lv.3'] or buffactive['Aftermath: Lv.2'] or buffactive['Aftermath: Lv.1']))) then
  1540.  
  1541.     if spell.english == 'Box Step' or spell.english == 'Quick Step' then
  1542.         ChangeGear(sets.Utility.Steps)
  1543.     elseif spell.english == 'Animated Flourish' then
  1544.         ChangeGear(sets.Enmity)
  1545.     end
  1546. end
  1547.  
  1548. function pc_Magic(spell, act)
  1549.     if spell.action_type == 'Magic' then
  1550.         ChangeGear(sets.precast.FastCast.Standard)
  1551.     end
  1552. end
  1553.  
  1554. function pretarget(spell,action)
  1555.  
  1556.     if  spell.english =="Call Wyvern" and pet.isvalid then -- Change Call Wyvern To Spirit Link If Wyvern Is Present --
  1557.         cancel_spell()
  1558.         send_command('Spirit Link')
  1559.     end
  1560.  
  1561. end
  1562.  
  1563.  
  1564. function pc_Item(spell, act)
  1565. end
  1566.  
  1567.  
  1568. -----------------------------
  1569. --         Midcast         --
  1570. -----------------------------
  1571. function mc_JA(spell, act)
  1572. end
  1573.  
  1574. function mc_Magic(spell, act)
  1575.     if spell.action_type == 'Magic' and player.hpp <= 50 then
  1576.         ChangeGear(sets.HB.Trigger)
  1577.     elseif Trigger:contains(spell.english) then --Put whatever you want to trigger the helm change in the table above
  1578.         ChangeGear(sets.HB.Trigger)
  1579.     end
  1580.  
  1581.     if spell.skill == 'Enhancing Magic' then
  1582.         if spell.english == 'Refresh' then
  1583.             ChangeGear(sets.Enhancing.Refresh)
  1584.         elseif string.find(spell.english,'Regen')then
  1585.             ChangeGear(sets.Enhancing.Regen)
  1586.         elseif string.find(spell.english,'Bar') then
  1587.             ChangeGear(sets.Enhancing.Skill)
  1588.         elseif spell.english=="Phalanx" then
  1589.             ChangeGear(sets.Enhancing.Phalanx)
  1590.         elseif string.find(spell.english,'Shell') or string.find(spell.english,'Protect') then
  1591.             ChangeGear(sets.Enhancing.ProShell)
  1592.         end
  1593.     end
  1594.    
  1595.     if PhysicalSpells:contains(spell.english) then
  1596.         ChangeGear(sets.BlueMagic.STR)
  1597.     end
  1598.  
  1599.     if BlueMagic_Enmity:contains(spell.english) then
  1600.         ChangeGear(sets.Enmity)
  1601.     elseif BlueMagic_Buffs:contains(spell.english) then
  1602.         ChangeGear(sets.TP.Tank)
  1603.     elseif BlueMagic_Healing:contains(spell.english) or string.find(spell.english,'Cure')then
  1604.         ChangeGear(set_combine(sets.Cures, sets.HB.Trigger))
  1605.     end
  1606. end
  1607.  
  1608. function mc_Item(spell, act)
  1609. end
  1610.  
  1611.  
  1612. --------------------------------
  1613. --         After Cast         --
  1614. --------------------------------
  1615. function ac_JA(spell)
  1616. end
  1617.  
  1618. function ac_Magic(spell)
  1619. end
  1620.  
  1621. function ac_Item(spell)
  1622. end
  1623.  
  1624. function ac_Global()
  1625.     if LockGearIndex == true then
  1626.         ChangeGear(LockGearSet)
  1627.         msg("Lock Gear is ON -- Swapping Gear")
  1628.     else
  1629.         if player.status == 'Engaged' then
  1630.                 EngagedState()
  1631.         else
  1632.             IdleState()
  1633.         end
  1634.     end
  1635. end
  1636.  
  1637. ------------------------------------
  1638. --         Framework Core         --
  1639. ------------------------------------
  1640. function status_change(new, old)
  1641.     if new == 'Idle' then
  1642.         IdleState()
  1643.     elseif new == 'Resting' then
  1644.         RestingState()
  1645.     elseif new == 'Engaged' then
  1646.         EngagedState()
  1647.     end
  1648.    
  1649.     if player.status == 'Engaged' and TH == true then
  1650.         ChangeGear(set_combine(equipSet, sets.Utility.TH))
  1651.     end
  1652.    
  1653.     if DT == true then
  1654.         ChangeGear(sets.DT[sets.DT.index[DT_ind]])
  1655.     end
  1656.    
  1657. end
  1658.  
  1659. function pet_midcast(spell, act)
  1660.     PetBreathFailover = true
  1661.     if string.find(spell.english,'Healing Breath')  then
  1662.         ChangeGear(sets.HB.Mentos)
  1663.     elseif ElementalBreath:contains(spell.english) then
  1664.         ChangeGear(sets.HB.Ricola)
  1665.     end
  1666.     send_command('wait 1.2;gs c PetBreathFailover')
  1667. end
  1668.  
  1669. function pet_aftercast(spell, act, spellMap, eventArgs)
  1670.     PetBreathFailover = false
  1671.     if spell.action_type == 'Ability' then
  1672.         ac_JA(spell)
  1673.     elseif spell.action_type == 'Magic' then
  1674.         ac_Magic(spell)
  1675.     else
  1676.         ac_Item(spell)
  1677.     end
  1678.     ac_Global()
  1679. end
  1680.        
  1681. function precast(spell, act, spellMap, eventArgs)
  1682.     if spell_control(spell) then
  1683.         cancel_spell()
  1684.         return
  1685.     end
  1686.     if spell.action_type == 'Ability' then
  1687.         pc_JA(spell, act)
  1688.     elseif spell.action_type == 'Magic' then
  1689.         pc_Magic(spell, act)
  1690.     else
  1691.         pc_Item(spell, act)
  1692.     end
  1693.    
  1694.     if spell.type:lower() == "weaponskill" and DomainInvasion == true then
  1695.         ChangeGear(set_combine(equipSet, sets.Utility.DomainInvasionWS))
  1696.     elseif spell.type:lower() == "weaponskill" and SkillchainPending == true then          
  1697.         if (os.time() - SkillchainTimer) <= 9 and AllowSkillchainGear == true then
  1698.             if buffactive["Allies' Roll"] then
  1699.                 equip(sets.SCDmgAllies)
  1700.             else
  1701.                 equip(sets.SCDmg)           -- If the current operating system time (in seconds)
  1702.             end                             -- minus SkillchainTimer variable is less than 9, equip skillchain gear
  1703.         else
  1704.             SkillchainPending = false
  1705.         end                                      
  1706.     end
  1707. end
  1708.  
  1709. function midcast(spell, act)
  1710.     if spell.action_type == 'Ability' and TH == true then
  1711.         ChangeGear(set_combine(equipSet, sets.Utility.TH))
  1712.     elseif spell.action_type == 'Ability' then
  1713.         mc_JA(spell, act)
  1714.     elseif spell.action_type == 'Magic' then
  1715.         mc_Magic(spell, act)
  1716.     else
  1717.         mc_Item(spell, act)
  1718.     end
  1719. end
  1720.  
  1721. function aftercast(spell, act, spellMap, eventArgs)
  1722.     if spell.action_type == 'Ability' then
  1723.         ac_JA(spell)
  1724.     elseif spell.action_type == 'Magic' then
  1725.         ac_Magic(spell)
  1726.     else
  1727.         ac_Item(spell)
  1728.     end
  1729.     ac_Global()
  1730.    
  1731.     if player.status == 'Engaged' and DomainInvasion == true then
  1732.         ChangeGear(set_combine(equipSet, sets.Utility.DomainInvasionTP))
  1733.     end
  1734.    
  1735.     --Countdowns--
  1736.     if not spell.interrupted then
  1737.         if spell.english == "Meditate" then
  1738.             send_command('wait 169;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1739.         elseif spell.english == "Sekkanoki" then
  1740.             send_command('wait 289;gs c -cd '..spell.name..': [Ready In 10 Seconds!];wait 10;gs c -cd '..spell.name..': [Ready !]')
  1741.         elseif spell.english == "Jump" then
  1742.             send_command('wait 49;gs c -cd '..spell.name..': [Ready!]')
  1743.         elseif spell.english == "High Jump" then
  1744.             send_command('wait 100;gs c -cd '..spell.name..': [Ready!!]')
  1745.         elseif spell.english == "Spirit Jump" then
  1746.             send_command('wait 49;gs c -cd '..spell.name..': [Ready!]')
  1747.         elseif spell.english == "Soul Jump" then
  1748.             send_command('wait 100;gs c -cd '..spell.name..': [Ready!!]')
  1749.         elseif spell.english == "Angon" then
  1750.             send_command('timers create "Angon Defense Down" 90 down')
  1751.         elseif spell.type == "WeaponSkill" then
  1752.             SkillchainPending = true
  1753.             SkillchainTimer = os.time()    -- sets SkillchainTimer variable to the current time of the operating system (in seconds)
  1754.         end
  1755.     end
  1756. end
  1757.  
  1758. function ChangeGear(GearSet)
  1759.     equipSet = GearSet
  1760.     equip(GearSet)
  1761. end
  1762.  
  1763. function LockGearSet(GearSet)
  1764.     LockedEquipSet = GearSet
  1765.     equip(GearSet)
  1766.     SetLocked = true
  1767. end
  1768.  
  1769. function UnlockGearSet()
  1770.     locked = false
  1771.     equip(equipSet)
  1772. end
  1773.  
  1774. function msg(str)
  1775.     send_command('@input /echo <----- ' .. str .. ' ----->')
  1776. end
  1777.  
  1778. ---End of Rules-------------------------------------------------------------------------------------------------------------------------------------------------------
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