Advertisement
Arnan

GEO (mule) Lua October 2017

Oct 4th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.27 KB | None | 0 0
  1. function get_sets()
  2.     AccIndex = 1
  3.     AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For Magic. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
  4.     IdleIndex = 1
  5.     IdleArray = {"Movement","Refresh"} -- Default Idle Set Is Movement --
  6.     Armor = 'None'
  7.     StunIndex = 0
  8.     Lock_Main = 'OFF' -- Set Default Lock Main Weapon ON or OFF Here --
  9.     Obi = 'ON' -- Set Default Obi ON or OFF Here --
  10.     Elemental_Staff = 'ON' -- Set Default Precast Elemental Staff ON or OFF Here --
  11.     LowNuke = 'ON' -- Set Default Low Tier Nuke ON or OFF Here --
  12.     MB = 'OFF' -- Set Default MB ON or OFF Here --
  13.     target_distance = 5 -- Set Default Distance Here --
  14.     define_geomancy_values()
  15.     select_default_macro_book() -- Change Default Macro Book At The End --
  16.  
  17.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  18.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  19.     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. --
  20.  
  21.     -- Add or Remove Low Tier Spells Here --
  22.     Low_Tier_Spells = S{
  23.             'Fire','Aero','Water','Blizzard','Stone','Thunder','Fire II','Aero II','Water II',
  24.             'Blizzard II','Stone II','Thunder II'}
  25.  
  26.     Non_Obi_Spells = S{
  27.             'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  28.             'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  29.  
  30.     Cities = S{
  31.             "Ru'lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  32.             "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  33.             "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  34.             "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  35.             "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  36.             "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham"}
  37.  
  38.     -- Augments --
  39.     MHead={}
  40.     MHead.FC={ name="Merlinic Hood", augments={'Mag. Acc.+25','"Fast Cast"+6','MND+10','"Mag.Atk.Bns."+5',}}
  41.     Solstice={}
  42.     Solstice.MACC={ name="Solstice", augments={'Mag. Acc.+20','Pet: Damage taken -4%','"Fast Cast"+5',}}
  43.     Solstice.MAB={ name="Solstice", augments={'INT+15','"Mag.Atk.Bns."+10','"Refresh"+1',}}
  44.            
  45.     sets.Idle = {
  46.         main="Bolelabunga",
  47.         sub="Genmei Shield",
  48.         range="Dunna",
  49.         head="Befouled Crown",
  50.         neck="Loricate Torque +1",
  51.         ear1="Etiolation Earring",
  52.         ear2="Odnowa Earring +1",
  53.         body="Geomancy Tunic +2",
  54.         hands="Bagua Mitaines +1",
  55.         ring1="Defending Ring",
  56.         ring2="Vocane Ring",
  57.         back="Moonbeam Cape",
  58.         waist="Isa Belt",
  59.         legs="Assid. Pants +1",
  60.         feet="Geo. Sandals +3"}
  61.  
  62.     -- Idle Sets --
  63.     sets.Idle.Refresh = set_combine(sets.Idle,{})
  64.     sets.Idle.Movement =  set_combine(sets.Idle,{})
  65.  
  66.     -- Luopan Set (Automaticly switches from Idle set when a GEO luopan is active) --
  67.     sets.Luopan =  {
  68.         main=Solstice.MACC,
  69.         sub="Genmei Shield",
  70.         range="Dunna",
  71.         head="Telchine Cap",
  72.         neck="Loricate Torque +1",
  73.         ear1="Etiolation Earring",
  74.         ear2="Odnowa Earring +1",
  75.         body="Telchine Chas.",
  76.         hands="Geo. Mitaines +2",
  77.         ring1="Defending Ring",
  78.         ring2="Vocane Ring",
  79.         back="Nantosuelta's Cape",
  80.         waist="Isa Belt",
  81.         legs="Telchine Braconi",
  82.         feet="Telchine Pigaches"}
  83.            
  84.     sets.Resting = set_combine(sets.Idle.Movement,{})
  85.  
  86.     -- PDT Set --
  87.     sets.PDT = {}
  88.  
  89.     -- Sublimation Set --
  90.     sets.Sublimation = {}
  91.  
  92.     sets.Precast = {
  93.         main=Solstice.MACC,
  94.         sub="Genmei Shield",
  95.         head=MHead.FC,
  96.         neck="Loricate Torque +1",
  97.         ear1="Etiolation Earring",
  98.         ear2="Odnowa Earring +1",
  99.         body="Helios Jacket",
  100.         ring1="Defending Ring",
  101.         ring2="Vocane Ring",
  102.         back="Lifestream Cape",
  103.         legs="Geomancy Pants +2"}
  104.    
  105.     -- FastCast Set --
  106.     sets.Precast.FastCast = {
  107.         main=Solstice.MACC,
  108.         sub="Genmei Shield",
  109.         head=MHead.FC,
  110.         neck="Loricate Torque +1",
  111.         ear1="Etiolation Earring",
  112.         ear2="Odnowa Earring +1",
  113.         body="Helios Jacket",
  114.         ring1="Defending Ring",
  115.         ring2="Vocane Ring",
  116.         back="Lifestream Cape",
  117.         legs="Geomancy Pants +2"}
  118.  
  119.     -- Geomancy Precast --
  120.     sets.Precast.GeoCast = {
  121.         main=Solstice.MACC,
  122.         sub="Genmei Shield",
  123.         head=MHead.FC,
  124.         neck="Loricate Torque +1",
  125.         ear1="Etiolation Earring",
  126.         ear2="Odnowa Earring +1",
  127.         body="Helios Jacket",
  128.         ring1="Defending Ring",
  129.         ring2="Vocane Ring",
  130.         back="Lifestream Cape",
  131.         legs="Geomancy Pants +2"}
  132.  
  133.     -- Elemental Staves --
  134.     sets.Precast.Lightning = {}
  135.     sets.Precast.Water = {}
  136.     sets.Precast.Fire = {}
  137.     sets.Precast.Ice = {}
  138.     sets.Precast.Wind = {}
  139.     sets.Precast.Earth = {}
  140.     sets.Precast.Light = {}
  141.     sets.Precast.Dark = {}
  142.  
  143.     -- Precast Enhancing Magic --
  144.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{})
  145.  
  146.     -- Precast Elemental Magic --
  147.     sets.Precast['Elemental Magic'] = set_combine(sets.Precast.FastCast,{hands="Bagua Mitaines +1"})
  148.  
  149.     -- Precast Cure Set --
  150.     sets.Precast.Cure = {}
  151.  
  152.     -- Midcasta Base Set --
  153.     sets.Midcast = {
  154.         main=Solstice.MACC,
  155.         sub="Genmei Shield",
  156.         head=MHead.FC,
  157.         neck="Loricate Torque +1",
  158.         ear1="Etiolation Earring",
  159.         ear2="Odnowa Earring +1",
  160.         body="Helios Jacket",
  161.         ring1="Defending Ring",
  162.         ring2="Vocane Ring",
  163.         back="Lifestream Cape",
  164.         legs="Geomancy Pants +2"}
  165.  
  166.     -- Midcast Geocolure Set --
  167.     sets.Midcast.Geocolure = {
  168.         main=Solstice.MACC,
  169.         sub="Genmei Shield",
  170.         range="Dunna",
  171.         head="Azimuth Hood +1",
  172.         neck="Incanter's Torque",
  173.         ear1="Etiolation Earring",
  174.         ear2="Odnowa Earring +1",
  175.         body="Azimuth Coat +1",
  176.         hands="Geo. Mitaines +2",
  177.         ring1="Defending Ring",
  178.         ring2="Stikini Ring",
  179.         back="Lifestream Cape",
  180.         legs="Azimuth Tights +1",
  181.         feet="Azimuth Gaiters +1"}
  182.  
  183.     -- Midcast Indicolure Set --
  184.     sets.Midcast.Indicolure = set_combine(sets.Midcast.Geocolure,{
  185.         legs="Bagua Pants +1"})
  186.  
  187.     -- Cure Set --
  188.     sets.Midcast.Cure = {
  189.         head="Vanya Hood",
  190.         hands="Bokwus Gloves",
  191.         back="Solemnity Cape"}
  192.  
  193.     -- Curaga Set --
  194.     sets.Midcast.Curaga = {
  195.         head="Vanya Hood",
  196.         hands="Bokwus Gloves",
  197.         back="Solemnity Cape"}
  198.  
  199.     -- Haste Set --
  200.     sets.Midcast.Haste = {
  201.         main=Solstice.MACC,
  202.         sub="Genmei Shield",
  203.         head=MHead.FC,
  204.         neck="Loricate Torque +1",
  205.         ear1="Etiolation Earring",
  206.         ear2="Odnowa Earring +1",
  207.         body="Helios Jacket",
  208.         ring1="Defending Ring",
  209.         ring2="Vocane Ring",
  210.         back="Lifestream Cape",
  211.         legs="Geomancy Pants +2"}
  212.  
  213.     -- Enhancing Set --
  214.     sets.Midcast['Enhancing Magic'] = {
  215.         head="Befouled Crown",
  216.         neck="Incanter's Torque",
  217.         body="Telchine Chas.",
  218.         ring1="Stikini Ring",
  219.         ring2="Stikini Ring"}
  220.  
  221.     -- Stoneskin Set --
  222.     sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{})
  223.  
  224.     -- Cursna Set --
  225.     sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{})
  226.  
  227.     -- Stun Sets --
  228.     sets.Midcast.Stun = {
  229.         main=Solstice.MACC,
  230.         head="Jhakri Coronal",
  231.         neck="Incanter's Torque",
  232.         ear1="Hermetic Earring",
  233.         ear2="",
  234.         body="Geomancy Tunic +2",
  235.         hands="Geo. Mitaines +2",
  236.         ring1="Stikini Ring",
  237.         ring2="Stikini Ring",
  238.         back="Lifestream Cape",
  239.         waist="Othila Sash",
  240.         legs="Geomancy Pants +2",
  241.         feet="Geo. Sandals +3"}
  242.     sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  243.     sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  244.  
  245.     -- Dark Magic Sets --
  246.     sets.Midcast['Dark Magic'] = {
  247.         main=Solstice.MACC,
  248.         head="Jhakri Coronal",
  249.         neck="Incanter's Torque",
  250.         ear1="Hermetic Earring",
  251.         ear2="",
  252.         body="Geomancy Tunic +2",
  253.         hands="Geo. Mitaines +2",
  254.         ring1="Stikini Ring",
  255.         ring2="Stikini Ring",
  256.         back="Lifestream Cape",
  257.         waist="Othila Sash",
  258.         legs="Geomancy Pants +2",
  259.         feet="Geo. Sandals +3"}
  260.     sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  261.     sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  262.  
  263.     -- Aspir Set --
  264.     sets.Midcast.Aspir = {
  265.         main=Solstice.MACC,
  266.         head="Bagua Galero",
  267.         neck="Incanter's Torque",
  268.         ear1="Hermetic Earring",
  269.         ear2="",
  270.         body="Geomancy Tunic +2",
  271.         hands="Geo. Mitaines +2",
  272.         ring1="Stikini Ring",
  273.         ring2="Evanescence Ring",
  274.         back="Lifestream Cape",
  275.         waist="Othila Sash",
  276.         legs="Geomancy Pants +2",
  277.         feet="Geo. Sandals +3"}
  278.  
  279.     -- Drain Set --
  280.     sets.Midcast.Drain = {
  281.         main=Solstice.MACC,
  282.         head="Bagua Galero",
  283.         neck="Incanter's Torque",
  284.         ear1="Hermetic Earring",
  285.         ear2="",
  286.         body="Geomancy Tunic +2",
  287.         hands="Geo. Mitaines +2",
  288.         ring1="Stikini Ring",
  289.         ring2="Evanescence Ring",
  290.         back="Lifestream Cape",
  291.         waist="Othila Sash",
  292.         legs="Geomancy Pants +2",
  293.         feet="Geo. Sandals +3"}
  294.  
  295.     -- Low Tier Set --
  296.     sets.LowNuke = {
  297.         main=Solstice.MAB,
  298.         head="Jhakri Coronal",
  299.         neck="Deviant Necklace",
  300.         ear1="Hermetic Earring",
  301.         ear2="Friomisi Earring",
  302.         body="Jhakri Robe",
  303.         hands="Jhakri Cuffs +1",
  304.         ring1="Acumen Ring",
  305.         ring2="Shiva Ring",
  306.         back="Toro Cape",
  307.         waist="Othila Sash",
  308.         legs="Jhakri Slops",
  309.         feet="Jhakri Pigaches +1"}
  310.  
  311.     -- MB Set --
  312.     sets.MB = {
  313.         neck="Mizu. Kubikazari",
  314.         feet="Jhakri Pigaches +1"}
  315.  
  316.     -- Elemental Sets --
  317.     sets.Midcast['Elemental Magic'] = {
  318.         main=Solstice.MAB,
  319.         head="Jhakri Coronal",
  320.         neck="Deviant Necklace",
  321.         ear1="Hermetic Earring",
  322.         ear2="Friomisi Earring",
  323.         body="Jhakri Robe",
  324.         hands="Jhakri Cuffs +1",
  325.         ring1="Acumen Ring",
  326.         ring2="Shiva Ring",
  327.         back="Toro Cape",
  328.         waist="Othila Sash",
  329.         legs="Jhakri Slops",
  330.         feet="Jhakri Pigaches +1"}
  331.     sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{})
  332.     sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  333.  
  334.     -- Enfeebling Sets --
  335.     sets.Midcast['Enfeebling Magic'] = {
  336.         main=Solstice.MACC,
  337.         head="Jhakri Coronal",
  338.         neck="Incanter's Torque",
  339.         ear1="Hermetic Earring",
  340.         ear2="",
  341.         body="Geomancy Tunic +2",
  342.         hands="Geo. Mitaines +2",
  343.         ring1="Stikini Ring",
  344.         ring2="Stikini Ring",
  345.         back="Lifestream Cape",
  346.         waist="Othila Sash",
  347.         legs="Geomancy Pants +2",
  348.         feet="Geo. Sandals +3"}
  349.     sets.Midcast['Enfeebling Magic'].MidACC =  set_combine(sets.Midcast['Enfeebling Magic'],{})
  350.     sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  351.  
  352.     -- Impact Set --
  353.     sets.Midcast.Impact = {}
  354.  
  355.     -- Elemental Obi/Twilight Cape --
  356.     sets.Obi = {}
  357.     sets.Obi.Lightning = {}
  358.     sets.Obi.Water = {}
  359.     sets.Obi.Fire = {}
  360.     sets.Obi.Ice = {}
  361.     sets.Obi.Wind = {}
  362.     sets.Obi.Earth = {}
  363.     sets.Obi.Light = {}
  364.     sets.Obi.Dark = {}
  365.  
  366.     -- JA Sets --
  367.     sets.JA = {}
  368.     sets.JA['Life Cycle'] = {body="Geomancy Tunic +2",back="Nantosuelta's Cape"}
  369.     sets.JA.Bolster = {body="Bagua Tunic +1"}
  370.     sets.JA['Radial Arcana'] = {feet="Bagua Sandals"}
  371.     sets.JA['Mending Halation'] = {feet="Bagua Pants +1"}
  372.     sets.JA['Full Circle'] = {head="Azimuth Hood +1"}
  373.  
  374.     -- Melee Set --
  375.     sets.Melee = set_combine(sets.Midcast.Haste,{})
  376.  
  377.     -- WS Base Set --
  378.     sets.WS = {}
  379.  
  380.     sets.WS.Exudation = {}
  381.     sets.WS["Hexa Strike"] = {}
  382.     sets.WS.Realmrazer = {}
  383.     sets.WS.Shattersoul = {}
  384.  
  385.     -- Idle Reive Set --
  386.     sets.Reive = {neck="Arciela's Grace +1"}
  387. end
  388.  
  389. function pretarget(spell,action)
  390.     if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  391.         cancel_spell()
  392.         send_command('input /item "Echo Drops" <me>')
  393.     elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
  394.         cancel_spell()
  395.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  396.         return
  397.     elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
  398.         degrade_spell(spell,Cure_Spells)
  399.     elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
  400.         degrade_spell(spell,Curaga_Spells)
  401.     elseif spell.english:startswith('Geo') and pet.isvalid then -- Change Any Geo Spells To Full Circle If You Have A Luopan Active --
  402.         cancel_spell()
  403.         send_command('input /ja "Full Circle" <me>')
  404.     elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  405.         if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  406.             cancel_spell()
  407.             send_command('input /ja Addendum: White <me>')
  408.         elseif spell.english == "Manifestation" then
  409.             cancel_spell()
  410.             send_command('input /ja Accession <me>')
  411.         elseif spell.english == "Alacrity" then
  412.             cancel_spell()
  413.             send_command('input /ja Celerity <me>')
  414.         elseif spell.english == "Parsimony" then
  415.             cancel_spell()
  416.             send_command('input /ja Penury <me>')
  417.         end
  418.     elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  419.         if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  420.             cancel_spell()
  421.             send_command('input /ja Addendum: Black <me>')
  422.         elseif spell.english == "Accession" then
  423.             cancel_spell()
  424.             send_command('input /ja Manifestation <me>')
  425.         elseif spell.english == "Celerity" then
  426.             cancel_spell()
  427.             send_command('input /ja Alacrity <me>')
  428.         elseif spell.english == "Penury" then
  429.             cancel_spell()
  430.             send_command('input /ja Parsimony <me>')
  431.         end
  432.     end
  433. end
  434.  
  435. function precast(spell,action)
  436.     if spell.action_type == 'Magic' then
  437.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  438.             cancel_spell()
  439.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  440.             return
  441.         else
  442.             if spell.type == "Geomancy" then
  443.                 if Cities:contains(world.area) then
  444.                     cancel_spell()
  445.                     add_to_chat(123,'Unable To Use Geomancy In Town')
  446.                     return
  447.                 else
  448.                     display_geomancy_info(spell)
  449.                     equip(sets.Precast.GeoCast)
  450.                 end
  451.             elseif spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  452.                 equip(sets.Precast.Cure)
  453.             elseif spell.english == "Impact" then
  454.                 equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  455.             elseif spell.english == 'Utsusemi: Ni' then
  456.                 if buffactive['Copy Image (3)'] then
  457.                     cancel_spell()
  458.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  459.                     return
  460.                 else
  461.                     equip(sets.Precast.FastCast)
  462.                 end
  463.             elseif sets.Precast[spell.skill] then
  464.                 equip(sets.Precast[spell.skill])
  465.             else
  466.                 equip(sets.Precast.FastCast)
  467.             end
  468.         end
  469.     elseif spell.type == "WeaponSkill" then
  470.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  471.             cancel_spell()
  472.             add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  473.             return
  474.         else
  475.             if sets.WS[spell.english] then
  476.                 equip(sets.WS[spell.english])
  477.             end
  478.         end
  479.     elseif spell.type == "JobAbility" then
  480.         if sets.JA[spell.english] then
  481.             equip(sets.JA[spell.english])
  482.         end
  483.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  484.         cast_delay(0.2)
  485.         send_command('cancel Sneak')
  486.     end
  487.     if sets.Precast[spell.element] and Elemental_Staff == 'ON' then
  488.         equip(sets.Precast[spell.element])
  489.     end
  490.     if StunIndex == 1 then
  491.         equip(sets.Midcast.Stun)
  492.     end
  493. end
  494.  
  495. function midcast(spell,action)
  496.     equipSet = {}
  497.     if spell.action_type == 'Magic' then
  498.         equipSet = sets.Midcast
  499.         if spell.type == "Geomancy" then
  500.             if spell.english:startswith('Indi') then
  501.                 equipSet = equipSet.Indicolure
  502.             else
  503.                 equipSet = equipSet.Geocolure
  504.             end
  505.         elseif spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  506.             if spell.english:startswith('Cure') then
  507.                 equipSet = equipSet.Cure
  508.             elseif spell.english:startswith('Cura') then
  509.                 equipSet = equipSet.Curaga
  510.             end
  511.             if world.day_element == spell.element or world.weather_element == spell.element then
  512.                 equipSet = set_combine(equipSet,{})
  513.             end
  514.         elseif spell.english:startswith('Banish') then
  515.             equipSet = set_combine(equipSet.Haste,{})
  516.         elseif spell.english == "Stoneskin" then
  517.             if buffactive.Stoneskin then
  518.                 send_command('@wait 2.8;cancel stoneskin')
  519.             end
  520.             equipSet = equipSet.Stoneskin
  521.         elseif spell.english == "Sneak" then
  522.             if spell.target.name == player.name and buffactive['Sneak'] then
  523.                 send_command('cancel sneak')
  524.             end
  525.             equipSet = equipSet.Haste
  526.         elseif spell.english:startswith('Aspir') then
  527.             equipSet = equipSet.Aspir
  528.         elseif spell.english == "Drain" then
  529.             equipSet = equipSet.Drain
  530.         elseif spell.english:startswith('Utsusemi') then
  531.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  532.                 send_command('@wait 1.7;cancel Copy Image*')
  533.             end
  534.             equipSet = equipSet.Haste
  535.         elseif spell.english == 'Monomi: Ichi' then
  536.             if buffactive['Sneak'] then
  537.                 send_command('@wait 1.7;cancel sneak')
  538.             end
  539.             equipSet = equipSet.Haste
  540.         elseif Low_Tier_Spells:contains(spell.english) and LowNuke == 'ON' then
  541.             equipSet = set_combine(equipSet,sets.LowNuke)
  542.         elseif spell.skill == 'Elemental Magic' and MB == 'ON' then
  543.             equipSet = set_combine(equipSet,sets.MB)
  544.         else
  545.             if equipSet[spell.english] then
  546.                 equipSet = equipSet[spell.english]
  547.             end
  548.             if equipSet[spell.skill] then
  549.                 equipSet = equipSet[spell.skill]
  550.             end
  551.             if equipSet[AccArray[AccIndex]] then
  552.                 equipSet = equipSet[AccArray[AccIndex]]
  553.             end
  554.             if equipSet[spell.type] then
  555.                 equipSet = equipSet[spell.type]
  556.             end
  557.             if (spell.skill == 'Elemental Magic' or spell.english:startswith('Cur') or spell.english:startswith('Bio') or spell.english:startswith('Dia') or spell.english == 'Aspir' or spell.english == 'Drain') 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' and spell.english ~= "Cursna" then -- Use Obi Toggle To Equip Normal Waist Gear --
  558.                 equipSet = set_combine(equipSet,sets.Obi[spell.element])
  559.             end
  560.         end
  561.     elseif equipSet[spell.english] then
  562.         equipSet = equipSet[spell.english]
  563.     end
  564.     equip(equipSet)
  565.     if StunIndex == 1 then
  566.         equip(sets.Midcast.Stun)
  567.     end
  568. end
  569.  
  570. function aftercast(spell,action)
  571.     if not spell.interrupted then
  572.         if spell.english == "Sleep II" then-- Sleep II Countdown --
  573.             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.]')
  574.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  575.             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.]')
  576.         elseif spell.english == "Banish II" then -- Banish II Countdown --
  577.             send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  578.         end
  579.     end
  580.     status_change(player.status)
  581. end
  582.  
  583. function status_change(new,old)
  584.     check_equip_lock()
  585.     if Armor == 'PDT' then
  586.         equip(sets.PDT)
  587.     elseif pet.isvalid then -- Equip Luopan Set when a GEO Luopan is active --
  588.         equip(sets.Luopan)
  589.     elseif buffactive["Sublimation: Activated"] then
  590.         equip(sets.Sublimation)
  591.     elseif new == 'Engaged' then
  592.         equip(sets.Melee)
  593.     elseif new == 'Idle' then
  594.         equipSet = sets.Idle
  595.         if equipSet[IdleArray[IdleIndex]] then
  596.             equipSet = equipSet[IdleArray[IdleIndex]]
  597.         end
  598.         if buffactive['Reive Mark'] then -- Equip Arciela's Grace +1 During Reive --
  599.             equipSet = set_combine(equipSet,sets.Reive)
  600.         end
  601.         if world.area:endswith('Adoulin') then
  602.             equipSet = set_combine(equipSet,{})
  603.         end
  604.         equip(equipSet)
  605.     elseif new == 'Resting' then
  606.         equip(sets.Resting)
  607.     end
  608.     if StunIndex == 1 then
  609.         equip(sets.Midcast.Stun)
  610.     end
  611. end
  612.  
  613. function buff_change(buff,gain,buff_table)
  614.         buff = string.lower(buff)
  615.     if buff == 'weakness' then -- Weakness Timer --
  616.         if gain then
  617.             send_command('timers create "Weakness" 300 up')
  618.         else
  619.             send_command('timers delete "Weakness"')
  620.         end
  621.     elseif buff_table['id'] == 539 then -- Geomancy Regen --
  622.         if not gain then
  623.             send_command('input /tell Arnan ----- Geomancy: Regen [Off] -----')
  624.         end
  625.     elseif buff_table['id'] == 541 then -- Geomancy Refresh --
  626.         if not gain then
  627.             send_command('input /tell Arnan ----- Geomancy: Refresh [Off] -----')
  628.         end
  629.     elseif buff_table['id'] == 580 then -- Geomancy Haste --
  630.         if not gain then
  631.             send_command('input /tell Arnan ----- Geomancy: Haste [Off] -----')
  632.         end    
  633.     elseif buff_table['id'] == 542 then -- Geomancy STR --
  634.         if not gain then
  635.             send_command('input /tell Arnan ----- Geomancy: STR [Off] -----')
  636.         end
  637.     elseif buff_table['id'] == 543 then -- Geomancy DEX --
  638.         if not gain then
  639.             send_command('input /tell Arnan ----- Geomancy: DEX [Off] -----')
  640.         end    
  641.     elseif buff_table['id'] == 544 then -- Geomancy VIT --
  642.         if not gain then
  643.             send_command('input /tell Arnan ----- Geomancy: VIT [Off] -----')
  644.         end
  645.     elseif buff_table['id'] == 545 then -- Geomancy AGI --
  646.         if not gain then
  647.             send_command('input /tell Arnan ----- Geomancy: AGI [Off] -----')
  648.         end    
  649.     elseif buff_table['id'] == 546 then -- Geomancy INT --
  650.         if not gain then
  651.             send_command('input /tell Arnan ----- Geomancy: INT [Off] -----')
  652.         end
  653.     elseif buff_table['id'] == 547 then -- Geomancy MND --
  654.         if not gain then
  655.             send_command('input /tell Arnan ----- Geomancy: MND [Off] -----')
  656.         end
  657.     elseif buff_table['id'] == 548 then -- Geomancy CHR --
  658.         if not gain then
  659.             send_command('input /tell Arnan ----- Geomancy: CHR [Off] -----')
  660.         end    
  661.     elseif buff_table['id'] == 549 then -- Geomancy Fury (Attack Boost) --
  662.         if not gain then
  663.             send_command('input /tell Arnan ----- Geomancy: Fury (Attack Boost) [Off] -----')
  664.         end        
  665.     elseif buff_table['id'] == 550 then -- Geomancy Barrier (Defense Boost) --
  666.         if not gain then
  667.             send_command('input /tell Arnan ----- Geomancy: Barrier (Defense Boost) [Off] -----')
  668.         end            
  669.     elseif buff_table['id'] == 551 then -- Geomancy Acumen (Magic Attack Boost) --
  670.         if not gain then
  671.             send_command('input /tell Arnan ----- Geomancy: Acumen (Magic Attack Boost) [Off] -----')
  672.         end    
  673.     elseif buff_table['id'] == 552 then -- Geomancy Fend (Magic Defense Boost) --
  674.         if not gain then
  675.             send_command('input /tell Arnan ----- Geomancy: Fend (Magic Defense Boost) [Off] -----')
  676.         end    
  677.     elseif buff_table['id'] == 553 then -- Geomancy Precision (Accuracy Boost) --
  678.         if not gain then
  679.             send_command('input /tell Arnan ----- Geomancy: Precision (Accuracy Boost) [Off] -----')
  680.         end    
  681.     elseif buff_table['id'] == 554 then -- Geomancy Voidance (Evasion Boost) --
  682.         if not gain then
  683.             send_command('input /tell Arnan ----- Geomancy: Voidance (Evasion Boost) [Off] -----')
  684.         end    
  685.     elseif buff_table['id'] == 555 then -- Geomancy Focus (Magic Accuracy Boost) --
  686.         if not gain then
  687.             send_command('input /tell Arnan ----- Geomancy: Focus (Magic Accuracy Boost) [Off] -----')
  688.         end    
  689.     elseif buff_table['id'] == 556 then -- Geomancy Attunement (Magic Evasion Boost) --
  690.         if not gain then
  691.             send_command('input /tell Arnan ----- Geomancy: Attunement (Magic Evasion Boost) [Off] -----')
  692.         end            
  693.     end
  694.     if not midaction() then
  695.         status_change(player.status)
  696.     end
  697. end
  698.  
  699. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  700. function self_command(command)
  701.     if command == 'C1' then -- Magic Accuracy Toggle --
  702.         AccIndex = (AccIndex % #AccArray) + 1
  703.         add_to_chat(158,'Magic Accuracy Level: ' .. AccArray[AccIndex])
  704.         status_change(player.status)
  705.     elseif command == 'C2' then -- Stun Toggle --
  706.         if StunIndex == 1 then
  707.             StunIndex = 0
  708.             add_to_chat(123,'Stun Set: [Unlocked]')
  709.         else
  710.             StunIndex = 1
  711.             add_to_chat(158,'Stun Set: [Locked]')
  712.         end
  713.         status_change(player.status)
  714.     elseif command == 'C5' then -- Auto Update Gear Toggle --
  715.         status_change(player.status)
  716.         add_to_chat(158,'Auto Update Gear')
  717.     elseif command == 'C3' then -- Obi Toggle --
  718.         if Obi == 'ON' then
  719.             Obi = 'OFF'
  720.             add_to_chat(123,'Obi: [OFF]')
  721.         else
  722.             Obi = 'ON'
  723.             add_to_chat(158,'Obi: [ON]')
  724.         end
  725.         status_change(player.status)
  726.     elseif command == 'C7' then -- PDT Toggle --
  727.         if Armor == 'PDT' then
  728.             Armor = 'None'
  729.             add_to_chat(123,'PDT Set: [Unlocked]')
  730.         else
  731.             Armor = 'PDT'
  732.             add_to_chat(158,'PDT Set: [Locked]')
  733.         end
  734.         status_change(player.status)
  735.     elseif command == 'C10' then -- Idris Toggle --
  736.         if Idris == 'ON' then
  737.             Idris = 'OFF'
  738.             add_to_chat(123,'Idris: [OFF]')
  739.         else
  740.             Idris = 'ON'
  741.             add_to_chat(158,'Idris: [ON]')
  742.         end
  743.         status_change(player.status)
  744.     elseif command == 'C15' then -- LowNuke Toggle --
  745.         if LowNuke == 'ON' then
  746.             LowNuke = 'OFF'
  747.             add_to_chat(123,'Low Nuke: [OFF]')
  748.         else
  749.             LowNuke = 'ON'
  750.             add_to_chat(158,'Low Nuke: [ON]')
  751.         end
  752.         status_change(player.status)
  753.     elseif command == 'C9' then -- MB Toggle --
  754.         if MB == 'ON' then
  755.             MB = 'OFF'
  756.             add_to_chat(123,'MB: [OFF]')
  757.         else
  758.             MB = 'ON'
  759.             add_to_chat(158,'MB: [ON]')
  760.         end
  761.         status_change(player.status)
  762.     elseif command == 'C17' then -- Lock Main Weapon Toggle --
  763.         if Lock_Main == 'ON' then
  764.             Lock_Main = 'OFF'
  765.             add_to_chat(123,'Main Weapon: [Unlocked]')
  766.         else
  767.             Lock_Main = 'ON'
  768.             add_to_chat(158,'Main Weapon: [Locked]')
  769.         end
  770.         status_change(player.status)
  771.     elseif command == 'C8' then -- Distance Toggle --
  772.         if player.target.distance then
  773.             target_distance = math.floor(player.target.distance*10)/10
  774.             add_to_chat(158,'Distance: '..target_distance)
  775.         else
  776.             add_to_chat(123,'No Target Selected')
  777.         end
  778.     elseif command == 'C6' then -- Idle Toggle --
  779.         IdleIndex = (IdleIndex % #IdleArray) + 1
  780.         add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  781.         status_change(player.status)
  782.     elseif command:match('^SC%d$') then
  783.         send_command('//' .. sc_map[command])
  784.     end
  785. end
  786.  
  787. function check_equip_lock() -- Lock Equipment Here --
  788.     if player.equipment.left_ring == "" or player.equipment.left_ring == "" or player.equipment.right_ring == "" or player.equipment.right_ring == "" then
  789.         disable('ring1','ring2')
  790.     elseif player.equipment.back == "" or player.equipment.back == "" or player.equipment.back == "Aptitude Mantle" then
  791.         disable('back')
  792.     elseif Lock_Main == 'ON' then
  793.         disable('main','sub')
  794.     else
  795.         enable('main','sub','ring1','ring2','back')
  796.     end
  797. end
  798.  
  799. function actualCost(originalCost)
  800.     if buffactive["Penury"] then
  801.         return originalCost*.5
  802.     elseif buffactive["Light Arts"] then
  803.         return originalCost*.9
  804.     else
  805.         return originalCost
  806.     end
  807. end
  808.  
  809. function degrade_spell(spell,degrade_array)
  810.     spell_index = table.find(degrade_array,spell.name)
  811.     if spell_index > 1 then
  812.         new_spell = degrade_array[spell_index - 1]
  813.         change_spell(new_spell,spell.target.raw)
  814.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  815.     end
  816. end
  817.  
  818. function change_spell(spell_name,target)
  819.     cancel_spell()
  820.     send_command('//'..spell_name..' '..target)
  821. end
  822.  
  823. function define_geomancy_values()
  824.     geomancy = {
  825.         Frailty = {bonus="Defense Down"},
  826.         Torpor = {bonus="Evasion Down"},
  827.         Languor = {bonus="Magic Evasion Down"},
  828.         Focus = {bonus="Magic Accuracy"},
  829.         Malaise = {bonus="Magic Defense Down"},
  830.         Precision = {bonus="Accuracy"},
  831.         Refresh = {bonus="Refresh"},
  832.         Fade = {bonus="Magic Attack Down"},
  833.         Wilt = {bonus="Attack Down"},
  834.         Vex = {bonus="Magic Accuracy Down"},
  835.         Slip = {bonus="Accuracy Down"},
  836.         Acumen = {bonus="Magic Attack"},
  837.         Fend = {bonus="Magic Defense"},
  838.         Fury = {bonus="Attack"},
  839.         Attunement = {bonus="Magic Evasion"},
  840.         Voidance = {bonus="Evasion"},
  841.         Barrier = {bonus="Defense"},
  842.         Haste = {bonus="Haste"}
  843.         }
  844. end
  845.  
  846. function display_geomancy_info(spell)
  847.     geoType=nil
  848.     string.gsub(spell.english.."-","-(.-)-",function(geo) geoType=geo end)
  849.     geoInfo = geomancy[geoType]
  850.     if geoInfo then
  851.         add_to_chat(158, spell.english..' = '..tostring(geoInfo.bonus))
  852.     end
  853. end
  854.  
  855. function sub_job_change(newSubjob, oldSubjob)
  856.     select_default_macro_book()
  857. end
  858.  
  859. function set_macro_page(set,book)
  860.     if not tonumber(set) then
  861.         add_to_chat(123,'Error setting macro page: Set is not a valid number ('..tostring(set)..').')
  862.         return
  863.     end
  864.     if set < 1 or set > 10 then
  865.         add_to_chat(123,'Error setting macro page: Macro set ('..tostring(set)..') must be between 1 and 10.')
  866.         return
  867.     end
  868.  
  869.     if book then
  870.         if not tonumber(book) then
  871.             add_to_chat(123,'Error setting macro page: book is not a valid number ('..tostring(book)..').')
  872.             return
  873.         end
  874.         if book < 1 or book > 20 then
  875.             add_to_chat(123,'Error setting macro page: Macro book ('..tostring(book)..') must be between 1 and 20.')
  876.             return
  877.         end
  878.         send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(set))
  879.     else
  880.         send_command('@input /macro set '..tostring(set))
  881.     end
  882. end
  883.  
  884. function select_default_macro_book()
  885.     -- Default macro set/book
  886.     if player.sub_job == 'RDM' then
  887.         set_macro_page(1, 1)
  888.     elseif player.sub_job == 'BLM' then
  889.         set_macro_page(1, 1)
  890.     elseif player.sub_job == 'WHM' then
  891.         set_macro_page(1, 1)
  892.     else
  893.         set_macro_page(1, 1)
  894.     end
  895. end
  896.  
  897. --- Luopan Notifier ---
  898. function pet_change(pet,gain_or_loss)
  899. status_change(player.status)
  900. if not gain_or_loss then
  901. add_to_chat(123,'Your luopan has vanished.')
  902. send_command('input /tell Arnan >>>>>>>>>> Your Luopan has vanished. <<<<<<<<<<')
  903. end
  904. end
  905.  
  906. function job_aftercast(spell, action, spellMap, eventArgs)
  907.     if not spell.interrupted then
  908.         if spell.english:startswith('Indi') then
  909.             if spell.target.type == 'SELF' then
  910.                 last_indi = spell.name
  911.             end
  912.         elseif spell.english:startswith('Geo') then
  913.             last_geo = spell.name
  914.         end
  915.     end
  916. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement