SHARE
TWEET

PUP

OrphenPUP Sep 28th, 2018 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job.  Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- Initialization function for this job file.
  6. function get_sets()
  7.     mote_include_version = 2
  8.  
  9.     -- Load and initialize the include file.
  10.     include('Mote-Include.lua')
  11. end
  12.  
  13.  
  14. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  15. function job_setup()
  16.     -- List of pet weaponskills to check for
  17.     petWeaponskills = S{"Slapstick", "Knockout", "Magic Mortar",
  18.         "Chimera Ripper", "String Clipper",  "Cannibal Blade", "Bone Crusher", "String Shredder",
  19.         "Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
  20.     petRangeskills = S{"Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
  21.        
  22.    
  23.     -- Map automaton heads to combat roles
  24.     petModes = {
  25.         ['Harlequin Head'] = 'Melee',
  26.         ['Sharpshot Head'] = 'Ranged',
  27.         ['Valoredge Head'] = 'Tank',
  28.         ['Stormwaker Head'] = 'Magic',
  29.         ['Soulsoother Head'] = 'Heal',
  30.         ['Spiritreaver Head'] = 'Nuke'
  31.         }
  32.  
  33.     -- Subset of modes that use magic
  34.     magicPetModes = S{'Nuke','Heal','Magic'}
  35.    
  36.     -- Var to track the current pet mode.
  37.     state.PetMode = M{['description']='Pet Mode', 'None', 'Melee', 'Ranged', 'Tank', 'Magic', 'Heal', 'Nuke'}
  38.    
  39.     -- Var to track Enmity Cure rule
  40.     state.CureEnmity = M{['description']='Cure Enmity', 'None', 'CureEnmity'}  
  41. end
  42.  
  43. -------------------------------------------------------------------------------------------------------------------
  44. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  45. -------------------------------------------------------------------------------------------------------------------
  46.  
  47. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  48. function user_setup()
  49.     -- Set up Treasure Modes and keybind Ctrl+=
  50.     state.TreasureMode = M{['description']='Treasure Mode', 'Tag', 'Normal'}
  51.    
  52.    
  53.     state.OffenseMode:options('Normal', 'Acc', 'HighAcc', 'Fodder')
  54.     state.HybridMode:options('Normal', 'PetTP', 'PetWS', 'RangeWS')
  55.     state.CastingMode:options('Normal', 'LowResist', 'HighResist') 
  56.     state.WeaponskillMode:options('Normal', 'Acc',  'Fodder')
  57.     state.IdleMode:options('Normal', 'PDT', 'PetTurtle', 'PetTank', 'Refresh', 'PetMagic')
  58.     state.PhysicalDefenseMode:options('PDT', 'PetTurtle', 'PetTank', 'PetEnmity')
  59.    
  60.     state.H2H = M{['description']='Current H2H', 'None', 'Kenkonken', 'Ohtas', 'Midnights'}--, 'Verethragna', 'Godhands'}
  61.     state.CureEnmity = M{['description']='Cure Enmity', 'None', 'CureEnmity'}
  62.     state.CP = M(false, "Capacity Points Mode")
  63.  
  64.     -- Default maneuvers 1, 2, 3 and 4 for each pet mode.
  65.     -- defaultManeuvers = {
  66.     --     ['Melee'] = {'Fire Maneuver', 'Thunder Maneuver', 'Wind Maneuver', 'Light Maneuver'},
  67.     --     ['Ranged'] = {'Wind Maneuver', 'Fire Maneuver', 'Thunder Maneuver', 'Light Maneuver'},
  68.     --     ['Tank'] = {'Earth Maneuver', 'Dark Maneuver', 'Light Maneuver', 'Wind Maneuver'},
  69.     --     ['Magic'] = {'Ice Maneuver', 'Light Maneuver', 'Dark Maneuver', 'Earth Maneuver'},
  70.     --     ['Heal'] = {'Light Maneuver', 'Dark Maneuver', 'Water Maneuver', 'Earth Maneuver'},
  71.     --     ['Nuke'] = {'Ice Maneuver', 'Dark Maneuver', 'Light Maneuver', 'Earth Maneuver'}
  72.     -- }
  73.  
  74.     -- Additional local binds
  75.     send_command('bind ^= gs c cycle TreasureMode')
  76.     send_command('bind @g gs c cycle H2H')
  77.     send_command('bind @c gs c toggle CP')
  78.     send_command('bind @e gs c cycle CureEnmity')
  79.    
  80.     update_pet_mode()
  81.    
  82.     -- List of abilities to reference for applying Treasure Hunter +1 via Chaac Belt.
  83.     abilities_to_check = S{'Feral Howl','Quickstep','Box Step','Stutter Step','Desperate Flourish',
  84.     'Violent Flourish','Animated Flourish','Provoke','Dia','Dia II','Flash','Bio','Bio II',
  85.     'Sleep','Sleep II','Drain','Aspir','Dispel','Stun','Steal','Mug', 'Smeak Attack', 'Trick Attack'}
  86.    
  87. end
  88.  
  89. function user_unload()
  90.     send_command('unbind ^=')
  91.     send_command('unbind @g')
  92.     send_command('unbind @c')
  93.     send_command('unbind @e')
  94. end
  95.  
  96. -- Define sets used by this job file.
  97. function init_gear_sets()
  98.    
  99.     ------------------------------------------------------------------------------------------------
  100.     ---------------------------------------- Precast Sets ------------------------------------------
  101.     ------------------------------------------------------------------------------------------------
  102.  
  103.     -- Fast cast sets for spells
  104.     sets.precast.FC = {
  105.         head=gear.Herculean_Head_TA,
  106.         neck="Voltsurge Torque",
  107.         ear1="Enchntr. Earring +1",
  108.         ear2="Loquac. Earring",
  109.         body=gear.Taeon_Body_Fastcast,
  110.         ring1="Prolix Ring",
  111.         ring2="Lebeche Ring",
  112.         back="Perimede Cape",
  113.         waist="Klouskap Sash",
  114.         legs="Rawhide Trousers",
  115.         feet="Regal Pumps +1"
  116.         }
  117.  
  118.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
  119.         neck="Magoraga Beads"})
  120.  
  121.     sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {})
  122.     sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {})
  123.     sets.precast.FC.Cure = set_combine(sets.precast.FC, {})
  124.         -- body="Heka's Kalasiris",back="Pahtli Cape"
  125.     sets.precast.FC.Curaga = sets.precast.FC.Cure
  126.  
  127.    
  128.     -- Precast sets to enhance JAs
  129.     sets.precast.JA['Overdrive'] = {body="Pitre Tobe +1"}
  130.     sets.precast.JA['Role Reversal'] = {feet="Pitre Babouches +1"}
  131.     sets.precast.JA['Deactivate'] = {body="Pitre Tobe +1"} 
  132.     sets.precast.JA['Tactical Switch'] = {feet="Karagoz Scarpe +1"}
  133.     sets.precast.JA['Ventriloquy'] = {legs="Pitre Churidars +3"}
  134.  
  135.     sets.precast.JA.Maneuver = {
  136.         ear2="Burana Earring",
  137.         body="Karagoz Farsetto +1",
  138.         hands="Foire Dastanas +2",
  139.         back=gear.Dispersal_PetTP,
  140.         }
  141.  
  142.     sets.precast.JA['Repair'] = {
  143.         ammo="Automat. Oil +3",
  144.         head=gear.Taeon_Head_Repair,
  145.         ear1="Guignol Earring",
  146.         ear2="Pratik Earring",
  147.         body=gear.Taeon_Body_Repair,
  148.         hands=gear.Taeon_Hands_Repair,
  149.         legs=gear.Taeon_Legs_Repair,
  150.         feet="Foire Babouches +2"
  151.         }
  152.  
  153.     sets.precast.JA['Maintenance'] = {
  154.         ammo="Automat. Oil +3",
  155.         ear1="Guignol Earring",
  156.         feet="Foire Babouches +2"
  157.         }
  158.  
  159.  
  160.     -- Waltz set (chr and vit)
  161.     sets.precast.Waltz = {
  162.         }
  163.        
  164.     -- Don't need any special gear for Healing Waltz.
  165.     sets.precast.Waltz['Healing Waltz'] = {}
  166.  
  167.     sets.precast.Flourish1 = {}
  168.     -- Magic accuracy
  169.     sets.precast.Flourish1['Violent Flourish'] = {
  170.         }
  171.        
  172.     -- Chakra set (vit)
  173.     sets.precast.JA['Chakra'] = {
  174.         }
  175.    
  176.     -- Chi Blast set (mnd)
  177.     sets.precast.JA['Chi Blast'] = {
  178.         }      
  179.        
  180.     -- Enmity Set (Master)
  181.     sets.precast.JA['Provoke'] = {}    
  182.    
  183.     -- Pet Cure Set Builds (minus & max HP).
  184.     sets.HPMin = {
  185.         }    
  186.     sets.HPMax = {
  187.         }
  188.    
  189.  
  190.     ------------------------------------------------------------------------------------------------
  191.     ------------------------------------- Weapon Skill Sets ----------------------------------------
  192.     ------------------------------------------------------------------------------------------------
  193.    
  194.     -- Default set for any weaponskill that isn't any more specifically defined
  195.     sets.precast.WS = {
  196.         head=gear.Herculean_Head_WS,
  197.         neck="Sanctity Necklace",
  198.         ear1="Steelflash Earring",
  199.         ear2="Bladeborn Earring",
  200.         body=gear.Herculean_Body_WS,
  201.         hands="Pitre Dastanas +3",
  202.         ring1="Epona's Ring",
  203.         ring2="Shukuyu Ring",
  204.         back=gear.PUP_Hybrid,
  205.         waist="Windbuffet Belt +1",
  206.         legs="Hiza. Hizayoroi +2",
  207.         feet=gear.Herculean_Feet_WS,
  208.         }
  209.        
  210.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  211.     -- STR32/VIT32 - Shadow /Soil/Flame
  212.     sets.precast.WS['Stringing Pummel'] = set_combine(sets.precast.WS, {
  213.         neck="Fotia Gorget",
  214.         waist="Fotia Belt"
  215.         })
  216.     sets.precast.WS['Stringing Pummel'].Acc = set_combine(sets.precast.WS['Stringing Pummel'], {
  217.         }) 
  218.        
  219.     -- STR80 - Light/Breeze/Thunder
  220.     sets.precast.WS['Victory Smite'] = set_combine(sets.precast.WS, {
  221.         })
  222.     sets.precast.WS['Victory Smite'].Acc = set_combine(sets.precast.WS['Victory Smite'], {
  223.         })
  224.  
  225.     -- DEX73~85 - Flame/Light/Aqua
  226.     sets.precast.WS['Shijin Spiral'] = set_combine(sets.precast.WS, {
  227.         })
  228.     sets.precast.WS['Shijin Spiral'].Acc = set_combine(sets.precast.WS['Shijin Spiral'], {
  229.         })
  230.    
  231.     -- STR20/DEX50 - Light/Thunder
  232.     sets.precast.WS['Howling Fist'] = set_combine(sets.precast.WS, {
  233.         })
  234.     sets.precast.WS['Howling Fist'].Acc = set_combine(sets.precast.WS['Howling Fist'], {
  235.         })
  236.        
  237.     -- STR100 - Flame/Thunder
  238.     sets.precast.WS['Spinning Attack'] = set_combine(sets.precast.WS, {
  239.         })
  240.     sets.precast.WS['Spinning Attack'].Acc = set_combine(sets.precast.WS['Spinning Attack'], {
  241.         })
  242.  
  243.     -- STR30/DEX30 - Thunder
  244.     sets.precast.WS['Raging Fists'] = set_combine(sets.precast.WS, {
  245.         })
  246.     sets.precast.WS['Raging Fists'].Acc = set_combine(sets.precast.WS['Raging Fists'], {
  247.         })
  248.  
  249.     -- VIT100 - Aqua/Thunder
  250.     sets.precast.WS['Shoulder Tackle'] = set_combine(sets.precast.WS, {
  251.         })
  252.     sets.precast.WS['Shoulder Tackle'].Acc = set_combine(sets.precast.WS['Shoulder Tackle'], {
  253.         }) 
  254.        
  255.  
  256.    
  257.     ------------------------------------------------------------------------------------------------
  258.     ---------------------------------------- Midcast Sets ------------------------------------------
  259.     ------------------------------------------------------------------------------------------------
  260.  
  261.     sets.midcast.FastRecast = {
  262.         }
  263.  
  264.     sets.midcast.Cure = {}
  265.     sets.midcast.Curaga = sets.midcast.Cure
  266.  
  267.     sets.midcast['Enhancing Magic'] = {}
  268.     sets.midcast.Protectra = set_combine(sets.midcast['Enhancing Magic'], {
  269.         ring1="Sheltered Ring"})
  270.     sets.midcast.Shellra = set_combine(sets.midcast['Enhancing Magic'], {
  271.         ring1="Sheltered Ring"})       
  272.     sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {})
  273.  
  274.     sets.midcast['Enfeebling Magic'] = {}
  275.     sets.midcast.ElementalEnfeeble = set_combine(sets.midcast['Enfeebling Magic'], {})
  276.  
  277.     sets.midcast['Dark Magic'] = {}
  278.     sets.midcast.Drain = sets.midcast['Dark Magic']
  279.     sets.midcast.Aspir = sets.midcast.Drain
  280.    
  281.     sets.midcast['Elemental Magic'] = {}
  282.     sets.midcast['Elemental Magic'].Resistant = {}
  283.    
  284.     sets.midcast.Utsusemi = {}
  285.     sets.midcast.ElementalNinjutsu = {}
  286.     sets.midcast.ElementalNinjutsu.Resistant = set_combine(sets.midcast.ElementalNinjutsu, {})
  287.     sets.midcast.NinjutsuDebuff = {}
  288.     sets.midcast.NinjutsuBuff = {}
  289.    
  290.    
  291.     -- Midcast sets for pet actions
  292.     sets.midcast.Pet.Cure = {
  293.         head="Naga Somen",
  294.         neck="Phalaina Locket",
  295.         body="Naga Samue",  
  296.         back=gear.Visucius_PetMage,
  297.         waist="Gishdubar Sash",
  298.         legs="Foire Churidars +2",
  299.         feet="Naga Kyahan"
  300.         }
  301.     sets.midcast.Pet.Cure.Enmity = set_combine(sets.midcast.Pet.Cure, {
  302.         head="Heyoka Cap",
  303.         body="Heyoka Harness",
  304.         ear2="Rimeice Earring",
  305.         ear2="Domes. Earring",
  306.         hands="Heyoka Mittens",
  307.         feet="Heyoka Leggings",
  308.         })     
  309.        
  310.     sets.midcast.Pet['Elemental Magic'] = {
  311.         head=gear.Taeon_Head_PetMAB,
  312.         neck="Adad Amulet",
  313.         ear1="Cirque Earring",
  314.         ear2="Burana Earring",
  315.         body=gear.Taeon_Body_PetMAB,
  316.         hands=gear.Naga_Hands_PetMAB,
  317.         ring1="Tali'ah Ring",
  318.         back=gear.Visucius_PetMage,
  319.         waist="Ukko Sash",
  320.         legs="Pitre Churidars +3",
  321.         feet="Foire Babouches +2",
  322.         }
  323.         -- ear1="Enmerkar Earring",
  324.         -- body="Udug Jacket",
  325.     sets.midcast.Pet['Elemental Magic'].LowResist = set_combine(sets.midcast.Pet['Elemental Magic'], {
  326.         head="Tali'ah Turban +1",
  327.         ear1="Charivari Earring",
  328.         body="Tali'ah Manteel +2",
  329.         hands=gear.Naga_Hands_PetMAB,
  330.         })
  331.     sets.midcast.Pet['Elemental Magic'].HighResist = set_combine(sets.midcast.Pet['Elemental Magic'].LowResist, {
  332.         head="Tali'ah Turban +1",
  333.         body="Tali'ah Manteel +2",
  334.         hands="Tali'ah Gages +1",      
  335.         })
  336.  
  337.     sets.midcast.Pet['Enfeebling Magic'] = {
  338.         head="Tali'ah Turban +1",
  339.         neck="Adad Amulet",
  340.         ear1="Charivari Earring",
  341.         body="Tali'ah Manteel +2",
  342.         hands="Tali'ah Gages +1",
  343.         back=gear.PUP_Pet_Magic,
  344.         waist="Ukko Sash",
  345.         legs="Pitre Churidars +3",
  346.         feet="Foire Babouches +2",     
  347.          } 
  348.        
  349.     sets.midcast.Pet['Enhancing Magic'] = {}   
  350.     sets.midcast.Pet.Protect = set_combine(sets.midcast.Pet['Enhancing Magic'], {lring="Sheltered Ring"})  
  351.     sets.midcast.Pet.Protectra = sets.midcast.Pet.Protect
  352.  
  353.     sets.midcast.Pet.Shell = set_combine(sets.midcast.Pet['Enhancing Magic'], {lring="Sheltered Ring"})
  354.     sets.midcast.Pet.Shellra = sets.midcast.Pet.Shell  
  355.  
  356. --    sets.midcast.Pet.WeaponSkill = {}
  357. --    sets.midcast.Pet.RangeSkill = {}
  358.  
  359.    
  360.     ------------------------------------------------------------------------------------------------
  361.     ----------------------------------------- Idle Sets --------------------------------------------
  362.     ------------------------------------------------------------------------------------------------
  363.    
  364.     -- Resting sets
  365.     sets.resting = {}
  366.     sets.resting.pet = {}
  367.    
  368.     -- Idle sets
  369.     sets.idle = {
  370.         head="Pitre Taj +1",
  371.         neck="Bathy Choker +1",
  372.         ear1="Dawn Earring",
  373.         ear2="Infused Earring",
  374.         body="Hiza. Haramaki +2",
  375.         hands=gear.Rao_Body_WS,
  376.         ring1="Sheltered Ring",
  377.         ring2="Chirich Ring",
  378.         back=gear.Visucius_PetTP,
  379.         waist="Moonbow Belt",
  380.         legs=gear.Rao_Legs_WS,
  381.         feet=gear.Rao_Feet_PetTank,
  382.         }
  383.    
  384.     -- Master Idle Refresh set (for sub mage)
  385.     sets.idle.Refresh = set_combine(sets.idle, {
  386.         }) 
  387.    
  388.     sets.idle.Town = set_combine(sets.idle, {
  389.         body="Councilor's Garb",
  390.         feet="Hermes' Sandals",
  391.         })
  392.    
  393.     -- Set for idle while pet is out (eg: pet regen/refresh gear)
  394.     sets.idle.Pet = set_combine(sets.idle, {
  395.         back="Contriver's Cape"})
  396.    
  397.     sets.idle.PetTurtle = set_combine(sets.idle, {
  398.         ear1="Rimeice Earring",
  399.         ear2="Domes. Earring",
  400.         body=gear.Taeon_Body_PetTank,
  401.         hands=gear.Taeon_Hands_PetTank,
  402.         ring1="Thur. Ring +1",
  403.         waist="Isa Belt",
  404.         legs=gear.Taeon_Legs_PetTank,
  405.         feet=gear.Taeon_Feet_PetTank,
  406.         })
  407.        
  408.     sets.idle.PetTank = set_combine(sets.defense.PetTurtle, {
  409.         head="Heyoka Cap",
  410.         body="Heyoka Harness",
  411.         hands="Heyoka Mittens",
  412.         legs="Heyoka Subligar",
  413.         feet="Heyoka Leggings",
  414.         })
  415.    
  416.     sets.idle.PetMagic = set_combine(sets.idle.Pet, {
  417.         head="Naga Somen",
  418.         body="Naga Samue",
  419.         waist="Ukko Sash",
  420.         legs="Pitre Churidars +3",
  421.         feet="Naga Kyahan",
  422.         }) 
  423.  
  424.     -- Idle sets to wear while pet is engaged
  425.     sets.idle.Pet.Engaged = {
  426.         head="Tali'ah Turban +1",
  427.         neck="Shulmanu Collar",
  428.         ear1="Rimeice Earring",
  429.         ear2="Domes. Earring",
  430.         body="Pitre Tobe +1",
  431.         hands=gear.Taeon_Hands_PetDD_TP,
  432.         ring1="Thur. Ring +1",
  433.         ring2="Varar Ring",
  434.         back=gear.Visucius_PetTP,
  435.         waist="Incarnation Sash",
  436.         legs=gear.Herculean_Legs_PetTP_Atk,
  437.         feet=gear.Herculean_Feet_PetTP_Atk,
  438.         }
  439.         -- ear1="Burana Earring",
  440.    
  441.     sets.idle.Pet.Engaged.Tank = set_combine(sets.idle.Pet.Engaged, {
  442.         ear1="Rimeice Earring",
  443.         ear2="Handler's Earring +1",
  444.         body=gear.Taeon_Body_PetTank,
  445.         hands=gear.Taeon_Hands_PetTank,
  446.         ring1="Thur. Ring +1",
  447.         waist="Isa Belt",
  448.         legs=gear.Taeon_Legs_PetTank,
  449.         feet=gear.Taeon_Feet_PetTank,
  450.         })
  451.     sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {
  452.         })
  453.  
  454.     sets.idle.Pet.Engaged.Nuke = set_combine(sets.idle.Pet.Engaged, {
  455.         })
  456.  
  457.     sets.idle.Pet.Engaged.Magic = set_combine(sets.idle.Pet.Engaged, {
  458.         })
  459.  
  460.  
  461.     ------------------------------------------------------------------------------------------------
  462.     ---------------------------------------- Defense Sets ------------------------------------------
  463.     ------------------------------------------------------------------------------------------------
  464.  
  465.     sets.defense.PDT = {
  466.         head="Otronif Mask +1",
  467.         neck="Loricate Torque +1",
  468.         ear1="Genmei Earring",
  469.         ear2="Odnowa Earring +1",
  470.         body=gear.Taeon_Body_PetTank,
  471.         hands=gear.Taeon_Hands_PetTank,
  472.         ring1="Defending Ring",
  473.         ring2="Dark Ring",
  474.         back="Solemnity Cape",
  475.         legs="Otronif Brais +1",
  476.         feet="Otronif Boots +1"
  477.         }
  478.         -- body="Otro. Harness +1",
  479.         -- hands="Otronif Gloves +1",
  480.  
  481.     sets.defense.MDT = set_combine(sets.defense.PDT, {
  482.         ear1="Etiolation Earring",
  483.         ring2="Shadow Ring"        
  484.         }) 
  485.        
  486.     sets.defense.PetTurtle = {
  487.         neck="Loricate Torque +1",
  488.         ear1="Rimeice Earring",
  489.         ear2="Domes. Earring",
  490.         body=gear.Taeon_Body_PetTank,
  491.         hands=gear.Taeon_Hands_PetTank,
  492.         ring1="Defending Ring",
  493.         ring2="Dark Ring",
  494.         back=gear.Visucius_PetTP,
  495.         waist="Isa Belt",
  496.         legs=gear.Taeon_Legs_PetTank,
  497.         feet=gear.Taeon_Feet_PetTank,
  498.         }
  499.        
  500.     sets.defense.PetTank = set_combine(sets.defense.PetTurtle, {
  501.         ring1="Thur. Ring +1",
  502.         ring2="Overbearing Ring"
  503.         })
  504.        
  505.     sets.defense.PetEnmity = set_combine(sets.defense.PetTurtle, {
  506.         head="Heyoka Cap",
  507.         body="Heyoka Harness",
  508.         hands="Heyoka Mittens",
  509.         legs="Heyoka Subligar",
  510.         feet="Heyoka Leggings"
  511.         }) 
  512.  
  513.     sets.Kiting = {feet="Hermes' Sandals"}
  514.  
  515.     ------------------------------------------------------------------------------------------------
  516.     ---------------------------------------- Engaged Sets ------------------------------------------
  517.     ------------------------------------------------------------------------------------------------
  518.  
  519.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  520.     -- sets if more refined versions aren't defined.
  521.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  522.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  523.    
  524.     -- Normal melee group (Master focus)
  525.     sets.engaged = {
  526.         head=gear.Herculean_Head_TA,
  527.         neck="Shulmanu Collar",
  528.         ear1="Telos Earring",
  529.         ear2="Cessance Earring",
  530.         body="Tali'ah Manteel +2",
  531.         hands=gear.Herculean_Hands_TA,
  532.         ring1="Epona's Ring",
  533.         ring2="Niqmaddu Ring",
  534.         back=gear.Visucius_MastDA,
  535.         waist="Moonbow Belt",
  536.         legs=gear.Herculean_Legs_TA,
  537.         feet=gear.Herculean_Feet_TA,
  538.         }
  539.     sets.engaged.Acc = set_combine(sets.engaged, {
  540.         })
  541.     sets.engaged.HighAcc = set_combine(sets.engaged.Acc, {
  542.         ear2="Zennaroi Earring",
  543.         waist="Klouskap Sash"
  544.         })
  545.    
  546.     -- Normal melee group (Pet focus)
  547.     sets.engaged.PetTP = {
  548.         }
  549.     sets.engaged.Acc.PetTP = set_combine(sets.engaged.PetTP, {
  550.         head="Tali'ah Turban +1",
  551.         body="Tali'ah Manteel +2",
  552.         hands="Tali'ah Gages +1",
  553.         legs="Tali'ah Sera. +2",
  554.         feet="Tali'ah Crackows +1",
  555.         })
  556.     sets.engaged.HighAcc.PetTP = set_combine(sets.engaged.Acc.PetTP, {
  557.         })
  558.    
  559.     -- Normal melee group (Pet WS focus)
  560.     sets.engaged.PetWS = {
  561.         }  
  562.        
  563.     sets.engaged.Acc.PetWS = set_combine(sets.engaged.PetWS, {
  564.         })
  565.     sets.engaged.HighAcc.PetWS = set_combine(sets.engaged.Acc.PetWS, {
  566.         })
  567.    
  568.     sets.engaged.RangeWS = set_combine(sets.engaged.PetWS, {})
  569.     sets.engaged.Acc.RangeWS = set_combine(sets.engaged.RangeWS, {
  570.         ear1="Charivari Earring",
  571.         body="Tali'ah Manteel +2",
  572.         ring2="Varar Ring"
  573.         })
  574.     sets.engaged.HighAcc.RangeWS = set_combine(sets.engaged.Acc.RangeWS, {
  575.         head="Tali'ah Turban +1",      
  576.         hands="Tali'ah Gages +1",
  577.         legs="Tali'ah Sera. +1"
  578.         })
  579.        
  580.     ------------------------------------------------------------------------------------------------
  581.     ---------------------------------------- Hybrid Sets -------------------------------------------
  582.     ------------------------------------------------------------------------------------------------
  583.  
  584.     -- TBD
  585.        
  586.    
  587.     ------------------------------------------------------------------------------------------------
  588.     ---------------------------------------- Special Sets ------------------------------------------
  589.     ------------------------------------------------------------------------------------------------
  590.            
  591.     -- sets.latent_ORing = {ring1="Oneiros Ring"}  
  592.     sets.THBelt = {waist="Chaac Belt"}
  593.     sets.CP = {back="Mecisto. Mantle"}
  594. end
  595.  
  596.  
  597. -------------------------------------------------------------------------------------------------------------------
  598. -- Job-specific hooks for standard casting events.
  599. -------------------------------------------------------------------------------------------------------------------
  600.  
  601. function job_precast(spell, action, spellMap, eventArgs)
  602.  
  603.     -- Equip Chaac Belt for TH+1 on common Subjob Abilities or Spells.
  604.     if abilities_to_check:contains(spell.english) and state.TreasureMode.value == 'Tag' then
  605.         equip(sets.THBelt)
  606.     end
  607. end
  608.  
  609.  
  610. -- Called when pet is about to perform an action
  611.     function job_pet_midcast(spell, action, spellMap, eventArgs)
  612. --      if petWeaponskills:contains(spell.english) then
  613. --          classes.CustomClass = "Weaponskill"
  614. --          equip(sets.midcast.Pet.WeaponSkill)
  615. --      end
  616. --      if petRangeskills:contains(spell.english) then
  617. --          classes.CustomClass = "Rangeskill"
  618. --          equip(sets.midcast.Pet.RangeSkill)
  619. --      end
  620.         if spell.skill == 'Elemental Magic' then
  621.             if state.CastingMode.value == 'LowResist' then
  622.                 equip(sets.midcast.Pet['Elemental Magic'].LowResist)
  623.             elseif state.CastingMode.value == 'HighResist' then
  624.                 equip(sets.midcast.Pet['Elemental Magic'].HighResist)
  625.             else
  626.                 equip(sets.midcast.Pet['Elemental Magic'])
  627.             end
  628.         elseif spell.skill == 'Healing Magic' then
  629.             if state.CureEnmity.value == 'CureEnmity' then
  630.                 equip(sets.midcast.Pet.Cure.Enmity)
  631.             else
  632.                 equip(sets.midcast.Pet.Cure)
  633.             end
  634.             state.CureEnmity:reset()
  635.         end
  636.     end
  637.  
  638.  
  639. -------------------------------------------------------------------------------------------------------------------
  640. -- Job-specific hooks for non-casting events.
  641. -------------------------------------------------------------------------------------------------------------------
  642.  
  643. -- Called when a player gains or loses a buff.
  644. -- buff == buff gained or lost
  645. -- gain == true if the buff was gained, false if it was lost.
  646. function job_buff_change(buff, gain)
  647.     if buff == 'Wind Maneuver' then
  648.         handle_equipping_gear(player.status)
  649.     end
  650. end
  651.  
  652. -- Called when a player gains or loses a pet.
  653. -- pet == pet gained or lost
  654. -- gain == true if the pet was gained, false if it was lost.
  655. function job_pet_change(pet, gain)
  656.     update_pet_mode()
  657. end
  658.  
  659. -- Called when the pet's status changes.
  660. function job_pet_status_change(newStatus, oldStatus)
  661.     if newStatus == 'Engaged' then
  662.         display_pet_status()
  663.     end
  664. end
  665.  
  666.  
  667. -------------------------------------------------------------------------------------------------------------------
  668. -- User code that supplements standard library decisions.
  669. -------------------------------------------------------------------------------------------------------------------
  670.  
  671. -- Called by the 'update' self-command, for common needs.
  672. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  673. function job_update(cmdParams, eventArgs)
  674.     update_pet_mode()
  675. end
  676.  
  677.  
  678. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  679. function display_current_job_state(eventArgs)
  680.     display_pet_status()
  681. end
  682.  
  683. -- Modify the default idle set after it was constructed.
  684. function customize_idle_set(idleSet)
  685. -- Current H2H Weapon  
  686.     if state.H2H.current == 'Kenkonken' then
  687.         equip({main="Kenkonken"})
  688.     elseif state.H2H.current == 'Ohtas' then
  689.         equip({main="Ohtas"})
  690.     elseif state.H2H.current == 'Midnights' then
  691.         equip({main="Midnights"})
  692. --  elseif state.H2H.current == 'Verethragna' then
  693. --      equip({main="Verethragna"})
  694. --  elseif state.H2H.current == 'Godhands' then
  695. --      equip({main="Godhands"})
  696.     end
  697.  
  698.     if state.CP.current == 'on' then
  699.         equip(sets.CP)
  700.         disable('back')
  701.     else
  702.         enable('back')
  703.     end
  704.     return idleSet
  705. end
  706.  
  707. function customize_melee_set(meleeSet)
  708.     --if state.DefenseMode.value == 'None' and player.mp > 100 then
  709.      --   meleeSet = set_combine(meleeSet, sets.latent_ORing)
  710.     --end
  711.     return meleeSet
  712. end
  713.  
  714.  
  715. -------------------------------------------------------------------------------------------------------------------
  716. -- User self-commands.
  717. -------------------------------------------------------------------------------------------------------------------
  718.  
  719. -- Called for custom player commands.
  720. -- function job_self_command(cmdParams, eventArgs)
  721. --    if cmdParams[1] == 'maneuver' then
  722. --       if pet.isvalid then
  723.  --           local man = defaultManeuvers[state.PetMode.value]
  724. --            if man and tonumber(cmdParams[2]) then
  725. --                man = man[tonumber(cmdParams[2])]
  726. --            end
  727. --
  728. --            if man then
  729. --                send_command('input /pet "'..man..'" <me>')
  730. --            end
  731. --        else
  732. --            add_to_chat(123,'No valid pet.')
  733. --        end
  734. --    end
  735. --end
  736.  
  737.  
  738. -------------------------------------------------------------------------------------------------------------------
  739. -- Utility functions specific to this job.
  740. -------------------------------------------------------------------------------------------------------------------
  741.  
  742. -- Get the pet mode value based on the equipped head of the automaton.
  743. -- Returns nil if pet is not valid.
  744. function get_pet_mode()
  745.     if pet.isvalid then
  746.         return petModes[pet.head] or 'None'
  747.     else
  748.         return 'None'
  749.     end
  750. end
  751.  
  752. -- Update state.PetMode, as well as functions that use it for set determination.
  753. function update_pet_mode()
  754.     state.PetMode:set(get_pet_mode())
  755.     update_custom_groups()
  756. end
  757.  
  758. -- Update custom groups based on the current pet.
  759. function update_custom_groups()
  760.     classes.CustomIdleGroups:clear()
  761.     if pet.isvalid then
  762.         classes.CustomIdleGroups:append(state.PetMode.value)
  763.     end
  764. end
  765.  
  766. -- Display current pet status.
  767. function display_pet_status()
  768.     if pet.isvalid then
  769.         local petInfoString = pet.name..' ['..pet.head..']: '..tostring(pet.status)..'  TP='..tostring(pet.tp)..'  HP%='..tostring(pet.hpp)
  770.        
  771.         if magicPetModes:contains(state.PetMode.value) then
  772.             petInfoString = petInfoString..'  MP%='..tostring(pet.mpp)
  773.         end
  774.        
  775.         add_to_chat(122,petInfoString)
  776.     end
  777. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top