Advertisement
Arnan

GEO (mule) Lua August 2018

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