Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 30.54 KB | None | 0 0
  1. --[[                                                                                                    
  2. 88888888ba   88                               88b           d88                                      
  3. 88      "8b  88                               888b         d888                                      
  4. 88      ,8P  88                               88`8b       d8'88                                      
  5. 88aaaaaa8P'  88  88       88   ,adPPYba,      88 `8b     d8' 88  ,adPPYYba,   ,adPPYb,d8   ,adPPYba,  
  6. 88""""""8b,  88  88       88  a8P_____88      88  `8b   d8'  88  ""     `Y8  a8"    `Y88  a8P_____88  
  7. 88      `8b  88  88       88  8PP"""""""      88   `8b d8'   88  ,adPPPPP88  8b       88  8PP"""""""  
  8. 88      a8P  88  "8a,   ,a88  "8b,   ,aa      88    `888'    88  88,    ,88  "8a,   ,d88  "8b,   ,aa  
  9. 88888888P"   88   `"YbbdP'Y8   `"Ybbd8"'      88     `8'     88  `"8bbdP"Y8   `"YbbdP"Y8   `"Ybbd8"'  
  10.                                                                               aa,    ,88              
  11.                                                                                "Y8bbdP"              
  12.                                                                                
  13. ]]
  14. windower.add_to_chat(123,[[BLU Lua Author: Kuroganashi; significantly modified by Byrne(Asura)]])
  15. windower.add_to_chat(160,[[Movement speed by default will not equip when engaged, Press F1 to handle auto-kiting while engaged.]])
  16. function get_sets()
  17.     mote_include_version = 2
  18.    
  19.     -- Load and initialize the include file.
  20.     include('Mote-Include.lua')
  21. end
  22.  
  23. --================================================--
  24. --                                                --
  25. --      |     |        ,---.     |                --
  26. --      |,---.|---.    `---.,---.|--- .   .,---.  --
  27. --      ||   ||   |        ||---'|    |   ||   |  --
  28. --  `---'`---'`---'    `---'`---'`---'`---'|---'  --
  29. --                                         |      --
  30. --                                                --
  31. --================================================--
  32.  
  33. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  34. function job_setup()
  35.     state.Buff.Doomed = buffactive.doomed or false
  36.     state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
  37.     state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
  38.     state.Buff.Convergence = buffactive.Convergence or false
  39.     state.Buff.Diffusion = buffactive.Diffusion or false
  40.     state.Buff.Efflux = buffactive.Efflux or false
  41.     state.Moving = M(false, "moving")
  42.     include('Mote-TreasureHunter')
  43.    
  44.    
  45.     state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
  46.  
  47.  
  48.     blue_magic_maps = {}
  49.    
  50.     -- Mappings for gear sets to use for various blue magic spells.
  51.     -- While Str isn't listed for each, it's generally assumed as being at least
  52.     -- moderately signficant, even for spells with other mods.
  53.    
  54.     -- Physical Spells --
  55.    
  56.     -- Physical spells with no particular (or known) stat mods
  57.     blue_magic_maps.Physical = S{
  58.         'Bilgestorm'
  59.     }
  60.  
  61.     -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  62.     blue_magic_maps.PhysicalAcc = S{
  63.         'Heavy Strike',
  64.     }
  65.  
  66.     -- Physical spells with Str stat mod
  67.     blue_magic_maps.PhysicalStr = S{
  68.         'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  69.         'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
  70.         'Uppercut','Vertical Cleave'
  71.     }
  72.        
  73.     -- Physical spells with Dex stat mod
  74.     blue_magic_maps.PhysicalDex = S{
  75.         'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
  76.         'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
  77.         'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
  78.         'Vanity Dive'
  79.     }
  80.        
  81.     -- Physical spells with Vit stat mod
  82.     blue_magic_maps.PhysicalVit = S{
  83.         'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
  84.         'Power Attack','Quad. Continuum','Sprout Smack','Saurian Slide','Sweeping Gouge','Sub-zero Smash'
  85.     }
  86.        
  87.     -- Physical spells with Agi stat mod
  88.     blue_magic_maps.PhysicalAgi = S{
  89.         'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
  90.         'Pinecone Bomb','Spiral Spin','Wild Oats'
  91.     }
  92.  
  93.     -- Physical spells with Int stat mod
  94.     blue_magic_maps.PhysicalInt = S{
  95.         'Mandibular Bite','Queasyshroom'
  96.     }
  97.  
  98.     -- Physical spells with Mnd stat mod
  99.     blue_magic_maps.PhysicalMnd = S{
  100.         'Ram Charge','Screwdriver','Tourbillion'
  101.     }
  102.  
  103.     -- Physical spells with Chr stat mod
  104.     blue_magic_maps.PhysicalChr = S{
  105.         'Bludgeon'
  106.     }
  107.  
  108.     -- Physical spells with HP stat mod
  109.     blue_magic_maps.PhysicalHP = S{
  110.         'Final Sting'
  111.     }
  112.  
  113.     -- Magical Spells --
  114.  
  115.     -- Magical spells with the typical Int mod
  116.     blue_magic_maps.Magical = S{
  117.         'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  118.         'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
  119.         'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
  120.         'Retinal Glare','Spectral Floe','Subduction','Tem. Upheaval','Water Bomb'
  121.     }
  122.  
  123.     --Tenebral Crush
  124.     blue_magic_maps.TenebralCrush = S{'Tenebral Crush'}
  125.    
  126.     -- Magical spells with a primary Mnd mod
  127.     blue_magic_maps.MagicalMnd = S{
  128.         'Acrid Stream','Evryone. Grudge','Nectarous Deluge','Magic Hammer','Mind Blast','Scouring Spate'
  129.     }
  130.  
  131.     -- Magical spells with a primary Chr mod
  132.     blue_magic_maps.MagicalChr = S{
  133.         'Eyes On Me','Mysterious Light'
  134.     }
  135.  
  136.     -- Magical spells with a Vit stat mod (on top of Int)
  137.     blue_magic_maps.MagicalVit = S{
  138.         'Atra. Libations','Entomb','Thermal Pulse'
  139.     }
  140.  
  141.     --Magical spells with a AGI Stat Mod.
  142.     blue_magic_maps.MagicalAgi = S{
  143.         'Molting Plumage','Palling Salvo','Silent Storm'
  144.     }
  145.    
  146.     --Magical spells with a STR Stat Mod.
  147.     blue_magic_maps.MagicalStr = S{
  148.         'Blinding Fulgor','Searing Tempest'
  149.     }
  150.    
  151.     -- Magical spells with a Dex stat mod (on top of Int)
  152.     blue_magic_maps.MagicalDex = S{
  153.         'Anvil Lightning','Charged Whisker','Gates of Hades'
  154.     }
  155.            
  156.     -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  157.     -- Add Int for damage where available, though.
  158.     blue_magic_maps.MagicAccuracy = S{
  159.         '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  160.         'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  161.         'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  162.         'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  163.         'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  164.         'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  165.         'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  166.         'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
  167.     }
  168.        
  169.     -- Breath-based spells
  170.     blue_magic_maps.Breath = S{
  171.         'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  172.         'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  173.         'Thunder Breath','Vapor Spray','Wind Breath'
  174.     }
  175.  
  176.     -- Stun spells
  177.     blue_magic_maps.Stun = S{
  178.         'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
  179.         'Thunderbolt','Whirl of Rage'
  180.     }
  181.        
  182.     -- Healing spells
  183.     blue_magic_maps.Healing = S{
  184.         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
  185.         'Wild Carrot'
  186.     }
  187.    
  188.     -- Buffs that depend on blue magic skill
  189.     blue_magic_maps.SkillBasedBuff = S{
  190.         'Barrier Tusk','Diamondhide','Magic Barrier','Mighty Guard','Metallic Body','Plasma Charge',
  191.         'Pyric Bulwark','Reactor Cool',
  192.     }
  193.  
  194.     -- Other general buffs
  195.     blue_magic_maps.Buff = S{
  196.         'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  197.         'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  198.         'Memento Mori','Mighty Guard','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
  199.         'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  200.         'Zephyr Mantle'
  201.     }
  202.    
  203.    
  204.     -- Spells that require Unbridled Learning to cast.
  205.     unbridled_spells = S{
  206.         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve','Cruel Joke','Cesspool',
  207.         'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Mighty Guard','Polar Roar',
  208.         'Pyric Bulwark','Tearing Gust','Thunderbolt','Tourbillion','Uproot'
  209.     }
  210. end
  211.  
  212. -------------------------------------------------------------------------------------------------------------------
  213. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  214. -------------------------------------------------------------------------------------------------------------------
  215.  
  216. --====================================================--
  217. --                                                    --
  218. --  .   .                   ,---.     |               --
  219. --  |   |,---.,---.,---.    `---.,---.|--- .   .,---. --
  220. --  |   |`---.|---'|            ||---'|    |   ||   | --
  221. --  `---'`---'`---'`        `---'`---'`---'`---'|---' --
  222. --                                              |     --
  223. --                                                    --
  224. --====================================================--
  225.  
  226. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  227. function user_setup()
  228.    
  229.     state.OffenseMode:options('Normal', 'Crit', 'Solo', 'Safe', 'DT')
  230.     state.IdleMode:options('Normal', 'Refresh', 'PDT', 'Cleaving')
  231.     state.WeaponLockMode = M('Unlocked','Locked')
  232.     state.DoomMode = M('OFF', 'Doom')
  233.     state.ZoneRing = M('None','Warp', 'Holla', 'Dem', 'Mea')
  234.     state.EngagedMoving = M('Disabled','Enabled')
  235.  
  236.     --default starting commands
  237.     send_command('input //gs equip sets.default_melee_weapons;wait 0.2;gs c set WeaponLockMode Locked')
  238.    
  239.     -- Additional local binds
  240.     send_command('bind f1 gs c cycle EngagedMoving')
  241.     send_command('bind f10 gs c cycle IdleMode')
  242.     send_command('bind f12 gs c cycle WeaponLockMode')
  243.     send_command('bind f9 gs c cycle OffenseMode')
  244.     send_command('bind f11 gs c set IdleMode PDT; gs c set OffenseMode Solo')
  245.     send_command('bind ^f11 gs c set IdleMode Normal; gs c set OffenseMode Normal')
  246.     send_command('bind f6 gs c set OffenseMode Normal')
  247.     send_command('bind f7 gs c set OffenseMode Solo')
  248.     send_command('bind f8 gs c set WeaponLockMode Unlocked;wait 0.2;input //gs equip sets.default_melee_weapons;wait 0.2;gs c set WeaponLockMode Locked')
  249.     send_command('bind f5 gs c cycle ZoneRing')
  250.     send_command('bind ^f9 gs c cycle TreasureMode')
  251.    
  252.     select_default_macro_book()
  253.     set_lockstyle()
  254.    
  255. end
  256.  
  257. --=================================--
  258. --  _  _ _  _ _    ____ ____ ___   --
  259. --  |  | |\ | |    |  | |__| |  \  --
  260. --  |__| | \| |___ |__| |  | |__/  --
  261. --                                 --
  262. --=================================--
  263.  
  264. function user_unload()
  265.  
  266.     send_command('unbind ^f9')
  267.     send_command('unbind ^f10')
  268.     send_command('unbind ^f11')
  269.     send_command('unbind ^f12')
  270.     send_command('unbind f8')
  271.        
  272.     send_command('unbind !f9')
  273.     send_command('unbind !f10')
  274.     send_command('unbind !f11')
  275.     send_command('unbind !f12')
  276.  
  277.     send_command('unbind f9')
  278.     send_command('unbind f10')
  279.     send_command('unbind f11')
  280.     send_command('unbind f12')
  281.     send_command('unbind f5')
  282.  
  283.     send_command('unbind -')
  284.     send_command('unbind =')
  285.        
  286. end
  287.  
  288.  
  289. --=============================================--
  290. --                                             --
  291. --   ..|'''.|  '||''''|      |     '||''|.     --
  292. --  .|'     '   ||  .       |||     ||   ||    --
  293. --  ||    ....  ||''|      |  ||    ||''|'     --
  294. --  '|.    ||   ||        .''''|.   ||   |.    --
  295. --   ''|...'|  .||.....| .|.  .||. .||.  '|'   --
  296. --                                             --
  297. --=============================================--
  298.  
  299. function init_gear_sets()
  300.     --------------------------------------
  301.     -- Start defining the sets
  302.     --------------------------------------
  303.  
  304.     sets.buff['Burst Affinity'] = {}
  305.     sets.buff['Chain Affinity'] = {}
  306.     sets.buff.Convergence = {}
  307.     sets.buff.Diffusion = {}
  308.     sets.buff.Enchainment = {}
  309.     sets.buff.Efflux = {}
  310.  
  311. --==================================================--
  312. --  ____                                       _    --
  313. -- |  _ \   _ __    ___    ___    __ _   ___  | |_  --
  314. -- | |_) | | '__|  / _ \  / __|  / _` | / __| | __| --
  315. -- |  __/  | |    |  __/ | (__  | (_| | \__ \ | |_  --
  316. -- |_|     |_|     \___|  \___|  \__,_| |___/  \__| --
  317. --                                                  --
  318. --==================================================--
  319.  
  320.     sets.precast.JA['Azure Lore'] = {}
  321.  
  322.     sets.precast.JA['Provoke'] = {}
  323.  
  324.     --Not an essential set, just there if you need it.  Intended for tanking.
  325.     sets.enmity = {}
  326.  
  327.     sets.precast.Waltz = {}
  328.        
  329.     sets.precast.Waltz['Healing Waltz'] = {}
  330.  
  331.     sets.precast.Step = {}
  332.  
  333.     --Fast Cast for Non-Blue Magic spells
  334.     sets.precast.FC = {}
  335.        
  336.     sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {})
  337.  
  338.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
  339.    
  340.  
  341.    
  342.    
  343. --===============================================================================--    
  344. -- __        __                                               _      _   _   _   --
  345. -- \ \      / /   ___    __ _   _ __     ___    _ __    ___  | | __ (_) | | | |  --
  346. --  \ \ /\ / /   / _ \  / _` | | '_ \   / _ \  | '_ \  / __| | |/ / | | | | | |  --
  347. --   \ V  V /   |  __/ | (_| | | |_) | | (_) | | | | | \__ \ |   <  | | | | | |  --
  348. --    \_/\_/     \___|  \__,_| | .__/   \___/  |_| |_| |___/ |_|\_\ |_| |_| |_|  --
  349. --                             |_|                                               --
  350. --                                                                               --
  351. --===============================================================================--
  352.  
  353.  
  354.    
  355.     sets.precast.WS = {}
  356.  
  357.     sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {})
  358.  
  359.     sets.precast.WS['Expiacion'] = set_combine(sets.precast.WS, {})
  360.  
  361.     sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {})
  362.  
  363.     sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {})
  364.  
  365.     sets.precast.WS['Vorpal Blade'] = set_combine(sets.precast.WS, {})
  366.  
  367.     sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {})
  368.  
  369.  
  370.     --[[Club Weaponskill]]
  371.  
  372.  
  373.     sets.precast.WS['Realmrazer'] = set_combine(sets.precast.WS, {})
  374.  
  375.     sets.precast.WS['Black Halo'] = set_combine(sets.precast.WS, {})
  376.  
  377.     sets.precast.WS['Flash Nova'] = set_combine(sets.precast.WS, {})
  378.  
  379.     sets.precast.WS['True Strike'] = set_combine(sets.precast.WS, {})
  380.    
  381.    
  382. --==================================================--
  383. --   __  __   _       _                        _    --
  384. --  |  \/  | (_)     | |                      | |   --
  385. --  | \  / |  _    __| |   ___    __ _   ___  | |_  --
  386. --  | |\/| | | |  / _` |  / __|  / _` | / __| | __| --
  387. --  | |  | | | | | (_| | | (__  | (_| | \__ \ | |_  --
  388. --  |_|  |_| |_|  \__,_|  \___|  \__,_| |___/  \__| --
  389. --                                                  --
  390. --==================================================--
  391.  
  392.  
  393.     sets.midcast['Blue Magic'] = {}
  394.  
  395.     --[[PHYSICAL SPELLS]]
  396.  
  397.     sets.midcast['Blue Magic'].Physical = {}
  398.  
  399.  
  400.     sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
  401.         {})
  402.  
  403.     sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
  404.         {})
  405.  
  406.     sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
  407.         {})
  408.  
  409.     sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
  410.         {})
  411.  
  412.     sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
  413.         {})
  414.  
  415.     sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
  416.         {})
  417.  
  418.     sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
  419.         {})
  420.  
  421.     sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical,
  422.         {})
  423.  
  424.  
  425.     --[[MAGICAL SPELLS]]
  426.  
  427.     sets.midcast['Blue Magic'].Magical = {}
  428.  
  429.  
  430.     sets.midcast['Blue Magic'].MagicalInt = set_combine(sets.midcast['Blue Magic'].Magical,
  431.         {})
  432.  
  433.     sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
  434.         {})
  435.  
  436.     sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical,
  437.         {})
  438.  
  439.     sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
  440.         {})
  441.  
  442.     sets.midcast['Blue Magic'].MagicalAgi = set_combine(sets.midcast['Blue Magic'].Magical,
  443.         {})
  444.  
  445.     sets.midcast['Blue Magic'].MagicalStr = set_combine(sets.midcast['Blue Magic'].Magical,
  446.         {})
  447.  
  448.     sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical,
  449.         {})
  450.  
  451.     sets.midcast['Blue Magic'].TenebralCrush = set_combine(sets.midcast['Blue Magic'].Magical, {})
  452.        
  453.     --Highest Magic Accuracy gear
  454.     sets.midcast['Blue Magic'].MagicAccuracy = set_combine(sets.midcast['Blue Magic'].Magical, {})
  455.  
  456.  
  457.     sets.midcast['Blue Magic'].Breath = set_combine(sets.midcast['Blue Magic'].Magical, {})
  458.  
  459.  
  460.     sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].Magical, {})
  461.        
  462.        
  463.     sets.midcast['Blue Magic']['White Wind'] = {}
  464.  
  465.  
  466.     sets.midcast['Blue Magic'].Healing = {}
  467.  
  468.  
  469.     sets.midcast['Blue Magic'].SkillBasedBuff = {}
  470.  
  471.  
  472.     sets.midcast['Blue Magic'].Buff = {}
  473.  
  474.  
  475.     sets.midcast['Phalanx'] = {}
  476.  
  477.  
  478.  
  479. --=================================--
  480. --      ___       _   _            --
  481. --     |_ _|   __| | | |   ___     --
  482. --      | |   / _` | | |  / _ \    --
  483. --      | |  | (_| | | | |  __/    --
  484. --     |___|  \__,_| |_|  \___|    --
  485. --                                 --
  486. --=================================--
  487.    
  488.  
  489.     sets.idle = {}
  490.  
  491.  
  492.     sets.idle.Refresh = set_combine(sets.idle, {})
  493.  
  494.  
  495.     sets.idle.PDT = set_combine(sets.idle, {})
  496.  
  497.  
  498.     sets.idle.Cleaving = set_combine(sets.idle, {})
  499.  
  500.  
  501. --====================================================--
  502. --     _____   ____      ____           _             --
  503. --    |_   _| |  _ \    / ___|    ___  | |_   ___     --
  504. --      | |   | |_) |   \___ \   / _ \ | __| / __|    --
  505. --      | |   |  __/     ___) | |  __/ | |_  \__ \    --
  506. --      |_|   |_|       |____/   \___|  \__| |___/    --
  507. --                                                    --
  508. --====================================================--
  509.    
  510.     --Put what weapons you would like to equip when the file loads here, it will lock them after equipping them.
  511.     sets.default_melee_weapons = {}
  512.  
  513.  
  514.     sets.engaged = {}
  515.  
  516.     --Reiki Yotai or other DW suppliment for non haste capped situations.
  517.     sets.engaged.Haste_30 = set_combine(sets.engaged, {})
  518.  
  519.     --Mostly for bead farming
  520.     sets.engaged.Crit = set_combine(sets.engaged, {})
  521.  
  522.     --Mild DT
  523.     sets.engaged.Solo = set_combine(sets.engaged, {})
  524.  
  525.     --Moderate DT
  526.     sets.engaged.Safe = set_combine(sets.engaged, {})
  527.  
  528.     --Full DT
  529.     sets.engaged.DT = set_combine(sets.engaged, {})
  530.    
  531.  
  532. --------------------------------------------------------------------------------------------------------   
  533. ---- _____    ____    _   _   _____    _____   _______   _____    ____    _   _              _      ----
  534. --  / ____|  / __ \  | \ | | |  __ \  |_   _| |__   __| |_   _|  / __ \  | \ | |     /\     | |       --
  535. -- | |      | |  | | |  \| | | |  | |   | |      | |      | |   | |  | | |  \| |    /  \    | |       --
  536. -- | |      | |  | | | . ` | | |  | |   | |      | |      | |   | |  | | | . ` |   / /\ \   | |       --
  537. -- | |____  | |__| | | |\  | | |__| |  _| |_     | |     _| |_  | |__| | | |\  |  / ____ \  | |____   --
  538. --  \_____|  \____/  |_| \_| |_____/  |_____|    |_|    |_____|  \____/  |_| \_| /_/    \_\ |______|  --
  539. ----                                                                                                ----
  540. --------------------------------------------------------------------------------------------------------
  541.  
  542.     sets.TreasureHunter = {}
  543.  
  544.  
  545.     --For alternate earring to moonshade at 3000TP
  546.     sets.MaxTP = {}
  547.  
  548.  
  549.     --Movement speed inside Adoulin (handled automatically)
  550.     sets.Adoulin = {body="Councilor's Garb",}
  551.  
  552.  
  553.     --Movement speed outside Adoulin (handled automatically) |  Carmine Cuisses / Carmine Cuisses+1 etc.
  554.     sets.MoveSpeed = {}
  555.  
  556.  
  557.     --Fucho-no-Obi
  558.     sets.latent_refresh = {}
  559.  
  560.  
  561.     --Store TP gear for Aftermath Up
  562.     sets.engaged.Aftermath3 = set_combine(sets.engaged, {})
  563.  
  564.  
  565.     --Store TP gear; swap windbuffet for Yotai, Adhemar Jacket +1 for Herc Vest +4TA for Store TP,  Store TP ambu cape.
  566.     sets.engaged.AM3HasteCap = set_combine(sets.engaged, {})
  567.  
  568.  
  569.     sets.self_healing = set_combine(sets.midcast['Blue Magic'].Healing, {})
  570.  
  571.  
  572.     sets.WeatherObi = {}
  573.  
  574.  
  575.     sets.Doom = {}
  576.    
  577.    
  578. end
  579.  
  580.  
  581. --======================================================================--
  582. --    __  __                                                     _      --
  583. --   |  \/  |   ___   __   __   ___   _ __ ___     ___   _ __   | |_    --
  584. --   | |\/| |  / _ \  \ \ / /  / _ \ | '_ ` _ \   / _ \ | '_ \  | __|   --
  585. --   | |  | | | (_) |  \ V /  |  __/ | | | | | | |  __/ | | | | | |_    --
  586. --   |_|  |_|  \___/    \_/    \___| |_| |_| |_|  \___| |_| |_|  \__|   --
  587. --                                                                      --
  588. --======================================================================--
  589.  
  590.  
  591.  
  592. mov = {counter=0}
  593. if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
  594.     mov.x = windower.ffxi.get_mob_by_index(player.index).x
  595.     mov.y = windower.ffxi.get_mob_by_index(player.index).y
  596.     mov.z = windower.ffxi.get_mob_by_index(player.index).z
  597. end
  598.  
  599.  
  600. moving = false
  601. windower.raw_register_event('prerender',function()
  602.     mov.counter = mov.counter + 1;
  603.     if mov.counter>15 then
  604.         local pl = windower.ffxi.get_mob_by_index(player.index)
  605.         if pl and pl.x and mov.x and state.EngagedMoving.Value == 'Disabled' then
  606.             if player.status ~= 'Engaged' then
  607.                 dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  608.                 if dist > 1 and not moving then
  609.                     state.Moving.value = true
  610.                     send_command('gs c update')
  611.                     if world.area:contains("Adoulin") then
  612.                         send_command('gs equip sets.Adoulin')
  613.                     else
  614.                         send_command('gs equip sets.MoveSpeed')
  615.                     end
  616.  
  617.                     moving = true
  618.  
  619.                 elseif dist < 1 and moving then
  620.                     state.Moving.value = false
  621.                     send_command('gs c update')
  622.                     moving = false
  623.                 end
  624.             end
  625.         elseif pl and pl.x and mov.x and state.EngagedMoving.Value == 'Enabled' then
  626.             dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  627.             if dist > 1 and not moving then
  628.                 state.Moving.value = true
  629.                 send_command('gs c update')
  630.                 if world.area:contains("Adoulin") then
  631.                     send_command('gs equip sets.Adoulin')
  632.                 else
  633.                     send_command('gs equip sets.MoveSpeed')
  634.                 end
  635.  
  636.                 moving = true
  637.  
  638.             elseif dist < 1 and moving then
  639.                 state.Moving.value = false
  640.                 send_command('gs c update')
  641.                 moving = false
  642.             end
  643.         end
  644.         if pl and pl.x then
  645.             mov.x = pl.x
  646.             mov.y = pl.y
  647.             mov.z = pl.z
  648.         end
  649.         mov.counter = 0
  650.     end
  651. end)
  652.  
  653. windower.register_event('zone change', function()
  654.  
  655.     send_command('gs c set ZoneRing None')
  656.    
  657. end)
  658.  
  659. --=================================================================--
  660. --  _____                          _     _                         --
  661. -- |  ___|  _   _   _ __     ___  | |_  (_)   ___    _ __    ___   --
  662. -- | |_    | | | | | '_ \   / __| | __| | |  / _ \  | '_ \  / __|  --
  663. -- |  _|   | |_| | | | | | | (__  | |_  | | | (_) | | | | | \__ \  --
  664. -- |_|      \__,_| |_| |_|  \___|  \__| |_|  \___/  |_| |_| |___/  --
  665. --                                                                 --
  666. --=================================================================--
  667.  
  668.  
  669. function job_precast(spell, action, spellMap, eventArgs)
  670.  
  671.     if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  672.         eventArgs.cancel = true
  673.         windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  674.     end
  675.    
  676. end
  677.  
  678.  
  679.  
  680.  
  681. function job_post_precast(spell, action, spellMap, eventArgs)
  682.  
  683.     if player.tp > 2750 then
  684.         equip(sets.MaxTP)  
  685.     end
  686.    
  687.     if spell.skill == 'Blue Magic' then
  688.         equip(set_combine(sets.precast.FC['Blue Magic'], sets.precast.FC['Blue Magic']))
  689.     end
  690.    
  691. end
  692.  
  693.  
  694.  
  695.  
  696. function job_post_midcast(spell, action, spellMap, eventArgs)
  697.  
  698.     if spell.skill == 'Blue Magic' then
  699.         for buff,active in pairs(state.Buff) do
  700.             if active and sets.buff[buff] then
  701.                 equip(sets.buff[buff])
  702.             end
  703.         end
  704.        
  705.         if spellMap == 'Healing' and spell.target.type == 'SELF' then
  706.             equip(sets.self_healing)
  707.         end
  708.    
  709.     end
  710.    
  711.     if spell.skill == 'Blue Magic'  then
  712.         if spell.element == world.day_element or spell.element == world.weather_element then
  713.             equip(sets.WeatherObi)
  714.  
  715.         end
  716.     end
  717.  
  718. end
  719.  
  720.  
  721.  
  722.  
  723.  
  724. function job_aftercast(spell, action, spellMap, eventArgs)
  725.  
  726.     if state.DoomMode.value == 'Doom' then
  727.         send_command('input /party IS STILL DOOMED! AM SCAREBOYE PLES HALP!! <scall15>')
  728.     end
  729.  
  730.     if not spell.interrupted then
  731.        if spell.english == "Dream Flower" then -- Sleep Countdown --
  732.             send_command('wait 60;input /echo DREAM FLOWER: [WEARING OFF IN 30 SEC.];wait 15;input /echo DREAM FLOWER: [WEARING OFF IN 15 SEC.];wait 10;input /echo DREAM FLOWER: [WEARING OFF IN 5 SEC.]')
  733.         elseif spell.english == "Entomb" then -- Petrify Countdown --
  734.             send_command('wait 30;input /echo ENTOMB: [WEARING OFF IN 30 SEC.];wait 15;input /echo ENTOMB: [WEARING OFF IN 15 SEC.];wait 10;input /echo ENTOMB: [WEARING OFF IN 5 SEC.]')        
  735.         elseif spell.english == "Tenebral Crush" then -- Defense Down Countdown --
  736.             send_command('wait 30;input /echo Defense Down wearing off (maybe?) in [30 seconds];wait 15;input /echo Defense Down wearing off (maybe?) [15 seconds];wait 10;input /echo Defense Down wearing off (maybe?) [5 seconds]')
  737.         elseif spell.english == "Nat. Meditation" then -- Attack up Countdown Countdown --
  738.             send_command('wait 60;input /echo Nat. Meditation RECAST!!! [30 Sec.];wait 15;input /echo Nat. Meditation RECAST!!! [15 Sec.];wait 10;input /echo Nat. Meditation RECAST!!! [5 Sec.]') 
  739.         end
  740.     end
  741.    
  742. end
  743.  
  744.  
  745.  
  746.  
  747. function customize_idle_set(idleSet)
  748.  
  749.     if player.mpp < 51 then
  750.         set_combine(idleSet, sets.latent_refresh)
  751.     end
  752.    
  753.     if state.ZoneRing.value == 'Warp' then
  754.         idleSet = set_combine(idleSet, {right_ring="Warp Ring"})
  755.     elseif state.ZoneRing.value == 'Holla' then
  756.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Holla)"})
  757.     elseif state.ZoneRing.value == 'Dem' then
  758.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Dem)"})
  759.     elseif state.ZoneRing.value == 'Mea' then
  760.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Mea)"})  
  761.         return idleSet
  762.     end
  763.    
  764.     return idleSet
  765.    
  766. end
  767.  
  768.  
  769.  
  770.  
  771. function job_buff_change(buff, gain)
  772.  
  773.     if (buff and gain) or (buff and not gain) then
  774.         send_command('gs c update')
  775.     end
  776.    
  777.     if buff == "doom" and gain then
  778.             send_command('gs c set DoomMode Doom')
  779.     elseif buff == "doom" and not gain then
  780.             send_command('gs c set DoomMode OFF')
  781.     end
  782.  
  783. end
  784.  
  785.  
  786.  
  787.  
  788. function job_state_change(stateField, newValue, oldValue)
  789.  
  790.     send_command('gs c update')
  791.  
  792.     if state.WeaponLockMode.value == newValue and newValue == 'Locked' then
  793.         disable('main','sub','range')
  794.     elseif state.WeaponLockMode.value == newValue and newValue == 'Unlocked' then
  795.         enable('main','sub','range')
  796.     end
  797.    
  798.     if state.DoomMode.value == 'Doom' then
  799.         send_command("input /party I'm DOOOOOMED, HAAAAAALP! <scall15>")
  800.     elseif state.DoomMode.value ==  newValue and newValue == 'OFF' then
  801.         send_command('input /party Doom is off! THENKS BUD :D <scall11>')
  802.     end
  803.  
  804. end
  805.  
  806. windower.register_event('zone change', function()
  807.  
  808.     send_command('gs c set ZoneRing None')
  809.    
  810. end)
  811.    
  812. function customize_melee_set(meleeSet)
  813.  
  814.     if player.equipment.main == 'Tizona' and (buffactive['Aftermath: Lv.3'] and (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard'])) then
  815.         meleeSet = set_combine(meleeSet, sets.engaged.Aftermath3, sets.engaged.AM3HasteCap)
  816.     elseif player.equipment.main == 'Tizona' and buffactive['Aftermath: Lv.3'] and not (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) then
  817.         meleeSet = set_combine(meleeSet, sets.engaged.Aftermath3)
  818.     end
  819.  
  820.     if not ((buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) and
  821.     (state.OffenseMode.value == 'Normal' or state.OffenseMode.value == 'Crit' or state.OffenseMode.value == 'Solo')) then
  822.         meleeSet = set_combine(meleeSet, sets.engaged.Haste_30)
  823.     end
  824.    
  825.     if buffactive['Doom'] then
  826.         meleeSet = set_combine(meleeSet, sets.Doom)
  827.     end
  828.    
  829.     if not buffactive['Shell'] and (state.OffenseMode.value == 'Solo') then
  830.         meleeSet = set_combine(meleeSet, sets.engaged.Safe)
  831.     end
  832.    
  833.     if state.ZoneRing.value == 'Warp' then
  834.         meleeSet = set_combine(meleeSet, {right_ring="Warp Ring"})
  835.     elseif state.ZoneRing.value == 'Holla' then
  836.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Holla)"})
  837.     elseif state.ZoneRing.value == 'Dem' then
  838.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Dem)"})
  839.     elseif state.ZoneRing.value == 'Mea' then
  840.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Mea)"})
  841.         return meleeSet
  842.     end
  843.    
  844.     return meleeSet
  845.    
  846. end
  847.  
  848.    
  849.    
  850.    
  851. function job_get_spell_map(spell, default_spell_map)
  852.     if spell.skill == 'Blue Magic' then
  853.         for category,spell_list in pairs(blue_magic_maps) do
  854.             if spell_list:contains(spell.english) then
  855.                 return category
  856.             end
  857.         end
  858.     end
  859. end
  860.  
  861.  
  862.  
  863. --=-----------------------------=--
  864. --          __   __   __   __    --
  865. --    /|/| /  | /    /  | /  |   --
  866. --   ( / |(___|(    (___|(   |   --
  867. --   |   )|   )|   )|\   |   )   --
  868. --   |  / |  / |__/ | \  |__/    --
  869. --=-----------------------------=--
  870.  
  871. function select_default_macro_book()
  872.     -- Default macro set/book
  873.    
  874.     if player.sub_job == 'WAR' then
  875.         set_macro_page(3, 7)
  876.     elseif player.sub_job ~= 'WAR' then
  877.         set_macro_page(3, 7)
  878.     end
  879.    
  880. end
  881.  
  882.  
  883. function set_lockstyle()
  884.  
  885.     send_command('wait 2; input /lockstyleset 004')
  886.  
  887. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement