Guest User

Untitled

a guest
Jul 13th, 2020
1,419
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 60.45 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.  
  15.  
  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. setupTextWindow(1525, 1188) -- TABLE CONFIGURED FOR 1440p Monitor currently!!!
  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.     --used for table tracking
  42.     state.Moving = M('false', 'true')
  43.  
  44.    
  45.     include('Mote-TreasureHunter')
  46.    
  47.    
  48.     state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
  49.  
  50.  
  51.     blue_magic_maps = {}
  52.    
  53.     -- Mappings for gear sets to use for various blue magic spells.
  54.     -- While Str isn't listed for each, it's generally assumed as being at least
  55.     -- moderately signficant, even for spells with other mods.
  56.    
  57.     -- Physical Spells --
  58.    
  59.     -- Physical spells with no particular (or known) stat mods
  60.     blue_magic_maps.Physical = S{
  61.         'Bilgestorm'
  62.     }
  63.  
  64.     -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
  65.     blue_magic_maps.PhysicalAcc = S{
  66.         'Heavy Strike',
  67.     }
  68.  
  69.     -- Physical spells with Str stat mod
  70.     blue_magic_maps.PhysicalStr = S{
  71.         'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
  72.         'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
  73.         'Uppercut','Vertical Cleave'
  74.     }
  75.        
  76.     -- Physical spells with Dex stat mod
  77.     blue_magic_maps.PhysicalDex = S{
  78.         'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
  79.         'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
  80.         'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
  81.         'Vanity Dive'
  82.     }
  83.        
  84.     -- Physical spells with Vit stat mod
  85.     blue_magic_maps.PhysicalVit = S{
  86.         'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
  87.         'Power Attack','Quad. Continuum','Sprout Smack','Saurian Slide','Sweeping Gouge','Sub-zero Smash'
  88.     }
  89.        
  90.     -- Physical spells with Agi stat mod
  91.     blue_magic_maps.PhysicalAgi = S{
  92.         'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
  93.         'Pinecone Bomb','Spiral Spin','Wild Oats'
  94.     }
  95.  
  96.     -- Physical spells with Int stat mod
  97.     blue_magic_maps.PhysicalInt = S{
  98.         'Mandibular Bite','Queasyshroom'
  99.     }
  100.  
  101.     -- Physical spells with Mnd stat mod
  102.     blue_magic_maps.PhysicalMnd = S{
  103.         'Ram Charge','Screwdriver','Tourbillion'
  104.     }
  105.  
  106.     -- Physical spells with Chr stat mod
  107.     blue_magic_maps.PhysicalChr = S{
  108.         'Bludgeon'
  109.     }
  110.  
  111.     -- Physical spells with HP stat mod
  112.     blue_magic_maps.PhysicalHP = S{
  113.         'Final Sting'
  114.     }
  115.  
  116.     -- Magical Spells --
  117.  
  118.     -- Magical spells with the typical Int mod
  119.     blue_magic_maps.Magical = S{
  120.         'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
  121.         'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
  122.         'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
  123.         'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
  124.     }
  125.  
  126.     --Tenebral Crush
  127.     blue_magic_maps.TenebralCrush = S{'Tenebral Crush'}
  128.    
  129.     -- Magical spells with a primary Mnd mod
  130.     blue_magic_maps.MagicalMnd = S{
  131.         'Acrid Stream','Evryone. Grudge','Nectarous Deluge','Magic Hammer','Mind Blast','Scouring Spate'
  132.     }
  133.  
  134.     -- Magical spells with a primary Chr mod
  135.     blue_magic_maps.MagicalChr = S{
  136.         'Eyes On Me','Mysterious Light'
  137.     }
  138.  
  139.     -- Magical spells with a Vit stat mod (on top of Int)
  140.     blue_magic_maps.MagicalVit = S{
  141.         'Atra. Libations','Entomb','Thermal Pulse'
  142.     }
  143.  
  144.     --Magical spells with a AGI Stat Mod.
  145.     blue_magic_maps.MagicalAgi = S{
  146.         'Molting Plumage','Palling Salvo','Silent Storm'
  147.     }
  148.    
  149.     --Magical spells with a STR Stat Mod.
  150.     blue_magic_maps.MagicalStr = S{
  151.         'Blinding Fulgor','Searing Tempest'
  152.     }
  153.    
  154.     blue_magic_maps.MagicalInt = S{'Spectral Floe'}
  155.    
  156.     -- Magical spells with a Dex stat mod (on top of Int)
  157.     blue_magic_maps.MagicalDex = S{
  158.         'Anvil Lightning','Charged Whisker','Gates of Hades'
  159.     }
  160.            
  161.     -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
  162.     -- Add Int for damage where available, though.
  163.     blue_magic_maps.MagicAccuracy = S{
  164.         '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
  165.         'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
  166.         'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
  167.         'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  168.         'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
  169.         'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
  170.         'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  171.         'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
  172.     }
  173.        
  174.     -- Breath-based spells
  175.     blue_magic_maps.Breath = S{
  176.         'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
  177.         'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
  178.         'Thunder Breath','Vapor Spray','Wind Breath'
  179.     }
  180.  
  181.     -- Stun spells
  182.     blue_magic_maps.Stun = S{
  183.         'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
  184.         'Thunderbolt','Whirl of Rage'
  185.     }
  186.        
  187.     -- Healing spells
  188.     blue_magic_maps.Healing = S{
  189.         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
  190.         'Wild Carrot'
  191.     }
  192.    
  193.     -- Buffs that depend on blue magic skill
  194.     blue_magic_maps.SkillBasedBuff = S{
  195.         'Barrier Tusk','Diamondhide','Magic Barrier','Mighty Guard','Metallic Body','Plasma Charge',
  196.         'Pyric Bulwark','Reactor Cool',
  197.     }
  198.  
  199.     -- Other general buffs
  200.     blue_magic_maps.Buff = S{
  201.         'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
  202.         'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
  203.         'Memento Mori','Mighty Guard','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
  204.         'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
  205.         'Zephyr Mantle'
  206.     }
  207.    
  208.    
  209.     -- Spells that require Unbridled Learning to cast.
  210.     unbridled_spells = S{
  211.         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve','Cruel Joke','Cesspool',
  212.         'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Mighty Guard','Polar Roar',
  213.         'Pyric Bulwark','Tearing Gust','Thunderbolt','Tourbillion','Uproot'
  214.     }
  215. end
  216.  
  217. -------------------------------------------------------------------------------------------------------------------
  218. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  219. -------------------------------------------------------------------------------------------------------------------
  220.  
  221. --====================================================--
  222. --                                                    --
  223. --  .   .                   ,---.     |               --
  224. --  |   |,---.,---.,---.    `---.,---.|--- .   .,---. --
  225. --  |   |`---.|---'|            ||---'|    |   ||   | --
  226. --  `---'`---'`---'`        `---'`---'`---'`---'|---' --
  227. --                                              |     --
  228. --                                                    --
  229. --====================================================--
  230.  
  231. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  232. function user_setup()
  233.    
  234.     state.OffenseMode:options('Normal', 'Crit', 'Solo', 'Safe', 'DT')
  235.     state.IdleMode:options('Normal', 'Refresh', 'PDT', 'Cleaving')
  236.     state.WeaponLockMode = M('Unlocked','Locked')
  237.     state.DoomMode = M('OFF', 'Doom')
  238.     state.ZoneRing = M('None','Warp', 'Holla', 'Dem', 'Mea')
  239.     state.EngagedMoving = M('Disabled','Enabled')
  240.  
  241.  
  242.     --default starting commands
  243.     send_command('input //gs equip sets.default_melee_weapons;wait 0.2;gs c set WeaponLockMode Locked')
  244.    
  245.     -- Additional local binds
  246.    
  247.     send_command('bind f1 gs c cycle EngagedMoving')
  248.     send_command('bind f10 gs c cycle IdleMode')
  249.     send_command('bind f12 gs c cycle WeaponLockMode')
  250.     send_command('bind f9 gs c cycle OffenseMode')
  251.     send_command('bind f11 gs c set IdleMode PDT; gs c set OffenseMode Solo')
  252.     send_command('bind ^f11 gs c set IdleMode Normal; gs c set OffenseMode Normal')
  253.     send_command('bind f6 gs c set OffenseMode Normal')
  254.     send_command('bind f7 gs c set OffenseMode Solo')
  255.     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')
  256.     send_command('bind f5 gs c cycle ZoneRing')
  257.     send_command('bind ^f9 gs c cycle TreasureMode')
  258.    
  259.     select_default_macro_book()
  260.     set_lockstyle()
  261.    
  262. end
  263.  
  264. --=================================--
  265. --  _  _ _  _ _    ____ ____ ___   --
  266. --  |  | |\ | |    |  | |__| |  \  --
  267. --  |__| | \| |___ |__| |  | |__/  --
  268. --                                 --
  269. --=================================--
  270.  
  271. function user_unload()
  272.  
  273.         send_command('unbind ^f9')
  274.         send_command('unbind ^f10')
  275.         send_command('unbind ^f11')
  276.         send_command('unbind ^f12')
  277.         send_command('unbind f8')
  278.        
  279.         send_command('unbind !f9')
  280.         send_command('unbind !f10')
  281.         send_command('unbind !f11')
  282.         send_command('unbind !f12')
  283.  
  284.         send_command('unbind f1')
  285.         send_command('unbind f9')
  286.         send_command('unbind f10')
  287.         send_command('unbind f11')
  288.         send_command('unbind f12')
  289.         send_command('unbind f5')
  290.        
  291.         send_command('unbind -')
  292.         send_command('unbind =')
  293.        
  294. end
  295.  
  296.  
  297. --=============================================--
  298. --                                             --
  299. --   ..|'''.|  '||''''|      |     '||''|.     --
  300. --  .|'     '   ||  .       |||     ||   ||    --
  301. --  ||    ....  ||''|      |  ||    ||''|'     --
  302. --  '|.    ||   ||        .''''|.   ||   |.    --
  303. --   ''|...'|  .||.....| .|.  .||. .||.  '|'   --
  304. --                                             --
  305. --=============================================--
  306.  
  307. function init_gear_sets()
  308.     --------------------------------------
  309.     -- Start defining the sets
  310.     --------------------------------------
  311.  
  312.     sets.buff['Burst Affinity'] = {feet="Hashi. Basmak +1",back="Cornflower Cape",ring2="Mujin Band"}
  313.     sets.buff['Chain Affinity'] = {}
  314.     sets.buff.Convergence = {}
  315.     sets.buff.Diffusion = {feet="Luhlaza Charuqs +1"}
  316.     sets.buff.Enchainment = {}
  317.     sets.buff.Efflux = {}
  318.  
  319. --==================================================--
  320. --  ____                                       _    --
  321. -- |  _ \   _ __    ___    ___    __ _   ___  | |_  --
  322. -- | |_) | | '__|  / _ \  / __|  / _` | / __| | __| --
  323. -- |  __/  | |    |  __/ | (__  | (_| | \__ \ | |_  --
  324. -- |_|     |_|     \___|  \___|  \__,_| |___/  \__| --
  325. --                                                  --
  326. --==================================================--
  327.  
  328.     sets.precast.JA['Azure Lore'] = {}
  329.  
  330.     sets.precast.JA['Provoke'] = {}
  331.  
  332.     sets.enmity = {}
  333.    
  334.     sets.precast.Waltz = {}
  335.        
  336.     sets.precast.Waltz['Healing Waltz'] = {}
  337.    
  338.     sets.precast.Step = {}
  339.    
  340.    
  341.     sets.precast.FC = {
  342.         main="Vampirism",
  343.         head="Carmine Mask +1",
  344.         neck="Orunmila's torque",
  345.         ear1="Loquac. Earring",
  346.         ear2="Etiolation Earring",
  347.         body={ name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}},
  348.         hands="Helios Gloves",
  349.         ring1="Prolix ring",
  350.         ring2="Kishar ring",
  351.         back="Swith Cape +1",
  352.         waist="Witful Belt",
  353.         legs="Pinga Pants",
  354.         feet="Carmine Greaves +1"}
  355.        
  356.     sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC,
  357.     {body="Hashishin Mintan"})
  358.    
  359.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
  360.    
  361.  
  362.    
  363.    
  364. --===============================================================================--    
  365. -- __        __                                               _      _   _   _   --
  366. -- \ \      / /   ___    __ _   _ __     ___    _ __    ___  | | __ (_) | | | |  --
  367. --  \ \ /\ / /   / _ \  / _` | | '_ \   / _ \  | '_ \  / __| | |/ / | | | | | |  --
  368. --   \ V  V /   |  __/ | (_| | | |_) | | (_) | | | | | \__ \ |   <  | | | | | |  --
  369. --    \_/\_/     \___|  \__,_| | .__/   \___/  |_| |_| |___/ |_|\_\ |_| |_| |_|  --
  370. --                             |_|                                               --
  371. --                                                                               --
  372. --===============================================================================--
  373.  
  374.  
  375.    
  376.     sets.precast.WS = {
  377.         ammo="Falcon Eye",
  378.         head="Adhemar Bonnet +1",
  379.         neck="Fotia gorget",
  380.         ear1="Moonshade earring",
  381.         ear2="Brutal earring",
  382.         body="Abnoba Kaftan",
  383.         hands={ name="Herculean Gloves", augments={'Accuracy+6','Crit. hit damage +5%','STR+6','Attack+15',}},
  384.         ring1="Epona's ring",ring2="Begrudging Ring",
  385.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
  386.         waist="Fotia Belt",
  387.         legs={ name="Herculean Trousers", augments={'Accuracy+25 Attack+25','Crit. hit damage +4%','AGI+7',}},
  388.         feet="Thereoid Greaves"}
  389.  
  390.     sets.precast.WS['Requiescat'] = {
  391.         ammo="Mantoptera Eye",
  392.         head="Jhakri Coronal +2",
  393.         body="Jhakri Robe +2",
  394.         hands="Jhakri Cuffs +2",
  395.         legs="Jhakri Slops +2",
  396.         feet="Jhakri Pigaches +2",
  397.         neck="Caro Necklace",
  398.         waist="Prosilio Belt +1",
  399.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  400.         right_ear="Cessance Earring",
  401.         left_ring="Begrudging Ring",
  402.         right_ring="Rufescent Ring",
  403.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},}
  404.  
  405.     sets.precast.WS['Expiacion'] = {
  406.         ammo="Mantoptera Eye",
  407.         head={ name="Herculean Helm", augments={'Attack+23','Weapon skill damage +4%','STR+10',}},
  408.         body="Assimilator's Jubbah +3",
  409.         hands="Jhakri Cuffs +2",
  410.         legs={ name="Herculean Trousers", augments={'Weapon skill damage +5%','STR+8','Accuracy+8','Attack+10',}},
  411.         feet="Jhakri Pigaches +2",
  412.         neck="Caro Necklace",
  413.         waist="Prosilio Belt +1",
  414.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  415.         right_ear="Ishvara Earring",
  416.         right_ring="Karieyh Ring +1",
  417.         left_ring="Rufescent Ring",
  418.         back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  419.  
  420.     sets.precast.WS['Savage Blade'] = {
  421.         ammo="Mantoptera Eye",
  422.         head={ name="Herculean Helm", augments={'Attack+23','Weapon skill damage +4%','STR+10',}},
  423.         body="Assimilator's Jubbah +3",
  424.         hands="Jhakri Cuffs +2",
  425.         legs={ name="Herculean Trousers", augments={'Weapon skill damage +5%','STR+8','Accuracy+8','Attack+10',}},
  426.         feet={ name="Herculean Boots", augments={'Accuracy+28','Weapon skill damage +5%','VIT+8','Attack+4',}},
  427.         neck="Caro Necklace",
  428.         waist="Prosilio Belt +1",
  429.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  430.         right_ear="Ishvara Earring",
  431.         left_ring="Karieyh Ring +1",
  432.         right_ring="Rufescent Ring",
  433.         back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  434.    
  435.     sets.precast.WS['Chant du Cygne'] = {
  436.         main="Tizona",
  437.         sub="Almace",
  438.         ammo="Falcon Eye",
  439.         head="Malignance Chapeau",
  440.         body="Abnoba Kaftan",
  441.         hands="Malignance Gloves",
  442.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  443.         feet="Malignance Boots",
  444.         neck="Fotia Gorget",
  445.         waist="Fotia Belt",
  446.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  447.         right_ear="Brutal Earring",
  448.         left_ring="Ilabrat Ring",
  449.         right_ring="Begrudging Ring",
  450.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},}
  451.    
  452.     sets.precast.WS['Vorpal Blade'] = {
  453.         ammo="Falcon Eye",
  454.         head="Malignance Chapeau",
  455.         body="Abnoba Kaftan",
  456.         hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  457.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  458.         feet={ name="Herculean Boots", augments={'Accuracy+23 Attack+23','"Triple Atk."+4','DEX+7','Attack+6',}},
  459.         neck="Fotia Gorget",
  460.         waist="Fotia Belt",
  461.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  462.         right_ear="Brutal Earring",
  463.         left_ring="Ilabrat Ring",
  464.         right_ring="Begrudging Ring",
  465.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},}
  466.    
  467.     sets.precast.WS['Sanguine Blade'] = {
  468.         ammo="Pemphredo Tathlum",
  469.         head="Pixie Hairpin +1",
  470.         body="Jhakri Robe +2",
  471.         hands="Jhakri Cuffs +2",
  472.         legs="Jhakri Slops +2",
  473.         feet="Jhakri Pigaches +2",
  474.         neck="Sanctity Necklace",
  475.         waist="Eschan Stone",
  476.         left_ear="Regal Earring",
  477.         right_ear="Friomisi Earring",
  478.         left_ring="Archon Ring",
  479.         right_ring="Karieyh Ring +1",
  480.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  481.    
  482.    
  483.     --[[Club Weaponskill]]
  484.    
  485.  
  486.     sets.precast.WS['Realmrazer'] = {
  487.         ammo="Mantoptera Eye",
  488.         head="Jhakri Coronal +2",
  489.         body="Jhakri Robe +2",
  490.         hands="Jhakri Cuffs +2",
  491.         legs="Jhakri Slops +2",
  492.         feet="Jhakri Pigaches +2",
  493.         neck="Caro Necklace",
  494.         waist="Prosilio Belt +1",
  495.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  496.         right_ear="Cessance Earring",
  497.         left_ring="Begrudging Ring",
  498.         right_ring="Rufescent Ring",
  499.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},}
  500.    
  501.     sets.precast.WS['Black Halo'] = {
  502.         main="Kaja Rod",
  503.         sub="Kaja Sword",
  504.         ammo="Mantoptera Eye",
  505.         head={ name="Herculean Helm", augments={'Attack+23','Weapon skill damage +4%','STR+10',}},
  506.         body="Assim. Jubbah +3",
  507.         hands="Jhakri Cuffs +2",
  508.         legs={ name="Herculean Trousers", augments={'Weapon skill damage +5%','STR+8','Accuracy+8','Attack+10',}},
  509.         feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
  510.         neck="Fotia Gorget",
  511.         waist="Fotia Belt",
  512.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  513.         right_ear="Ishvara Earring",
  514.         left_ring="Karieyh Ring +1",
  515.         right_ring="Rufescent Ring",
  516.         back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  517.    
  518.     sets.precast.WS['Flash Nova'] = {
  519.         main="Kaja Rod",
  520.         sub="Kaja Sword",
  521.         ammo="Mantoptera Eye",
  522.         head={ name="Herculean Helm", augments={'Pet: INT+2','"Mag.Atk.Bns."+25','Chance of successful block +6','Accuracy+2 Attack+2','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
  523.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  524.         hands="Jhakri Cuffs +2",
  525.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  526.         feet="Jhakri Pigaches +2",
  527.         neck="Fotia Gorget",
  528.         waist="Fotia Belt",
  529.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +250',}},
  530.         right_ear="Ishvara Earring",
  531.         left_ring="Karieyh Ring +1",
  532.         right_ring="Rufescent Ring",
  533.         back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  534.    
  535.     sets.precast.WS['True Strike'] = {
  536.         ammo="Mantoptera Eye",
  537.         head={ name="Herculean Helm", augments={'Attack+23','Weapon skill damage +4%','STR+10',}},
  538.         body="Assimilator's Jubbah +3",
  539.         hands="Jhakri Cuffs +2",
  540.         legs={ name="Herculean Trousers", augments={'Weapon skill damage +5%','STR+8','Accuracy+8','Attack+10',}},
  541.         feet={ name="Herculean Boots", augments={'Accuracy+28','Weapon skill damage +5%','VIT+8','Attack+4',}},
  542.         neck="Caro Necklace",
  543.         waist="Prosilio Belt +1",
  544.         left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','TP Bonus +25',}},
  545.         right_ear="Ishvara Earring",
  546.         left_ring="Karieyh Ring +1",
  547.         right_ring="Rufescent Ring",
  548.         back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}
  549.    
  550.    
  551. --==================================================--
  552. --   __  __   _       _                        _    --
  553. --  |  \/  | (_)     | |                      | |   --
  554. --  | \  / |  _    __| |   ___    __ _   ___  | |_  --
  555. --  | |\/| | | |  / _` |  / __|  / _` | / __| | __| --
  556. --  | |  | | | | | (_| | | (__  | (_| | \__ \ | |_  --
  557. --  |_|  |_| |_|  \__,_|  \___|  \__,_| |___/  \__| --
  558. --                                                  --
  559. --==================================================--
  560.  
  561.  
  562.     sets.midcast['Blue Magic'] = {
  563.         main="Tizona",
  564.         sub={ name="Mimesis", augments={'Accuracy+50','Mag. Acc.+50','System: 2 ID: 115 Val: 79',}},
  565.         ammo="Pemphredo Tathlum",
  566.         head="Carmine Mask +1",
  567.         body="Jhakri Robe +2",
  568.         hands="Jhakri Cuffs +2",
  569.         legs="Jhakri Slops +2",
  570.         feet="Jhakri pigaches +2",
  571.         neck="Incanter's Torque",
  572.         waist="Eschan Stone",
  573.         left_ear="Gwati Earring",
  574.         right_ear="Dignitary's Earring",
  575.         left_ring="Stikini Ring +1",
  576.         right_ring="Stikini Ring +1",
  577.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  578.    
  579.     --[[PHYSICAL SPELLS]]
  580.    
  581.  
  582.    
  583.     sets.midcast['Blue Magic'].Physical = {
  584.         main="Tizona",
  585.         sub={ name="Mimesis", augments={'Accuracy+50','Mag. Acc.+50','System: 2 ID: 115 Val: 79',}},
  586.         ammo="Pemphredo Tathlum",
  587.         head="Carmine Mask +1",
  588.         body="Jhakri Robe +2",
  589.         hands="Jhakri Cuffs +2",
  590.         legs="Jhakri Slops +2",
  591.         feet="Jhakri pigaches +2",
  592.         neck="Incanter's Torque",
  593.         waist="Eschan Stone",
  594.         left_ear="Gwati Earring",
  595.         right_ear="Dignitary's Earring",
  596.         left_ring="Stikini Ring +1",
  597.         right_ring="Stikini Ring +1",
  598.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  599.  
  600.  
  601.     sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
  602.         {})
  603.  
  604.     sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
  605.         {})
  606.  
  607.     sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
  608.         {})
  609.  
  610.     sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
  611.         {})
  612.  
  613.     sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
  614.         {})
  615.  
  616.     sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
  617.         {})
  618.  
  619.     sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
  620.         {})
  621.  
  622.     sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical,
  623.         {})
  624.  
  625.  
  626.     --[[MAGICAL SPELLS]]
  627.    
  628.     sets.midcast['Blue Magic'].Magical = {    
  629.         main="Kaja Rod",
  630.         sub="Kaja Sword",
  631.         ammo="Pemphredo Tathlum",
  632.         head={ name="Herculean Helm", augments={'Pet: INT+2','"Mag.Atk.Bns."+25','Chance of successful block +6','Accuracy+2 Attack+2','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
  633.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  634.         hands="Jhakri Cuffs +2",
  635.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  636.         feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','MND+5','Mag. Acc.+7','"Mag.Atk.Bns."+14',}},
  637.         neck="Sanctity Necklace",
  638.         waist="Eschan Stone",
  639.         left_ear="Regal Earring",
  640.         right_ear="Friomisi Earring",
  641.         left_ring="Shiva Ring +1",
  642.         right_ring="Shiva Ring +1",
  643.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  644.  
  645.     sets.midcast['Blue Magic'].MagicalInt = set_combine(sets.midcast['Blue Magic'].Magical, {
  646.         main="Kaja Rod",
  647.         sub="Kaja Sword",
  648.         ammo="Pemphredo Tathlum",
  649.         head={ name="Herculean Helm", augments={'Pet: INT+2','"Mag.Atk.Bns."+25','Chance of successful block +6','Accuracy+2 Attack+2','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
  650.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  651.         hands="Jhakri Cuffs +2",
  652.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  653.         feet="Jhakri Pigaches +2",
  654.         neck="Sanctity Necklace",
  655.         waist="Eschan Stone",
  656.         left_ear="Regal Earring",
  657.         right_ear="Friomisi Earring",
  658.         left_ring="Shiva Ring +1",
  659.         right_ring="Shiva Ring +1",
  660.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},})
  661.    
  662.     sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
  663.         {})
  664.  
  665.     sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical,
  666.         {})
  667.  
  668.     sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
  669.         {})
  670.  
  671.     sets.midcast['Blue Magic'].MagicalAgi = set_combine(sets.midcast['Blue Magic'].Magical,
  672.         {})
  673.    
  674.     sets.midcast['Blue Magic'].MagicalStr = set_combine(sets.midcast['Blue Magic'].Magical,
  675.         {})
  676.    
  677.     sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical,
  678.         {})
  679.    
  680.     sets.midcast['Blue Magic'].TenebralCrush = {
  681.         main="Kaja Rod",
  682.         sub="Kaja Sword",
  683.         ammo="Pemphredo Tathlum",
  684.         head="Pixie Hairpin +1",
  685.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  686.         hands="Jhakri Cuffs +2",
  687.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  688.         feet={ name="Herculean Boots", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','MND+5','Mag. Acc.+7','"Mag.Atk.Bns."+14',}},
  689.         neck="Sanctity Necklace",
  690.         waist="Eschan Stone",
  691.         left_ear="Regal Earring",
  692.         right_ear="Friomisi Earring",
  693.         left_ring="Shiva Ring +1",
  694.         right_ring="Archon Ring",
  695.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  696.        
  697.     sets.midcast['Blue Magic'].MagicAccuracy = {
  698.         main="Tizona",
  699.         sub="Almace",
  700.         ammo="Pemphredo Tathlum",
  701.         head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
  702.         body="Jhakri Robe +2",
  703.         hands="Malignance Gloves",
  704.         legs="Jhakri Slops +2",
  705.         feet="Malignance Boots",
  706.         neck="Erra Pendant",
  707.         waist="Eschan Stone",
  708.         left_ear="Regal Earring",
  709.         right_ear="Digni. Earring",
  710.         left_ring="Stikini Ring +1",
  711.         right_ring="Stikini Ring +1",
  712.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  713.  
  714.    
  715.     sets.midcast['Blue Magic'].Breath = {
  716.         main="Tizona",
  717.         sub={ name="Mimesis", augments={'Accuracy+50','Mag. Acc.+50','System: 2 ID: 115 Val: 79',}},
  718.         ammo="Pemphredo Tathlum",
  719.         head="Carmine Mask +1",
  720.         body="Jhakri Robe +2",
  721.         hands="Jhakri Cuffs +2",
  722.         legs="Jhakri Slops +2",
  723.         feet="Jhakri pigaches +2",
  724.         neck="Erra Pendant",
  725.         waist="Eschan Stone",
  726.         left_ear="Regal Earring",
  727.         right_ear="Dignitary's Earring",
  728.         left_ring="Stikini Ring +1",
  729.         right_ring="Stikini Ring +1",
  730.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  731.  
  732.    
  733.     sets.midcast['Blue Magic'].Stun = {
  734.         main="Tizona",
  735.         sub="Almace",
  736.         ammo="Pemphredo Tathlum",
  737.         head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
  738.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  739.         hands="Malignance Gloves",
  740.         legs="Malignance Tights",
  741.         feet="Malignance Boots",
  742.         neck="Incanter's Torque",
  743.         waist="Eschan Stone",
  744.         left_ear="Regal Earring",
  745.         right_ear="Digni. Earring",
  746.         left_ring="Stikini Ring +1",
  747.         right_ring="Stikini Ring +1",
  748.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  749.        
  750.     sets.midcast['Blue Magic']['White Wind'] = {
  751.         main="Tamaxchi",
  752.         sub="Bolelabunga",
  753.         ammo="Mavi Tathlum",
  754.         head={ name="Uk'uxkaj Cap", augments={'Phys. dmg. taken -2%','Magic dmg. taken -2%','Phys. dmg. taken -2%',}},
  755.         body="Pinga Tunic",
  756.         hands={ name="Rawhide Gloves", augments={'DEX+10','STR+7','INT+7',}},
  757.         legs="Pinga Pants",
  758.         feet={ name="Luhlaza Charuqs +1", augments={'Enhances "Diffusion" effect',}},
  759.         neck="Loricate Torque +1",
  760.         waist="Kentarch Belt +1",
  761.         left_ear="Digni. Earring",
  762.         right_ear="Mendicant's Earring",
  763.         left_ring="Stikini Ring +1",
  764.         right_ring="Stikini Ring +1",
  765.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}}}
  766.  
  767.     sets.midcast['Blue Magic'].Healing = {
  768.         main="Tamaxchi",
  769.         sub="Bolelabunga",
  770.         ammo="Mavi Tathlum",
  771.         head={ name="Uk'uxkaj Cap", augments={'Phys. dmg. taken -2%','Magic dmg. taken -2%','Phys. dmg. taken -2%',}},
  772.         body="Pinga Tunic",
  773.         hands={ name="Rawhide Gloves", augments={'DEX+10','STR+7','INT+7',}},
  774.         legs="Pinga Pants",
  775.         feet={ name="Luhlaza Charuqs +1", augments={'Enhances "Diffusion" effect',}},
  776.         neck="Loricate Torque +1",
  777.         waist="Kentarch Belt +1",
  778.         left_ear="Digni. Earring",
  779.         right_ear="Mendicant's Earring",
  780.         left_ring="Stikini Ring +1",
  781.         right_ring="Stikini Ring +1",
  782.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}}}
  783.  
  784.     sets.midcast['Blue Magic'].SkillBasedBuff = {
  785.         ammo="Mavi Tathlum",
  786.         head="Carmine Mask +1",
  787.         body="Assim. Jubbah +3",
  788.         hands={ name="Rawhide Gloves", augments={'DEX+10','STR+7','INT+7',}},
  789.         legs="Aya. Cosciales +1",
  790.         feet={ name="Luhlaza Charuqs +1", augments={'Enhances "Diffusion" effect',}},
  791.         neck="Incanter's Torque",
  792.         waist="Kentarch Belt +1",
  793.         left_ear="Digni. Earring",
  794.         right_ear="Zennaroi Earring",
  795.         left_ring="Stikini Ring +1",
  796.         right_ring="Stikini Ring +1",
  797.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  798.  
  799.     sets.midcast['Blue Magic'].Buff = {
  800.         ammo="Mavi Tathlum",
  801.         head="Carmine Mask +1",
  802.         body="Assim. Jubbah +3",
  803.         hands={ name="Rawhide Gloves", augments={'DEX+10','STR+7','INT+7',}},
  804.         legs="Aya. Cosciales +1",
  805.         feet={ name="Luhlaza Charuqs +1", augments={'Enhances "Diffusion" effect',}},
  806.         neck="Incanter's Torque",
  807.         waist="Kentarch Belt +1",
  808.         left_ear="Digni. Earring",
  809.         right_ear="Zennaroi Earring",
  810.         left_ring="Stikini Ring +1",
  811.         right_ring="Stikini Ring +1",
  812.         back={ name="Cornflower Cape", augments={'MP+16','DEX+1','Blue Magic skill +9',}},}
  813.    
  814.  
  815.    
  816.     sets.midcast['Phalanx'] = {    
  817.         main="Terra's Staff",
  818.         sub="Alber Strap",
  819.         ammo="Staunch Tathlum +1",
  820.         head={ name="Herculean Helm", augments={'Accuracy+9','CHR+9','"Refresh"+1','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  821.         body={ name="Taeon Tabard", augments={'Accuracy+19 Attack+19','Spell interruption rate down -10%','Phalanx +3',}},
  822.         hands={ name="Herculean Gloves", augments={'MND+4','VIT+13','Phalanx +5','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  823.         legs={ name="Taeon Tights", augments={'Spell interruption rate down -10%','Phalanx +3',}},
  824.         feet={ name="Taeon Boots", augments={'Accuracy+23','Spell interruption rate down -8%','Phalanx +3',}},
  825.         neck="Loricate Torque +1",
  826.         waist="Flume Belt +1",
  827.         left_ear="Etiolation Earring",
  828.         right_ear="Odnowa Earring +1",
  829.         left_ring="Defending Ring",
  830.         right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -4%',}},
  831.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  832.  
  833.  
  834.  
  835. --=================================--
  836. --      ___       _   _            --
  837. --     |_ _|   __| | | |   ___     --
  838. --      | |   / _` | | |  / _ \    --
  839. --      | |  | (_| | | | |  __/    --
  840. --     |___|  \__,_| |_|  \___|    --
  841. --                                 --
  842. --=================================--
  843.    
  844.  
  845.     sets.idle = {
  846.         ammo="Staunch Tathlum +1",
  847.         head={ name="Herculean Helm", augments={'Accuracy+9','CHR+9','"Refresh"+1','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  848.         neck="Loricate Torque +1",
  849.         ear1="Etiolation Earring",
  850.         ear2="Odnowa Earring +1",
  851.         body="Jhakri Robe +2",
  852.         hands={ name="Herculean Gloves", augments={'STR+15','Attack+13','"Refresh"+1','Accuracy+5 Attack+5','Mag. Acc.+19 "Mag.Atk.Bns."+19',}},
  853.         ring1="Defending Ring",
  854.         ring2="Karieyh Ring +1",
  855.         back="Solemnity Cape",
  856.         waist="Flume Belt +1",
  857.         legs={ name="Herculean Trousers", augments={'Sklchn.dmg.+4%','Pet: STR+13','"Refresh"+2',}},
  858.         feet={ name="Herculean Boots", augments={'Pet: Attack+19 Pet: Rng.Atk.+19','Pet: "Dbl. Atk."+4','"Refresh"+1','Accuracy+8 Attack+8',}},
  859.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  860.  
  861.     sets.idle.Refresh = {
  862.         main="Sequence",
  863.         sub={ name="Colada", augments={'"Dbl.Atk."+3','DEX+15','Attack+8',}},
  864.         ammo="Staunch Tathlum +1",
  865.         head={ name="Herculean Helm", augments={'Accuracy+9','CHR+9','"Refresh"+1','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  866.         body="Assim. Jubbah +3",
  867.         hands={ name="Herculean Gloves", augments={'STR+15','Attack+13','"Refresh"+1','Accuracy+5 Attack+5','Mag. Acc.+19 "Mag.Atk.Bns."+19',}},
  868.         legs={ name="Herculean Trousers", augments={'Sklchn.dmg.+4%','Pet: STR+13','"Refresh"+2',}},
  869.         feet={ name="Herculean Boots", augments={'Pet: Attack+19 Pet: Rng.Atk.+19','Pet: "Dbl. Atk."+4','"Refresh"+1','Accuracy+8 Attack+8',}},
  870.         neck="Loricate Torque +1",
  871.         waist="Flume Belt +1",
  872.         left_ear="Etiolation Earring",
  873.         right_ear="Infused Earring",
  874.         left_ring="Defending Ring",
  875.         right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -4%',}},
  876.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  877.        
  878.     sets.idle.PDT = {
  879.         main="Terra's Staff",
  880.         sub="Alber strap",
  881.         ammo="Staunch Tathlum +1",
  882.         head="Ayanmo Zucchetto +2",
  883.         body="Ayanmo Corazza +2",
  884.         hands="Assimilator's Bazubands +3",
  885.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  886.         feet={ name="Herculean Boots", augments={'Pet: Attack+19 Pet: Rng.Atk.+19','Pet: "Dbl. Atk."+4','"Refresh"+1','Accuracy+8 Attack+8',}},
  887.         neck="Loricate Torque +1",
  888.         waist="Flume Belt +1",
  889.         left_ear="Etiolation Earring",
  890.         right_ear="Odnowa Earring +1",
  891.         left_ring="Defending Ring",
  892.         right_ring="Dark Ring",
  893.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  894.  
  895.     sets.idle.Cleaving = {    
  896.         main="Terra's Staff",
  897.         sub="Alber Strap",
  898.         ammo="Staunch Tathlum +1",
  899.         head="Malignance Chapeau",
  900.         body="Jhakri Robe +2",
  901.         hands={ name="Herculean Gloves", augments={'STR+15','Attack+13','"Refresh"+1','Accuracy+5 Attack+5','Mag. Acc.+19 "Mag.Atk.Bns."+19',}},
  902.         legs={ name="Carmine Cuisses +1", augments={'HP+80','STR+12','INT+12',}},
  903.         feet={ name="Herculean Boots", augments={'Pet: Attack+19 Pet: Rng.Atk.+19','Pet: "Dbl. Atk."+4','"Refresh"+1','Accuracy+8 Attack+8',}},
  904.         neck="Loricate Torque +1",
  905.         waist="Flume Belt +1",
  906.         left_ear="Etiolation Earring",
  907.         right_ear="Odnowa Earring +1",
  908.         left_ring="Defending Ring",
  909.         right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -4%',}},
  910.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  911.  
  912.  
  913. --====================================================--
  914. --     _____   ____      ____           _             --
  915. --    |_   _| |  _ \    / ___|    ___  | |_   ___     --
  916. --      | |   | |_) |   \___ \   / _ \ | __| / __|    --
  917. --      | |   |  __/     ___) | |  __/ | |_  \__ \    --
  918. --      |_|   |_|       |____/   \___|  \__| |___/    --
  919. --                                                    --
  920. --====================================================--
  921.    
  922.     sets.default_melee_weapons = {main="Tizona",sub="Almace",}
  923.  
  924.     sets.engaged = {
  925.         main="Sequence",
  926.         sub={ name="Colada", augments={'Weapon skill damage +3%','STR+11','Accuracy+13','Attack+13','DMG:+2',}},
  927.         ammo="Ginsen",
  928.         head="Malignance Chapeau",
  929.         body="Adhemar Jacket +1",
  930.         hands="Malignance Gloves",
  931.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  932.         feet="Malignance Boots",
  933.         neck="Lissome Necklace",
  934.         waist="Windbuffet Belt +1",
  935.         left_ear="Suppanomimi",
  936.         right_ear="Brutal Earring",
  937.         left_ring="Epona's Ring",
  938.         right_ring="Petrov Ring",
  939.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  940.    
  941.     sets.engaged.Haste_30 = {
  942.         main="Tizona",
  943.         sub={ name="Machaera +3", augments={'TP Bonus +1000',}},
  944.         ammo="Ginsen",
  945.         head="Malignance Chapeau",
  946.         body={ name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}},
  947.         hands="Malignance Gloves",
  948.         legs="Aya. Cosciales +2",
  949.         feet="Malignance Boots",
  950.         neck="Lissome Necklace",
  951.         waist="Reiki Yotai",
  952.         left_ear="Suppanomimi",
  953.         right_ear="Telos Earring",
  954.         left_ring="Epona's Ring",
  955.         right_ring="Petrov Ring",
  956.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  957.     --Reiki Yotai
  958.    
  959.    
  960.     sets.engaged.Crit = {
  961.         main="Tizona",
  962.         sub="Sequence",
  963.         ammo="Ginsen",
  964.         head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  965.         body="Abnoba Kaftan",
  966.         hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  967.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  968.         feet="Ayanmo Gambieras +2",
  969.         neck="Lissome Necklace",
  970.         waist="Reiki Yotai",
  971.         left_ear="Suppanomimi",
  972.         right_ear="Brutal Earring",
  973.         left_ring="Epona's Ring",
  974.         right_ring="Begrudging Ring",
  975.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},}
  976.  
  977.     sets.engaged.Solo = {
  978.         main="Tizona",
  979.         sub={ name="Machaera +3", augments={'TP Bonus +1000',}},
  980.         ammo="Ginsen",
  981.         head="Malignance Chapeau",
  982.         body={ name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}},
  983.         hands="Malignance Gloves",
  984.         legs="Aya. Cosciales +2",
  985.         feet="Malignance Boots",
  986.         neck="Lissome Necklace",
  987.         waist="Windbuffet Belt +1",
  988.         left_ear="Suppanomimi",
  989.         right_ear="Telos Earring",
  990.         left_ring="Epona's Ring",
  991.         right_ring="Petrov Ring",
  992.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  993.        
  994.     sets.engaged.Safe = {
  995.         main="Sequence",
  996.         sub={ name="Colada", augments={'Weapon skill damage +3%','STR+11','Accuracy+13','Attack+13','DMG:+2',}},
  997.         ammo="Staunch Tathlum +1",
  998.         head="Malignance Chapeau",
  999.         body="Ayanmo Corazza +2",
  1000.         hands="Assimilator's Bazubands +3",
  1001.         legs="Samnuha Tights",
  1002.         feet={ name="Herculean Boots", augments={'Accuracy+23 Attack+23','"Triple Atk."+4','DEX+7','Attack+6',}},
  1003.         neck="Loricate Torque +1",
  1004.         waist="Reiki Yotai",
  1005.         left_ear="Suppanomimi",
  1006.         right_ear="Brutal Earring",
  1007.         left_ring="Defending Ring",
  1008.         right_ring="Epona's Ring",
  1009.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  1010.        
  1011.     sets.engaged.DT = {
  1012.         main="Tizona",
  1013.         ammo="Staunch Tathlum",
  1014.         head="Malignance Chapeau",
  1015.         body="Ayanmo Corazza +2",
  1016.         hands="Assim. Bazu. +3",
  1017.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  1018.         feet={ name="Herculean Boots", augments={'Accuracy+23 Attack+23','"Triple Atk."+4','DEX+7','Attack+6',}},
  1019.         neck="Loricate Torque +1",
  1020.         waist="Reiki Yotai",
  1021.         left_ear="Suppanomimi",
  1022.         right_ear="Brutal Earring",
  1023.         left_ring="Defending Ring",
  1024.         right_ring="Dark Ring",
  1025.         back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Damage taken-5%',}},}
  1026.  
  1027. --------------------------------------------------------------------------------------------------------   
  1028. ---- _____    ____    _   _   _____    _____   _______   _____    ____    _   _              _      ----
  1029. --  / ____|  / __ \  | \ | | |  __ \  |_   _| |__   __| |_   _|  / __ \  | \ | |     /\     | |       --
  1030. -- | |      | |  | | |  \| | | |  | |   | |      | |      | |   | |  | | |  \| |    /  \    | |       --
  1031. -- | |      | |  | | | . ` | | |  | |   | |      | |      | |   | |  | | | . ` |   / /\ \   | |       --
  1032. -- | |____  | |__| | | |\  | | |__| |  _| |_     | |     _| |_  | |__| | | |\  |  / ____ \  | |____   --
  1033. --  \_____|  \____/  |_| \_| |_____/  |_____|    |_|    |_____|  \____/  |_| \_| /_/    \_\ |______|  --
  1034. ----                                                                                                ----
  1035. --------------------------------------------------------------------------------------------------------
  1036.  
  1037.     sets.TreasureHunter = {    
  1038.         legs={ name="Herculean Trousers", augments={'MND+5','Accuracy+7','"Treasure Hunter"+1','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  1039.         waist="Chaac Belt",}
  1040.  
  1041.     sets.MaxTP = {ear2="Cessance Earring"}
  1042.  
  1043.     sets.Adoulin = {body="Councilor's Garb",}
  1044.    
  1045.     sets.MoveSpeed = {legs={ name="Carmine Cuisses +1", augments={'HP+80','STR+12','INT+12',}},}
  1046.  
  1047.     sets.latent_refresh = {waist="Fucho-no-obi"}
  1048.  
  1049.     sets.engaged.Aftermath3 = set_combine(sets.engaged, {left_ring="Chirich Ring +1",right_ring="Chirich Ring +1",right_ear="Telos Earring",left_ear="Suppanomimi",back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},})
  1050.  
  1051.     sets.engaged.AM3HasteCap = {    
  1052.         body={ name="Herculean Vest", augments={'Accuracy+30','"Triple Atk."+4','VIT+1','Attack+5',}},
  1053.         waist="Reiki Yotai",
  1054.         right_ear="Dedition Earring",
  1055.         left_ring="Chirich Ring +1",
  1056.         right_ring="Chirich Ring +1",}
  1057.    
  1058.     sets.self_healing = set_combine(sets.midcast['Blue Magic'].Healing, {
  1059.         main="Tamaxchi",
  1060.         sub="Bolelabunga",
  1061.         ammo="Mavi Tathlum",
  1062.         head={ name="Uk'uxkaj Cap", augments={'Phys. dmg. taken -2%','Magic dmg. taken -2%','Phys. dmg. taken -2%',}},
  1063.         body="Pinga Tunic",
  1064.         hands={ name="Buremte Gloves", augments={'Phys. dmg. taken -2%','Magic dmg. taken -2%','Phys. dmg. taken -2%',}},
  1065.         legs="Pinga Pants",
  1066.         feet="Medium's Sabots",
  1067.         neck="Loricate Torque +1",
  1068.         waist="Gishdubar Sash",
  1069.         left_ear="Digni. Earring",
  1070.         right_ear="Mendicant's Earring",
  1071.         left_ring="Dark Ring",
  1072.         right_ring="Kunaji Ring",
  1073.         back="Solemnity Cape",})
  1074.        
  1075.     sets.Doom = {waist="Gishdubar Sash",right_ring="Purity Ring",left_ring="Saida Ring"}
  1076.    
  1077. end
  1078.  
  1079.  
  1080. --======================================================================--
  1081. --    __  __                                                     _      --
  1082. --   |  \/  |   ___   __   __   ___   _ __ ___     ___   _ __   | |_    --
  1083. --   | |\/| |  / _ \  \ \ / /  / _ \ | '_ ` _ \   / _ \ | '_ \  | __|   --
  1084. --   | |  | | | (_) |  \ V /  |  __/ | | | | | | |  __/ | | | | | |_    --
  1085. --   |_|  |_|  \___/    \_/    \___| |_| |_| |_|  \___| |_| |_|  \__|   --
  1086. --                                                                      --
  1087. --======================================================================--
  1088.  
  1089.  
  1090.  
  1091. mov = {counter=0}
  1092. if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
  1093.     mov.x = windower.ffxi.get_mob_by_index(player.index).x
  1094.     mov.y = windower.ffxi.get_mob_by_index(player.index).y
  1095.     mov.z = windower.ffxi.get_mob_by_index(player.index).z
  1096. end
  1097.  
  1098.  
  1099. moving = false
  1100. windower.raw_register_event('prerender',function()
  1101.     mov.counter = mov.counter + 1;
  1102.     if mov.counter>15 then
  1103.         local pl = windower.ffxi.get_mob_by_index(player.index)
  1104.         if pl and pl.x and mov.x and state.EngagedMoving.Value == 'Disabled' then
  1105.             --we want this to return a false value if these conditions were met, but we drew our weapons whilst moving.
  1106.             --we also want this value to become false if we Disable EngagedMovement while engaged.
  1107.             if state.Moving.value == 'true' and player.status == 'Engaged' then
  1108.                 state.Moving.value = 'false'
  1109.             end
  1110.             if player.status ~= 'Engaged' then
  1111.                 dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  1112.                 if dist > 1 and not moving then
  1113.                     state.Moving.value = 'true'
  1114.                     send_command('gs c update')
  1115.                     if world.area:contains("Adoulin") then
  1116.                         send_command('gs equip sets.Adoulin')
  1117.                     else
  1118.                         send_command('gs equip sets.MoveSpeed')
  1119.                     end
  1120.  
  1121.                     moving = true
  1122.  
  1123.                 elseif dist < 1 and moving then
  1124.                     state.Moving.value = 'false'
  1125.                     send_command('gs c update')
  1126.                     moving = false
  1127.                 end
  1128.             end
  1129.         elseif pl and pl.x and mov.x and state.EngagedMoving.Value == 'Enabled' then
  1130.             dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
  1131.             if dist > 1 and not moving then
  1132.                 state.Moving.value = 'true'
  1133.                 send_command('gs c update')
  1134.                 if world.area:contains("Adoulin") then
  1135.                     send_command('gs equip sets.Adoulin')
  1136.                 else
  1137.                     send_command('gs equip sets.MoveSpeed')
  1138.                 end
  1139.  
  1140.                 moving = true
  1141.  
  1142.             elseif dist < 1 and moving then
  1143.                 state.Moving.value = 'false'
  1144.                 send_command('gs c update')
  1145.                 moving = false
  1146.             end
  1147.         end
  1148.         if pl and pl.x then
  1149.             mov.x = pl.x
  1150.             mov.y = pl.y
  1151.             mov.z = pl.z
  1152.         end
  1153.         mov.counter = 0
  1154.     end
  1155.    
  1156. end)
  1157.  
  1158.  
  1159.  
  1160. --=================================================================--
  1161. --  _____                          _     _                         --
  1162. -- |  ___|  _   _   _ __     ___  | |_  (_)   ___    _ __    ___   --
  1163. -- | |_    | | | | | '_ \   / __| | __| | |  / _ \  | '_ \  / __|  --
  1164. -- |  _|   | |_| | | | | | | (__  | |_  | | | (_) | | | | | \__ \  --
  1165. -- |_|      \__,_| |_| |_|  \___|  \__| |_|  \___/  |_| |_| |___/  --
  1166. --                                                                 --
  1167. --=================================================================--
  1168.  
  1169.  
  1170. function job_precast(spell, action, spellMap, eventArgs)
  1171.  
  1172.     if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
  1173.         eventArgs.cancel = true
  1174.         windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
  1175.     end
  1176.    
  1177. end
  1178.  
  1179.  
  1180.  
  1181.  
  1182. function job_post_precast(spell, action, spellMap, eventArgs)
  1183.  
  1184.     if player.tp > 2750 then
  1185.         equip(sets.MaxTP)  
  1186.     end
  1187.    
  1188.     if spell.skill == 'Blue Magic' then
  1189.         equip(set_combine(sets.precast.FC['Blue Magic'], sets.precast.FC['Blue Magic']))
  1190.     end
  1191.    
  1192.     if spell.english == 'Stoneskin' and buffactive['Stoneskin'] then
  1193.         cancel_buff()
  1194.     end
  1195.    
  1196. end
  1197.  
  1198.  
  1199.  
  1200.  
  1201. function job_post_midcast(spell, action, spellMap, eventArgs)
  1202.  
  1203.     if spell.skill == 'Blue Magic' then
  1204.         for buff,active in pairs(state.Buff) do
  1205.             if active and sets.buff[buff] then
  1206.                 equip(sets.buff[buff])
  1207.             end
  1208.         end
  1209.        
  1210.         if spellMap == 'Healing' and spell.target.type == 'SELF' then
  1211.             equip(sets.self_healing)
  1212.         end
  1213.    
  1214.     end
  1215.    
  1216.     if spell.skill == 'Blue Magic'  then
  1217.         if spell.element == world.day_element or spell.element == world.weather_element then
  1218.             equip({waist="Hachirin-No-Obi"})
  1219.  
  1220.         end
  1221.     end
  1222.  
  1223. end
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229. function job_aftercast(spell, action, spellMap, eventArgs)
  1230.  
  1231.     if state.DoomMode.value == 'Doom' then
  1232.         send_command('input /party IS STILL DOOMED! AM SCAREBOYE PLES HALP!! <scall15>')
  1233.     end
  1234.  
  1235.     if not spell.interrupted then
  1236.        if spell.english == "Dream Flower" then -- Sleep Countdown --
  1237.             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.]')
  1238.         elseif spell.english == "Entomb" then -- Petrify Countdown --
  1239.             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.]')        
  1240.         elseif spell.english == "Tenebral Crush" then -- Defense Down Countdown --
  1241.             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]')
  1242.         elseif spell.english == "Nat. Meditation" then -- Attack up Countdown Countdown --
  1243.             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.]') 
  1244.         end
  1245.     end
  1246.    
  1247. end
  1248.  
  1249.  
  1250.  
  1251.  
  1252. function customize_idle_set(idleSet)
  1253.  
  1254.     if player.mpp < 51 then
  1255.         set_combine(idleSet, sets.latent_refresh)
  1256.     end
  1257.    
  1258.     if state.ZoneRing.value == 'Warp' then
  1259.         idleSet = set_combine(idleSet, {right_ring="Warp Ring"})
  1260.     elseif state.ZoneRing.value == 'Holla' then
  1261.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Holla)"})
  1262.     elseif state.ZoneRing.value == 'Dem' then
  1263.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Dem)"})
  1264.     elseif state.ZoneRing.value == 'Mea' then
  1265.         idleSet = set_combine(idleSet, {right_ring="Dimensional ring (Mea)"})  
  1266.         return idleSet
  1267.     end
  1268.    
  1269.     if buffactive['doom'] then
  1270.         idleSet = set_combine(idleSet, sets.Doom)
  1271.     end
  1272.    
  1273.     return idleSet
  1274.    
  1275. end
  1276.  
  1277.  
  1278.  
  1279.  
  1280. function job_buff_change(buff, gain)
  1281.  
  1282.     if (buff and gain) or (buff and not gain) then
  1283.         send_command('gs c update')
  1284.     end
  1285.    
  1286.     if buff == "doom" and gain then
  1287.             send_command('gs c set DoomMode Doom')
  1288.     elseif buff == "doom" and not gain then
  1289.             send_command('gs c set DoomMode OFF')
  1290.     end
  1291.  
  1292. end
  1293.  
  1294.  
  1295.  
  1296.  
  1297. function job_state_change(stateField, newValue, oldValue)
  1298.  
  1299.     send_command('gs c update')
  1300.  
  1301.     if state.WeaponLockMode.value == newValue and newValue == 'Locked' then
  1302.         disable('main','sub','range')
  1303.     elseif state.WeaponLockMode.value == newValue and newValue == 'Unlocked' then
  1304.         enable('main','sub','range')
  1305.     end
  1306.    
  1307.     if state.DoomMode.value == 'Doom' then
  1308.         send_command("input /party I'm DOOOOOMED, HAAAAAALP! <scall15>")
  1309.     elseif state.DoomMode.value ==  newValue and newValue == 'OFF' then
  1310.         send_command('input /party Doom is off! THENKS BUD :D <scall11>')
  1311.     end
  1312.  
  1313. end
  1314.  
  1315. windower.register_event('zone change', function()
  1316.  
  1317.     if state.ZoneRing.Value ~= 'None' then
  1318.         send_command('gs c set ZoneRing None')
  1319.     end
  1320.    
  1321. end)
  1322.    
  1323. function customize_melee_set(meleeSet)
  1324.  
  1325.     if player.equipment.main == 'Tizona' and (buffactive['Aftermath: Lv.3'] and (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard'])) and (state.OffenseMode.value ~= 'Safe' and state.OffenseMode.value ~= 'DT') then
  1326.         meleeSet = set_combine(meleeSet, sets.engaged.Aftermath3, sets.engaged.AM3HasteCap)
  1327.     elseif player.equipment.main == 'Tizona' and buffactive['Aftermath: Lv.3'] and not (buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) and (state.OffenseMode.value ~= 'Safe' and state.OffenseMode.value ~= 'DT') then
  1328.         meleeSet = set_combine(meleeSet, sets.engaged.Aftermath3)
  1329.     end
  1330.  
  1331.     if not ((buffactive['Embrava'] or buffactive['March'] or buffactive[580] or buffactive['Mighty Guard']) and
  1332.     (state.OffenseMode.value == 'Normal' or state.OffenseMode.value == 'Crit' or state.OffenseMode.value == 'Solo')) then
  1333.         meleeSet = set_combine(meleeSet, sets.engaged.Haste_30)
  1334.     end
  1335.    
  1336.     if not buffactive['Shell'] and (state.OffenseMode.value == 'Solo') then
  1337.         meleeSet = set_combine(meleeSet, sets.engaged.Safe)
  1338.     end
  1339.    
  1340.     if state.ZoneRing.value == 'Warp' then
  1341.         meleeSet = set_combine(meleeSet, {right_ring="Warp Ring"})
  1342.     elseif state.ZoneRing.value == 'Holla' then
  1343.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Holla)"})
  1344.     elseif state.ZoneRing.value == 'Dem' then
  1345.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Dem)"})
  1346.     elseif state.ZoneRing.value == 'Mea' then
  1347.         meleeSet = set_combine(meleeSet, {right_ring="Dimensional ring (Mea)"})
  1348.         return meleeSet
  1349.     end
  1350.    
  1351.     if buffactive['doom'] then
  1352.         meleeSet = set_combine(meleeSet, sets.Doom)
  1353.     end
  1354.    
  1355.     return meleeSet
  1356.    
  1357. end
  1358.  
  1359.    
  1360. function job_get_spell_map(spell, default_spell_map)
  1361.     if spell.skill == 'Blue Magic' then
  1362.         for category,spell_list in pairs(blue_magic_maps) do
  1363.             if spell_list:contains(spell.english) then
  1364.                 return category
  1365.             end
  1366.         end
  1367.     end
  1368. end
  1369.  
  1370. --This is used to make sure we will attempt to refresh the window every second
  1371. --prerender is actually faster than 1 second as it is called every few milliseconds
  1372. time_start = os.time()
  1373. windower.register_event(
  1374.     "prerender",
  1375.     function()
  1376.         --Items we want to check every second
  1377.         if os.time() > time_start then
  1378.             --We want to keep this reset each time we enter so its called every second
  1379.             time_start = os.time()
  1380.  
  1381.             --Simply refreshes the window
  1382.             refreshWindow()
  1383.         end
  1384.     end
  1385. )
  1386.  
  1387. --Window
  1388. --Default To Set Up the Text Window
  1389.  
  1390. -- Place this in the job_function()
  1391. -- setupTextWindow(1400, 600)
  1392.  
  1393. -- You can toggle this with a command to turn the entire window on and off
  1394. -- visible = false
  1395. visible = true
  1396.  
  1397. function setupTextWindow(pos_x, pos_y)
  1398.     tb_name = "run_gs_helper"
  1399.     bg_visible = true
  1400.     textinbox = " "
  1401.  
  1402.  
  1403.  
  1404.     windower.text.create(tb_name)
  1405.     -- table_name, x, y
  1406.     windower.text.set_location(tb_name, pos_x, pos_y)
  1407.     -- transparency, rgb
  1408.     windower.text.set_bg_color(tb_name, 170, 30, 30, 40)
  1409.     windower.text.set_color(tb_name, 255, 255, 161, 61)
  1410.     windower.text.set_font(tb_name, "Consolas")
  1411.     windower.text.set_font_size(tb_name, 12)
  1412.     windower.text.set_bold(tb_name, true)
  1413.     windower.text.set_italic(tb_name, false)
  1414.     windower.text.set_text(tb_name, textinbox)
  1415.     windower.text.set_bg_visibility(tb_name, bg_visible)
  1416.     windower.text.set_visibility(tb_name, visible)
  1417.  
  1418.  
  1419. end
  1420.  
  1421. --Hanldles refreshing the current text window
  1422. -- refreshWindow() should be called anytime you perform an action that would change what is on the window
  1423. function refreshWindow()
  1424.     textinbox = " " -- This is what gets drawn on the screen at the end
  1425.     textColorNewLine = "\\cr \n" --Placed at the end of a line to end the color and make a new line after
  1426.     textColorEnd = " \\cr" -- Placed at the end of what you are displaying to end the given color
  1427.     textColor = "\\cs(125, 255, 125)" --RGB color setting
  1428.  
  1429.     if not visible then --If not 'true' then it will hide the window all together
  1430.         textinbox = ""
  1431.         windower.text.set_text(tb_name, textinbox)
  1432.         return
  1433.     end
  1434.  
  1435.     --If you want to Toggle this section uncomment the if and end
  1436.     --You'll need to use a variable like this in user_setup():
  1437.     --state.textHideMode = M(false, "Hide Mode")
  1438.     --then you can toggle it with Mote's
  1439.     -- //gs c toggle textHideMode
  1440.    
  1441.     -- if not state.textHideMode.value then
  1442.    
  1443.         textinbox = textinbox .. drawTitle("  Local Keybinds  ")
  1444.         textinbox = textinbox .. textColor .. "(F11) Idle PDT & TP Solo" .. textColorNewLine
  1445.         textinbox = textinbox .. textColor .. "(CTRL+F11) Idle Normal & TP Normal" .. textColorNewLine
  1446.         textinbox = textinbox .. textColor .. "(F8) Equip & Lock Weapons" .. textColorNewLine
  1447.        
  1448.         textinbox = textinbox .. drawTitle("  Current Settings  ") --Draws the title and puts '=', example ====     Mode     ==== around the title passed in
  1449.         textinbox = textinbox .. textColor .. "TP Mode (F9) : " .. tostring(state.OffenseMode.current) .. textColorNewLine
  1450.         textinbox = textinbox .. textColor .. "Idle Mode (F10) : " .. tostring(state.IdleMode.current) .. textColorNewLine
  1451.         textinbox = textinbox .. textColor .. "TreasureMode (CTRL+F9) : " .. tostring(state.TreasureMode.value) .. textColorNewLine
  1452.         textinbox = textinbox .. textColor .. "WeaponLockMode (F12) : " .. tostring(state.WeaponLockMode.value) .. textColorNewLine
  1453.        
  1454.        
  1455.         if state.ZoneRing.current == 'Warp' then
  1456.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 75, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1457.         elseif state.ZoneRing.current == 'Holla' then
  1458.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 75, 75)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1459.         elseif state.ZoneRing.current == 'Dem' then
  1460.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(0, 175, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1461.         elseif state.ZoneRing.current == 'Mea' then
  1462.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 255, 75)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1463.         elseif state.ZoneRing.current == 'None' then
  1464.             textinbox = textinbox .. "Zone Ring (F5) : " .. "\\cs(255, 255, 255)" .. tostring(state.ZoneRing.current) .. textColorNewLine
  1465.         end
  1466.         if state.Moving.value == 'false' then
  1467.             textinbox = textinbox .. "Player Moving (Auto) : " .. "\\cs(255, 100, 100)" .. tostring(state.Moving.value) .. "\\cr \n"
  1468.         else
  1469.             textinbox = textinbox .. "Player Moving (Auto) : " .. "\\cs(100, 255, 100)" .. tostring(state.Moving.value) .. "\\cr \n"
  1470.         end
  1471.             textinbox = textinbox .. textColor .. "Engaged Movespeed (F1) : " .. tostring(state.EngagedMoving.current) .. textColorNewLine
  1472.  
  1473.         if state.DoomMode.value == 'Doom' then
  1474.             textinbox = textinbox .. "\\cs(255, 75, 255)" .. "~~~~~~DOOOOOOOOM~~~~~~" .. textColorNewLine
  1475.         end
  1476.            
  1477.     -- end
  1478.  
  1479.     --textinbox = textinbox .. drawTitle("  Options  ")
  1480.  
  1481.     --This takes a true and false value and will either display ON or OFF on the window instead of true or false
  1482.     --state.LockWeapon = M(false, "Lock Weapon") would be placed in user_setup()
  1483.     --textinbox = textinbox .. textColor .. "Lock Pet DT Set: " .. ternary(state.LockPetDT.value, "ON", "OFF") .. textColorNewLine
  1484.     --textinbox = textinbox .. textColor .. "Lock Weapon: " .. ternary(state.LockWeapon.value, "ON", "OFF") .. textColorNewLine
  1485.  
  1486.     windower.text.set_text(tb_name, textinbox)
  1487. end
  1488.  
  1489.  
  1490. --Creates the Title for a section in the Text Screen
  1491. function drawTitle(title)
  1492.     return "\\cs(200, 222, 255)" .. pad(tostring(title), 6, "*") .. "\\cr \n"
  1493. end
  1494.  
  1495. --Pads a given chara on both sides (centering with left justification)
  1496. function pad(s, l, c)
  1497.     local srep = string.rep
  1498.     local c = c or " "
  1499.  
  1500.     local res1 = srep(c, l) .. s -- pad to half-length s
  1501.     local res2 = res1 .. srep(c, l) -- right-pad our left-padded string to the full length
  1502.  
  1503.     return res2
  1504. end
  1505.  
  1506. --Takes a condition and returns a given value based on if it is true or false
  1507. function ternary(cond, T, F)
  1508.     if cond then
  1509.         return T
  1510.     else
  1511.         return F
  1512.     end
  1513. end
  1514.  
  1515. --this will disable all add_to_chat, reccomend using Echos.  Alternatively, you can disable this.
  1516. function add_to_chat(command)
  1517.     if handle_unset and command == 'add_to_chat' then
  1518.     end
  1519. end
  1520.  
  1521. --=-----------------------------=--
  1522. --          __   __   __   __    --
  1523. --    /|/| /  | /    /  | /  |   --
  1524. --   ( / |(___|(    (___|(   |   --
  1525. --   |   )|   )|   )|\   |   )   --
  1526. --   |  / |  / |__/ | \  |__/    --
  1527. --=-----------------------------=--
  1528.  
  1529. function select_default_macro_book()
  1530.     -- Default macro set/book
  1531.    
  1532.     if player.sub_job == 'WAR' then
  1533.         set_macro_page(3, 7)
  1534.     elseif player.sub_job ~= 'WAR' then
  1535.         set_macro_page(3, 7)
  1536.     end
  1537.    
  1538. end
  1539.  
  1540.  
  1541. function set_lockstyle()
  1542.  
  1543.     send_command('wait 2; input /lockstyleset 004')
  1544.  
  1545. end
Add Comment
Please, Sign In to add comment