Advertisement
Guest User

Untitled

a guest
Dec 14th, 2016
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.39 KB | None | 0 0
  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.     sets.obi = {Fire = {waist="Karin Obi"},
  10.     Earth = {waist="Dorin Obi"},
  11.     Water = {waist="Suirin Obi"},
  12.     Wind = {waist="Furin Obi"},
  13.     Ice = {waist="Hyorin Obi"},
  14.     Lightning = {waist="Rairin Obi"},
  15.     Light = {waist="Korin Obi"},
  16.     Dark = {waist="Anrin Obi"}}
  17.    
  18.     sets.tonban = {legs="Sorcerer's Tonban +1"}
  19.    
  20.     sets.grips = {Fire = {sub="Fire Grip"},
  21.     Earth = {sub="Earth Grip"},
  22.     Water = {sub="Water Grip"},
  23.     Wind = {sub="Wind Grip"},
  24.     Ice = {sub="Ice Grip"},
  25.     Lightning = {sub="Lightning Grip"},
  26.     Light = {sub="Light Grip"},
  27.     Dark = {sub="Dark Grip"}}
  28.    
  29.     -- Load and initialize the include file.
  30.     include('Mote-Include.lua')
  31.    
  32. end
  33.  
  34.  
  35. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  36. function job_setup()
  37.  
  38. end
  39.  
  40. -------------------------------------------------------------------------------------------------------------------
  41. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  42. -------------------------------------------------------------------------------------------------------------------
  43.  
  44. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  45. function user_setup()
  46.     state.OffenseMode:options('None', 'Normal')
  47.     state.CastingMode:options('Normal', 'Resistant', 'Proc', 'MagicBurst')
  48.     state.IdleMode:options('Normal', 'ConvertHP')
  49.  
  50.     --[[Nukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
  51.         'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
  52.         'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
  53.         'Stone IV', 'Water IV', 'Aero IV', 'Fire IV', 'Blizzard IV', 'Thunder IV',
  54.         'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
  55.         'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II',
  56.         'Stonega III', 'Waterga III', 'Aeroga III', 'Firaga III', 'Blizzaga III', 'Thundaga III',
  57.         'Quake', 'Flood', 'Tornado', 'Flare', 'Freeze', 'Burst',
  58.         'Quake II', 'Flood II', 'Tornado II', 'Flare II', 'Freeze II', 'Burst II',}
  59.     ]]
  60.     select_default_macro_book()
  61.     -- Additional local binds
  62.     send_command('bind ^` input /ma "stun" <t>')
  63.  
  64. end
  65.  
  66. -- Called when this job file is unloaded (eg: job change)
  67. function user_unload()
  68.    
  69. end
  70.  
  71.  
  72. -- Define sets and vars used by this job file.
  73. function init_gear_sets()
  74.     --------------------------------------
  75.     -- Start defining the sets
  76.     --------------------------------------
  77.    
  78.     ---- Precast Sets ----
  79.    
  80.     -- Precast sets to enhance JAs
  81.  
  82.     -- Fast cast sets for spells
  83.  
  84.     sets.precast.FC = {
  85.         main="Earth Staff",
  86.         sub="Bugard Leather Strap +1",
  87.         ammo="Phantom Tathlum",
  88.         head="Walahra Turban",
  89.         neck="Orochi Nodowa",
  90.         ear1="Loquacious Earring",
  91.         ear2="Morion Earring +1",
  92.         body="Dalmatica",
  93.         hands="Sorcerer's Gloves +1",
  94.         ring1="Snow Ring",
  95.         ring2="Tamas Ring",
  96.         back="Errant Cape",
  97.         waist="Penitent's Rope",
  98.         legs="Mahatma Slops",
  99.         feet="Wizard's Sabots"}
  100.  
  101.    
  102.     -- Midcast Sets
  103.  
  104.     sets.midcast.FastRecast = {
  105.         head="Walahra Turban",
  106.         neck="Orochi Nodowa",
  107.         ear1="Loquacious Earring",
  108.         ear2="Morion Earring +1",
  109.         body="Dalmatica",
  110.         hands="Sorcerer's Gloves +1",
  111.         ring1="Snow Ring",
  112.         ring2="Tamas Ring",
  113.         back="Errant Cape",
  114.         waist="Sorcerer's Belt",
  115.         legs="Mahatma Slops",
  116.         feet="Wizard's Sabots"}
  117.  
  118.     sets.midcast.Cure = {
  119.         main="Chatoyant Staff",
  120.         head="Errant Hat",
  121.         neck="Fylgja Torque +1",
  122.         ear1="Star Earring",
  123.         ear2="Star Earring",
  124.         body="Mahatma Houppelande",
  125.         hands="Bricta's Cuffs",
  126.         ring1="Celestial Ring",
  127.         ring2="Tamas Ring",
  128.         back="Prism Cape",
  129.         waist="Penitent's Rope",
  130.         legs="Mahatma Slops",
  131.         feet="Wizard's Sabots"}
  132.  
  133.     sets.midcast.Curaga = sets.midcast.Cure
  134.  
  135.     sets.midcast['Enhancing Magic'] = {
  136.         main="Chatoyant Staff",
  137.         head="Walahra Turban",
  138.         neck="Holy Phial",
  139.         ear1="Star Earring",
  140.         ear2="Loquacious Earring",
  141.         body="Dalmatica",
  142.         hands="Bricta's Cuffs",
  143.         ring1="Celestial Ring",
  144.         ring2="Tamas Ring",
  145.         back="Prism Cape",
  146.         waist="Penitent's Rope",
  147.         legs="Mahatma Slops",
  148.         feet="Wizard's Sabots"}
  149.  
  150.     -- Custom spell classes
  151.     sets.midcast.MndEnfeebles = {
  152.         main="Chatoyant Staff",
  153.         head="Genie Tiara",
  154.         neck="Enfeebling Torque",
  155.         ear1="Star Earring",
  156.         ear2="Star Earring",
  157.         body="Wizard's Coat",
  158.         hands="Bricta's Cuffs",
  159.         ring1="Celestial Ring",
  160.         ring2="Tamas Ring",
  161.         back="Prism Cape",
  162.         waist="Penitent's Rope",
  163.         legs="Igqira Lappas",
  164.         feet="Errant Pigaches"}
  165.  
  166.     sets.midcast.IntEnfeebles = {
  167.         main="Chatoyant Staff",
  168.         head="Genie Tiara",
  169.         neck="Enfeebling Torque",
  170.         ear1="Abyssal Earring",
  171.         ear2="Morion Earring +1",
  172.         body="Wizard's Coat",
  173.         hands="Oracle's Gloves",
  174.         ring1="Snow Ring",
  175.         ring2="Tamas Ring",
  176.         back="Prism Cape",
  177.         waist="Penitent's Rope",
  178.         legs="Igqira Lappas",
  179.         feet="Sorcerer's Sabots +1"}
  180.  
  181.     sets.midcast.ElementalEnfeeble = {
  182.         main="Chatoyant Staff",
  183.         head="Demon Helm +1",
  184.         neck="Lemegeton Medallion +1",
  185.         ear1="Abyssal Earring",
  186.         ear2="Morion Earring +1",
  187.         body="Mahatma Houppelande",
  188.         hands="Genie Gages",
  189.         ring1="Snow Ring",
  190.         ring2="Tamas Ring",
  191.         back="Prism Cape",
  192.         waist="Sorcerer's Belt",
  193.         legs="Mahatma Slops",
  194.         feet="Sorcerer's Sabots +1"}
  195.  
  196.     sets.midcast['Dark Magic'] = {
  197.         main="Claustrum",
  198.         sub="Dark Grip",
  199.         head="Demon Helm +1",
  200.         neck="Dark Torque",
  201.         ear1="Abyssal Earring",
  202.         ear2="Morion Earring +1",
  203.         body="Mahatma Houppelande",
  204.         hands="Sorcerer's Gloves +1",
  205.         ring1="Snow Ring",
  206.         ring2="Tamas Ring",
  207.         back="Prism Cape",
  208.         waist="Sorcerer's Belt",
  209.         legs="Wizard's Tonban",
  210.         feet="Sorcerer's Sabots +1"}
  211.  
  212.     sets.midcast.Drain = sets.midcast['Dark Magic']
  213.  
  214.     sets.midcast.Aspir = sets.midcast.Drain
  215.  
  216.     sets.midcast.Stun = sets.midcast['Dark Magic']
  217.  
  218.     sets.midcast.Bind = set_combine(sets.midcast.IntEnfeebles,{sub="Ice Grip"})
  219.    
  220.     sets.midcast.Blind = set_combine(sets.midcast.IntEnfeebles,{sub="Dark Grip"})
  221.    
  222.     sets.midcast.Dispel = set_combine(sets.midcast.IntEnfeebles,{sub="Dark Grip"})
  223.    
  224.     sets.midcast.Slow = set_combine(sets.midcast.MndEnfeebles,{sub="Earth Grip"})
  225.    
  226.     sets.midcast.Paralyze = set_combine(sets.midcast.MndEnfeebles,{sub="Ice Grip"})
  227.    
  228.     sets.midcast.Stoneskin = set_combine(sets.midcast.Enhancing,{main="Kirin's Pole",sub="Raptor Leather Strap +1",head="Errant Hat",body="Mahatma Houppelande",feet="Errant Pigaches"})
  229.  
  230.     sets.midcast.ring = {
  231.         ring1="Sorcerer's Ring"}
  232.     -- Elemental Magic sets are default for handling low-tier nukes.
  233.     sets.midcast['Elemental Magic'] = {
  234.         main="Claustrum",
  235.         head="Demon Helm +1",
  236.         neck="Lmg. Medallion +1",
  237.         ear1="Moldavite Earring",
  238.         ear2="Morion Earring +1",
  239.         body="Genie Weskit",
  240.         hands="Zenith Mitts +1",
  241.         ring1="Snow Ring",
  242.         ring2="Tamas Ring",
  243.         back="Hecate's Cape",
  244.         waist="Sorcerer's Belt",
  245.         legs="Mahatma Slops",
  246.         feet="Sorcerer's Sabots +1"}
  247.  
  248.     sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'],{head="Sorcerer's Petasos +1",hands="Wizard's Gloves"})
  249.  
  250.     sets.midcast['Elemental Magic'].MagicBurst = set_combine(sets.midcast['Elemental Magic'],{hands="Sorcerer's Gloves +1",ear="Static Earring"})
  251.     -- Custom refinements for certain nuke tiers
  252.    
  253.  
  254.  
  255.     -- Sets to return to when not performing an action.
  256.  
  257.     -- Resting sets
  258.     sets.resting = {
  259.         main="Claustrum",
  260.         sub="Bugard Leather Strap +1",
  261.         head="Oracle's Cap",
  262.         neck="Grandiose Chain",
  263.         ear1="Abyssal Earring",
  264.         ear2="Loquacious Earring",
  265.         body="Mahatma Houppelande",
  266.         hands="Oracle's Gloves",
  267.         ring1="Celestial Ring",
  268.         ring2="Celestial Ring",
  269.         back="Viator Cape",
  270.         waist="Mohbwa Sash +1",
  271.         legs="Oracle's Braconi",
  272.         feet="Numerist Pumps"}
  273.  
  274.  
  275.     -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  276.    
  277.     sets.idle = {
  278.         main="Claustrum",
  279.         sub="Buggard Leather Strap +1",
  280.         head="Sorcerer's Petasos +1",
  281.         neck="Lemegeton Medallion +1",
  282.         ear1="Abyssal Earring",
  283.         ear2="Loquac. Earring",
  284.         body="Genie Weskit",
  285.         hands="Sorcerer's Gloves +1",
  286.         ring1="Sorcerer's Ring",
  287.         ring2="Tamas Ring",
  288.         back="Hecate's Cape",
  289.         waist="Rairin Obi",
  290.         legs="Igqira Lappas",
  291.         feet="Sorcerer's Sabots +1"}
  292.    
  293.    
  294.    sets.idle.Field = {
  295.         main="Claustrum",
  296.         sub="Buggard Leather Strap +1",
  297.         head="Sorcerer's Petasos +1",
  298.         neck="Chocobo Whistle",
  299.         ear1="Abyssal Earring",
  300.         ear2="Loquac. Earring",
  301.         body="Dalmatica",
  302.         hands="Sorcerer's Gloves +1",
  303.         ring1="Snow Ring",
  304.         ring2="Tamas Ring",
  305.         back="Errant Cape",
  306.         waist="Sorcerer's Belt",
  307.         legs="Sorcerer's Tonban +1",
  308.         feet="Sorcerer's Sabots +1"}
  309.        
  310.     sets.idle.Town = {
  311.         main="Claustrum",
  312.         sub="Buggard Leather Strap +1",
  313.         head="Sorcerer's Petasos +1",
  314.         neck="Chocobo Whistle",
  315.         ear1="Abyssal Earring",
  316.         ear2="Loquac. Earring",
  317.         body="Genie Weskit",
  318.         hands="Sorcerer's Gloves +1",
  319.         ring1="Sorcerer's Ring",
  320.         ring2="Tamas Ring",
  321.         back="Nexus Cape",
  322.         waist="Sorcerer's Belt",
  323.         legs="Sorcerer's Tonban +1",
  324.         feet="Sorcerer's Sabots +1"}
  325.  
  326.     sets.idle.Field.ConvertHP = {
  327.         main="Claustrum",
  328.         sub="Buggard Leather Strap +1",
  329.         head="Zenith Crown",
  330.         neck="Lemegeton Medallion +1",
  331.         ear1="Astral Earring",
  332.         ear2="Loquac. Earring",
  333.         body="Dalmatica",
  334.         hands="Zenith Mitts +1",
  335.         ring1="Serket Ring",
  336.         ring2="Ether Ring",
  337.         back="Prism Cape",
  338.         waist="Sorcerer's Belt",
  339.         legs="Sorcerer's Tonban +1",
  340.         feet="Zenith Pumps"}
  341.     -- Defense sets
  342.  
  343.     sets.defense.PDT = {}
  344.  
  345.     sets.defense.MDT = {}
  346.  
  347.     -- Engaged sets
  348.  
  349.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  350.     -- sets if more refined versions aren't defined.
  351.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  352.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  353.  
  354.     -- Normal melee group
  355.     sets.engaged = {}
  356.  
  357.  
  358.  
  359.     -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
  360.     sets.buff['Ebullience'] = {}
  361.     sets.buff['Rapture'] = {}
  362.     sets.buff['Perpetuance'] = {}
  363.     sets.buff['Immanence'] = {}
  364.     sets.buff['Penury'] = {}
  365.     sets.buff['Parsimony'] = {}
  366.     sets.buff['Celerity'] = {}
  367.     sets.buff['Alacrity'] = {}
  368.  
  369.     sets.buff['Klimaform'] = {}
  370.  
  371.     sets.buff.FullSublimation = {}
  372.     sets.buff.PDTSublimation = {}
  373.  
  374.     sets.buff['Sandstorm'] = {feet="Desert Boots +1"}
  375.    
  376.     sets.latent_refresh = {main="Claustrum", body="Dalmatica"}
  377. end
  378.  
  379. -------------------------------------------------------------------------------------------------------------------
  380. -- Job-specific hooks for standard casting events.
  381. -------------------------------------------------------------------------------------------------------------------
  382.  
  383. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  384. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  385. function job_precast(spell, action, spellMap, eventArgs)
  386.    
  387. end
  388.  
  389.  
  390. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  391. function job_midcast(spell, action, spellMap, eventArgs)
  392.  
  393. end
  394.  
  395. function job_post_midcast(spell, action, spellMap, eventArgs)
  396.     if spell.skill == 'Elemental Magic' then
  397.         if spell.element == world.day_element then
  398.             equip(sets.tonban)
  399.             end
  400.         end
  401.     if spell.action_type == "Magic" then
  402.         if spell.element == world.weather_element or spell.element == world.day_element then
  403.             equip(sets.obi[spell.element])
  404.             end
  405.         end
  406.     if spell.action_type == "Magic" and state.CastingMode.value == 'Resistant' then
  407.         equip(sets.grips[spell.element])
  408.         end
  409.     if player.hpp < 76 and spell.skill == 'Elemental Magic' then
  410.          equip(sets.midcast.ring)
  411.       end
  412.  
  413. end
  414. --[[function job_post_midcast(spell, action, spellMap, eventArgs)
  415.     if spell.skill == 'Elemental Magic' then
  416.         if spell.element == world.day_element then
  417.             equip(sets.tonban)
  418.             end
  419.         end
  420. end
  421. function job_post_midcast(spell, action, spellMap, eventArgs)
  422.         if spell.skill == 'Elemental Magic' and player.hpp <= 76 then
  423.         equip({ring1="Sorcerer's Ring"})   
  424.         end
  425. end]]
  426.    
  427. function job_aftercast(spell, action, spellMap, eventArgs)
  428.     if spell.english == 'Drain' or spell.english == 'Aspir' then
  429.         send_command('@wait 50;input /echo ------- '..spell.english..' is Ready!!! -------')
  430.     end
  431.     if spell.english == 'Stun' then
  432.         send_command('@wait 37;input /echo ------- '..spell.english..' is Ready!!! -------')
  433.     end
  434.     if spell.english == 'Sleep' or spell.english == 'Sleepga' then
  435.         send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  436.         send_command('@wait 55;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
  437.         send_command('@wait 57;input /echo ------- '..spell.english..' is wearing off in 3 seconds -------')
  438.     elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  439.         send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
  440.         send_command('@wait 85;input /echo ------- '..spell.english..' is wearing off in 5 seconds -------')
  441.         send_command('@wait 87;input /echo ------- '..spell.english..' is wearing off in 3 seconds -------')
  442.     end    
  443. end
  444.  
  445. -------------------------------------------------------------------------------------------------------------------
  446. -- Job-specific hooks for non-casting events.
  447. -------------------------------------------------------------------------------------------------------------------
  448.  
  449. -- Called when a player gains or loses a buff.
  450. -- buff == buff gained or lost
  451. -- gain == true if the buff was gained, false if it was lost.
  452. function job_buff_change(buff, gain)
  453.    
  454. end
  455.  
  456. -- Handle notifications of general user state change.
  457. function job_state_change(stateField, newValue, oldValue)
  458. --[[    if stateField == 'Offense Mode' then
  459.         if newValue == 'Normal' then
  460.             disable('main','sub','range')
  461.         else
  462.             enable('main','sub','range')
  463.         end
  464.     end]]
  465. end
  466.  
  467.  
  468. -------------------------------------------------------------------------------------------------------------------
  469. -- User code that supplements standard library decisions.
  470. -------------------------------------------------------------------------------------------------------------------
  471.  
  472. -- Custom spell mapping.
  473. function job_get_spell_map(spell, default_spell_map)
  474.     if spell.action_type == 'Magic' then
  475.         if spell.skill == 'Enfeebling Magic' then
  476.             if spell.type == 'WhiteMagic' then
  477.                 return 'MndEnfeebles'
  478.             else
  479.                 return 'IntEnfeebles'
  480.             end
  481.         end
  482.     end
  483. --[[    if spell.action_type == 'Magic' then
  484.         elseif spell.skill == 'Elemental Magic' then
  485.                 return 'Nukes'
  486.             end
  487.         end
  488.     end]]
  489. end
  490.  
  491.  
  492. -- Modify the default idle set after it was constructed.
  493. function customize_idle_set(idleSet)
  494.     if player.mpp < 51 then
  495.         idleSet = set_combine(idleSet, sets.latent_refresh)
  496.     end
  497.    
  498.     return idleSet
  499. end
  500.  
  501.  
  502. -- Function to display the current relevant user state when doing an update.
  503. function display_current_job_state(eventArgs)
  504.     display_current_caster_state()
  505.     eventArgs.handled = true
  506. end
  507.  
  508. -------------------------------------------------------------------------------------------------------------------
  509. -- Utility functions specific to this job.
  510. -------------------------------------------------------------------------------------------------------------------
  511. -- Select default macro book on initial load or subjob change.
  512. function select_default_macro_book()
  513.     -- Default macro set/book
  514.     if player.sub_job == 'DNC' then
  515.         set_macro_page(1, 8)
  516.     elseif player.sub_job == 'WAR' then
  517.         set_macro_page(1, 8)
  518.     elseif player.sub_job == 'NIN' then
  519.         set_macro_page(1, 8)
  520.     else
  521.         set_macro_page(1, 8)
  522.     end
  523. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement