Trumpy

GEO lua v1

Sep 30th, 2014
357
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 20.67 KB | None | 0 0
  1. function get_sets()
  2. --------  Includes  --------    DONE
  3.     include('AllJobs.lua')
  4.  
  5. --------  Variables  --------   DONE
  6. --  TP_Index = 1
  7. --  Idle_Index = 1
  8. --  Idle_Set_Names = {'Normal','Fishing'}
  9.     Weapon_Index = 1
  10.     Weapon_Set_Names = {"Club","Staff"}
  11.  
  12. --------  Weapon Switch Sets  --------  DONE
  13.     sets.Command = {}
  14.     sets.Command.Club =
  15.         {main="Nehushtan",sub="Genbu's Shield"}
  16.     sets.Command.Staff =
  17.         {main="Eminent Staff",sub="Mephitis Grip"}
  18.  
  19. --------  Idle Sets  --------   DONE
  20.     sets.Idle =
  21.         {range="Dunna",
  22.         head="Geomancy Galero",neck="Twilight Torque",
  23.         lear="Moonshade Earring",rear="Novio Earring",
  24.         body="Geomancy Tunic",hands="Bagua Mitaines",
  25.         lring="Dark Ring",rring="Dark Ring",
  26.         back="Repulse Mantle",waist="Oneiros Sash",
  27.         legs="Nares Trews",feet="Geomancy Sandals"}
  28.     sets.Idle.Club = set_combine(sets.Idle,
  29.         {main="Nehushtan",sub="Genbu's Shield"})
  30.     sets.Idle.Staff = set_combine(sets.Idle,
  31.         {main="Eminent Staff",sub="Mephitis Grip"})
  32.  
  33.     sets.IdleLuopan = set_combine(sets.Idle,
  34.         {range="Dunna",
  35.         hands="Geomancy Mitaines",
  36.         feet="Bagua Sandals"})
  37.     sets.IdleLuopan.Club = set_combine(sets.IdleLuopan,
  38.         {main="Nehushtan",sub="Genbu's Shield"})
  39.     sets.IdleLuopan.Staff = set_combine(sets.IdleLuopan,
  40.         {main="Eminent Staff",sub="Mephitis Grip"})
  41.  
  42.     sets.Idle.Fishing = set_combine(sets.Idle.Normal,
  43.         {range="Ebisu Fishing Rod",ammo="empty",
  44.         neck="Fisher's Torque",
  45.         body="Fisherman's Smock",hands="Fisherman's Gloves",
  46.         lring="Puffin Ring",rring="Noddy Ring",
  47.         waist="Fisher's Rope",
  48.         legs="Fisherman's Hose",feet="Waders"})
  49. --  sets.Idle.Crafting = set_combine(sets.Idle.Normal,
  50. --      {lring="Craftkeeper's Ring",rring="Artificer's Ring",
  51. --      back="Shaper's Shawl"})
  52. --  sets.Idle.HELM = set_combine(sets.Idle.Normal,
  53. --      {neck="Field Torque",
  54. --      body="Trench Tunic",hands="Treefeller Gloves",
  55. --      waist="Field Rope",legs="Dredger Hose",feet="Agrarian Boots"})
  56.  
  57. --------  Resting Sets  --------    DONE                -- Change Club to ilvl 119 Delve Club From Yorcia Weald When Obtained. --
  58.     sets.Rest =
  59.         {lear="Moonshade Earring",
  60.         body="Geomancy Tunic",hands="Bagua Mitaines",
  61.         legs="Nares Trews",feet="Chelona Boots"}
  62.     sets.Rest.Club = set_combine(sets.Rest,
  63.         {main="Nehushtan",sub="Genbu's Shield"})
  64.     sets.Rest.Staff = set_combine(sets.Rest,
  65.         {main="Chatoyant Staff"})
  66.  
  67.     sets.RestLuopan = set_combine(sets.Rest,
  68.         {range="Dunna",
  69.         hands="Geomancy Mitaines",
  70.         feet="Bagua Sandals"})
  71.     sets.RestLuopan.Club = set_combine(sets.RestLuopan, {})
  72.     sets.RestLuopan.Staff = set_combine(sets.RestLuopan,
  73.         {main="Chatoyant Staff"})
  74.  
  75. --------  Melee Sets  --------  DONE                    -- Remove Skillup Gear When Capped Club/Staff (Delete sets.TP and remove the word .Real) --
  76.     sets.TP =
  77.         {head="Temachtiani Headband",neck="Asperity Necklace",
  78.         lear="Steelflash Earring",rear="Bladeborn Earring",
  79.         body="Geomancy Tunic",hands="Bagua Mitaines",
  80.         lring="Dark Ring",rring="Rajas Ring",
  81.         back="Repulse Mantle",waist="Witful Belt",
  82.         legs="Temachtiani Pants",feet="Temachtiani Boots"}
  83.     sets.TP.Real =
  84.         {head="Geomancy Galero",neck="Asperity Necklace",
  85.         lear="Steelflash Earring",rear="Bladeborn Earring",
  86.         body="Geomancy Tunic",hands="Bagua Mitaines",
  87.         lring="Dark Ring",rring="Rajas Ring",
  88.         back="Repulse Mantle",waist="Witful Belt",
  89.         legs="Bagua Pants",feet="Bagua Sandals"}
  90.     sets.TP.Club = set_combine(sets.TP,
  91.         {main="Nehushtan",sub="Genbu's Shield"})
  92.     sets.TP.Staff = set_combine(sets.TP,
  93.         {main="Eminent Staff",sub="Mephitis Grip"})
  94.  
  95.     sets.TP.Acc = set_combine(sets.TP, {})
  96.  
  97.     sets.TPLuopan = set_combine(sets.TP,
  98.         {range="Dunna",
  99.         hands="Geomancy Mitaines",
  100.         feet="Bagua Sandals"})
  101.     sets.TPLuopan.Club = set_combine(sets.TPLuopan,
  102.         {main="Nehushtan",sub="Genbu's Shield"})
  103.     sets.TPLuopan.Staff = set_combine(sets.TPLuopan,
  104.         {main="Eminent Staff",sub="Mephitis Grip"})
  105.  
  106. --------  Magic Sets  --------  DONE
  107.     sets.MA = {}
  108.  
  109.     ----  Fast Cast  ----   DONE
  110.     sets.FC =                                   -- Add Lifestream Cape When Obtained --
  111.         {rear="Loquacious Earring",
  112.         hands="Repartie Gloves",
  113.         lring="Prolix Ring",
  114.         back="Lifestream Cape",waist="Witful Belt",
  115.         legs="Geomancy Pants",feet="Chelona Boots"}
  116.     sets.FC.Geo = set_combine(sets.FC,
  117.         {range="Dunna"})
  118.     sets.FC.Elem = set_combine(sets.FC,
  119.         {neck="Stoicheion Medal",
  120.         hands="Bagua Mitaines"})
  121.     sets.FC.Impact = set_combine(sets.FC,
  122.         {head="empty",
  123.         body="Twilight Cloak"})
  124.     sets.FC.Stun = set_combine(sets.FC,
  125.         {main="Apamajas I"})
  126.     sets.FC.Enh = set_combine(sets.FC,
  127.         {waist="Siegel Sash"})
  128.     sets.FC.Stoneskin = set_combine(sets.FC.Enh,
  129.         {head="Umuthi Hat",
  130.         hands="Carapacho Cuffs",
  131.         waist="Siegel Sash"})
  132.     sets.FC.Cure = set_combine(sets.FC,
  133.         {back="Pahtli Cape"})
  134.  
  135.     ----  Geomancy Skill  ----      DONE
  136.     sets.Geo =
  137.         {range="Dunna",
  138.         body="Bagua Tunic",hands="Geomancy Mitaines",
  139.         back="Lifestream Cape",
  140.         legs="Bagua Pants"}
  141.     sets.Geo.Club = set_combine(sets.Geo,
  142.         {main="Nehushtan",sub="Genbu's Shield"})
  143.     sets.Geo.Staff = set_combine(sets.Geo,
  144.         {main="Eminent Staff",sub="Mephitis Grip"})
  145.  
  146.     ----  Elemental Skill  ----     DONE            -- Change Elementa Grip to Zuuxowu Grip When Obtained. Diamond Ring to Acumen Ring/Shiva +1 When Obtained. Add to Feet Umbani Boots When Obtained. --
  147.     sets.Elem =                                     -- Add Sets For When Collimated Fervor Is Used Before Castin Elem Magic If Primeval Zeal Is Ever Merited. Relic Head Augs This. --
  148.         {head="Geomancy Galero",neck="Stoicheion Medal",
  149.         lear="Hecate's Earring",rear="Novio Earring",
  150.         body="Bagua Tunic",hands="Yaoyotl Gloves",
  151.         lring="Diamond Ring",rring="Diamond Ring",
  152.         back="Toro Cape",waist="Olympus Sash",
  153.         legs="Hagondes Pants"}
  154.     sets.Elem.Club = set_combine(sets.Elem,
  155.         {main="Nehushtan",sub="Genbu's Shield"})
  156.     sets.Elem.Staff = set_combine(sets.Elem,
  157.         {main="Eminent Staff",sub="Elementa Grip"})
  158.  
  159.     sets.Impact = set_combine(sets.Elem,
  160.         {head="empty",
  161.         body="Twilight Cloak"})
  162.     sets.Impact.Club = set_combine(sets.Impact,
  163.         {main="Nehushtan",sub="Genbu's Shield"})
  164.     sets.Impact.Staff = set_combine(sets.Impact,
  165.         {main="Eminent Staff",sub="Elementa Grip"})
  166.  
  167.     ----  Enfeebling Skill  ----    DONE            -- Change Enfeebling Torque to Imbodla Necklace When Obtained. Remove Skillup Gear When Enfeeb Capped --
  168.     sets.Enfeeb =
  169.         {head="Bagua Galero",neck="Enfeebling Torque",
  170.         lear="Lifestorm Earring",rear="Psystorm Earring",
  171.         body="Temachtiani Shirt",hands="Temachtiani Gloves",
  172.         lring="Aquasoul Ring",rring="Aquasoul Ring",
  173.         back="Lifestream Cape",waist="Casso Sash",
  174.         legs="Hagondes Pants",feet="Bagua Sandals"}
  175.     sets.Enfeeb.Real =
  176.         {head="Bagua Galero",neck="Enfeebling Torque",
  177.         lear="Lifestorm Earring",rear="Psystorm Earring",
  178.         body="Hagondes Coat",hands="Hagondes Cuffs",
  179.         lring="Aquasoul Ring",rring="Aquasoul Ring",
  180.         back="Lifestream Cape",waist="Casso Sash",
  181.         legs="Hagondes Pants",feet="Bagua Sandals"}
  182.     sets.Enfeeb.Club = set_combine(sets.Enfeeb,
  183.         {main="Nehushtan",sub="Genbu's Shield"})
  184.     sets.Enfeeb.Staff = set_combine(sets.Enfeeb,
  185.         {main="Eminent Staff",sub="Mephitis Grip"})
  186.  
  187.     ----  Dark Skill  ----  DONE
  188.     sets.Dark =
  189.         {neck="Dark Torque",
  190.         lear="Lifestorm Earring",rear="Psystorm Earring",
  191.         body="Geomancy Tunic",hands="Yaoyotl Gloves",
  192.         lring="Diamond Ring",rring="Diamond Ring",
  193.         back="Refraction Cape",waist="Casso Sash"}
  194.     sets.Dark.Club = set_combine(sets.Dark,
  195.         {main="Nehushtan",sub="Genbu's Shield"})
  196.     sets.Dark.Staff = set_combine(sets.Dark,
  197.         {main="Eminent Staff",sub="Caecus Grip"})
  198.  
  199.     sets.Stun = set_combine(sets.Dark, {})
  200.     sets.Stun.Club = set_combine(sets.Stun, {})
  201.     sets.Stun.Staff = set_combine(sets.Stun,
  202.         {main="Apamajas II",sub="Caecus Grip"})
  203.  
  204.     sets.DrainAspir = set_combine(sets.Dark,
  205.         {head="Striga Crown",
  206.         lear="Hirudinea Earring",
  207.         hands="Vampiric Mitts",
  208.         lring="Excelsis Ring",
  209.         waist="Fucho-no-Obi",
  210.         feet="Vampiric Boots"})
  211.     sets.DrainAspir.Club = set_combine(sets.DrainAspir, {})
  212.     sets.DrainAspir.Staff = set_combine(sets.DrainAspir,
  213.         {main="Bounty Sickle",sub="Caecus Grip"})
  214.  
  215.     ----  Enhancing Skill  ----     DONE
  216.     sets.Enhance =
  217.         {head="Umuthi Hat",neck="Enhancing Torque",
  218.         back="Merciful Cape",waist="Olympus Sash"}
  219.     sets.Enhance.Stoneskin = set_combine(sets.Enhance,
  220.         {neck="Stone Gorget",
  221.         rear="Earthcry Earring",
  222.         hands="Stone Mufflers",
  223.         waist="Siegel Sash",
  224.         legs="Haven Hose"})
  225.        
  226.     ----  Healing Skill  ----   DONE
  227.     sets.Heal =
  228.         {neck="Nesanica Torque",
  229.         rear="Beatific Earring",
  230.         lring="Ephedra Ring",rring="Ephedra Ring",
  231.         back="Tempered Cape",waist="Bishop's Sash"}
  232.     sets.Heal.Club = set_combine(sets.Heal,
  233.         {main="Tamaxchi",sub="Genbu's Shield"})
  234.     sets.Heal.Staff = set_combine(sets.Heal,
  235.         {main="Arka IV",sub="Curatio Grip"})
  236.  
  237.     sets.Cure = set_combine(sets.Heal,
  238.         {hands="Bokwus Gloves",
  239.         back="Tempered Cape",
  240.         legs="Nares Trews"})
  241.     sets.Cure.Club = set_combine(sets.Cure,
  242.         {main="Tamaxchi",sub="Genbu's Shield"})
  243.     sets.Cure.Staff = set_combine(sets.Cure,
  244.         {main="Arka IV",sub="Curatio Grip"})
  245.        
  246.     sets.Cursna = set_combine(sets.Heal,
  247.         {neck="Malison Medallion",
  248.         lring="Ephedra Ring",rring="Ephedra Ring"})
  249.  
  250. --------  Job Ability Sets  --------   
  251.     sets.JA = {}
  252.     sets.JA.Bolster =
  253.         {body="Bagua Tunic"}
  254.     sets.JA["Mending Halation"] =
  255.         {legs="Bagua Pants"}
  256.     sets.JA["Radial Arcana"] =
  257.         {feet="Bagua Sandals"}
  258.     sets.JA["Full Circle"] =
  259.         {hands="Bagua Mitaines"}
  260.     sets.JA["Life Cycle"] =
  261.         {body="Geomancy Tunic"}
  262.  
  263. --------  Weapon Skill Sets  --------   DONE
  264.     sets.WS = {}
  265.     sets.WS.Realmrazer =
  266.         {head="Hagondes Hat",neck="Light Gorget",
  267.         lear="Steelflash Earring",rear="Bladeborn Earring",
  268.         body="Geomancy Tunic",hands="Bagua Mitaines",
  269.         lring="Aquasoul Ring",rring="Aquasoul Ring",
  270.         back="Refraction Cape",waist="Light Belt",
  271.         legs="Bagua Pants",feet="Bagua Sandals"}
  272.     sets.WS.Shattersoul =
  273.         {head="Hagondes Hat",neck="Soil Gorget",
  274.         lear="Steelflash Earring",rear="Bladeborn Earring",
  275.         body="Geomancy Tunic",hands="Bagua Mitaines",
  276.         lring="Diamond Ring",rring="Diamond Ring",
  277.         back="Refraction Cape",waist="Soil Belt",
  278.         legs="Bagua Pants",feet="Bagua Sandals"}
  279.     sets.WS.STRMND =
  280.         {head="Geomancy Galero",neck="Asperity Necklace",
  281.         lear="Steelflash Earring",rear="Bladeborn Earring",
  282.         body="Geomancy Tunic",hands="Bagua Mitaines",
  283.         lring="Aquasoul Ring",rring="Aquasoul Ring",
  284.         back="Refraction Cape",
  285.         legs="Bagua Pants",feet="Bagua Sandals"}
  286.     sets.WS["Spirit Taker"] =
  287.         {head="Geomancy Galero",neck="Asperity Necklace",
  288.         lear="Steelflash Earring",rear="Bladeborn Earring",
  289.         body="Geomancy Tunic",hands="Bagua Mitaines",
  290.         lring="Diamond Ring",rring="Diamond Ring",
  291.         back="Refraction Cape",
  292.         legs="Bagua Pants",feet="Bagua Sandals"}
  293.     sets.WS.MAB = set_combine(sets.WS.STRMND,                       -- Change Diamond Ring to Acumen Ring/Shiva +1 When Obtained. Add to Feet Umbani Boots When Obtained. --
  294.         {head="Geomancy Galero",neck="Stoicheion Medal",
  295.         lear="Hecate's Earring",rear="Novio Earring",
  296.         body="Bagua Tunic",hands="Yaoyotl Gloves",
  297.         lring="Diamond Ring",rring="Diamond Ring",
  298.         back="Toro Cape",waist="Oneiros Sash",
  299.         legs="Hagondes Pants"})
  300.  
  301. --------  Commands & Variables  --------                            -- Not sure if possible to change macro set based on subjob changing or not --
  302.     send_command('input /macro book 19;wait .1;input /macro set 1')
  303.     send_command('bind ^f9 gs c weapon')
  304.  
  305. end
  306.  
  307. function precast(spell)
  308. --  if midaction() or pet_midaction() then
  309. --      add_to_chat(039,'Cancelling '..spell.name..'!')
  310. --      cancel_spell()
  311. --      return
  312. --  end
  313.     if spell.action_type == 'Magic' then
  314.         equip(sets.FC)
  315.         if spell.skill == 'Geomancy' then
  316.             equip(sets.FC.Geo)
  317.         end
  318.         if spell.skill == 'Elemental Magic' then
  319.             if spell.name == 'Impact' then
  320.                 equip(sets.FC.Impact)
  321.             else
  322.                 equip(sets.FC.Elem)
  323.             end
  324.         end
  325.         if spell.name == 'Stun' then
  326.             equip(sets.FC.Stun)
  327.         end
  328.         if spell.name == 'Stoneskin' then
  329.             equip(sets.FC.Stoneskin)
  330.             if buffactive.stoneskin then
  331.                 windower.ffxi.cancel_buff(37)
  332.             end
  333.         elseif spell.name == 'Sneak' then
  334.             equip(sets.FC.Enh)
  335.             if buffactive.sneak and spell.target.type == 'SELF' then
  336.                 windower.ffxi.cancel_buff(71)
  337.             end
  338.         elseif spell.skill == 'Enhancing Magic' then
  339.             equip(sets.FC.Enh)
  340.         end
  341.         if spell.name:startswith('Cure') then
  342.             equip(sets.FC.Cure)
  343.             refine_cure(spell)
  344.             return
  345.         end
  346.         if spell.name:startswith('Cura') then
  347.             equip(sets.FC.Cure)
  348.         end
  349.     end
  350.     if spell.name:startswith('Curing Waltz') then
  351.         refine_waltz(spell)
  352.         return
  353.     end
  354.     if spell.type == "Step" or spell.type == "Flourish1" then
  355.         equip(sets.TP.Acc)                                                  -- Change to real Accuracy Gear if Ever Obtained. --
  356.     end
  357.     if spell.name == 'Spectral Jig' and buffactive.sneak then
  358.         windower.ffxi.cancel_buff(71)
  359.     end
  360.     if spell.name == 'Light Arts' and buffactive['Addendum: White'] then            -- Code to Use Addendums with 1 macro for light arts and 1 for dark arts (typing //lightarts also works) --
  361.         cancel_spell()
  362.         add_to_chat(122,'Addendum: White Already Activated. Using Light Arts Cancelled!')
  363.         return
  364.     elseif spell.name == 'Light Arts' and buffactive['Light Arts'] then
  365.         cancel_spell()
  366.         send_command('Addendum: White')
  367.         add_to_chat(122,'Addendum: White Activated!')
  368.         return
  369.     elseif spell.name == 'Light Arts' and not buffactive['Light Arts'] then
  370.         add_to_chat(122,'Click Second Time to Trigger Addendum!')
  371.         send_command('@input /recast "Parsimony"')
  372.         return
  373.     end
  374.     if spell.name == 'Dark Arts' and buffactive['Addendum: Black'] then
  375.         cancel_spell()
  376.         add_to_chat(122,'Addendum: Black Activated. Using Dark Arts Cancelled!')
  377.         return
  378.     elseif spell.name == 'Dark Arts' and buffactive['Dark Arts'] then
  379.         cancel_spell()
  380.         send_command('Addendum: Black')
  381.         add_to_chat(122,'Addendum: Black Activated!')
  382.         return
  383.     elseif spell.name == 'Dark Arts' and not buffactive['Dark Arts'] then
  384.         add_to_chat(122,'Click Second Time to Trigger Addendum!')
  385.         send_command('@input /recast "Penury"')
  386.         return
  387.     end
  388. end
  389.  
  390. function midcast(spell)
  391.     if sets.JA[spell.name] then
  392.         equip(sets.JA[spell.name])
  393.     end
  394.     if spell.type == "WeaponSkill" then
  395.         if sets.WS[spell.name] then
  396.             equip(sets.WS[spell.name])
  397.             send_command('@input /echo <tp> % '..spell.name..' @ <t>!')
  398.         elseif spell.name=="Heavy Swing" or spell.name=="Starburst" or spell.name=="Sunburst" or spell.name=="Shell Crusher" or spell.name=="Full Swing" or spell.name=="Retribution"
  399.             or spell.name=="Brainshaker" or spell.name=="Skullbreaker" or spell.name=="True Strike" or spell.name=="Judgment" or spell.name=="Black Halo" then
  400.             equip(sets.WS.STRMND)
  401.             send_command('@input /echo <tp> % '..spell.name..' @ <t>!')
  402.         elseif spell.name=="Rock Crusher" or spell.name=="Earth Crusher" or spell.name=="Cataclysm" or spell.name=="Shining Strike" or spell.name=="Seraph Strike" or spell.name=="Flash Nova" or spell.name=="Vidohunir" then
  403.             equip(sets.WS.MAB)
  404.             send_command('@input /echo <tp> % '..spell.name..' @ <t>!')
  405.         end
  406.     end
  407.     if spell.type == 'Scholar' then
  408.         send_command('@input /recast "'..spell.name..'"')
  409.     end
  410.     if spell.name == 'Sublimation' then
  411.         send_command('@wait 30;input /echo =======*****======= '..spell.name..' is Ready! =======*****=======')
  412.     end
  413.     if spell.skill == 'Geomancy' then
  414.         equip(sets.Geo[Weapon_Set_Names[Weapon_Index]])
  415.     end
  416.     if spell.skill == 'Elemental Magic' then
  417.         if spell.name == 'Impact' then
  418.             equip(sets.Impact[Weapon_Set_Names[Weapon_Index]])
  419.         else
  420.             equip(sets.Elem[Weapon_Set_Names[Weapon_Index]])
  421.         end
  422.     end
  423.     if spell.skill == 'Enfeebling Magic' then
  424.         equip(sets.Enfeeb[Weapon_Set_Names[Weapon_Index]])
  425.         if spell.name == 'Sleep II' or spell.name == 'Sleepga II' or spell.name == 'Repose' then
  426.             send_command('@wait 45;input /echo '..spell.name..' Wearing off in 45 seconds!;wait 30;input /echo '..spell.name..' Wearing off in 15 seconds!;wait 10;input /echo '..spell.name..' Wearing off in 5 seconds!')
  427.         end
  428.         if spell.name == 'Sleep' or spell.name == 'Sleepga' then
  429.             send_command('@wait 30;input /echo '..spell.name..' Wearing off in 30 seconds!;wait 15;input /echo '..spell.name..' Wearing off in 15 seconds!;wait 10;input /echo '..spell.name..' Wearing off in 5 seconds!')
  430.         end
  431.     end
  432.     if spell.skill == 'Dark Magic' then
  433.         if spell.name == 'Stun' then
  434.             equip(sets.Stun[Weapon_Set_Names[Weapon_Index]])
  435.         elseif spell.name == 'Drain' or spell.name == 'Aspir' or spell.name == 'Aspir II' then
  436.             equip(sets.DrainAspir[Weapon_Set_Names[Weapon_Index]])
  437.         else
  438.             equip(sets.Dark[Weapon_Set_Names[Weapon_Index]])
  439.         end
  440.     end
  441.     if spell.skill == 'Enhancing Magic' then                    -- After Fastcast gear set to idle so equipment isnt accidently changed on Zoning for Teleports and Warp. --
  442.         if spell.name == 'Stoneskin' then
  443.             equip(sets.Enhance.Stoneskin)
  444.         elseif spell.name:startswith('Teleport') or spell.name:startswith('Warp') or spell.name == 'Escape' then
  445.             equip(sets.Idle[Weapon_Set_Names[Weapon_Index]])
  446.         else
  447.             equip(sets.Enhance)
  448.         end
  449.     end
  450.     if spell.skill == 'Healing Magic' then
  451.         if spell.name == 'Cursna' then
  452.             equip(sets.Cursna)
  453.         elseif spell.name:endswith('na') then
  454.             equip(sets.Heal[Weapon_Set_Names[Weapon_Index]])
  455.         elseif spell.name:startswith('Cure') or spell.name:startswith('Cura') then
  456.             equip(sets.Cure[Weapon_Set_Names[Weapon_Index]])
  457.         else
  458.             equip(sets.Heal[Weapon_Set_Names[Weapon_Index]])
  459.         end
  460.     end
  461.     if spell.name == 'Monomi: Ichi' and buffactive.sneak then
  462.         send_command('@wait 1.7;cancel 71')
  463.     end
  464.     if spell.name == 'Utsusemi: Ichi' and ( buffactive["Copy Image"] or buffactive["Copy Image (2)"] or buffactive["Copy Image (3)"] ) then
  465.         send_command('@wait 2.5;cancel 66;cancel 444;cancel 445')
  466.     end
  467. end
  468.  
  469. function aftercast(spell)
  470.     if spell.name:startswith('Geo-') then
  471.         if player.status == 'Engaged' then
  472.             equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]])
  473.         else
  474.             equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]])
  475.         end
  476.     else
  477.         if player.status == 'Engaged' then
  478.             if pet.isvalid then
  479.                 equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]])
  480.             else
  481.                 equip(sets.TP[Weapon_Set_Names[Weapon_Index]])
  482.             end
  483.         else
  484.             if pet.isvalid then
  485.                 equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]])
  486.             else
  487.                 equip(sets.Idle[Weapon_Set_Names[Weapon_Index]])
  488.             end
  489.         end
  490.     end
  491. end
  492.  
  493. function status_change(new,old)
  494.     if new == 'Engaged' then
  495.         if pet.isvalid then
  496.             equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]])
  497.         else
  498.             equip(sets.TP[Weapon_Set_Names[Weapon_Index]])
  499.         end
  500.     elseif new == 'Resting' then
  501.         if pet.isvalid then
  502.             equip(sets.RestLuopan[Weapon_Set_Names[Weapon_Index]])
  503.         else
  504.             equip(sets.Rest[Weapon_Set_Names[Weapon_Index]])
  505.         end
  506.     else
  507.         if pet.isvalid then
  508.             equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]])
  509.         else
  510.             equip(sets.Idle[Weapon_Set_Names[Weapon_Index]])
  511.         end
  512.     end
  513. end
  514.  
  515. function buff_change(buff,gain)
  516.     if buff == 'Reraise' and not gain then
  517.         send_command('@input /echo ======== Auto Casting Reraise in 5 Seconds! ========;wait 5;/ma "Reraise" <me>')
  518.     end
  519.     if buff == 'Encumbrance' and not gain then
  520.         if player.status == 'Engaged' then
  521.             if pet.isvalid then
  522.                 equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]])
  523.             else
  524.                 equip(sets.TP[Weapon_Set_Names[Weapon_Index]])
  525.             end
  526.         elseif player.status == 'Resting' then
  527.             if pet.isvalid then
  528.                 equip(sets.RestLuopan[Weapon_Set_Names[Weapon_Index]])
  529.             else
  530.                 equip(sets.Rest[Weapon_Set_Names[Weapon_Index]])
  531.             end
  532.         else
  533.             if pet.isvalid then
  534.                 equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]])
  535.             else
  536.                 equip(sets.Idle[Weapon_Set_Names[Weapon_Index]])
  537.             end
  538.         end
  539.     end
  540. end
  541.  
  542. function indi_change(indi_table,gain)                                   -- Currently wont refresh timer if the same spell is recasted over the same last spell. Could delete the timer up above in precast for indi spells, but would cancel even if interupted! --
  543.     if gain then
  544.         send_command('@timers c Indi-Spell 180 up IndiAura.png')
  545.     else
  546.         send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::')
  547.     end
  548. end
  549.  
  550. function pet_change(pet,gain)
  551.     if not gain then
  552.         send_command('@timers d Geo-Spell;input /echo ::X:: ::X:: Luopan Has Died! Recast If Needed! ::X:: ::X::')
  553.         if player.status == 'Engaged' then
  554.             equip(sets.TP[Weapon_Set_Names[Weapon_Index]])
  555.         elseif player.status == 'Resting' then
  556.             equip(sets.Rest[Weapon_Set_Names[Weapon_Index]])
  557.         else
  558.             equip(sets.Idle[Weapon_Set_Names[Weapon_Index]])
  559.         end
  560.     else
  561.         send_command('@timers c Geo-Spell 180 up GeoAura.png')
  562.     end
  563. end
  564.  
  565. function self_command(command)
  566.     if command == 'weapon' then
  567.         Weapon_Index = Weapon_Index +1
  568.         if Weapon_Index > #Weapon_Set_Names then Weapon_Index = 1 end
  569.         send_command('@input /echo ----- Weapon Changed To '..Weapon_Set_Names[Weapon_Index]..' -----')
  570.         equip(sets.Command[Weapon_Set_Names[Weapon_Index]])
  571.     end
  572. end
Add Comment
Please, Sign In to add comment