Guest User

fixxxxxxxed_Geo

a guest
Jul 12th, 2014
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.63 KB | None | 0 0
  1. function get_sets()
  2.     IdleIndex = 1
  3.     IdleArray = {"Refresh","Pet","PDT.Pet"} -- Default Idle Set Is Movement --
  4.     Armor = 'None'
  5.     define_geomancy_values()
  6.     Obi = 'ON' -- Turn Default Obi ON or OFF Here --
  7.     target_distance = 5 -- Set Default Distance Here --
  8.  
  9.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  10.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  11.     sc_map = {SC1 = "GeoTorpor", SC2 = "GeoLanguor", SC3 = "IndiFocus"} -- 3 Additional Binds. Can Change Whatever JA/WS/Spells You Like Here. Remember Not To Use Spaces. --
  12.  
  13.     Non_Obi_Spells = S{
  14.             'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  15.             'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  16.  
  17.     Cities = S{
  18.             "Ru'lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  19.             "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  20.             "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  21.             "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  22.             "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  23.             "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
  24.  
  25.     -- Idle Sets --
  26.     sets.Idle = {} 
  27.     sets.Idle.Refresh = {
  28.             main="Bolelabunga",
  29.             sub="Genbu's Shield",
  30.             range="Dunna",
  31.             head="Bagua Galero +1",
  32.             neck="Wiglen Gorget",
  33.             ear1="Ethereal Earring",
  34.             ear2="Merman's Earring",
  35.             body="Geomancy Tunic +1",
  36.             hands="Geomancy mitaines +1",
  37.             ring1="Dark Ring",
  38.             ring2="Dark Ring",
  39.             back="Shadow Mantle",
  40.             waist="Fucho-no-obi",
  41.             legs="Nares Trews",
  42.             feet="Bagua Sandals +1",
  43.             ammo=empty}
  44.            
  45.     sets.Resting = set_combine(sets.Idle.Refresh,{})
  46.    
  47.         -- .Pet sets are for when Luopan is present. --
  48.        
  49. sets.Idle.Pet = {main="Earth Staff",sub="Oneiros Grip",range="Dunna",ammo=empty,
  50. head="Nahtirah Hat",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Sanare Earring",
  51. body="Artsieq Jubbah",hands="Geomancy Mitaines",ring1="Dark Ring",ring2="Dark Ring",
  52. back="Cheviot Cape",waist="Slipor Sash",legs="Nares Trews",feet="Bagua Sandals"}
  53.  
  54.     -- PDT Set --
  55.     sets.PDT = {
  56.             main="Earth Staff",
  57.             sub="Oneiros Grip",
  58.             head="Nahtirah Hat",
  59.             neck="Twilight Torque",
  60.             body="Artsieq Jubbah",
  61.             hands="Geomancy Mitaines",
  62.             ring1="Dark Ring",
  63.             ring2="Dark Ring",
  64.             back="Cheviot Cape",
  65.             ear1="Ethereal Earring",
  66.             ear2="Sanare Earring",
  67.             waist="Slipor Sash",
  68.             legs="Hagondes Pants",
  69.             feet="Hagondes Sabots",
  70.             range="Dunna",
  71.             ammo=empty}
  72.            
  73. sets.PDT.Pet = {main="Earth Staff",sub="Oneiros Grip",range="Dunna",ammo=empty,
  74. head="Nahtirah Hat",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Sanare Earring",
  75. body="Hagondes Coat",hands="Geomancy Mitaines",ring1="Dark Ring",ring2="Dark Ring",
  76. back="Cheviot Cape",waist="Slipor Sash",legs="Nares Trews",feet="Bagua Sandals"}
  77.  
  78.     sets.Sublimation = {
  79.             main="Bolelabunga",
  80.             sub="Genbu's Shield",
  81.             ammo="Oreiad's Tathlum",
  82.             head="Wivre Hairpin",
  83.             neck="Dualism Collar",
  84.             ear1="Bloodgem Earring",
  85.             ear2="Loquac. Earring",
  86.             body="Geomancy Tunic",
  87.             hands="Serpentes Cuffs",
  88.             ring1="K'ayres Ring",
  89.             ring2="Meridian Ring",
  90.             back="Gigant Mantle",
  91.             waist="Forest Sash",
  92.             legs="Nares Trews",
  93.             feet="Hagondes Sabots"}
  94.  
  95.     sets.Precast = {}
  96.     -- FastCast Sets --
  97.     sets.Precast.FastCast = {
  98.             ammo="Impatiens",
  99.             head="Nahtirah Hat",
  100.             neck="Orunmila's Torque",
  101.             ear2="Loquac. Earring",
  102.             body="Anhur Robe",
  103.             hands="Repartie Gloves",
  104.             ring1="Prolix Ring",
  105.             ring2="Veneficium Ring",
  106.             back="Lifestream Cape",
  107.             waist="Witful Belt";
  108.             legs="Geomancy Pants +1",
  109.             feet="Chelona Boots"}
  110.  
  111.     -- Geomancy Precast
  112.     sets.Precast.GeoCast = set_combine(sets.Precast.FastCast,{range="Dunna",body="Bagua Tunic +1",hands="Geomancy Mitaines +1",back="Lifestream Cape",ear1="Gifted Earring",feet="Umbani Boots"})
  113.    
  114.     sets.Precast.IndiCast = set_combine(sets.Precast.GeoCast,{legs="Bagua Pants +1"})
  115.    
  116.     -- Elemental Staves --
  117.     sets.Precast.Thunder = {main='Lehbrailg +2'}
  118.     sets.Precast.Water = {main='Lehbrailg +2'}
  119.     sets.Precast.Fire = {main='Lehbrailg +2'}
  120.     sets.Precast.Ice = {main='Ngqoqwanb'}
  121.     sets.Precast.Wind = {main='Lehbrailg +2'}
  122.     sets.Precast.Earth = {main='Lehbrailg +2'}
  123.     sets.Precast.Light = {main='Lehbrailg +2'}
  124.     sets.Precast.Dark = {main='Lehbrailg +2'}
  125.  
  126.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash",head="Umuthi Hat"})
  127.  
  128.     -- Precast Cure Set --
  129.     sets.Precast.Cure = {
  130.             main="Tamaxchi",
  131.             sub="Genbu's Shield",
  132.             head="Nahtirah Hat",
  133.             neck="Orunmila's Torque",
  134.             ear2="Loquac. Earring",
  135.             body="Heka's Kalasiris",
  136.             hands="Repartie Gloves",
  137.             ring1="Prolix Ring",
  138.             ring2="Veneficium Ring",
  139.             back="Pahtli Cape",
  140.             waist="Witful Belt";
  141.             legs="Geomancy Pants",
  142.             feet="Chelona Boots"}
  143.  
  144.     -- Midcast Base Set --
  145.     sets.Midcast = {range="Dunna",ammo=empty,body="Bagua Tunic +1",hands="Geomancy Mitaines +1",back="Lifestream Cape",ear1="Gifted Earring",feet="Umbani Boots"}
  146.  
  147.     -- Cure Set --
  148.     sets.Midcast.Cure = {
  149.             main="Tamaxchi",
  150.             sub="Genbu's Shield",
  151.             ammo="Oreiad's Tathlum",
  152.             head="Nahtirah Hat",
  153.             neck="Phalaina Locket",
  154.             ear1="Lifestorm Earring",
  155.             ear2="Beatific Earring",
  156.             body="Heka's Kalasiris",
  157.             hands="Bokwus Gloves",
  158.             ring1="Aqualsoul Ring",
  159.             ring2="Haoma's Ring",
  160.             back="Pahtli Cape",
  161.             waist="Cascade Belt",
  162.             legs="Nares Trews",
  163.             feet="Hagondes Sabots"}
  164.  
  165.     -- Curaga Set --
  166.     sets.Midcast.Curaga = {
  167.             main="Tamaxchi",
  168.             sub="Genbu's Shield",
  169.             ammo="Oreiad's Tathlum",
  170.             head="Nahtirah Hat",
  171.             neck="Phalaina Locket",
  172.             ear1="Lifestorm Earring",
  173.             ear2="Loquac. Earring",
  174.             body="Heka's Kalasiris",
  175.             hands="Bokwus Gloves",
  176.             ring1="Aquasoul Ring",
  177.             ring2="Karka Ring",
  178.             back="Pahtli Cape",
  179.             waist="Cascade Belt",
  180.             legs="Nares Trews",
  181.             feet="Hagondes Sabots"}
  182.  
  183.     -- Haste Set --
  184.     sets.Midcast.Haste = {
  185.             ammo="Impatiens",
  186.             head="Nahtirah Hat",
  187.             neck="Orunmila's Torque",
  188.             ear2="Loquac. Earring",
  189.             body="Anhur Robe",
  190.             hands="Geomancy Mitaines +1",
  191.             ring1="Prolix Ring",
  192.             ring2="Veneficium Ring",
  193.             back="Lifestream Cape",
  194.             waist="Witful Belt",
  195.             legs="Geomancy Pants +1",
  196.             feet="Umbani Boots"}
  197.  
  198.     sets.Midcast['Enhancing Magic'] = {
  199.             main="Kirin's Pole",
  200.             sub="Fulcio Grip",
  201.             head="Umuthi Hat",
  202.             neck="Colossus's Torque",
  203.             body="Anhur Robe",
  204.             hands="Ayao's Gages",
  205.             ring1="Prolix Ring",
  206.             ring2="Veneficium Ring",
  207.             waist="Cascade Belt",
  208.             legs="Portent Pants",
  209.             feet="Umbani Boots"}
  210.  
  211.     sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{
  212.             head="Umuthi Hat",
  213.             waist="Siegel Sash"})
  214.  
  215.     sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{
  216.             head="Nahtirah Hat",
  217.             neck="Colossus's Torque",
  218.             ear2="Beatific Earring",
  219.             body="Anhur Robe",
  220.             hands="Bokwus Gloves",
  221.             ring1="Haoma's Ring",
  222.             ring2="Haoma's Ring",
  223.             back="Altruistic Cape",
  224.             waist="Witful Belt",
  225.             legs="Bokwus Slops",
  226.             feet="Geomancy Sandals"})
  227.  
  228.     sets.Midcast.Stun = {
  229.             main="Lehbrailg +2",
  230.             sub="Mephitis Grip",
  231.             head="Nahtirah Hat",
  232.             neck="Orunmila's Torque",
  233.             ear1="Lifestorm Earring",
  234.             ear2="Psystorm Earring",
  235.             body="Hedera Cotehardie",
  236.             hands="Geomancy Mitaines +1",
  237.             ring1="Balrahn's Ring",
  238.             ring2="Sangoma Ring",
  239.             back="Lifestream Cape",
  240.             waist="Witful Belt",
  241.             legs="Hagondes Pants +1",
  242.             feet="Artsieq boots"}
  243.     sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  244.     sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  245.  
  246.     -- Elemental Sets --
  247.     sets.Midcast['Elemental Magic'] = {
  248.             main="Lehbrailg +2",
  249.             sub="Zuuxowu grip",
  250.             head="Buremte Hat",
  251.             neck="Eddy Necklace",
  252.             ear1="Novio Earring",
  253.             ear2="Friomisi Earring",
  254.             body="Hagondes Coat +1",
  255.             hands="Yaoyotl Gloves",
  256.             ring1="Sangoma Ring",
  257.             ring2="Omega Ring",
  258.             back="Toro Cape",
  259.             waist="Sekhmet Corset",
  260.             legs="Hagondes Pants +1",
  261.             feet="Umbani Boots"}
  262.            
  263.     sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{})
  264.     sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  265.    
  266.         -- Dark Magic Sets --
  267.     sets.Midcast['Dark Magic'] = set_combine(sets.Midcast['Elemental Magic'],{
  268.             ear1="Psystorm Earring",
  269.             ear2="Lifestorm Earring",
  270.             body="Geomancy Tunic +1",
  271.             head="Buremte Hat",
  272.             hands="Lurid Mitts",
  273.             legs="Mes'yohi slacks",
  274.             back="Refraction Cape",
  275.             ring1="Sangoma Ring"})
  276.            
  277.     sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  278.     sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  279.    
  280.     sets.Midcast.Aspir = set_combine(sets.Midcast['Dark Magic'],{
  281.             ring2="Excelsis Ring",
  282.             head="Bagua Galero +1",
  283.             waist="Fucho-no-obi"})
  284.        
  285.     sets.Midcast.Drain = set_combine(sets.Midcast.Aspir)
  286.  
  287.  
  288.     -- Enfeebling Sets --
  289.     sets.Midcast['Enfeebling Magic'] = set_combine(sets.Midcast['Elemental Magic'],{
  290.             head="Nahtirah Hat",
  291.             neck="Imbodla Necklace",
  292.             ear1="Lifestorm Earring",
  293.             ear2="Psystorm Earring",
  294.             waist="Aswang sash",
  295.             hands="Lurid mitts",
  296.             legs="Mes'yohi slacks",
  297.             ring1="Sangoma Ring",
  298.             ring2="Perception Ring",
  299.             feet="Bagua Sandals +1"})
  300.     sets.Midcast['Enfeebling Magic'].MidACC =  set_combine(sets.Midcast['Enfeebling Magic'],{})
  301.     sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  302.  
  303.     sets.Midcast.Impact = {
  304.             main="Lehbrailg +2",
  305.             sub="Mephitis grip",
  306.             neck="Imbodla necklace",
  307.             head="Buremte Hat",
  308.             ear1="Lifestorm Earring",
  309.             ear2="Psystorm Earring",
  310.             body="Twilight Cloak",
  311.             hands="Lurid Mitts",
  312.             ring1="Perception Ring",
  313.             ring2="Sangoma Ring",
  314.             back="Refraction Cape",
  315.             waist="Aswang Sash",
  316.             legs="Mes'yohi slacks",
  317.             feet="Bagua Sandals +1"}
  318.            
  319.     -- Elemental Obi/Twilight Cape --
  320.     sets.Obi = {}
  321.     sets.Obi.Thunder = {back="Twilight Cape",waist='Rairin Obi'}
  322.     sets.Obi.Water = {back="Twilight Cape",waist='Suirin Obi'}
  323.     sets.Obi.Fire = {back="Twilight Cape",waist='Karin Obi'}
  324.     sets.Obi.Ice = {back="Twilight Cape",waist='Hyorin Obi'}
  325.     sets.Obi.Wind = {back="Twilight Cape",waist='Furin Obi'}
  326.     sets.Obi.Earth = {back="Twilight Cape",waist='Dorin Obi'}
  327.     sets.Obi.Light = {back="Twilight Cape",waist='Korin Obi'}
  328.     sets.Obi.Dark = {back="Twilight Cape",waist='Anrin Obi'}
  329.  
  330.     -- JA Sets --
  331.     sets.JA = {}
  332.     sets.JA['Life Cycle'] = {body="Geomancy Tunic +1"}
  333.     sets.JA.Bolster = {body="Bagua Tunic +1"}
  334.     sets.JA['Radial Arcana'] = {feet="Bagua Sandals +1"}
  335.  
  336.     -- Melee Set --
  337.     sets.Melee = set_combine(sets.Midcast.Haste,{})
  338.  
  339.     -- WS Base Set --
  340.     sets.WS = {}
  341.     sets.WS["Hexa Strike"] = {}
  342.     sets.WS.Realmrazer = {}
  343.     sets.WS.Shattersoul = {}
  344.    
  345.     -- Latent Idle Set --
  346.     sets.latent_refresh = {waist="Fucho-no-obi"}
  347. end
  348.  
  349. function pretarget(spell,action)
  350.     if (string.find(spell.type,'Magic') or spell.type == "Ninjutsu" or spell.type == "Geomancy") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  351.         cancel_spell()
  352.         send_command('input /item "Echo Drops" <me>')
  353.     elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  354.         degrade_spell(spell,Cure_Spells)
  355.     elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  356.         degrade_spell(spell,Curaga_Spells)
  357.     elseif string.find(spell.english,'Geo') and pet.isvalid then -- Change Any Geo Spells To Full Circle If You Have A Luopan Active --
  358.         cancel_spell()
  359.         send_command('input /ja "Full Circle" <me>')
  360.     elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  361.         if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  362.             cancel_spell()
  363.             send_command('input /ja Addendum: White <me>')
  364.         elseif spell.english == "Manifestation" then
  365.             cancel_spell()
  366.             send_command('input /ja Accession <me>')
  367.         elseif spell.english == "Alacrity" then
  368.             cancel_spell()
  369.             send_command('input /ja Celerity <me>')
  370.         elseif spell.english == "Parsimony" then
  371.             cancel_spell()
  372.             send_command('input /ja Penury <me>')
  373.         end
  374.     elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  375.         if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  376.             cancel_spell()
  377.             send_command('input /ja Addendum: Black <me>')
  378.         elseif spell.english == "Accession" then
  379.             cancel_spell()
  380.             send_command('input /ja Manifestation <me>')
  381.         elseif spell.english == "Celerity" then
  382.             cancel_spell()
  383.             send_command('input /ja Alacrity <me>')
  384.         elseif spell.english == "Penury" then
  385.             cancel_spell()
  386.             send_command('input /ja Parsimony <me>')
  387.         end
  388.     end
  389. end
  390.  
  391. function precast(spell,action)
  392.     if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  393.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  394.             cancel_spell()
  395.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  396.             return
  397.         else
  398.             if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
  399.                 equip(sets.Precast.Cure)
  400.             elseif spell.english == "Impact" then
  401.                 equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  402.             elseif spell.english == "Dia" then
  403.                 equip(set_combine(sets.Midcast['Enfeebling Magic'],{waist="Tarutaru Sash"}))
  404.             elseif string.find(spell.english,'Utsusemi') then
  405.                 if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  406.                     cancel_spell()
  407.                     add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
  408.                     return
  409.                 else
  410.                     equip(sets.Precast.FastCast)
  411.                 end
  412.             elseif sets.Precast[spell.skill] then
  413.                 equip(sets.Precast[spell.skill])
  414.             else
  415.                 equip(sets.Precast.FastCast)
  416.             end
  417.         end
  418.     elseif spell.type == "WeaponSkill" then
  419.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  420.             cancel_spell()
  421.             add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  422.             return
  423.         elseif sets.WS[spell.english] then
  424.             equip(sets.WS[spell.english])
  425.         end
  426.     elseif spell.type == "JobAbility" then
  427.         if sets.JA[spell.english] then
  428.             equip(sets.JA[spell.english])
  429.         end
  430.     elseif spell.type == "Geomancy" then
  431.         if Cities:contains(world.area) then
  432.             cancel_spell()
  433.             add_to_chat(123,'Unable To Use Geomancy In Town')
  434.             return
  435.         else
  436.             if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Geomancy If You Are Silenced or Out of Range --
  437.                 cancel_spell()
  438.                 add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  439.                 return
  440.             else
  441.                 display_geomancy_info(spell)
  442.                 equip(sets.Precast.GeoCast)
  443.             end
  444.         end
  445.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  446.         cast_delay(0.2)
  447.         send_command('cancel Sneak')
  448.     end
  449.     if sets.Precast[spell.element] then
  450.         equip(sets.Precast[spell.element])
  451.     end
  452.     if StunIndex == 1 then
  453.         equip(sets.Midcast.Stun)
  454.     end
  455. end
  456.  
  457. function midcast(spell,action)
  458.     equipSet = {}
  459.     if spell.type:endswith('Magic') or spell.type == "Geomancy" or spell.type == 'Ninjutsu' then
  460.         equipSet = sets.Midcast
  461.         if string.find(spell.english,'Cure') then
  462.             eequipSet = equipSet.Cure
  463.         elseif string.find(spell.english,'Cura') then
  464.             equipSet = equipSet.Curaga
  465.         elseif string.find(spell.english,'Indi')then
  466.             equipSet = equipSet.Indi
  467.         elseif string.find(spell.english,'Banish') then
  468.             equipSet = set_combine(equipSet.Haste,{ring1="Fenian Ring"})
  469.         elseif spell.english == "Stoneskin" then
  470.             if buffactive.Stoneskin then
  471.                 send_command('@wait 2.8;cancel stoneskin')
  472.             end
  473.             equipSet = equipSet.Stoneskin
  474.         elseif spell.english == "Sneak" then
  475.             if spell.target.name == player.name and buffactive['Sneak'] then
  476.                 send_command('cancel sneak')
  477.             end
  478.             equipSet = equipSet.Haste
  479.         elseif string.find(spell.english,'Utsusemi') then
  480.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  481.                 send_command('@wait 1.7;cancel Copy Image*')
  482.             end
  483.             equipSet = equipSet.Haste
  484.         elseif spell.english == 'Monomi: Ichi' then
  485.             if buffactive['Sneak'] then
  486.                 send_command('@wait 1.7;cancel sneak')
  487.             end
  488.             equipSet = equipSet.Haste
  489.         else
  490.             if equipSet[spell.english] then
  491.                 equipSet = equipSet[spell.english]
  492.             end
  493.             if equipSet[spell.skill] then
  494.                 equipSet = equipSet[spell.skill]
  495.             end
  496.             if equipSet[spell.type] then
  497.                 equipSet = equipSet[spell.type]
  498.             end
  499.             if (spell.skill == 'Elemental Magic' or string.find(spell.english,'Cur') or string.find(spell.english,'Bio') or string.find(spell.english,'Dia')) and not Non_Obi_Spells:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' then -- Use Obi Toggle To Equip Normal Waist Gear --
  500.                 equipSet = set_combine(equipSet,sets.Obi[spell.element])
  501.             end
  502.         end
  503.     elseif equipSet[spell.english] then
  504.         equipSet = equipSet[spell.english]
  505.     end
  506.     equip(equipSet)
  507.     if StunIndex == 1 then
  508.         equip(sets.Midcast.Stun)
  509.     end
  510. end
  511.  
  512. function aftercast(spell,action)
  513.     if not spell.interrupted then
  514.         if spell.english == "Sleep II" then-- Sleep II Countdown --
  515.             send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  516.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  517.             send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  518.         elseif spell.english == "Banish II" then -- Banish II Countdown --
  519.             send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  520.         end
  521.     end
  522.     status_change(player.status)
  523. end
  524.  
  525. function status_change(new,old)
  526.     if Armor == 'PDT' then
  527.         equip(sets.PDT)
  528.     elseif buffactive["Sublimation: Activated"] then
  529.         equip(sets.Sublimation)
  530.     elseif new == 'Engaged' then
  531.         equip(sets.Melee)
  532.     elseif new == 'Idle' then
  533.         equip(sets.Idle[IdleArray[IdleIndex]])
  534.     elseif new == 'Resting' then
  535.         equip(sets.Resting)
  536.     end
  537.     if StunIndex == 1 then
  538.         equip(sets.Midcast.Stun)
  539.     end
  540. end
  541.  
  542. function buff_change(buff,gain)
  543.     buff = string.lower(buff)
  544.     if buff == 'weakness' then -- Weakness Timer --
  545.         if gain then
  546.             send_command('timers create "Weakness" 300 up')
  547.         else
  548.             send_command('timers delete "Weakness"')
  549.         end
  550.     end
  551.     if not midaction() then
  552.         status_change(player.status)
  553.     end
  554. end
  555.  
  556. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  557. function self_command(command)
  558.     if command == 'C1' then -- Stun Toggle --
  559.         if StunIndex == 1 then
  560.             StunIndex = 0
  561.             add_to_chat(123,'Stun Set: [Unlocked]')
  562.         else
  563.             StunIndex = 1
  564.             add_to_chat(158,'Stun Set: [Locked]')
  565.         end
  566.         status_change(player.status)
  567.     elseif command == 'C5' then -- Auto Update Gear Toggle --
  568.         status_change(player.status)
  569.         add_to_chat(158,'Auto Update Gear')
  570.     elseif command == 'C3' then -- Obi Toggle --
  571.         if Obi == 'ON' then
  572.             Obi = 'OFF'
  573.             add_to_chat(123,'Obi: [OFF]')
  574.         else
  575.             Obi = 'ON'
  576.             add_to_chat(158,'Obi: [ON]')
  577.         end
  578.         status_change(player.status)
  579.     elseif command == 'C7' then -- PDT Toggle --
  580.         if Armor == 'PDT' then
  581.             Armor = 'None'
  582.             add_to_chat(123,'PDT Set: [Unlocked]')
  583.         else
  584.             Armor = 'PDT'
  585.             add_to_chat(158,'PDT Set: [Locked]')
  586.         end
  587.         status_change(player.status)
  588.     elseif command == 'C8' then -- Distance Toggle --
  589.         if player.target.distance then
  590.             target_distance = math.floor(player.target.distance*10)/10
  591.             add_to_chat(158,'Distance: '..target_distance)
  592.         else
  593.             add_to_chat(123,'No Target Selected')
  594.         end
  595.     elseif command == 'C6' then -- Idle Toggle --
  596.         IdleIndex = (IdleIndex % #IdleArray) + 1
  597.         add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  598.         status_change(player.status)
  599.     elseif command:match('^SC%d$') then
  600.         send_command('//' .. sc_map[command])
  601.     end
  602. end
  603.  
  604. function actualCost(originalCost)
  605.     if buffactive["Penury"] then
  606.         return originalCost*.5
  607.     elseif buffactive["Light Arts"] then
  608.         return originalCost*.9
  609.     else
  610.         return originalCost
  611.     end
  612. end
  613.  
  614. function degrade_spell(spell,degrade_array)
  615.     spell_index = table.find(degrade_array,spell.name)
  616.     if spell_index > 1 then
  617.         new_spell = degrade_array[spell_index - 1]
  618.         change_spell(new_spell,spell.target.raw)
  619.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  620.     end
  621. end
  622.  
  623. function change_spell(spell_name,target)
  624.     cancel_spell()
  625.     send_command('//'..spell_name..' '..target)
  626. end
  627.  
  628. function customize_idle_set(idleSet)
  629.     if player.mpp < 51 then
  630.         idleSet = set_combine(idleSet, sets.latent_refresh)
  631.     end
  632. return idleSet
  633. end
  634.  
  635. function define_geomancy_values()
  636.     geomancy = {
  637.         Frailty = {bonus="Defense Down"},
  638.         Torpor = {bonus="Evasion Down"},
  639.         Languor = {bonus="Magic Evasion Down"},
  640.         Focus = {bonus="Magic Accuracy"},
  641.         Malaise = {bonus="Magic Defense Down"},
  642.         Precision = {bonus="Accuracy"},
  643.         Refresh = {bonus="Refresh"},
  644.         Fade = {bonus="Magic Attack Down"},
  645.         Wilt = {bonus="Attack Down"},
  646.         Vex = {bonus="Magic Accuracy Down"},
  647.         Slip = {bonus="Accuracy Down"},
  648.         Acumen = {bonus="Magic Attack"},
  649.         Fend = {bonus="Magic Defense"},
  650.         Fury = {bonus="Attack"},
  651.         Attunement = {bonus="Magic Evasion"},
  652.         Voidance = {bonus="Evasion"},
  653.         Barrier = {bonus="Defense"},
  654.         Haste = {bonus="Haste"}
  655.         }
  656. end
  657.  
  658. function display_geomancy_info(spell)
  659.     geoType=nil
  660.     string.gsub(spell.english.."-","-(.-)-",function(geo) geoType=geo end)
  661.     geoInfo = geomancy[geoType]
  662.     if geoInfo then
  663.         add_to_chat(158, spell.english..' = '..tostring(geoInfo.bonus))
  664.     end
  665. end
Advertisement
Add Comment
Please, Sign In to add comment