Advertisement
Arcaniz

WHM

Jan 27th, 2016
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.49 KB | None | 0 0
  1. function get_sets()
  2.     include('no_interruptions.lua')
  3.  
  4.  
  5. include('organizer-lib.lua')
  6.     failedCount = 0
  7.     limitemp = 739
  8.     meleeMode = "Off"
  9.     meleeSet = "Melee"
  10.     idleSet = "Idle"
  11.     cureSet = "Cure"
  12.     curagaset="Curaga"
  13.     restingSet = "Resting"
  14.     pdtset= "PDT"
  15.     mdtset= "MDT"
  16.     pdtgaitset= "PDTgait"
  17.     craft=0
  18.  
  19.     nextAllowableCast = 0
  20.     currentCast = ''
  21.     okToCast = true
  22.  
  23.     send_command('input /macro book 4;')
  24.  
  25.     sets['Club'] = {main = "Bolelabunga",sub = "Genbu's Shield"}
  26.  
  27.     sets['DualClub'] = {main = "Bolelabunga"}
  28.  
  29.     sets['Staff'] = {main = "Twebuliij",sub = "Vivid Stra"}
  30.  
  31.  
  32.     sets['Idle'] = {main = "Bolelabunga",sub = "Sors shield", ammo = "Sihirik", head = "Wivre Hairpin", neck = "Twilight Torque", ear1 = "Ethereal Earring", ear2 = "Moonshade Earring", body = "Piety briault +1", hands = "Serpentes Cuffs", ring1 = "Dark Ring", ring2 = "Defending Ring", waist = "Fucho-no-obi", legs = "Assiduity pants +1", feet = "Serpentes Sabots", back = "Mecistopins mantle"}
  33.    
  34.     sets['IdleDT'] = {main = "Bolelabunga",sub = "Genbu's Shield", ammo = "Sihirik", head = "Wivre Hairpin", neck = "Twilight Torque", ear1 = "Ethereal Earring", ear2 = "Moonshade Earring", body = "Gendewitha bliaut +1", hands = "Serpentes Cuffs", ring1 = "Dark Ring", ring2 = "Defending Ring", waist = "Fucho-no-obi", legs = "Assiduity pants +1", feet = "Serpentes Sabots", back = "Umbra Cape"}
  35.    
  36.     sets['PDT'] = {main = "Bolelabunga",sub = "Genbu's Shield", ammo = "Sihirik", head = "Gende. Caubeen +1", neck = "Twilight Torque", ear1 = "Ethereal Earring", ear2 = "Sanare Earring", body = "Gendewitha Bliaut +1", hands = "Gendewitha gages +1", ring1={name="Dark Ring",augment='Phys. dmg. taken -5%','Magic dmg. taken -3%'}, ring2 = "Defending Ring", waist = "Slipor sash", legs = "Gendewitha Spats +1", feet = "Gendewitha galoshes", back = "Repulse mantle"}
  37.        
  38.     sets['PDTgait'] = {main = "Bolelabunga",sub = "Genbu's Shield", ammo = "Sihirik", head = "Gende. Caubeen +1", neck = "Twilight Torque", ear1 = "Ethereal Earring", ear2 = "Sanare Earring", body = "Gendewitha Bliaut +1", hands = "Gendewitha gages +1", ring1={name="Dark Ring",augment='Breath dmg. taken -4%','Phys. dmg. taken -6%'}, ring2 = "Defending Ring", waist = "Slipor sash", legs = "Gendewitha Spats +1", feet = "Herald's gaiters", back = "Umbra cape"}
  39.    
  40.     sets['MDT'] = {main = "Bolelabunga",sub = "Genbu's Shield", ammo = "Sihirik", head = "Gende. Caubeen +1", neck = "Twilight Torque", ear1 = "Ethereal Earring", ear2 = "Sanare Earring", body = "Gendewitha Bliaut +1", hands = "Gendewitha gages +1" , ring1 = "Shadow Ring", ring2 = "Defending Ring", waist = "Slipor sash", legs = "Piety Pantaloons +1", feet = "Umbani boots", back = "Hexerei Cape"}
  41.  
  42.     sets['Standard'] = {main = "Capricorn Staff",sub = "Vivid Stra", ammo = "Impatiens", head = "Nahtirah Hat", neck = "Orunmila's Torque", ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body = "Ebers Briault", hands = "Serpentes Cuffs", ring1 = "Prolix Ring", ring2 = "Weatherspoon Ring", back = "Swith Cape +1", waist = "Witful Belt", legs = "Ebers Pantaloons", feet = "Regal pumps +1"}
  43.  
  44.     sets['Melee'] = {}
  45.  
  46.     sets['HexaStrike'] = set_combine(sets['Standard'], {})
  47.  
  48.     sets['Realmrazer'] = set_combine(sets['Standard'], {})
  49.  
  50.     sets['Shattersoul'] = set_combine(sets['Standard'], { })
  51.  
  52.     sets['PreCure'] = {main = "Ababinili",sub = "Vivid Strap", ammo = "Impatiens", head = "Nahtirah Hat", neck = "Orunmila's Torque", ear1 = "Enchanter earring +1", ear2 = "Loquac. Earring", body = "Marduk's jubbah +1", hands = "Gendewitha gages +1", ring1 = "Weatherspoon ring", ring2 = "Veneficium Ring", back = "Swith cape +1", waist = "Acerbic sash +1", legs = "Ebers Pantaloons", feet = "Regal pumps +1"}
  53.  
  54.     sets['Cure'] = {main = "Ababinili",sub = "Curatio Grip", ammo = "Quartz Tathlum +1", head = "Gende. Caubeen +1", neck = "Colossus's Torque", ear1 = "Novia Earring", ear2 = "Beatific Earring", body = "Ebers Briault", hands = "Bokwus Gloves", ring1 = "Sirona's Ring", ring2 = "Haoma's ring", back={name="Mending Cape",augment='Healing magic skill +10'}, waist = "Bishop's Sash", legs = "Ebers Pantaloons", feet = "Regal Pumps +1"}
  55.    
  56.     sets['Curaga'] = {main = "Ababinili",sub = "Achaq Grip", ammo = "Quartz Tathlum +1", head = "Gende. Caubeen +1", neck = "Imbodla necklace", ear1 = "Novia Earring", ear2 = "Lifestorm Earring", body = "Gendewitha Bliaut +1", hands = "Bokwus Gloves", ring1 = "Leviathan ring +1", ring2 = "Leviathan ring +1", back = "Pahtli Cape", waist = "Cascade belt", legs = "Ebers Pantaloons", feet = "Uk'uxkaj boots"}
  57.  
  58.     sets['CureObi'] = set_combine(sets['Cure'], {back="Twilight Cape", waist="Hachirin-no-Obi"})
  59.  
  60.     sets['Resting'] = set_combine(sets['Idle'], {main = "Boonwell Staff", sub = "Oneiros grip", body = "Chelona blazer", ammo = "Mana Ampulla", back = "Vita cape", hands = "Nares cuffs", neck= "Eidolon pendant", feet = "Chelona boots +1", ring1 = "Star ring", ring2 = "Angha ring", ear1 = "Relaxing Earring", ear2 = "Moonshade Earring",  waist = "Austerity Belt"})
  61.  
  62.     sets['Regen'] = set_combine(sets['Standard'], {body = "Piety briault +1", waist = "Ninurta's Sash",  legs = "Theophany pantaloons +1", hands = "Ebers Duckbills", main = "Bolelabunga", sub="Thuellaic ecu +1",head="Marduk's Tiara +1", ammo="Hasty pinion +1"})
  63.  
  64.     sets['DivineCaressSet'] = set_combine(sets['Standard'], {hands = "Ebers Duckbills", back = "Mending Cape"})
  65.  
  66.     sets['Divine'] = {main = "Twebuliij",sub = "Mephitis Grip", head = "Artsieq Hat", ear1 = "Psystorm Earring",  ear2 = "Lifestorm Earring",body={name="Artsieq jubbah",augment='MP+30','Mag. Acc.+20','MND+7'}, hands = "Lurid Mitts", ring1 = "Weatherspoon ring", ring2 = "Sangoma Ring", waist = "Ovate rope", back = "Ogapepo Cape +1", range = "Aureole", neck = "Eddy Necklace", legs = "Mes'yohi Slacks", feet = "Artsieq boots"}
  67.  
  68.     sets['Holy'] = {main = "Venabulum",sub = "Zuuxowu Grip", head = "Buremte Hat", ear1 = "Crematio Earring", ear2 = "Friomisi Earring",body={name="Artsieq jubbah",augment='MP +30','"Mag. Atk.Bns."+20','INT +7'}, hands = "Otomi Gloves", neck="Eddy Necklace", ring1 = "Weatherspoon ring", ring2 = "Sangoma Ring", back = "Ogapepo Cape +1", waist = "Sekhmet Corset", range ="Aureole", legs = "Artsieq hose", feet = "Umbani boots"}
  69.  
  70.     sets['MAB'] = {main = "Venabulum",sub = "Zuuxowu Grip", head = "Buremte Hat", ear1 = "Crematio Earring", ear2 = "Friomisi Earring",body={name="Artsieq jubbah",augment='MP +30','"Mag. Atk.Bns."+20','INT +7'}, hands = "Otomi Gloves", neck="Eddy Necklace", ring1 = "Weatherspoon ring", ring2 = "Sangoma Ring", back = "Ogapepo Cape +1", waist = "Sekhmet Corset", range ="Aureole", legs = "Mes'yohi Slacks", feet = "Umbani boots"}
  71.  
  72.     sets['HasteCast'] ={main = "Capricorn Staff",sub = "Vivid Strap", ammo = "Hasty pinion +1", head = "Nahtirah Hat", neck = "Orunmila's Torque", ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body = "Marduk's jubbah +1", hands = "Gendewitha gages +1", ring1 = "Prolix Ring", ring2 = "Weatherspoon Ring", back = "Swith Cape +1", waist = "Ninurta's sash", legs = "Artsieq hose", feet = "Regal pumps +1"}
  73.  
  74.     sets['StunSet'] = {main = "Twebuliij",sub = "Vivid Stra", range = "Aureole", head = "Nahtirah Hat", neck = "Orunmila's Torque",ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body = "Artsieq jubbah", hands = "Lurid Mitts", rring1 = "Weatherspoon ring", ring2 = "Sangoma Ring", back="Ogapepo Cape +1", waist = "Witful Belt", legs = "Artsieq hose", feet = "Bokwus boots"}
  75.  
  76.     sets['Enfeeb2'] = {main = "Twebuliij",sub = "Mephitis Grip", head = "Artsieq Hat", ear1 = "Psystorm Earring",  ear2 = "Lifestorm Earring", body={name="Artsieq jubbah",augment='MP+30','Mag. Acc.+20','MND+7'}, hands = "Lurid Mitts", ring1 = "Weatherspoon ring", ring2 = "Sangoma Ring", waist = "Ovate rope", back = "Ogapepo Cape +1", range = "Aureole", neck = "Weike Torque", legs = "Mes'yohi Slacks", feet = "Artsieq boots"}
  77.  
  78.     sets['Cursna'] = {main = "Capricorn Staff",sub = "Vivid Stra", ammo = "Impatiens", head = "Ebers Cap", neck = "Malison medallion", ear2 = "Loquac. Earring", body = "Marduk's jubbah +1", hands = "Gendewitha gages +1", ring1 = "Ephedra Ring", ring2 = "Weatherspoon ring", back = "Mending Cape", waist = "Ninurta's sash", legs = "Theophany pantaloons +1", feet = "Gende. Galoshes"}
  79.  
  80.     sets['NaSpells'] = {main = "Marin Staff",sub = "Thuellaic ecu +1", ammo = "Impatiens", head = "Nahtirah hat", neck = "Orunmila's Torque", ear2 = "Loquac. Earring", ear1="Enchanter earring +1", body = "Dalmatica", hands = "Gendewitha gages +1", ring1 = "Weatherspoon ring", ring2 = "Veneficium ring", back = "Ogapepo cape +1", waist = "Witful Belt", legs = "Ebers Pantaloons", feet = "Regal pumps +1"}
  81.    
  82.     sets['MidNaSpells'] = {main = "Capricorn Staff",sub = "Vivid Stra", ammo = "Hasty pinion +1", head = "Ebers Cap", neck = "Orunmila's Torque", ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body = "Hedera cotehardie", hands = "Gendewitha gages +1", ring1 = "Prolix Ring", ring2 = "Weatherspoon ring",  back="Swith Cape +1", waist = "Ninurta's sash", legs = "Artsieq Hose", feet = "Regal pumps +1"}
  83.  
  84.     sets['Preerase'] = {main = "Vejovis wand",sub = "Thuellaic ecu +1", ammo = "Impatiens", head = "Nahtirah hat", neck = "Orunmila's Torque", ear2 = "Loquac. Earring", ear1="Enchanter earring +1", body = "Dalmatica", hands = "Gendewitha gages +1", ring1 = "Weatherspoon ring", ring2 = "Veneficium ring", back = "Ogapepo cape +1", waist = "Witful Belt", legs = "Ebers Pantaloons", feet = "Regal Pumps +1"}
  85.    
  86.     sets['Precast'] = {main = "Marin Staff",sub = "Vivid Strap", ammo = "Incantor Stone", head = "Nahtirah Hat", neck = "Orunmila's Torque", ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body = "Marduk's jubbah +1", hands = "Gendewitha gages +1", ring1 = "Prolix Ring", ring2 = "Weatherspoon ring", back = "Swith Cape +1", waist = "Witful Belt", legs = "Artsieq Hose",feet = "Regal Pumps +1"}
  87.  
  88.     sets['PreEnhance'] = {main = "Marin Staff",sub = "Vivid Strap", ammo = "Incantor Stone", head = "Nahtirah Hat", neck = "Orunmila's Torque",ear1="Enchanter earring +1", ear2 = "Loquac. Earring", body="Marduk's jubbah +1", hands = "Gendewitha gages +1", ring1 = "Prolix Ring", ring2 = "Weatherspoon ring", back = "Swith Cape +1", waist = "Siegel Sash",feet ="Regal Pumps +1", legs = "Artsieq Hose"}
  89.  
  90.     sets['Enhance'] = set_combine(sets['Standard'], {ammo= "Hasty pinion +1", main = "Beneficus",sub = "Thuellaic ecu +1", head = "Befouled crown", neck = "Colossus's Torque", ear1 = "Augment. Earring", ear2 = "Andoaa Earring", body = "Anhur Robe", hands = "Dynasty Mitts", Back={name="Mending Cape",augment='Healing magic skill +5'}, waist = "Olympus Sash", legs = "Piety Pantaloons +1", feet = "Ebers Duckbills", ring1 = "Prolix Ring", ring2 = "Weatherspoon ring"})
  91.  
  92.     sets['EnhanceHaste'] = set_combine(sets['HasteCast'], {hands = "Dynasty Mitts"})
  93.  
  94.     sets['BarNQ'] = set_combine(sets['Standard'], {main = "Beneficus",sub = "Thuellaic ecu +1", head = "Befouled crown", neck = "Colossus's Torque", ear1 = "Augment. Earring", ear2 = "Andoaa Earring", body = "Anhur Robe", hands = "Dynasty Mitts",Back={name="Mending Cape",augment='Healing magic skill +5'}, waist = "Olympus Sash", legs = "Piety Pantaloons +1", feet = "Ebers Duckbills",ammo="Incantor Stone"})
  95.    
  96.     sets['Bar'] = set_combine(sets['Standard'], {main = "Beneficus",sub = "Thuellaic ecu +1", head = "Ebers Cap", neck = "Colossus's Torque", ear1 = "Augment. Earring", ear2 = "Andoaa Earring", body = "Ebers Briault", hands = "Ebers Duckbills", Back={name="Mending Cape",augment='Healing magic skill +5'}, waist = "Olympus Sash", legs = "Piety Pantaloons +1", feet = "Ebers Duckbills", ammo="Incantor Stone"})
  97.  
  98.     sets['Stoneskin'] = set_combine(sets['Enhance'],  {ammo = "Mana Ampulla",  ear1 = "Earthcry earring", head = "Befouled crown", ear2 = "Loquac. Earring",  neck = "Stone gorget", hands = "Carapacho Cuffs", ring1 = "Prolix Ring", ring2 = "Weatherspoon Ring", back = "Swith Cape +1", waist = "Siegel Sash", legs = "Shedir Seraweels", feet = "Ebers Duckbills"})
  99.    
  100.     sets['Aquaveil'] = set_combine(sets['Enhance'],  {legs = "Shedir Seraweels",  waist = "Emphatikos rope"})
  101.  
  102.     sets['Benediction'] = {body = "Piety briault +1"}  
  103.    
  104.     sets['TH'] = {waist = "Fucho-no-obi"}  
  105. end
  106.  
  107. function precast(spell,action)
  108.     if midaction() then
  109.         okToCast = false
  110.         if os.time() > nextAllowableCast then
  111.             okToCast = true
  112.             midaction(false)
  113.             failedCount = 0
  114.             windower.add_to_chat(050, 'Time has passed, resetting')
  115.         else
  116.             cancel_spell()
  117.             return
  118.             windower.add_to_chat(050, 'Time not passed, '..nextAllowableCast-os.time()..' seconds remaining')
  119.         end
  120.     else
  121.         okToCast = true
  122.         nextAllowableCast = 0
  123.     end
  124.  
  125.     if okToCast == true then
  126.  
  127.         --[[for i,v in pairs(spell.target) do
  128.             if type(v) == 'table' then
  129.                 for ii,vv in pairs(v) do
  130.                     if type(vv) == 'table' then
  131.                         for iii,vvv in pairs(vv) do
  132.                             windower.add_to_chat(158,i..' is a table, contains: '..ii..' which is a table, contains: '..iii..' '..tostring(vvv))
  133.                         end
  134.                     else
  135.                         windower.add_to_chat(158,i..' is a table, contains: '..ii..tostring(vv))
  136.                     end
  137.                 end
  138.             else
  139.                 windower.add_to_chat(158,i..' '..tostring(v))
  140.             end
  141.         end]]--
  142.         if spell.english == "Teleport-Holla" or spell.english == "Teleport-Dem" or spell.english == "Teleport-Mea" or spell.english == "Teleport-Altep" or spell.english == "Teleport-Yhoat" or spell.english == "Teleport-Vahzl" or spell.english == "Warp" or spell.english == "Escape" or spell.english == "Recall-Jugner" or spell.english == "Recall-Pashh" or spell.english == "Recall-Meriph" then
  143.             equip(sets['PreCast'])
  144.             return
  145.         end
  146.        
  147.  
  148.         if spell.type == 'WeaponSkill' and player.tp > 100 then
  149.             if spell.target.distance > 10 then
  150.                 cancel_spell()
  151.             end
  152.  
  153.             if spell.english== 'Shattersoul' then
  154.                 equip(sets['Shattersoul'])
  155.             elseif spell.english== 'Realmrazer' then
  156.                 equip(sets['Realmrazer'])
  157.             elseif spell.english== 'Hexa Strike' then
  158.                 equip(sets['HexaStrike'])
  159.             end
  160.  
  161.             windower.add_to_chat(050, '['..spell.name..'] '..spell.target.name..' <'..player.tp..'>')
  162.         end
  163.     if world.day_element == 'Light' or world.weather_element == 'Light' or buffactive['Aurorastorm'] then
  164.             cureSet = "CureObi"
  165.         else
  166.             cureSet = "Cure"
  167.         end
  168.    
  169.  
  170.         if spell.type == 'JobAbility' then
  171.             if spell.english== 'Benediction' then
  172.                 equip(sets['Benediction'])
  173.                 windower.add_to_chat(209,"Benediction Set On")
  174.             elseif spell.english == 'Divine Caress' then
  175.                 equip(sets['DivineCaressSet'])
  176.             end
  177.         elseif spell.type == 'WhiteMagic' or spell.type == 'BlackMagic' then
  178.             if spell.english:find('Cure') or spell.english:find('Cura') then
  179.            
  180.                 equip(sets['PreCure'])
  181.             elseif spell.english== 'Cursna' then       
  182.                 equip(sets['Cursna'])
  183.                 windower.add_to_chat(209,"Cursna Set On")
  184.             elseif spell.english == 'Poisona' or spell.english == 'Paralyna' or spell.english == 'Blindna' or spell.english == 'Silena' or spell.english == 'Stona' or spell.english == 'Viruna' or spell.english == 'Cursna' or spell.english == 'Esuna' then
  185.                 equip(sets['NaSpells'])
  186.             elseif spell.english == 'Erase' then
  187.                 equip(sets['Preerase'])
  188.                 elseif spell.english == 'Sacrifice' then
  189.                 equip(sets['Preerase'])
  190.             elseif spell.english == 'Barfira' or spell.english == 'Barblizzara' or spell.english == 'Baraera' or spell.english == 'Barstonra' or spell.english == 'Barthundra' or spell.english == 'Barwatera' or spell.english == 'Baramnesia' or spell.english == 'Baramnesra' or spell.english == 'Barsleepra' or spell.english == 'Barpoisonra' or spell.english == 'Barparalyzra' or spell.english == 'Barblindra' or spell.english == 'Barsilencera' or spell.english == 'Barpetra' or spell.english == 'Barvira' then
  191.                 equip(sets['Bar'])     
  192.             elseif spell.english:find('Regen') then
  193.                 equip(sets['PreEnhace'])       
  194.             elseif spell.english == 'Stoneskin' then
  195.                 equip(sets['PreEnhance'])
  196.                 elseif spell.english == 'Haste' then
  197.             equip(sets['PreEnhace'])
  198.             elseif spell.english:find('Banish') or spell.english == 'Holy' or spell.english == 'Holy II' then
  199.                 equip(sets['PreCast'])
  200.             elseif spell.english == 'Arise' or spell.english == 'Raise' or spell.english == 'Raise II' or spell.english == 'Raise III' or spell.english == 'Warp II' then
  201.                 equip(sets['PreCast'])
  202.             elseif player.sub_job == "DNC" and spell.english == 'Sneak' then
  203.                 cancel_spell()
  204.                 send_command('input /ja "Spectral Jig" <me>;')
  205.             elseif spell.skill== 'Enhancing Magic' then
  206.                 equip(sets['PreEnhance'])
  207.             elseif spell.skill== 'Enfeebling Magic' then
  208.                 equip(sets['Standard'])
  209.             else
  210.                 equip(sets['PreCast'])
  211.             end
  212.         elseif spell.english == "Spectral Jig" then
  213.             send_command('cancel 71;')
  214.         end
  215.  
  216.        
  217.  
  218.         currentCast = spell.english
  219.         if spell.cast_time == nil then
  220.             nextAllowableCast = os.time()
  221.         else
  222.             nextAllowableCast = os.time() + (spell.cast_time/4)
  223.         end
  224.     end
  225. end
  226.  
  227. function midcast(spell,action)
  228.     if spell.type == 'WhiteMagic' or spell.type == 'BlackMagic' then
  229.         if spell.english:find('Cure') then
  230.  
  231.             equip(sets[cureSet])
  232.         elseif spell.english:find('Cura') then
  233.              equip(sets[curagaset])          
  234.         elseif spell.english== 'Cursna' then       
  235.             equip(sets['Cursna'])
  236.         elseif spell.english == 'Poisona' or spell.english == 'Paralyna' or spell.english == 'Blindna' or spell.english == 'Silena' or spell.english == 'Stona' or spell.english == 'Viruna' or spell.english == 'Cursna' or spell.english == 'Esuna' then
  237.             equip(sets['MidNaSpells'])
  238.         elseif spell.english == 'Erase' then
  239.             equip(sets['MidNaSpells'])
  240.         elseif spell.english == 'Barfira' or spell.english == 'Barblizzara' or spell.english == 'Baraera' or spell.english == 'Barstonra' or spell.english == 'Barthundra' or spell.english == 'Barwatera' or spell.english == 'Baramnesia' or spell.english == 'Baramnesra' or spell.english == 'Barsleepra' or spell.english == 'Barpoisonra' or spell.english == 'Barparalyzra' or spell.english == 'Barblindra' or spell.english == 'Barsilencera' or spell.english == 'Barpetra' or spell.english == 'Barvira' then
  241.  if buffactive['Light Arts'] then
  242.     equip(sets['Bar'])
  243.  else
  244.    equip(sets['BarNQ'])
  245.  end
  246.        
  247.         elseif spell.english:find('Regen') then
  248.             equip(sets['Regen'])       
  249.         elseif spell.english == 'Stoneskin' then
  250.             equip(sets['Stoneskin'])
  251.             elseif spell.english == 'Repose' then
  252.             equip(sets['Divine'])
  253.         elseif spell.english:find('Banish') or spell.english == 'Holy' or spell.english == 'Holy II' then
  254.             equip(sets['Holy'])
  255.         elseif spell.english == 'Haste' then
  256.             equip(sets['EnhanceHaste'])
  257.         elseif spell.english == 'Arise' or spell.english == 'Raise' or spell.english == 'Raise II' or spell.english == 'Raise III' or spell.english == 'Warp II' then
  258.             equip(sets['HasteCast'])
  259.         elseif spell.english == 'Stun' then
  260.             equip(sets['StunSet'])
  261.         elseif spell.skill== 'Enhancing Magic' then
  262.             equip(sets['Enhance'])
  263.             elseif spell.english == 'Aquaveil' then
  264.             equip(sets['Aquaveil'])
  265.             elseif spell.skill== 'Elemental Magic' then
  266.             equip(sets['MAB'])
  267.                 elseif spell.skill== 'Enfeebling Magic' then
  268.                 equip(sets['Enfeeb2'])
  269.         else
  270.             equip(sets['HasteCast'])
  271.         end
  272.     end
  273.  
  274.    
  275. end
  276.  
  277. function aftercast(spell,action)
  278.     blocked = false
  279.     failedCount = 0
  280.         --[[for i,v in pairs(spell.target) do
  281.             if type(v) == 'table' then
  282.                 for ii,vv in pairs(v) do
  283.                     if type(vv) == 'table' then
  284.                         for iii,vvv in pairs(vv) do
  285.                             windower.add_to_chat(158,i..' is a table, contains: '..ii..' which is a table, contains: '..iii..' '..tostring(vvv))
  286.                         end
  287.                     else
  288.                         windower.add_to_chat(158,i..' is a table, contains: '..ii..tostring(vv))
  289.                     end
  290.                 end
  291.             else
  292.                 windower.add_to_chat(158,i..' '..tostring(v))
  293.             end
  294.         end]]--
  295.     if spell.english == currentCast and spell.action_type == 'Interruption' then
  296.         nextAllowableCast = 0
  297.         currentCast= ''
  298.         okToCast = true
  299.     end
  300.  
  301.     neka_whm_idle()
  302. end
  303.  
  304. function filtered_action(spell,action)
  305.     windower.add_to_chat(209,player.sub_job)
  306.     if player.sub_job == "DNC" and spell.english == 'Sneak' then
  307.         cancel_spell()
  308.         send_command('input /ja "Spectral Jig" <me>;')
  309.     end
  310. end
  311.  
  312. function status_change(new,old)
  313.     if buff == 'terror' or buff == 'sleep' or buff == 'stunned' or buff == 'petrification' or buff == 'KO' or buff == 'silence' or buff == 'silence' or buff == 'mute' then
  314.         blocked = false
  315.         midaction(false)
  316.         failedCount = 0
  317.     end
  318.     neka_whm_idle()
  319. end
  320.  
  321. function buff_change(buff,gain_or_loss)
  322. end
  323.  
  324. function neka_whm_idle()
  325.  
  326.          
  327.     if player.status == 'Engaged' then
  328.         equip(sets[meleeSet])
  329.     elseif player.status == 'Resting' then
  330.         equip(sets['Resting'])
  331.         elseif player.mp < limitemp then
  332.             -- windower.add_to_chat(209,"Usando refresh belt, TH Off")
  333.          equip(sets['Idle'],sets['TH'])
  334.        
  335.     else
  336.         equip(sets[idleSet])
  337.        
  338.     end
  339.     if world.area == 'Nyzul Isle' or world.area == 'Alzadaal Undersea Ruins' or world.area == 'Zhayolm Remnants' or world.area == 'Arrapago Remnants' or world.area == 'Bhaflau Remnants' or world.area == 'Silver Sea Remnants' then
  340.         equip({ring2 = "Balrahn's Ring"})
  341.     end
  342.  
  343. end
  344.            
  345.  
  346.  
  347. function self_command(command)
  348. if command == 'c7' then -- PDT Toggle --
  349.              
  350.                        equip(sets['PDT'])
  351.                         add_to_chat(158,'PDT Set: [on]')
  352.                         end
  353.                         if command == 'c6' then -- PDT Toggle --
  354.              
  355.                        equip(sets['MDT'])
  356.                         add_to_chat(158,'MDT Set: [on]')
  357.                 end
  358.                
  359.                
  360.                 if command == 'c8' then -- PDT Toggle --
  361.              
  362.                        equip(sets['PDTgait'])
  363.                         add_to_chat(158,'PDTgait Set: [on]')
  364.                        
  365.                                  
  366.                 end
  367.  
  368.    
  369.         if command == 'c7' then -- PDT Toggle --
  370.              
  371.                        equip(sets['PDT'])
  372.                         add_to_chat(158,'PDT Set: [Locked]')
  373.                 end
  374.        
  375.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement