Guest User

Untitled

a guest
Jun 18th, 2014
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.34 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -------------------------------------------------------------------------------------------------------------------
  3.  
  4. -- Aeolus of Fairy, Aeo of Sylph: Gearswap LUA file
  5. --                  Job: Scholar
  6.  
  7. -------------------------------------------------------------------------------------------------------------------
  8. -------------------------------------------------------------------------------------------------------------------
  9.  
  10.  
  11. -------------------------------------------------------------------------------------------------------------------
  12. -- Equipment sets for each spell/Ability/Job Ability and Scenario
  13. -------------------------------------------------------------------------------------------------------------------
  14. function get_sets ()
  15.  
  16.     send_command('input /macro book 3; wait .1;input /macro set 1')
  17.        
  18.        
  19. -------------------------------------------------------------------------------------------------------------------
  20.         --Idle Sets--
  21.     sets.Idle = {}
  22.  
  23.  
  24.         sets.Idle = {
  25.             main="Bolelabunga",
  26.             sub="Genbu's Shield",
  27.             ammo="Kalboron Stone",
  28.             head="Auspex Coif",
  29.             body="Morrigan's Robe +1",
  30.             hands="Serpentes Cuffs",
  31.             legs="Nares Trews",
  32.             feet="Serpentes Sabots",
  33.             neck="Twilight Torque",
  34.             waist="Fucho-no-Obi",
  35.             left_ear="Lifestorm Earring",
  36.             right_ear="Psystorm Earring",
  37.             left_ring="Dark Ring",
  38.             right_ring="Dark Ring",
  39.             back="Cheviot Cape"}
  40.  
  41.         sets.Idle.Lockstyle = {}
  42.        
  43.        
  44. -------------------------------------------------------------------------------------------------------------------
  45.     --Precast--
  46.     sets.precast = {}
  47.  
  48.  
  49.         sets.precast.JA = {
  50.             legs="Hagondes Pants"}
  51.                
  52.         sets.precast.FC = {
  53.             head="Peda. M.Board +1",
  54.             body="Vanir Cotehardie",
  55.             hands="Gendewitha Gages",
  56.             legs="Orvail Pants +1",
  57.             feet="Peda. Loafers +1",
  58.             neck="Jeweled Collar",
  59.             back="Swith Cape"}
  60.  
  61.         sets.precast.Elemental =
  62.             set_combine(
  63.                 sets.precast.FC,
  64.                 {neck="Stoicheion Medal"})
  65.                        
  66.         sets.precast.Impact =
  67.             set_combine(
  68.                 sets.precast.Elemental,
  69.                 {head=empty,
  70.                 body="Twilight Cloak"})
  71.                        
  72.                        
  73. -------------------------------------------------------------------------------------------------------------------
  74.         -- Midcast Sets --
  75.     sets.midcast = {}
  76.  
  77.  
  78.         sets.midcast.Cure = {
  79.             main="Tamaxchi",
  80.             sub="Genbu's Shield",
  81.             ammo="Hedgehog Bomb",
  82.             head="Gende. Caubeen",
  83.             body="Gendewitha Bliaut",
  84.             hands="Bokwus Gloves",
  85.             legs="Nares Trews",
  86.             feet="Chelona Boots",
  87.             neck="Colossus's Torque",
  88.             waist="Penitent's Rope",
  89.             left_ear="Lifestorm Earring",
  90.             right_ear="Loquac. Earring",
  91.             left_ring="Sirona's Ring",
  92.             right_ring="Ephedra Ring",
  93.             back="Swith Cape"}
  94.                
  95.         sets.midcast.CureLight = {
  96.             main="Chatoyant Staff",
  97.             sub="Reign Grip",
  98.             ammo="Kalboron Stone",
  99.             head="Gende. Caubeen",
  100.             body="Gendewitha Bliaut",
  101.             hands="Bokwus Gloves",
  102.             legs="Nares Trews",
  103.             feet="Peda. Loafers +1",
  104.             neck="Colossus's Torque",
  105.             waist="Korin Obi",
  106.             left_ear="Loquac. Earring",
  107.             right_ear="Beatific Earring",
  108.             left_ring="Ephedra Ring",
  109.             right_ring="Sirona's Ring",
  110.             back="Twilight Cape"}
  111.                
  112.         sets.midcast.Regen = {
  113.             main="Bolelabunga",
  114.             head="Savant's Bonnet +2"}
  115.                
  116.         sets.midcast.Cursna = {
  117.             head="Nahtirah Hat",
  118.             body="Vanir Cotehardie",
  119.             hands="Gendewitha Gages",
  120.             legs="Orvail Pants +1",
  121.             feet="Gende. Galoshes",
  122.             neck="Malison Medallion",
  123.             waist="Swift Belt",
  124.             left_ear="Loquac. Earring",
  125.             right_ear="Beatific Earring",
  126.             left_ring="Ephedra Ring",
  127.             right_ring="Sirona's Ring",
  128.             back="Altruistic Cape"}
  129.                
  130.         sets.midcast.Enhancing = {
  131.             main="Kirin's Pole",
  132.             sub="Fulcio Grip",
  133.             ammo="Savant's Treatise",
  134.             head="Svnt. Bonnet +2",
  135.             body="Argute Gown",
  136.             legs="Scholar's Pants",
  137.             neck="Colossus's Torque",
  138.             left_ear="Andoaa Earring",
  139.             right_ear="Augment. Earring",
  140.             back="Merciful Cape"}
  141.                
  142.         sets.midcast.Stoneskin =
  143.             set_combine(
  144.                 sets.midcast.Enhancing,
  145.                 {neck="Stone Gorget"})
  146.                
  147.         sets.midcast.Storm =
  148.             set_combine(
  149.                 sets.midcast.Enhancing,
  150.                 {feet="Pedagogy Loafers +1"})
  151.                        
  152.         sets.midcast.Enfeebling = {
  153.             main="Eminent Staff",
  154.             sub="Bugard Strap +1",
  155.             ammo="Kalboron Stone",
  156.             head="Nahtirah Hat",
  157.             body="Vanir Cotehardie",
  158.             hands="Otomi Gloves",
  159.             legs="Savant's Pants +2",
  160.             feet="Umbani Boots",
  161.             neck="Imbodla Necklace",
  162.             waist="Argute Belt",
  163.             left_ear="Psystorm Earring",
  164.             right_ear="Lifestorm Earring",
  165.             left_ring="Perception Ring",
  166.             right_ring="Sangoma Ring",
  167.             back="Kaikias' Cape"}
  168.                
  169.         sets.midcast.Elemental = {
  170.             main="Eminent Staff",
  171.             sub="Bugard Strap +1",
  172.             ammo="Kalboron Stone",
  173.             head="Nahtirah Hat",
  174.             body="Vanir Cotehardie",
  175.             hands="Otomi Gloves",
  176.             legs="Hagondes Pants",
  177.             feet="Umbani Boots",
  178.             neck="Eddy Necklace",
  179.             waist="Argute Belt",
  180.             left_ear="Friomisi Earring",
  181.             right_ear="Novio Earring",
  182.             left_ring="Strendu Ring",
  183.             right_ring="Acumen Ring",
  184.             back="Toro Cape"}
  185.                
  186.         sets.midcast.Dark = {
  187.             main="Eminent Staff",
  188.             sub="Reign Grip",
  189.             ammo="Witchstone",
  190.             head="Kaabanax Hat",
  191.             body="Academic's Gown",
  192.             hands="Otomi Gloves",
  193.             legs="Orvail Pants +1",
  194.             feet="Peda. Loafers +1",
  195.             neck="Eddy Necklace",
  196.             waist="Fucho-no-Obi",
  197.             left_ear="Gwati Earring",
  198.             right_ear="Loquac. Earring",
  199.             left_ring="Sangoma Ring",
  200.             right_ring="Perception Ring",
  201.             back="Merciful Cape"}
  202.                
  203.         sets.midcast.Stun = {
  204.             main="Apamajas II",
  205.             sub="Bugard Strap +1",
  206.             ammo="Kalboron Stone",
  207.             head="Peda. M.Board +1",
  208.             body="Vanir Cotehardie",
  209.             hands="Gendewitha Gages",
  210.             legs="Orvail Pants +1",
  211.             feet="Peda. Loafers +1",
  212.             neck="Jeweled Collar",
  213.             waist="Swift Belt",
  214.             left_ear="Lifestorm Earring",
  215.             right_ear="Psystorm Earring",
  216.             left_ring="Sangoma Ring",
  217.             right_ring="Perception Ring",
  218.             back="Swith Cape"}
  219.  
  220.  
  221. -------------------------------------------------------------------------------------------------------------------
  222.     --Buffs--
  223.     sets.buff = {}
  224.  
  225.  
  226.         sets.buff.Penury = {
  227.             legs="Savant's Pants +2"}
  228.  
  229.         sets.buff.Celerity = {
  230.             feet="Pedagogy Loafers +1"}
  231.  
  232.         sets.buff.Rapture = {
  233.             head="Savant's Bonnet +2"}
  234.  
  235.         sets.buff.Tranquility = {}
  236.        
  237.         sets.buff.Perpetuance = {
  238.             hands="Savant's Bracers +2"}
  239.        
  240.         sets.buff.Parsimony = {
  241.             legs="Savant's Pants +2"}
  242.                
  243.         sets.buff.Alacrity = {
  244.             feet="Pedagogy Loafers +1"}
  245.        
  246.         sets.buff.Ebullience = {
  247.             head="Savant's Bonnet +2"}
  248.  
  249.         sets.buff.Manifestation = {}
  250.                
  251.         sets.buff.Focalization = {
  252.             head="Pedagogy Mortarboard +2"}
  253.                
  254.         sets.buff.Immanence = {
  255.             hands="Savant's Bracers +2"}
  256.  
  257.         sets.buff.Klimaform = {
  258.             feet="Savant's Loafers +2"}
  259.        
  260.  
  261. -------------------------------------------------------------------------------------------------------------------
  262.     --Obis--
  263.     sets.Obi = {}
  264.        
  265.  
  266.         sets.Obi.Fire =
  267.             set_combine(
  268.                 sets.midcast.Enhancing,
  269.                 {waist="Karin Obi",
  270.                 back="Twilight Cape"})
  271.                
  272.         sets.Obi.Earth =
  273.             set_combine(
  274.                 sets.midcast.Enhancing,
  275.                 {waist="Dorin Obi",
  276.                 back="Twilight Cape"})
  277.                
  278.         sets.Obi.Water =
  279.             set_combine(
  280.                 sets.midcast.Enhancing,
  281.                 {waist="Suirin Obi",
  282.                 back="Twilight Cape"})
  283.                
  284.         sets.Obi.Wind =
  285.             set_combine(
  286.                 sets.midcast.Enhancing,
  287.                 {waist="Furin Obi",
  288.                 back="Twilight Cape"})
  289.                
  290.         sets.Obi.Ice =
  291.             set_combine(
  292.                 sets.midcast.Enhancing,
  293.                 {waist="Hyorin Obi",
  294.                 back="Twilight Cape"})
  295.  
  296.         sets.Obi.Thunder =
  297.             set_combine(
  298.                 sets.midcast.Enhancing,
  299.                 {waist="Rarin Obi",
  300.                 back="Twilight Cape"})
  301.                
  302.         sets.Obi.Light =
  303.             set_combine(
  304.                 sets.midcast.Enhancing,
  305.                 {waist="Korin Obi",
  306.                 back="Twilight Cape"})
  307.                
  308.         sets.Obi.Dark =
  309.             set_combine(
  310.                 sets.midcast.Enhancing,
  311.                 {waist="Anrin Obi",
  312.                 back="Twilight Cape"})
  313.            
  314. end                    
  315.  
  316.  
  317. -------------------------------------------------------------------------------------------------------------------
  318. --Rules to govern when and how to use sets
  319. -------------------------------------------------------------------------------------------------------------------
  320.  
  321.  
  322. -------------------------------------------------------------------------------------------------------------------
  323. --Precast Actions--
  324. function precast(spell)
  325.  
  326.  
  327.     --Avoids that nasty animation lock from strategem spam--
  328.     if spell.action_type == 'Ability' then
  329.  
  330.         equip(sets.precast.JA)
  331.     end
  332.  
  333.     --Puts on special Elemental FastCast set--
  334.     if spell.skill == 'Elemental Magic' then
  335.                        
  336.         if spell.english == 'Impact' then
  337.  
  338.             equip(sets.preset.Impact)
  339.  
  340.         else equip(sets.precast.Elemental)
  341.         end
  342.     end
  343.  
  344.     --Puts on FastCast/Haste gear which stays on if no midcast is specified--  
  345.     if spell.action_type == 'Magic' and spell.skill ~= 'Elemental Magic' then
  346.  
  347.         equip (sets.precast.FC)
  348.     end
  349. end
  350.  
  351.  
  352. -------------------------------------------------------------------------------------------------------------------
  353. --Midcast--
  354. function midcast(spell)
  355.  
  356.  
  357.     --Healing Magic--            
  358.     if string.find(spell.english,'Cur') and spell.english ~= 'Cursna' then
  359.                
  360.         if spell.element == world.weather_element or spell_element == world.day_element then
  361.  
  362.             equip(sets.midcast.CureLight)
  363.             send_command('@input /echo <----- Light cure set!----->')
  364.                                
  365.         else equip(sets.midcast.Cure)
  366.         end
  367.     end
  368.  
  369.     if spell.english == 'cursna' then
  370.  
  371.         equip(sets.midcast.Cursna)
  372.     end
  373.  
  374.     if string.find(spell.english,'Regen') then
  375.    
  376.         equip (sets.midcast.regen)
  377.     end
  378.  
  379.  
  380.     --Elemental Magic--
  381.     if spell.english == 'Impact' then
  382.    
  383.         equip (sets.midcast.Impact)
  384.  
  385.         else equip (sets.midcast.Elemental)
  386.     end
  387.  
  388.     if spell.skill == "Elemental Magic" and spell.english ~= 'Impact' then
  389.    
  390.         equip(sets.midcast.Elemental)
  391.    
  392.         if spell.element == world.weather_element or spell_element == world.day_element then
  393.  
  394.             equip(sets.Obi[spell.element])
  395.             send_command('@input /echo <----- Weather/Day detected!----->')
  396.         end
  397.     end
  398.  
  399.  
  400.     --Dark Magic--
  401.     if spell.skill == "Dark Magic" then
  402.        
  403.         if spell.english == 'Stun' then
  404.            
  405.             equip (sets.midcast.Stun)
  406.  
  407.         else equip (sets.midcast.Dark)
  408.         end
  409.     end
  410.  
  411.  
  412.     --Enhancing Magic--
  413.     if spell.skill == "Enhancing Magic" then
  414.  
  415.         if spell.english == "Stoneskin" then
  416.  
  417.             equip (sets.midcast.Stoneskin)
  418.  
  419.             if buffactive.stoneskin then
  420.            
  421.                 send_command('@wait 2.5;@input /echo working')
  422.  
  423.             elseif spell.english == "Sneak" then
  424.            
  425.                 if buffactive.sneak then
  426.        
  427.                     send_command('@wait 2;@input //cancel 71')
  428.                 end
  429.                    
  430.             else equip (sets.midcast.Enhancing)
  431.             end
  432.         end
  433.     end
  434.        
  435.        
  436.     --Enfeebling--
  437.     if spell.skill == "Enfeebling Magic"
  438.        
  439.         then equip (sets.midcast.Enfeebling)
  440.     end
  441.        
  442.        
  443.         --Equip gear for stratagems--
  444.         if buffactive.penury and spell.type == "White Magic"
  445.                 then equip (sets.buff.Penury)
  446.         send_command('@input /echo <----- '..spell.english..' has 1/2 MP cost ----->')
  447.         end
  448.        
  449.         if buffactive.celerity and spell.type == "White Magic"
  450.                 then equip (sets.buff.Celerity)
  451.         send_command('@input /echo <----- '..spell.english..' has faster casting/recast ----->')
  452.         end
  453.        
  454.         if buffactive.rapture and spell.skill == 'Healing Magic'
  455.                 then equip (sets.buff.Rapture)
  456.         send_command('@input /echo <----- '..spell.english..' has 1.5x potency ----->')
  457.         end
  458.        
  459.         if buffactive.accession and spell.skill == 'Healing Magic' or spell.skill == 'Enhancing Magic'
  460.                 then equip (sets.buff.Accession)
  461.         send_command('@input /echo <----- '..spell.english..' is now AoE ----->')
  462.         end
  463.        
  464.         if buffactive.tranquility and spell.type == "White Magic"
  465.                 then equip (sets.buff.Tranquility)
  466.         send_command('@input /echo <----- '..spell.english..' generates less emnity ----->')
  467.         end
  468.        
  469.         if buffactive.perpetuance and spell.type == "White Magic"
  470.                 then equip (sets.buff.Perpetuance)
  471.         send_command('@input /echo <----- '..spell.english..' will last twice as long ----->')
  472.         end
  473.  
  474.         if buffactive.parsimony and spell.type == "Black Magic"
  475.                 then equip (sets.buff.Parsimony)
  476.         send_command('@input /echo <----- '..spell.english..' has 1/2 MP cost ----->')
  477.         end
  478.  
  479.         if buffactive.alacrity and spell.type == "Black Magic"
  480.                 then equip (sets.buff.Alacrity)
  481.         send_command('@input /echo <----- '..spell.english..' has faster casting/recast ----->')
  482.         end
  483.  
  484.         if buffactive.ebullience and spell.type == "Black Magic"
  485.                 then equip (sets.buff.Ebullience)
  486.         send_command('@input /echo <----- '..spell.english..' has 1.5x potency ----->')
  487.         end
  488.  
  489.         if buffactive.manifestation and spell.type == "Black Magic" and spell.skill ~= "Elemental Magic"
  490.                 then equip (sets.buff.Manifestation)
  491.         send_command('@input /echo <----- '..spell.english..' is now AoE ----->')
  492.         end
  493.  
  494.         if buffactive.focalization and spell.type == "Black Magic"
  495.                 then equip (sets.buff.Focalization)
  496.         send_command('@input /echo <----- '..spell.english..' is more accurate ----->')
  497.         end
  498. end
  499.  
  500.  
  501. -------------------------------------------------------------------------------------------------------------------
  502. --Aftercast--
  503.  
  504.  
  505. function aftercast(spell)
  506.         equip(sets.Idle)
  507.  
  508.  
  509.         --Warnings when crowd control is wearing off--
  510.         if spell.english == 'Sleep' or spell.english == 'Sleepga' then
  511.                 send_command('@wait 50;input /echo <----- '..spell.english..' is wearing off in 10 seconds ----->')
  512.  
  513.         elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  514.             send_command('@wait 80;input /echo <----- '..spell.english..' is wearing off in 10 seconds ----->')
  515.  
  516.         elseif spell.english == 'Break' or spell.english == 'Breakga' then
  517.             send_command('@wait 20;input /echo <----- '..spell.english..' is wearing off in 10 seconds ----->')
  518.  
  519.         end
  520. end
  521.  
  522.  
  523. -------------------------------------------------------------------------------------------------------------------
  524. --New commands created by GearSwap for use in-game
  525. -------------------------------------------------------------------------------------------------------------------
  526.  
  527.  
  528. --//gs c dark       activates dark arts or if already active, addendum: black
  529. --//gs c light      activates light arts or if already active, addendum" white
  530. --//gs c mp     activates 1/2 MP strategem regardless of grimore
  531. --//gs c fast       activates reduced casting/recast strategem regardless of grimore
  532. --//gs c aoe        activates area of effect strategem regardless of grimore
  533. --//gs c potency    activates potency strategem regardless of grimore
  534. --//gs c merit      activates -enmity in light arts/ ad: wht or +m.acc in dark arts/ ad: blk
  535. --//gs c duration   activates x2 duration in light arts/ ad: wht or Skillchaining in dark arts/ ad: blk
  536.  
  537.  
  538. function self_command(command)
  539.  
  540.     if command == 'light' then
  541.         if buffactive['Light Arts'] then
  542.             send_command('@input //addendumwhite')
  543.  
  544.             else send_command('@input //lightarts')
  545.                 end
  546.                
  547.     elseif command == 'dark'  then
  548.         if buffactive['Dark Arts'] then
  549.             send_command('@input //addendumblack')
  550.                                
  551.             else send_command('@input //darkarts')
  552.                 end
  553.                
  554.     elseif command == 'MP' then
  555.  
  556.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  557.             send_command('@input //Penury')
  558.                         send_command('@input /echo <----- Fuel Efficency ----->')
  559.                                
  560.             elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  561.                 send_command('@input //Parsimony')
  562.                 send_command('@input /echo <----- Fuel Efficiency ----->')
  563.                                
  564.                         else send_command('@input /echo <----- No Grimore Active! ----->')
  565.                 end
  566.        
  567.     elseif command == 'fast' then
  568.  
  569.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  570.             send_command('@input //Celerity')
  571.             send_command('@input /echo <----- Turbo ----->')
  572.                                
  573.             elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  574.                 send_command('@input //Alacrity')
  575.                 send_command('@input /echo <----- Turbo ----->')
  576.                                
  577.                         else send_command('@input /echo <----- No Grimore Active! ----->')
  578.                 end
  579.  
  580.     elseif command == 'aoe' then
  581.  
  582.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  583.             send_command('@input //Accession')
  584.                         send_command('@input /echo <----- Exhaust Stacks----->')
  585.                                
  586.             elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  587.                 send_command('@input //Manifestation')
  588.                             send_command('@input /echo <----- Exhaust Stacks----->')
  589.  
  590.             else send_command('@input /echo <----- No Grimore Active! ----->')
  591.                 end
  592.                
  593.     elseif command == 'potency' then
  594.  
  595.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  596.             send_command('@input //Rapture')
  597.                         send_command('@input /echo <----- Super Charger----->')
  598.                                
  599.                         elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  600.                 send_command('@input //Ebbulience')
  601.                             send_command('@input /echo <----- Super Charger----->')
  602.                                
  603.                         else send_command('@input /echo <----- No Grimore Active! ----->')
  604.                 end
  605.                        
  606.     elseif command == 'merit' then
  607.  
  608.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  609.             send_command('@input //Tranquility')
  610.                         send_command('@input /echo <----- Muffler----->')
  611.  
  612.             elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  613.                 send_command('@input //Focalization')
  614.                             send_command('@input /echo <----- Overhead Cams----->')
  615.                                
  616.             else send_command('@input /echo <----- No Grimore Active! ----->')
  617.         end
  618.  
  619.     elseif command == 'duration' then
  620.  
  621.         if buffactive['Light Arts'] or buffactive['Addendum: White'] then
  622.             send_command('@input //Perpetuance')
  623.                         send_command('@input /echo <----- Japanese Import----->')
  624.  
  625.             elseif  buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  626.                 send_command('@input //Immanence')
  627.                             send_command('@input /echo <----- BMW----->')
  628.  
  629.             else send_command('@input /echo <----- No Grimore Active! ----->')
  630.         end
  631.         end
  632. end
Advertisement
Add Comment
Please, Sign In to add comment