Advertisement
FalownPSA

Astan_PLD

May 1st, 2016
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 44.50 KB | None | 0 0
  1.  
  2. -- Last Updated: 11/06/2015 --
  3.  
  4. function get_sets()
  5.     include('organizer-lib')
  6.     AccIndex = 1
  7.     AccArray = {"LowACC","MidACC","HighACC"} -- Default ACC Set is Low --
  8.     ShieldIndex = 1
  9.     ShieldArray = {"Ochain","Aegis","Priwen"} -- Default Shield Set is Ochain --
  10.     IdleIndex = 4
  11.     IdleArray = {"Movement","Regen","Refresh","Hybrid"} -- Default Idle Set Is Hybrid --
  12.     Armor = 'None'
  13.     Twilight = 'None'
  14.     Repulse = 'OFF' -- Set Default Repulse ON or OFF Here --
  15.     Capa = 'OFF' -- Set Default Capacity Points+ Mantle ON or OFF Here --
  16.     target_distance = 6 -- Set Default Distance Here --
  17.     select_default_macro_book() -- Change Default Macro Book At The End --
  18.  
  19.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  20.     sc_map = {SC1="Flash", SC2="UtsusemiNi", SC3="UtsusemiIchi"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  21.     EnmityBlueMagic = S{"Jettatura","Sheep Song","Soporific","Blank Gaze","Geist Wall"} -- BlueMagic --
  22.    
  23.     Cities = S{
  24.                         "Ru'Lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  25.                         "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  26.                         "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  27.                         "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  28.                         "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  29.                         "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham","Tavnazia"}
  30.  
  31.     sets.Idle = {}
  32.     -- Idle/Town Sets --
  33.     sets.Idle.Regen = {
  34.             ammo="Homiliary",
  35.             head="Sulevia's Mask",
  36.             neck="Wiglen Gorget",
  37.             ear1="Infused Earring",
  38.             ear2="Ethereal Earring",
  39.             body="Sulevia's Plate.",
  40.             hands="Sulevia's Gauntlets",
  41.             ring1="Paguroidea Ring",
  42.             ring2="Sheltered Ring",
  43.             back="Weard Mantle",
  44.             waist="Tempus Fugit",
  45.             legs="Sulevia's Cuisses",
  46.             feet="Sulevia's Leggings"}
  47.     sets.Idle.Regen.Ochain = set_combine(sets.Idle.Regen,{
  48.             main="Burtgang",
  49.             sub="Ochain"})
  50.     sets.Idle.Regen.Aegis = set_combine(sets.Idle.Regen,{
  51.             main="Burtgang",
  52.             sub="Aegis"})
  53.     sets.Idle.Regen.Priwen = set_combine(sets.Idle.Regen,{
  54.             main="Burtgang",
  55.             sub="Priwen"})
  56.     sets.Idle.Movement = set_combine(sets.Idle.Regen,{})
  57.     sets.Idle.Movement.Ochain = set_combine(sets.Idle.Movement,{
  58.             main="Burtgang",
  59.             sub="Ochain"})
  60.     sets.Idle.Movement.Aegis = set_combine(sets.Idle.Movement,{
  61.             main="Burtgang",
  62.             sub="Aegis"})
  63.     sets.Idle.Movement.Priwen = set_combine(sets.Idle.Movement,{
  64.             main="Burtgang",
  65.             sub="Priwen"})
  66.     sets.Idle.Refresh = set_combine(sets.Idle.Regen,{
  67.             head="Baghere Salade",
  68.             body="Ares' Cuirass +1",
  69.             hands="Ogier's Gauntlets",
  70.             feet="Ogier's Leggings"})
  71.     sets.Idle.Refresh.Ochain = set_combine(sets.Idle.Refresh,{
  72.             main="Burtgang",
  73.             sub="Ochain"})
  74.     sets.Idle.Refresh.Aegis = set_combine(sets.Idle.Refresh,{
  75.             main="Burtgang",
  76.             sub="Aegis"})
  77.     sets.Idle.Refresh.Priwen = set_combine(sets.Idle.Refresh,{
  78.             main="Burtgang",
  79.             sub="Priwen"})
  80.     sets.Town = set_combine(sets.Idle.Hybrid,{
  81.             head="Cab. Coronet +1",
  82.             body="Councilor's Garb",
  83.             hands="Souv. Handsch. +1",
  84.             ring1="Defending Ring",
  85.             ring2="Vocane Ring",
  86.             feet="Souveran Schuhs +1"})
  87.  
  88.     sets.Resting = set_combine(sets.Idle.Regen)
  89.  
  90.     sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
  91.    
  92.     sets.Idle.Hybrid = set_combine(sets.Idle.Regen,{
  93.             neck="Coatl Gorget +1",
  94.             ring2="Sheltered Ring",
  95.             back="Shadow Mantle",
  96.             legs="Crimson Cuisses"})
  97.            
  98.     -- TP Base Set --
  99.     sets.TP = {}
  100.  
  101.     -- Ochain TP Sets --
  102.     sets.TP.Ochain = {
  103.             main="Burtgang",
  104.             sub="Ochain",
  105.             ammo="Ginsen",
  106.             head="Otomi Helm",
  107.             neck="Asperity Necklace",
  108.             ear1="Trux Earring",
  109.             ear2="Brutal Earring",
  110.             body="Acro Surcoat",
  111.             hands="Acro Gauntlets",
  112.             ring1="K'ayres Ring",
  113.             ring2="Rajas Ring",
  114.             back="Bleating Mantle",
  115.             waist="Windbuffet Belt +1",
  116.             legs="Acro Breeches",
  117.             feet="Acro Leggings"}          
  118.     sets.TP.Ochain.MidACC = set_combine(sets.TP.Ochain,{
  119.             head={name="Yorium Barbuta",augments={"Accuracy+21","Dbl. Atk. +2","Damage taken -1%"}},
  120.             ear2="Zennaroi Earring",
  121.             hands="Leyline Gloves",
  122.             ring1="Patricius Ring",
  123.             back="Grounded Mantle",
  124.             legs="Eschite Cuisses"})   
  125.     sets.TP.Ochain.HighACC = set_combine(sets.TP.Ochain.MidACC,{
  126.             neck="Subtlety Spec.",
  127.             ear1="Zwazo Earring +1",
  128.             body="Found. Breastplate",
  129.             ring2="Beeline Ring",
  130.             waist="Dynamic Belt +1"})
  131.  
  132.     -- Aegis TP Sets --
  133.     sets.TP.Aegis = {
  134.             main="Burtgang",
  135.             sub="Aegis",
  136.             ammo="Ginsen",
  137.             head="Otomi Helm",
  138.             neck="Asperity Necklace",
  139.             ear1="Trux Earring",
  140.             ear2="Brutal Earring",
  141.             body="Acro Surcoat",
  142.             hands="Acro Gauntlets",
  143.             ring1="K'ayres Ring",
  144.             ring2="Rajas Ring",
  145.             back="Bleating Mantle",
  146.             waist="Windbuffet Belt +1",
  147.             legs="Acro Breeches",
  148.             feet="Acro Leggings"}  
  149.     sets.TP.Aegis.MidACC = set_combine(sets.TP.Aegis,{
  150.             head={name="Yorium Barbuta",augments={"Accuracy+21","Dbl. Atk. +2","Damage taken -1%"}},
  151.             ear2="Zennaroi Earring",
  152.             hands="Leyline Gloves",
  153.             ring1="Patricius Ring",
  154.             back="Grounded Mantle",
  155.             legs="Eschite Cuisses"})   
  156.     sets.TP.Aegis.HighACC = set_combine(sets.TP.Aegis.MidACC,{
  157.             neck="Subtlety Spec.",
  158.             ear1="Zwazo Earring +1",
  159.             body="Found. Breastplate",
  160.             ring2="Beeline Ring",
  161.             waist="Dynamic Belt +1"})
  162.            
  163.     -- Priwen TP Sets --
  164.     sets.TP.Priwen = {
  165.             main="Burtgang",
  166.             sub="Priwen",
  167.             ammo="Homiliary",
  168.             head="Sulevia's Mask",
  169.             neck="Wiglen Gorget",
  170.             ear1="Infused Earring",
  171.             ear2="Ethereal Earring",
  172.             body="Sulevia's Plate.",
  173.             hands="Sulevia's Gauntlets",
  174.             ring1="Paguroidea Ring",
  175.             ring2="Sheltered Ring",
  176.             back="Weard Mantle",
  177.             waist="Tempus Fugit",
  178.             legs="Sulevia's Cuisses",
  179.             feet="Sulevia's Leggings"}     
  180.     sets.TP.Priwen.MidACC = set_combine(sets.TP.Priwen,{
  181.             head={name="Yorium Barbuta",augments={"Accuracy+21","Dbl. Atk. +2","Damage taken -1%"}},
  182.             ear2="Zennaroi Earring",
  183.             hands="Leyline Gloves",
  184.             ring1="Patricius Ring",
  185.             back="Grounded Mantle",
  186.             legs="Eschite Cuisses"})   
  187.     sets.TP.Priwen.HighACC = set_combine(sets.TP.Priwen.MidACC,{
  188.             neck="Subtlety Spec.",
  189.             ear1="Zwazo Earring +1",
  190.             body="Found. Breastplate",
  191.             ring2="Beeline Ring",
  192.             waist="Dynamic Belt +1"})
  193.  
  194.     -- Ragnarok TP Sets --
  195.     sets.TP.Ragnarok = {}
  196.     sets.TP.Ragnarok.MidACC = set_combine(sets.TP.Ragnarok,{}) 
  197.     sets.TP.Ragnarok.HighACC = set_combine(sets.TP.Ragnarok.MidACC,{})
  198.  
  199.     -- Ragnarok(Ionis) TP Sets --
  200.     sets.TP.Ragnarok.Ionis = set_combine(sets.TP.Ragnarok,{})
  201.     sets.TP.Ragnarok.MidACC.Ionis = set_combine(sets.TP.Ragnarok.Ionis,{}) 
  202.     sets.TP.Ragnarok.HighACC.Ionis = set_combine(sets.TP.Ragnarok.MidACC.Ionis,{})
  203.  
  204.     -- PDT/MDT/DT Sets --                                              
  205.                                                
  206.     sets.PDT = {}
  207.     sets.PDT.Ochain = {
  208.             sub="Ochain",
  209.             ammo="Hasty Pinion +1",
  210.             head={name="Yorium Barbuta",augments={"Accuracy+21","Dbl. Atk. +2","Damage taken -1%"}}, -- 1 DT -- [Upgrade: Yorium Barbuta -3% DT]
  211.             neck="Subtlety Spec.",
  212.             ear1="Zennaroi Earring",
  213.             ear2="Ethereal Earring",
  214.             body="Cab. Surcoat +1", -- 10 DT [Upgrade: Tartarus Platemail -10% DT] --
  215.             hands="Souv. Handsch. +1", -- 4 DT 2/5 Souv. Set --
  216.             ring1="Defending Ring", -- 10 DT --
  217.             ring2="Vocane Ring", -- 7 DT --
  218.             back="Weard Mantle", -- 3 DT --
  219.             waist="Flume Belt +1", -- 4 --
  220.             legs="Chev. Cuisses +1", -- 6 --
  221.             feet="Souveran Schuhs +1"} -- 5 --
  222.                             -- Total -35% DT + -15% PDT = -50% Reduction --
  223.                                                 -- Primary ACC 873 --
  224.     sets.PDT.Aegis = {
  225.             sub="Aegis",
  226.             ammo="Hasty Pinion +1",
  227.             head={name="Yorium Barbuta",augments={"Accuracy+21","Dbl. Atk. +2","Damage taken -1%"}},
  228.             neck="Subtlety Spec.",
  229.             ear1="Zennaroi Earring",
  230.             ear2="Ethereal Earring",
  231.             body="Cab. Surcoat +1",
  232.             hands="Souv. Handsch. +1",
  233.             ring1="Defending Ring",
  234.             ring2="Vocane Ring",
  235.             back="Weard Mantle",
  236.             waist="Flume Belt +1",
  237.             legs="Chev. Cuisses +1",
  238.             feet="Souveran Schuhs +1"}
  239.            
  240.     sets.PDT.Priwen = {
  241.             sub="Priwen",
  242.             ammo="Homiliary",
  243.             head="Sulevia's Mask",
  244.             neck="Wiglen Gorget",
  245.             ear1="Infused Earring",
  246.             ear2="Ethereal Earring",
  247.             body="Sulevia's Plate.",
  248.             hands="Sulevia's Gauntlets",
  249.             ring1="Paguroidea Ring",
  250.             ring2="Sheltered Ring",
  251.             back="Weard Mantle",
  252.             waist="Tempus Fugit",
  253.             legs="Sulevia's Cuisses",
  254.             feet="Sulevia's Leggings"}
  255.  
  256.     sets.MDT = {}
  257.     sets.MDT.Ochain = {
  258.             sub="Ochain",
  259.             ammo="Vanir Battery", -- MDB 4 --
  260.             head="Cizin Helm +1", -- MDB 2 / MDT 3 --
  261.             neck="Twilight Torque", -- 5 DT --
  262.             ear1="Etiolation Earring", -- MDT 3 --
  263.             ear2="Merman's Earring", -- MDT 2 --
  264.             body="Cab. Surcoat +1", -- 10 DT --
  265.             hands="Souv. Handsch. +1", -- MDB 1 / MDT 5 --
  266.             ring1="Defending Ring", -- 10 DT --
  267.             ring2="Shadow Ring",
  268.             back="Mollusca Mantle", -- 5 DT --
  269.             waist="Nierenschutz", -- 3 DT --
  270.             legs={name="Cizin Breeches +1",augments={"Dbl.Atk. +1","Phys. dmg. taken -3%","Magic dmg. taken -3%"}}, -- MDB 3 / MDT 3 --
  271.             feet="Cab. Leggings +1"} -- MDB 2 / MDT 5 --
  272.                                 -- Total -30% DT + -21% MDT = -54%/50% Reduction / +12 MDB --
  273.  
  274.     sets.MDT.Aegis = {
  275.             sub="Aegis",
  276.             ammo="Vanir Battery",
  277.             head="Cizin Helm +1",
  278.             neck="Twilight Torque",
  279.             ear1="Etiolation Earring",
  280.             ear2="Merman's Earring",
  281.             body="Cab. Surcoat +1",
  282.             hands="Souv. Handsch. +1",
  283.             ring1="Defending Ring",
  284.             ring2="Shadow Ring",
  285.             back="Mollusca Mantle",
  286.             waist="Nierenschutz",
  287.             legs={name="Cizin Breeches +1",augments={"Dbl.Atk. +1","Phys. dmg. taken -3%","Magic dmg. taken -3%"}},
  288.             feet="Cab. Leggings +1"}
  289.                                
  290.     sets.MDT.Priwen = {
  291.             sub="Priwen",
  292.             ammo="Vanir Battery",
  293.             head="Cizin Helm +1",
  294.             neck="Twilight Torque",
  295.             ear1="Etiolation Earring",
  296.             ear2="Merman's Earring",
  297.             body="Cab. Surcoat +1",
  298.             hands="Souv. Handsch. +1",
  299.             ring1="Defending Ring",
  300.             ring2="Shadow Ring",
  301.             back="Mollusca Mantle",
  302.             waist="Nierenschutz",
  303.             legs={name="Cizin Breeches +1",augments={"Dbl.Atk. +1","Phys. dmg. taken -3%","Magic dmg. taken -3%"}},
  304.             feet="Cab. Leggings +1"}
  305.  
  306.     sets.DT = {}
  307.     sets.DT.Ochain = {
  308.             sub="Ochain",
  309.             ammo="Iron Gobbet",
  310.             head="Souv. Schaller +1",
  311.             neck="Warder's Charm +1",
  312.             ear1="Zwazo Earring +1",
  313.             ear2="Ethereal Earring",
  314.             body="Souv. Cuirass +1",
  315.             hands="Souv. Handsch. +1",
  316.             ring1="Defending Ring",
  317.             ring2="Vocane Ring",
  318.             back="Engulfer Cape +1",
  319.             waist="Flume Belt +1",
  320.             legs="Souv. Diechlings +1",
  321.             feet="Souveran Schuhs +1"}
  322.            
  323.     sets.DT.Aegis = {
  324.             sub="Aegis",
  325.             ammo="Iron Gobbet",
  326.             head="Souv. Schaller +1",
  327.             neck="Warder's Charm +1",
  328.             ear1="Zwazo Earring +1",
  329.             ear2="Ethereal Earring",
  330.             body="Souv. Cuirass +1",
  331.             hands="Souv. Handsch. +1",
  332.             ring1="Defending Ring",
  333.             ring2="Vocane Ring",
  334.             back="Engulfer Cape +1",
  335.             waist="Flume Belt +1",
  336.             legs="Souv. Diechlings +1",
  337.             feet="Souveran Schuhs +1"}
  338.            
  339.     sets.DT.Priwen = {
  340.             sub="Priwen",
  341.             ammo="Iron Gobbet",
  342.             head="Souv. Schaller +1",
  343.             neck="Warder's Charm +1",
  344.             ear1="Zwazo Earring +1",
  345.             ear2="Ethereal Earring",
  346.             body="Souv. Cuirass +1",
  347.             hands="Souv. Handsch. +1",
  348.             ring1="Defending Ring",
  349.             ring2="Vocane Ring",
  350.             back="Engulfer Cape +1",
  351.             waist="Flume Belt +1",
  352.             legs="Souv. Diechlings +1",
  353.             feet="Souveran Schuhs +1"}
  354.  
  355.     -- Weakness/Kiting/Repulse Sets --
  356.     sets.Weakness = {}
  357.     sets.Weakness.Ochain = set_combine(sets.PDT.Ochain,{})
  358.     sets.Weakness.Aegis = set_combine(sets.PDT.Aegis,{})
  359.     sets.Weakness.Priwen = set_combine(sets.PDT.Priwen,{})
  360.  
  361.     sets.Kiting = {}
  362.     sets.Kiting.Ochain = set_combine(sets.PDT.Ochain,{legs="Crimson Cuisses"})
  363.     sets.Kiting.Aegis = set_combine(sets.PDT.Aegis,{legs="Crimson Cuisses"})
  364.     sets.Kiting.Priwen = set_combine(sets.PDT.Priwen,{legs="Crimson Cuisses"})
  365.  
  366.     sets.Repulse = {}
  367.     sets.Repulse.Ochain = {sub="Ochain",back="Repulse Mantle"}
  368.     sets.Repulse.Aegis = {sub="Aegis",back="Repulse Mantle"}
  369.     sets.Repulse.Priwen = {sub="Priwen",back="Repulse Mantle"}
  370.  
  371.     -- Hybrid/Shield Skill Sets --
  372.     sets.TP.Hybrid = {}
  373.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  374.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  375.  
  376.     sets.TP.ShieldSkill = {}
  377.  
  378.     -- WS Base Set --
  379.     sets.WS = {
  380.             ammo="Cheruski Needle",
  381.             head="Otomi Helm",
  382.             neck="Fotia Gorget",
  383.             ear1="Moonshade Earring",
  384.             ear2="Brutal Earring",
  385.             body="Acro Surcoat",
  386.             hands="Acro Gauntlets",
  387.             ring1="Ifrit Ring +1",
  388.             ring2="Ifrit Ring +1",
  389.             back="Bleating Mantle",
  390.             waist="Metalsinger Belt",
  391.             legs="Acro Breeches",
  392.             feet="Eschite Greaves"}
  393.  
  394.     -- WS Sets --
  395.     sets.WS["Chant du Cygne"] = {
  396.             ammo="Jukukik Feather",
  397.             head="Quiahuiz Helm",
  398.             neck="Fotia Gorget",
  399.             ear1="Moonshade Earring",
  400.             ear2="Brutal Earring",
  401.             body="Mes. Haubergeon",
  402.             hands="Acro Gauntlets",
  403.             ring1="Ramuh Ring",
  404.             ring2="Ramuh Ring",
  405.             back="Rancorous Mantle",
  406.             waist="Chiner's Belt +1",
  407.             legs="Acro Breeches",
  408.             feet="Acro Leggings"}
  409.     sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS["Chant du Cygne"],{
  410.             waist="Fotia Belt"})
  411.     sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS["Chant du Cygne"].MidACC,{})
  412.            
  413.     sets.WS["Savage Blade"] = {
  414.             ammo="Cheruski Needle",
  415.             head="Otomi Helm",
  416.             neck="Fotia Gorget",
  417.             ear1="Moonshade Earring",
  418.             ear2="Brutal Earring",
  419.             body="Acro Surcoat",
  420.             hands="Acro Gauntlets",
  421.             ring1="Ifrit Ring +1",
  422.             ring2="Ifrit Ring +1",
  423.             back="Bleating Mantle",
  424.             waist="Metalsinger Belt",
  425.             legs="Acro Breeches",
  426.             feet="Eschite Greaves"}
  427.     sets.WS["Savage Blade"].MidACC = set_combine(sets.WS["Chant du Cygne"],{
  428.             waist="Fotia Belt"})
  429.     sets.WS["Savage Blade"].HighACC = set_combine(sets.WS["Chant du Cygne"].MidACC,{})
  430.  
  431.     sets.WS.Requiescat = {
  432.             ammo="Quartz Tathlum +1",
  433.             head="Otomi Helm",
  434.             neck="Fotia Gorget",
  435.             ear1="Moonshade Earring",
  436.             ear2="Brutal Earring",
  437.             body="Acro Surcoat",
  438.             hands="Acro Gauntlets",
  439.             ring1="Levia. Ring +1",
  440.             ring2="Ifrit Ring +1",
  441.             back="Bleating Mantle",
  442.             waist="Fotia Belt",
  443.             legs="Acro Breeches",
  444.             feet="Acro Leggings"}
  445.     sets.WS.Requiescat.MidACC = set_combine(sets.WS.Requiescat,{})
  446.     sets.WS.Requiescat.HighACC = set_combine(sets.WS.Requiescat.MidACC,{})
  447.  
  448.     sets.WS.Resolution = {
  449.             ammo="Cheruski Needle",
  450.             head="Otomi Helm",
  451.             neck="Fotia Gorget",
  452.             ear1="Moonshade Earring",
  453.             ear2="Brutal Earring",
  454.             body="Acro Surcoat",
  455.             hands="Acro Gauntlets",
  456.             ring1="Ifrit Ring +1",
  457.             ring2="Ifrit Ring +1",
  458.             back="Bleating Mantle",
  459.             waist="Metalsinger Belt",
  460.             legs="Acro Breeches",
  461.             feet="Eschite Greaves"}
  462.     sets.WS.Resolution.MidACC = set_combine(sets.WS.Resolution,{})
  463.     sets.WS.Resolution.HighACC = set_combine(sets.WS.Resolution.MidACC,{})
  464.  
  465.     sets.WS.Atonement = {
  466.             ammo="Iron Gobbet",
  467.             head="Champion's Galea",
  468.             neck="Fotia Gorget",
  469.             ear1="Moonshade Earring",
  470.             ear2="Trux Earring",
  471.             body="Phorcys Korazin",
  472.             hands={name="Yorium Gauntlets",augments={"Enmity+10","Weapon skill damage +3%"}},
  473.             ring1="Eihwaz Ring",
  474.             ring2="Apeile Ring +1",
  475.             back="Weard Mantle",
  476.             waist="Fotia Belt",
  477.             legs="Ogier's Breeches",
  478.             feet={name="Yorium Sabatons",augments={"STR+4 VIT+4","Accuracy+16 Attack+16","Enmity+9"}}}
  479.  
  480.     sets.WS["Knights of Round"] = {
  481.             ammo="Cheruski Needle",
  482.             head="Otomi Helm",
  483.             neck="Fotia Gorget",
  484.             ear1="Moonshade Earring",
  485.             ear2="Brutal Earring",
  486.             body="Acro Surcoat",
  487.             hands="Acro Gauntlets",
  488.             ring1="Ifrit Ring +1",
  489.             ring2="Ifrit Ring +1",
  490.             back="Bleating Mantle",
  491.             waist="Metalsinger Belt",
  492.             legs="Acro Breeches",
  493.             feet="Eschite Greaves"}
  494.  
  495.     sets.WS["Sanguine Blade"] = {}
  496.  
  497.     sets.WS["Aeolian Edge"] = {}
  498.  
  499.     sets.Enmity = { -- +18 from Burtgang iLvl 119 --
  500.             ammo="Iron Gobbet", -- 2 --
  501.             head="Cab. Coronet +1", -- 7 --
  502.             neck="Unmoving Collar +1", -- 10 --
  503.             ear1="Trux Earring", -- 5 --
  504.             ear2="Cryptic Earring", -- 4 --
  505.             body="Chev. Cuirass +1", -- 12 --
  506.             hands={name="Yorium Gauntlets",augments={"Enmity+10","Weapon skill damage +3%"}}, -- 14 --
  507.             ring1="Apeile Ring", -- 5 --
  508.             ring2="Apeile Ring +1", -- 5~9 --
  509.             back="Weard Mantle", -- 5 --
  510.             waist="Creed Baudrier", -- 5 --
  511.             legs="Cab. Breeches +1", -- 7 --
  512.             feet={name="Yorium Sabatons",augments={"STR+4 VIT+4","Accuracy+16 Attack+16","Enmity+9"}}} -- 14 --
  513.                                     -- Total Enmity+ = 113~117 --
  514.  
  515.     -- JA Sets --
  516.     sets.JA = {}
  517.     sets.JA["Shield Bash"] = set_combine(sets.Enmity,{hands="Cab. Gauntlets +1"})
  518.     sets.JA.Sentinel = set_combine(sets.Enmity,{feet="Cab. Leggings +1"})
  519.     sets.JA["Holy Circle"] = set_combine(sets.Enmity,{feet="Rev. Leggings +1"})
  520.     sets.JA["Divine Emblem"] = set_combine(sets.Enmity,{feet="Chev. Sabatons +1"})
  521.     sets.JA.Fealty = set_combine(sets.Enmity,{body="Cab. Surcoat +1"})
  522.     sets.JA.Invincible = set_combine(sets.Enmity,{legs="Cab. Breeches +1"})
  523.     sets.JA.Cover = {head="Rev. Coronet +1",body="Cab. Surcoat +1"}
  524.     sets.JA.Palisade = set_combine(sets.Enmity)
  525.     sets.JA.Provoke = set_combine(sets.Enmity)
  526.     sets.JA.Warcry = set_combine(sets.Enmity)
  527.     sets.JA.Souleater = set_combine(sets.Enmity)
  528.     sets.JA["Last Resort"] = set_combine(sets.Enmity)
  529.     sets.JA.Chivalry = {
  530.             ammo="Quartz Tathlum +1",
  531.             head="Rev. Coronet +1",
  532.             body="Cab. Surcoat +1",
  533.             hands="Umuthi Gloves",
  534.             ring1="Levia. Ring +1",
  535.             legs="Cab. Breeches +1",
  536.             feet="Whirlpool Greaves"}
  537.     sets.JA.Rampart = set_combine(sets.Enmity,{head="Cab. Coronet +1"})
  538.  
  539.     -- Sublimation --
  540.     sets.Sublimation = {}
  541.  
  542.     -- Flourish --
  543.     sets.Flourish = set_combine(sets.Enmity)
  544.  
  545.     -- Step --
  546.     sets.Step = set_combine(sets.Enmity)
  547.  
  548.     -- Waltz --
  549.     sets.Waltz = {}
  550.  
  551.     sets.Precast = {}
  552.     --Fastcast Set --
  553.     sets.Precast.FastCast = {
  554.             ammo="Impatiens",
  555.             head="Chev. Armet +1",
  556.             neck="Orunmila's Torque",
  557.             ear1="Enchntr. Earring +1",
  558.             ear2="Loquac. Earring",
  559.             body="Nuevo Coselete",
  560.             hands="Leyline Gloves",
  561.             ring1="Prolix Ring",
  562.             ring2="Veneficium Ring",
  563.             back="Repulse Mantle",
  564.             waist="Goading Belt",
  565.             legs="Enif Cosciales",
  566.             feet="Ejekamal Boots"}
  567.  
  568.     -- Precast Enhancing Magic --
  569.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  570.  
  571.     -- Cure Precast Set --
  572.     sets.Precast.Cure = set_combine(sets.Precast.FastCast,{ear2="Nourish. Earring +1"})
  573.  
  574.     -- Midcast Base Set --
  575.     sets.Midcast = {}
  576.  
  577.     -- Spells Recast --
  578.     sets.Midcast.Recast = {
  579.             ammo="Impatiens",
  580.             head="Chev. Armet +1",
  581.             neck="Orunmila's Torque",
  582.             ear1="Enchntr. Earring +1",
  583.             ear2="Loquac. Earring",
  584.             body="Nuevo Coselete",
  585.             hands="Leyline Gloves",
  586.             ring1="Prolix Ring",
  587.             ring2="Veneficium Ring",
  588.             back="Repulse Mantle",
  589.             waist="Goading Belt",
  590.             legs="Enif Cosciales",
  591.             feet="Ejekamal Boots"}
  592.  
  593.     -- Divine Magic --
  594.     sets.Midcast['Divine Magic'] = set_combine(sets.Midcast.Recast,{
  595.             neck="Nesanica Torque",
  596.             ear1="Knight's Earring",
  597.             ear2="Beatific Earring",
  598.             body="Rev. Surcoat +1",
  599.             hands="Eschite Gauntlets",
  600.             waist="Bishop's Sash",
  601.             feet="Templar Sabatons"})
  602.  
  603.     -- Cure Set --
  604.     sets.Midcast.Cure = {
  605.             ammo="Impatiens",
  606.             head="Shabti Armet +1",
  607.             neck="Phalaina Locket",
  608.             ear1="Oneiros Earring",
  609.             ear2="Nourish. Earring +1",
  610.             body="Jumalik Mail",
  611.             hands="Macabre Gaunt. +1",
  612.             ring1="Eihwaz Ring",
  613.             ring2="Vocane Ring",
  614.             back="Fierabras's Mantle",
  615.             waist="Chuq'aba Belt",
  616.             legs={name="Yorium Cuisses",augments={"Accuracy+20","Cure potency +5%","Phys. dmg. taken -2%"}},
  617.             feet={name="Yorium Sabatons",augments={"Cure potency +5%"}}}
  618.  
  619.     -- Self Cure Set --
  620.     sets.Midcast.SelfCure = set_combine(sets.Midcast.Cure,{})
  621.  
  622.     -- Flash Set --
  623.     sets.Midcast.Flash = sets.Enmity
  624.                     -- Total Enmity+ = 107~111 --
  625.  
  626.     -- Enhancing Magic --
  627.     sets.Midcast['Enhancing Magic'] = set_combine(sets.Midcast.Recast,{
  628.             ammo="Impatiens",
  629.             neck="Colossus's Torque",
  630.             ear1="Andoaa Earring",
  631.             ear2="Augment. Earring",
  632.             body="Shab. Cuirass +1",
  633.             back="Merciful Cape",
  634.             waist="Olympus Sash",
  635.             legs="Rev. Breeches +1"})
  636.  
  637.     -- Stoneskin --
  638.     sets.Midcast.Stoneskin =  set_combine(sets.Midcast['Enhancing Magic'],{})
  639.  
  640.     -- Reprisal --
  641.     sets.Midcast.Reprisal = {
  642.             ammo="Impatiens",
  643.             head="Chev. Armet +1",
  644.             neck="Dualism Collar +1",
  645.             ear1="Etiolation Earring",
  646.             ear2="Cryptic Earring",
  647.             body="Shab. Cuirass +1",
  648.             hands="Souv. Handsch. +1",
  649.             ring1="Eihwaz Ring",
  650.             ring2="Meridian Ring",
  651.             back="Aenoth. Mantle +1",
  652.             waist="Oneiros Belt",
  653.             legs="Chev. Cuisses +1",
  654.             feet="Souveran Schuhs +1"}
  655.            
  656.     -- Lock Capa Mantle --
  657.     sets.Capa = {
  658.             back="Mecisto. Mantle"}
  659.            
  660.     -- Organizer Items --
  661.     organizer_items = {
  662.         head={name="Yorium Barbuta",augments={"Phalanx+2"}},
  663.         legs={name="Yorium Cuisses",augments={"Dbl. Atk.+2","Phalanx+2"}}}
  664. end
  665.  
  666. function pretarget(spell,action)
  667.     if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  668.         cancel_spell()
  669.         send_command('input /item "Echo Drops" <me>')
  670.     elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  671.         degrade_spell(spell,Cure_Spells)
  672.     elseif spell.english == "Berserk" and buffactive.Berserk then -- Cancel Berserk If Berserk Is On --
  673.         send_command('cancel Berserk')
  674.     elseif spell.english == "Defender" and buffactive.Defender then -- Cancel Defender If Defender Is On --
  675.         send_command('cancel Defender')
  676.     elseif spell.english == "Souleater" and buffactive.Souleater then -- Cancel Souleater If Souleater Is On --
  677.         send_command('cancel Souleater')
  678.     elseif spell.english == "Last Resort" and buffactive["Last Resort"] then -- Cancel Last Resort If Last Resort Is On --
  679.         send_command('cancel Last Resort')
  680.     elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
  681.         cancel_spell()
  682.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  683.         return
  684.     elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  685.         if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  686.             cancel_spell()
  687.             send_command('input /ja Addendum: White <me>')
  688.         elseif spell.english == "Manifestation" then
  689.             cancel_spell()
  690.             send_command('input /ja Accession <me>')
  691.         elseif spell.english == "Alacrity" then
  692.             cancel_spell()
  693.             send_command('input /ja Celerity <me>')
  694.         elseif spell.english == "Parsimony" then
  695.             cancel_spell()
  696.             send_command('input /ja Penury <me>')
  697.         end
  698.     elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  699.         if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  700.             cancel_spell()
  701.             send_command('input /ja Addendum: Black <me>')
  702.         elseif spell.english == "Accession" then
  703.             cancel_spell()
  704.             send_command('input /ja Manifestation <me>')
  705.         elseif spell.english == "Celerity" then
  706.             cancel_spell()
  707.             send_command('input /ja Alacrity <me>')
  708.         elseif spell.english == "Penury" then
  709.             cancel_spell()
  710.             send_command('input /ja Parsimony <me>')
  711.         end
  712.     end
  713. end
  714.  
  715. function precast(spell,action)
  716.     if spell.type == "WeaponSkill" then
  717.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  718.             cancel_spell()
  719.             add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  720.             return
  721.         else
  722.             equipSet = sets.WS
  723.             if equipSet[spell.english] then
  724.                 equipSet = equipSet[spell.english]
  725.             end
  726.             if equipSet[AccArray[AccIndex]] then
  727.                 equipSet = equipSet[AccArray[AccIndex]]
  728.             end
  729.             if player.tp > 2999 then
  730.                 if spell.english == "Resolution" then -- Equip Kokou's Earring When You Have 3000 TP --
  731.                     equipSet = set_combine(equipSet,{ear1="Kokou's Earring"})
  732.                 elseif spell.english == "Chant du Cygne" then -- Equip Jupiter's Pearl When You Have 3000 TP --
  733.                     equipSet = set_combine(equipSet,{ear1="Jupiter's Pearl"})
  734.                 end
  735.             end
  736.             equip(equipSet)
  737.         end
  738.     elseif spell.type == "JobAbility" then
  739.         if sets.JA[spell.english] then
  740.             equip(sets.JA[spell.english])
  741.         end
  742.     elseif spell.type == "Rune" then
  743.         equip(sets.Enmity)
  744.     elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  745.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  746.             cancel_spell()
  747.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  748.             return
  749.         else
  750.             if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  751.                 equip(sets.Precast.Cure)
  752.             elseif spell.english == "Reprisal" then
  753.                 if buffactive['Blaze Spikes'] or buffactive['Ice Spikes'] or buffactive['Shock Spikes'] then -- Cancel Blaze Spikes, Ice Spikes or Shock Spikes When You Cast Reprisal --
  754.                     cast_delay(0.2)
  755.                     send_command('cancel Blaze Spikes,Ice Spikes,Shock Spikes')
  756.                 end
  757.                 equip(sets.Precast.FastCast)
  758.             elseif string.find(spell.english,'Utsusemi') then
  759.                 if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  760.                     cancel_spell()
  761.                     add_to_chat(123, spell.name .. ' Canceled: [3+ Images]')
  762.                     return
  763.                 else
  764.                     equip(sets.Precast.FastCast)
  765.                 end
  766.             elseif sets.Precast[spell.skill] then
  767.                 equip(sets.Precast[spell.skill])
  768.             else
  769.                 equip(sets.Precast.FastCast)
  770.             end
  771.         end
  772.     elseif string.find(spell.type,'Flourish') then
  773.         if spell.english == "Animated Flourish" then
  774.             equip(sets.Enmity)
  775.         else
  776.             equip(sets.Flourish)
  777.         end
  778.     elseif spell.type == "Step" then
  779.         equip(sets.Step)
  780.     elseif spell.type == "Waltz" then
  781.         refine_waltz(spell,action)
  782.         equip(sets.Waltz)
  783.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  784.         cast_delay(0.2)
  785.         send_command('cancel Sneak')
  786.     end
  787.     if Twilight == 'Twilight' then
  788.         equip(sets.Twilight)
  789.     end
  790.     if Capa == 'ON' then
  791.         equip(sets.Capa)
  792.     end
  793. end
  794.  
  795. function midcast(spell,action)
  796.     equipSet = {}
  797.     if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  798.         equipSet = sets.Midcast
  799.         if equipSet[spell.english] then
  800.             equipSet = equipSet[spell.english]
  801.         elseif (string.find(spell.english,'Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  802.             if spell.target.name == player.name then
  803.                 equipSet = equipSet.SelfCure
  804.             else
  805.                 equipSet = equipSet.Cure
  806.             end
  807.         elseif string.find(spell.english,'Protect') or string.find(spell.english,'Shell') then
  808.             if spell.target.name == player.name then
  809.                 equipSet = set_combine(equipSet,{ring2="Sheltered Ring"})
  810.             end
  811.         elseif spell.english == "Phalanx" then
  812.             equipSet = set_combine(sets.Midcast['Enhancing Magic'],{head={name="Yorium Barbuta",augments={"Phalanx+2"}},hands="Souv. Handsch. +1",back="Weard Mantle",legs={name="Yorium Cuisses",augments={"Dbl. Atk.+2","Phalanx+2"}},feet="Souveran Schuhs +1"})
  813.         elseif spell.english == "Stoneskin" then
  814.             if buffactive.Stoneskin then
  815.                 send_command('@wait 1.7;cancel stoneskin')
  816.             end
  817.             equipSet = equipSet.Stoneskin
  818.         elseif spell.english == "Sneak" then
  819.             if spell.target.name == player.name and buffactive['Sneak'] then
  820.                 send_command('cancel sneak')
  821.             end
  822.             equipSet = equipSet.Recast
  823.         elseif string.find(spell.english,'Banish') then
  824.             equipSet = set_combine(equipSet,{ring1=""})
  825.         elseif EnmityBlueMagic:contains(spell.english) or spell.english == "Stun" or string.find(spell.english,'Absorb') or spell.english == 'Aspir' or spell.english == 'Drain' then
  826.             if buffactive.Sentinel then
  827.                 equipSet = equipSet.Recast
  828.             else
  829.                 equipSet = equipSet.Flash
  830.             end
  831.         elseif string.find(spell.english,'Spikes') then
  832.             equipSet = equipSet.Recast
  833.         elseif string.find(spell.english,'Utsusemi') then
  834.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  835.                 send_command('@wait 1.7;cancel Copy Image*')
  836.             end
  837.             equipSet = equipSet.Recast
  838.         elseif spell.english == 'Monomi: Ichi' then
  839.             if buffactive['Sneak'] then
  840.                 send_command('@wait 1.7;cancel sneak')
  841.             end
  842.             equipSet = equipSet.Recast
  843.         elseif equipSet[spell.skill] then
  844.             equipSet = equipSet[spell.skill]
  845.         end
  846.     elseif equipSet[spell.english] then
  847.         equipSet = equipSet[spell.english]
  848.     end
  849.     equip(equipSet)
  850.     if Capa == 'ON' then
  851.         equip(sets.Capa)
  852.     end
  853. end
  854.  
  855. function aftercast(spell,action)
  856.     if not spell.interrupted then
  857.         if spell.type == "WeaponSkill" then
  858.             send_command('wait 0.2;gs c TP')
  859.         elseif spell.english == "Banish II" then -- Banish II Countdown --
  860.             send_command('@wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  861.         elseif spell.english == "Holy Circle" then -- Holy Circle Countdown --
  862.             send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
  863.         end
  864.     end
  865.     status_change(player.status)
  866. end
  867.  
  868. function status_change(new,old)
  869.     check_equip_lock()
  870.     if Armor == 'PDT' then
  871.         equip(sets.PDT[ShieldArray[ShieldIndex]])
  872.     elseif Armor == 'MDT' then
  873.         equip(sets.MDT[ShieldArray[ShieldIndex]])
  874.     elseif Armor == 'Kiting' then
  875.         equip(sets.Kiting[ShieldArray[ShieldIndex]])
  876.     elseif Armor == 'Weakness' then
  877.         equip(sets.Weakness[ShieldArray[ShieldIndex]])
  878.     elseif Armor == 'DT' then
  879.         equip(sets.DT[ShieldArray[ShieldIndex]])
  880.     elseif buffactive["Sublimation: Activated"] then
  881.         equip(sets.Sublimation)
  882.     elseif new == 'Engaged' then
  883.         equipSet = sets.TP
  884.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  885.             equipSet = equipSet["Hybrid"]
  886.         end
  887.         if equipSet[player.equipment.main] then
  888.             equipSet = equipSet[player.equipment.main]
  889.         end
  890.         if equipSet[ShieldArray[ShieldIndex]] then
  891.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  892.         end
  893.         if equipSet[AccArray[AccIndex]] then
  894.             equipSet = equipSet[AccArray[AccIndex]]
  895.         end
  896.         if buffactive.Ionis and equipSet["Ionis"] then
  897.             equipSet = equipSet["Ionis"]
  898.         end
  899.         if Armor == 'ShieldSkill' then
  900.             equipSet = set_combine(equipSet,sets.TP.ShieldSkill)
  901.         end
  902.         equip(equipSet)
  903.     elseif new == 'Idle' then
  904.         equipSet = sets.Idle
  905.         if equipSet[IdleArray[IdleIndex]] then
  906.             equipSet = equipSet[IdleArray[IdleIndex]]
  907.         end
  908.         if equipSet[ShieldArray[ShieldIndex]] then
  909.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  910.         end
  911.     if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  912.         equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  913.     end
  914.     if world.area:endswith('Adoulin') then
  915.         equipSet = set_combine(equipSet,{body="Councilor's Garb"})
  916.     end
  917.         equip(equipSet)
  918.     elseif new == 'Resting' then
  919.         equip(sets.Resting)
  920.     end
  921.     if Repulse == 'ON' then -- Use Repulse Toggle To Lock Repulse Mantle --
  922.         equip(sets.Repulse[ShieldArray[ShieldIndex]])
  923.     end
  924.     if Twilight == 'Twilight' then
  925.         equip(sets.Twilight)
  926.     end
  927.     if Capa == 'ON' then
  928.         equip(sets.Capa)
  929.     end
  930.     if Cities:contains(world.area) then
  931.         equipSet = equip(sets.Town)
  932.     end
  933. end
  934.  
  935. function buff_change(buff,gain)
  936.     buff = string.lower(buff)
  937.     if buff == "aftermath: lv.3" then -- AM3 Timer/Countdown --
  938.         if gain then
  939.             send_command('timers create "Aftermath: Lv.3" 180 down;wait 120;input /echo Aftermath: Lv.3 [WEARING OFF IN 60 SEC.];wait 30;input /echo Aftermath: Lv.3 [WEARING OFF IN 30 SEC.];wait 20;input /echo Aftermath: Lv.3 [WEARING OFF IN 10 SEC.]')
  940.         else
  941.             send_command('timers delete "Aftermath: Lv.3"')
  942.             add_to_chat(123,'AM3: [OFF]')
  943.         end
  944.     elseif buff == 'weakness' then -- Weakness Timer --
  945.         if gain then
  946.             send_command('timers create "Weakness" 300 up')
  947.         else
  948.             send_command('timers delete "Weakness"')
  949.         end
  950.     end
  951.     if buff == "sleep" and gain and player.hp > 200 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep & Have 200+ HP --
  952.         equip({neck=""})
  953.     else
  954.         if not midaction() then
  955.             status_change(player.status)
  956.         end
  957.     end
  958. end
  959.  
  960. --Macros--
  961. send_command('bind f9 gs c C7') --PDT--
  962. send_command('bind f8 gs c C15') --MDT--
  963. send_command('bind f7 gs c C2') --Ochain/Aegis/Priwen--
  964. send_command('bind f6 gs c C1') --ACC Level--
  965. send_command('bind f5 gs c C3') --Twilight--
  966. send_command('bind f10 gs c C4') --Capa Mantle--
  967.  
  968. function file_unload()
  969.     if binds_on_unload then
  970.         binds_on_unload()
  971.     end
  972.  
  973.     send_command('unbind f10')
  974.     send_command('unbind f9')
  975.     send_command('unbind f8')
  976.     send_command('unbind f7')
  977.     send_command('unbind f6')
  978.     send_command('unbind f5')
  979. end
  980.  
  981.  
  982. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  983. function self_command(command)
  984.     if command == 'C1' then -- Accuracy Level Toggle --
  985.         AccIndex = (AccIndex % #AccArray) + 1
  986.         status_change(player.status)
  987.         add_to_chat(158,'Accuracy Level: '..AccArray[AccIndex])
  988.     elseif command == 'C5' then -- Auto Update Gear Toggle --
  989.         status_change(player.status)
  990.         add_to_chat(158,'Auto Update Gear')
  991.     elseif command == 'C2' then -- Shield Type Toggle --
  992.         ShieldIndex = (ShieldIndex % #ShieldArray) + 1
  993.         status_change(player.status)
  994.         add_to_chat(158,'Shield Type: '..ShieldArray[ShieldIndex])
  995.     elseif command == 'C9' then -- Hybrid Toggle --
  996.         if Armor == 'Hybrid' then
  997.             Armor = 'None'
  998.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  999.         else
  1000.             Armor = 'Hybrid'
  1001.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1002.         end
  1003.         status_change(player.status)
  1004.     elseif command == 'C7' then -- PDT Toggle --
  1005.         if Armor == 'PDT' then
  1006.             Armor = 'None'
  1007.             add_to_chat(123,'PDT Set: [Unlocked]')
  1008.         else
  1009.             Armor = 'PDT'
  1010.             add_to_chat(158,'PDT Set: [Locked]')
  1011.         end
  1012.         status_change(player.status)
  1013.     elseif command == 'C15' then -- MDT Toggle --
  1014.         if Armor == 'MDT' then
  1015.             Armor = 'None'
  1016.             add_to_chat(123,'MDT Set: [Unlocked]')
  1017.         else
  1018.             Armor = 'MDT'
  1019.             add_to_chat(158,'MDT Set: [Locked]')
  1020.         end
  1021.         status_change(player.status)
  1022.     elseif command == 'C12' then -- Kiting Toggle --
  1023.         if Armor == 'Kiting' then
  1024.             Armor = 'None'
  1025.             add_to_chat(123,'Kiting Set: [Unlocked]')
  1026.         else
  1027.             Armor = 'Kiting'
  1028.             add_to_chat(158,'Kiting Set: [Locked]')
  1029.         end
  1030.         status_change(player.status)
  1031.     elseif command == 'C4' then -- Capa Back Toggle --
  1032.         if Capa == 'ON' then
  1033.             Capa = 'OFF'
  1034.             add_to_chat(123,'Capacity Mantle: [Unlocked]')
  1035.         else
  1036.             Capa = 'ON'
  1037.             add_to_chat(158,'Capacity Mantle: [Locked]')
  1038.         end
  1039.         status_change(player.status)
  1040.     elseif command == 'C10' then -- Weakness Set Toggle --
  1041.         if Armor == 'Weakness' then
  1042.             Armor = 'None'
  1043.             add_to_chat(123,'Weakness Set: [Unlocked]')
  1044.         else
  1045.             Armor = 'Weakness'
  1046.             add_to_chat(158,'Weakness Set: [Locked]')
  1047.         end
  1048.         status_change(player.status)
  1049.     elseif command == 'C17' then -- DT Toggle --
  1050.         if Armor == 'DT' then
  1051.             Armor = 'None'
  1052.             add_to_chat(123,'DT Set: [Unlocked]')
  1053.         else
  1054.             Armor = 'DT'
  1055.             add_to_chat(158,'DT Set: [Locked]')
  1056.         end
  1057.         status_change(player.status)
  1058.     elseif command == 'C16' then -- Repulse Mantle Toggle --
  1059.         if Repulse == 'ON' then
  1060.             Repulse = 'OFF'
  1061.             add_to_chat(123,'Repulse Mantle: [Unlocked]')
  1062.         else
  1063.             Repulse = 'ON'
  1064.             add_to_chat(158,'Repulse Mantle: [Locked]')
  1065.         end
  1066.         status_change(player.status)
  1067.     elseif command == 'C11' then -- Shield Skill Toggle --
  1068.         if Armor == 'ShieldSkill' then
  1069.             Armor = 'None'
  1070.             add_to_chat(123,'Shield Skill Set: [Unlocked]')
  1071.         else
  1072.             Armor = 'ShieldSkill'
  1073.             add_to_chat(158,'Shield Skill Set: [Locked]')
  1074.         end
  1075.         status_change(player.status)
  1076.     elseif command == 'C3' then -- Twilight Toggle --
  1077.         if Twilight == 'Twilight' then
  1078.             Twilight = 'None'
  1079.             add_to_chat(123,'Twilight Set: [Unlocked]')
  1080.         else
  1081.             Twilight = 'Twilight'
  1082.             add_to_chat(158,'Twilight Set: [locked]')
  1083.         end
  1084.         status_change(player.status)
  1085.     elseif command == 'C8' then -- Distance Toggle --
  1086.         if player.target.distance then
  1087.             target_distance = math.floor(player.target.distance*10)/10
  1088.             add_to_chat(158,'Distance: '..target_distance)
  1089.         else
  1090.             add_to_chat(123,'No Target Selected')
  1091.         end
  1092.     elseif command == 'C6' then -- Idle Toggle --
  1093.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1094.         status_change(player.status)
  1095.         add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  1096.     elseif command == 'TP' then
  1097.         add_to_chat(158,'TP Return: ['..tostring(player.tp)..']')
  1098.     elseif command:match('^SC%d$') then
  1099.         send_command('//' .. sc_map[command])
  1100.     end
  1101. end
  1102.  
  1103. function check_equip_lock() -- Lock Equipment Here --
  1104.     if player.equipment.left_ring == "Warp Ring" or player.equipment.left_ring == "Capacity Ring" or player.equipment.right_ring == "Warp Ring" or player.equipment.right_ring == "Capacity Ring" then
  1105.         disable('ring1','ring2')
  1106.     elseif player.equipment.back == "Mecisto. Mantle" or player.equipment.back == "Aptitude Mantle +1" or player.equipment.back == "Aptitude Mantle" then
  1107.         disable('back')
  1108.     else
  1109.         enable('ring1','ring2','back')
  1110.     end
  1111. end
  1112.  
  1113. function actualCost(originalCost)
  1114.     if buffactive["Penury"] then
  1115.         return originalCost*.5
  1116.     elseif buffactive["Light Arts"] then
  1117.         return originalCost*.9
  1118.     else
  1119.         return originalCost
  1120.     end
  1121. end
  1122.  
  1123. function degrade_spell(spell,degrade_array)
  1124.     spell_index = table.find(degrade_array,spell.name)
  1125.     if spell_index>1 then
  1126.         new_spell = degrade_array[spell_index - 1]
  1127.         change_spell(new_spell,spell.target.raw)
  1128.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  1129.     end
  1130. end
  1131.  
  1132. function change_spell(spell_name,target)
  1133.     cancel_spell()
  1134.     send_command('//'..spell_name..' '..target)
  1135. end
  1136.  
  1137. function refine_waltz(spell,action)
  1138.     if spell.type ~= 'Waltz' then
  1139.         return
  1140.     end
  1141.  
  1142.     if spell.name == "Healing Waltz" or spell.name == "Divine Waltz" or spell.name == "Divine Waltz II" then
  1143.         return
  1144.     end
  1145.  
  1146.     local newWaltz = spell.english
  1147.     local waltzID
  1148.  
  1149.     local missingHP
  1150.  
  1151.     if spell.target.type == "SELF" then
  1152.         missingHP = player.max_hp - player.hp
  1153.     elseif spell.target.isallymember then
  1154.         local target = find_player_in_alliance(spell.target.name)
  1155.         local est_max_hp = target.hp / (target.hpp/100)
  1156.         missingHP = math.floor(est_max_hp - target.hp)
  1157.     end
  1158.  
  1159.     if missingHP ~= nil then
  1160.         if player.sub_job == 'DNC' then
  1161.             if missingHP < 40 and spell.target.name == player.name then
  1162.                 add_to_chat(123,'Full HP!')
  1163.                 cancel_spell()
  1164.                 return
  1165.             elseif missingHP < 150 then
  1166.                 newWaltz = 'Curing Waltz'
  1167.                 waltzID = 190
  1168.             elseif missingHP < 300 then
  1169.                 newWaltz = 'Curing Waltz II'
  1170.                 waltzID = 191
  1171.             else
  1172.                 newWaltz = 'Curing Waltz III'
  1173.                 waltzID = 192
  1174.             end
  1175.         else
  1176.             return
  1177.         end
  1178.     end
  1179.  
  1180.     local waltzTPCost = {['Curing Waltz'] = 20, ['Curing Waltz II'] = 35, ['Curing Waltz III'] = 50, ['Curing Waltz IV'] = 65, ['Curing Waltz V'] = 80}
  1181.     local tpCost = waltzTPCost[newWaltz]
  1182.  
  1183.     local downgrade
  1184.  
  1185.     if player.tp < tpCost and not buffactive.trance then
  1186.  
  1187.         if player.tp < 20 then
  1188.             add_to_chat(123, 'Insufficient TP ['..tostring(player.tp)..']. Cancelling.')
  1189.             cancel_spell()
  1190.             return
  1191.         elseif player.tp < 35 then
  1192.             newWaltz = 'Curing Waltz'
  1193.         elseif player.tp < 50 then
  1194.             newWaltz = 'Curing Waltz II'
  1195.         elseif player.tp < 65 then
  1196.             newWaltz = 'Curing Waltz III'
  1197.         elseif player.tp < 80 then
  1198.             newWaltz = 'Curing Waltz IV'
  1199.         end
  1200.  
  1201.         downgrade = 'Insufficient TP ['..tostring(player.tp)..']. Downgrading to '..newWaltz..'.'
  1202.     end
  1203.  
  1204.     if newWaltz ~= spell.english then
  1205.         send_command('@input /ja "'..newWaltz..'" '..tostring(spell.target.raw))
  1206.         if downgrade then
  1207.             add_to_chat(158, downgrade)
  1208.         end
  1209.         cancel_spell()
  1210.         return
  1211.     end
  1212.  
  1213.     if missingHP > 0 then
  1214.         add_to_chat(158,'Trying to cure '..tostring(missingHP)..' HP using '..newWaltz..'.')
  1215.     end
  1216. end
  1217.  
  1218. function find_player_in_alliance(name)
  1219.     for i,v in ipairs(alliance) do
  1220.         for k,p in ipairs(v) do
  1221.             if p.name == name then
  1222.                 return p
  1223.             end
  1224.         end
  1225.     end
  1226. end
  1227.  
  1228. function sub_job_change(newSubjob, oldSubjob)
  1229.     select_default_macro_book(13)
  1230. end
  1231.  
  1232. function set_macro_page(set,book)
  1233.     if not tonumber(set) then
  1234.         add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  1235.         return
  1236.     end
  1237.     if set < 1 or set > 10 then
  1238.         add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  1239.         return
  1240.     end
  1241.  
  1242.     if book then
  1243.         if not tonumber(book) then
  1244.             add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  1245.             return
  1246.         end
  1247.         if book < 1 or book > 20 then
  1248.             add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  1249.             return
  1250.         end
  1251.         send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  1252.     else
  1253.         send_command('@input /macro set '..tostring(set))
  1254.     end
  1255. end
  1256.  
  1257. function select_default_macro_book()
  1258.     -- Default macro set/book
  1259.     if player.sub_job == 'WAR' then
  1260.         set_macro_page(1, 13)
  1261.     elseif player.sub_job == 'DRK' then
  1262.         set_macro_page(1, 13)
  1263.     elseif player.sub_job == 'NIN' then
  1264.         set_macro_page(1, 13)
  1265.     elseif player.sub_job == 'BLU' then
  1266.         set_macro_page(1, 13)
  1267.     elseif player.sub_job == 'DNC' then
  1268.         set_macro_page(1, 13)
  1269.     elseif player.sub_job == 'RDM' then
  1270.         set_macro_page(1, 13)
  1271.     elseif player.sub_job == 'WHM' then
  1272.         set_macro_page(1, 13)
  1273.     else
  1274.         set_macro_page(1, 13)
  1275.     end
  1276. end
  1277.  
  1278. --- Delve Assistant
  1279. windower.register_event('incoming text', function(original, modified, mode)
  1280.     local match
  1281.        
  1282.  
  1283.        
  1284.         if player.target.name then
  1285.             if player.target.name == "Apex Jagil" then
  1286.                
  1287.             match = original:match('Etsune uses Exudation.')
  1288.             if match then
  1289.                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Counting  ] *-*-*-*-*-*-*-*-*')
  1290.                 send_command('wait 3;input /ws "Chant du Cygne" <t>')
  1291.             end
  1292.            
  1293.             end
  1294.         end
  1295.        
  1296.        
  1297.        
  1298.        
  1299.     return modified, mode
  1300. end)
  1301.  
  1302. fps = 1
  1303. sec = 0
  1304. i=1
  1305. j=1
  1306. sav = 0
  1307.  
  1308. spells = {"Indi-Regen", "Indi-Poison", "Indi-Precision", "Indi-Voidance", "Indi-Malaise"}
  1309. spell = {"Indi-Focus", "Geo-Refresh", "Sleep II", "Sleep", "Poisonga", "Blind", "Stun", "Sleep", "Sleep", "Sleep II", "Sleep", "Sleep", "Blind", "Stun", "Sleep", "Sleep", "Sleep II", "Sleep", "Sleep", "Blind", "Stun", "Sleep", "Sleep"}
  1310.  
  1311. NMs = S{"King Behemoth", "Immanibugard", "Steamy Samantha", "Sybaritic Samantha", "Sultry Samantha", "Ruea", "Ma", "Sombra Dragon", "Apex Jagil","Apex Crab","Apex Craklaw", "Xag'Nar", "Laevvid", "Morseiu", "Ircinraq", "Hyoscya", "Wopket"}
  1312.  
  1313. windower.register_event('prerender', function()
  1314.     if fps < 150 then
  1315.         fps = fps +1
  1316.     else
  1317.         fps = 1
  1318.     end
  1319.    
  1320.    
  1321.     if fps == 1 and buffactive['silence'] then
  1322.             send_command('input /item "echo drops" '..player.name..'')
  1323.     end
  1324.    
  1325.     if fps == 1 then
  1326.        
  1327.         if player.target.name then
  1328.             if player.target.name == "Faloun"  then
  1329.                     if player.mp >=100 then
  1330.                         if buffactive["Refresh"] then
  1331.                             send_command('input /ma '..spells[i]..' <me>')
  1332.                             if i <5 then
  1333.                                 i=i+1
  1334.                             else
  1335.                                 i = 1
  1336.                             end
  1337.                         else
  1338.                             send_command('input /ma Geo-Refresh <me>')
  1339.                         end
  1340.                     end
  1341.             elseif player.target.name == "Bight Uragnite" or NMs:contains(player.target.name)  then
  1342.                
  1343.                 if player.tp > 1000 then
  1344.                     send_command('input /ws "Chant du Cygne" <t>')
  1345.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ CDCING ] *-*-*-*-*-*-*-*-*')
  1346.                 end
  1347.                
  1348.                 if not buffactive['Reprisal'] and windower.ffxi.get_spell_recasts()[97] <1 then
  1349.                     send_command('input /ma Reprisal <me>')
  1350.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ REPRISALING ] *-*-*-*-*-*-*-*-*')
  1351.                 elseif  not buffactive['Enmity Boost'] then
  1352.                     send_command('input /ma Crusade <me>')
  1353.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ CRUSADING ] *-*-*-*-*-*-*-*-*')
  1354.                 elseif  windower.ffxi.get_spell_recasts()[112] <1 then
  1355.                     send_command('input /ma Flash <t>')
  1356.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ FLASHING ] *-*-*-*-*-*-*-*-*')
  1357.                 elseif  windower.ffxi.get_spell_recasts()[116] <1 then
  1358.                     send_command('input /ma Phalanx <me>')
  1359.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ FLASHING ] *-*-*-*-*-*-*-*-*')
  1360.                 elseif  windower.ffxi.get_spell_recasts()[274] <1 then
  1361.                     send_command('input /ma Enlight <me>')
  1362.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ FLASHING ] *-*-*-*-*-*-*-*-*')
  1363.                 end
  1364.                
  1365.                
  1366.                 -- VOKE
  1367.                 if windower.ffxi.get_ability_recasts()[5] < 1 then
  1368.                     send_command('input /ja Provoke <t>')
  1369.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ VOkING ] *-*-*-*-*-*-*-*-*')
  1370.                 end
  1371.                
  1372.                 -- DEFENDER
  1373.                 if windower.ffxi.get_ability_recasts()[3] < 1 then
  1374.                     send_command('input /ja Defender <me>')
  1375.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ DEFENDINGG ] *-*-*-*-*-*-*-*-*')
  1376.                 end
  1377.                
  1378.                 -- SENTINEL
  1379.                 if windower.ffxi.get_ability_recasts()[75] < 1 then
  1380.                     send_command('input /ja Sentinel <me>')
  1381.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ SENTINELING ] *-*-*-*-*-*-*-*-*')
  1382.                 end
  1383.                
  1384.                 -- PALLISADE
  1385.                 if windower.ffxi.get_ability_recasts()[42] < 1 then
  1386.                     send_command('input /ja Palisade <me>')
  1387.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ PALISADING ] *-*-*-*-*-*-*-*-*')
  1388.                 end
  1389.                
  1390.                
  1391.                
  1392.                 if player.mp < 50 then
  1393.                     send_command('input /ja Chivalry <me>')
  1394.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ CHIVALRING ] *-*-*-*-*-*-*-*-*')
  1395.                 end
  1396.             end
  1397.         end
  1398.        
  1399.     end
  1400.    
  1401.    
  1402.    
  1403. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement