Advertisement
Vamperica

Ninja

Sep 25th, 2016
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.71 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.     -- Load and initialize the include file.
  9.     include('Mote-Include.lua')
  10.     include('sammeh_custom_functions.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.     state.Buff.Migawari = buffactive.migawari or false
  17.     state.Buff.Doomed = buffactive.doomed or false
  18.     state.Buff.Sange = buffactive.Sange or false
  19.     state.Buff.Yonin = buffactive.Yonin or false
  20.     state.Buff.Innin = buffactive.Innin or false
  21.     state.Buff.Futae = buffactive.Futae or false
  22.    
  23.     gear.MovementFeet = {name="Danzo Sune-ate"}
  24.     gear.DayFeet = "Danzo Sune-ate"
  25.     gear.NightFeet = "Hachiya Kyahan"
  26.     gear.AccAmmo = {name="Happo Shuriken +1"}
  27.     gear.AccAmmoDay = "Seki Shuriken"
  28.     gear.AccAmmoNight = "Seki Shuriken"
  29.     gear.ElementalObi = {name="Hachirin-no-Obi"}
  30.     gear.default.obi_waist = "Eschan Stone"
  31.    
  32.     send_command("alias fc gs equip sets.precast.FC")
  33.     send_command("alias idle gs equip sets.idle")
  34.     send_command("alias nindebuff gs equip sets.midcast.NinjutsuDebuff")
  35.     send_command("alias ele gs equip sets.midcast.ElementalNinjutsu")
  36.     send_command("alias utsus gs equip sets.midcast.Utsusemi")
  37.     send_command("alias eng gs equip sets.engaged")
  38.     send_command("alias wsset gs equip sets.precast.WS")
  39.     send_command("alias meva gs equip sets.meva")
  40. end
  41.  
  42. -------------------------------------------------------------------------------------------------------------------
  43. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  44. -------------------------------------------------------------------------------------------------------------------
  45.  
  46. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  47. function user_setup()
  48.     windower.register_event('time change', time_change)
  49.     -- Options: Override default values
  50.     state.OffenseMode:options ('Normal', 'Acc', 'Acc2', 'Acc3')
  51.     state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
  52.     state.CastingMode:options('Normal', 'Resistant')
  53.     state.IdleMode:options('Normal')
  54.    
  55.     select_movement_feet()
  56.     select_default_macro_book()
  57.     send_command('@wait 1;input /lockstyleset 7')
  58.  
  59.  
  60. end
  61.  
  62.  
  63. -- Define sets and vars used by this job file.
  64. function init_gear_sets()
  65.    
  66.     --------------------------------------
  67.     -- Precast sets
  68.     --------------------------------------
  69.  
  70. -- React Sets --
  71.    
  72.     sets.React = {}
  73.  
  74.     sets.React.MEVA = {    
  75.         ammo="Yamarang",
  76.         head="Mummu Bonnet +2",
  77.         body="Adhemar Jacket +1",
  78.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  79.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  80.         feet="Amm Greaves",
  81.         neck="Warder's Charm +1",
  82.         waist="Carrier's Sash",
  83.         left_ear="Eabani Earring",
  84.         right_ear="Flashward Earring",
  85.         left_ring="Defending Ring",
  86.         right_ring="Patricius Ring",
  87.         back="Fugacity Mantle +1",
  88.         }
  89.  
  90.     sets.React.Light = set_combine(sets.React.MEVA, {ring2="Wuji Ring"})
  91.  
  92.     sets.React.Dark = set_combine(sets.React.MEVA, {ring2="Wuji Ring"})
  93.  
  94.     sets.React.Thunder = set_combine(sets.React.MEVA, {ammo="Thunder Sachet", ring2="Icecrack Ring"})
  95.  
  96.     sets.React.Ice = set_combine(sets.React.MEVA, {ring2="Icecrack Ring"})
  97.  
  98.     sets.React.Water = set_combine(sets.React.MEVA, {})
  99.  
  100.     sets.React.Fire = set_combine(sets.React.MEVA, {})
  101.  
  102.     sets.React.Air = set_combine(sets.React.MEVA, {})
  103.  
  104.     sets.React.Stone = set_combine(sets.React.MEVA, {ring2="Kunaji Ring"})
  105.  
  106.     sets.React.Status = set_combine(sets.React.MEVA, {ammo="Staunch Tathlum +1",ear2="Hearty Earring",})
  107.  
  108.     sets.React.Paralyze = set_combine(sets.React.Status, {ring2="Icecrack Ring"})
  109.  
  110.     sets.React.Sleep = set_combine(sets.React.Status, {ring2="Wuji Ring"})
  111.  
  112.     sets.React.Charm = set_combine(sets.React.Status, {ring2="Wuji Ring"})
  113.  
  114.     sets.React.Stun = set_combine(sets.React.Status, {ring2="Icecrack Ring"})
  115.  
  116.     sets.React.Silence = set_combine(sets.React.Status, {ear1="Etiolation Earring"})
  117.  
  118.     sets.React.Slow = set_combine(sets.React.Status, {ring2="Kunaji Ring"})
  119.  
  120.     sets.React.Death = set_combine(sets.React.Status, {})
  121.  
  122.     sets.React.Gravity = set_combine(sets.React.Status, {})
  123.  
  124.     sets.React.Bind = set_combine(sets.React.Status, {})
  125.  
  126.     sets.React.Petrify = set_combine(sets.React.Status, {})
  127.  
  128.     sets.React.PDT = {
  129.         ammo="Staunch Tathlum +1",
  130.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  131.         body="Emet Harness +1",
  132.         hands="Macabre Gaunt. +1",
  133.         legs="Mummu Kecks +2",
  134.         feet="Amm Greaves",
  135.         neck="Loricate Torque +1",
  136.         waist="Flume Belt",
  137.         left_ear="Ethereal Earring",
  138.         right_ear="Hearty Earring",
  139.         left_ring="Defending Ring",
  140.         right_ring="Patricius Ring",
  141.         back="Solemnity Cape",
  142.         }
  143.  
  144.     sets.React.MDT = {
  145.         ammo="Staunch Tathlum +1",
  146.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  147.         body="Adhemar Jacket +1",
  148.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  149.         legs="Mummu Kecks +2",
  150.         feet="Amm Greaves",
  151.         neck="Loricate Torque +1",
  152.         waist="Carrier's Sash",
  153.         left_ear="Flashward Earring",
  154.         right_ear="Etiolation Earring",
  155.         left_ring="Defending Ring",
  156.         back="Solemnity Cape",
  157.         }
  158.  
  159.     sets.React.BDT = {
  160.         ammo="Staunch Tathlum +1",
  161.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  162.         body="Adhemar Jacket +1",
  163.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  164.         legs="Mummu Kecks +2",
  165.         feet="Amm Greaves",
  166.         neck="Loricate Torque +1",
  167.         waist="Carrier's Sash",
  168.         left_ear="Flashward Earring",
  169.         right_ear="Etiolation Earring",
  170.         left_ring="Defending Ring",
  171.         back="Solemnity Cape",
  172.         }
  173.  
  174.     sets.Enmity = {
  175.         body="Emet Harness +1",
  176.         hands="Macabre Gaunt. +1",
  177.         neck="Warder's Charm +1",
  178.         right_ring="Petrov Ring",
  179.         }
  180.     -- Precast sets to enhance JAs
  181.     -- sets.precast.JA['Mijin Gakure'] = {}
  182.     --sets.precast.JA['Futae'] = {}
  183.     sets.precast.JA = {}
  184.     sets.precast.JA['Sange'] = {}
  185.     sets.precast.JA['Provoke'] = sets.Enmity
  186.     sets.precast.JA['Warcry'] = sets.Enmity
  187.    
  188.    
  189.     -- Waltz set (chr and vit)
  190.     sets.precast.Waltz = {
  191.         head="Mummu Bonnet +2",
  192.         legs="Dashing Subligar",
  193.         left_ear="Handler's Earring +1",
  194.         right_ring="Asklepian Ring",
  195.         left_ring="Begrudging Ring"
  196.         }
  197.        
  198.     -- Don't need any special gear for Healing Waltz.
  199.     sets.precast.Waltz['Healing Waltz'] = {}
  200.  
  201.     -- Set for acc on steps, since Yonin drops acc a fair bit
  202.     sets.precast.Step = {
  203.         head="Mummu Bonnet +2",
  204.         body="Adhemar Jacket +1",
  205.         hands="Adhemar Wrist. +1",
  206.         legs="Hiza. Hizayoroi +2",
  207.         feet="Hiza. Sune-Ate +2",
  208.         neck="Combatant's Torque",
  209.         waist="Olseni Belt",
  210.         left_ear="Mache Earring +1",
  211.         right_ear="Mache Earring +1",
  212.         left_ring="Patricius Ring",
  213.         right_ring="Cacoethic Ring +1",
  214.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  215.         }
  216.  
  217.     sets.precast.Flourish1 = {}
  218.  
  219.     -- Fast cast sets for spells
  220.    
  221.     sets.precast.FC = {
  222.         head={ name="Herculean Helm", augments={'"Fast Cast"+6','Enmity-6','Mag. Acc.+2 "Mag.Atk.Bns."+2',}},
  223.         body={ name="Taeon Tabard", augments={'Pet: "Mag.Atk.Bns."+24','Crit. hit damage +2%',}},
  224.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  225.         legs="Hiza. Hizayoroi +2",
  226.         feet="Hiza. Sune-Ate +2",
  227.         neck="Baetyl Pendant",
  228.         left_ear="Loquac. Earring",
  229.         right_ear="Etiolation Earring",
  230.         left_ring="Prolix Ring",
  231.         right_ring="Kishar Ring",
  232.         }
  233.    
  234.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {back="Andartia's Mantle",neck="Magoraga Bead Necklace"})
  235.  
  236.     -- Snapshot for ranged
  237.     sets.precast.RA = {}
  238.    
  239.      
  240.     -- Weaponskill sets
  241.     -- Default set for any weaponskill that isn't any more specifically defined
  242.     sets.precast.WS = {
  243.         head="Adhemar Bonnet +1",
  244.         body="Adhemar Jacket +1",
  245.         hands="Adhemar Wrist. +1",
  246.         legs="Hiza. Hizayoroi +2",
  247.         feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  248.         neck="Fotia Gorget",
  249.         waist="Fotia Belt",
  250.         left_ear="Moonshade Earring",
  251.         right_ear="Ishvara Earring",
  252.         left_ring="Ilabrat Ring",
  253.         right_ring="Epona's Ring",
  254.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  255.         }
  256.        
  257.     sets.cursnarec={waist="Gishdubar Sash",ring1="Purity Ring",}
  258.    
  259.     -- sets.precast.WS.Acc = set_combine(sets.precast.WS, {ammo="Honed Tathlum",hands="Ryuo Tekko",back="Yokaze Mantle"})
  260.  
  261.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  262.     sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS, {left_ring="Begrudging Ring", back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}})
  263.     sets.precast.WS['Blade: Ten'] = set_combine(sets.precast.WS, {back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}})
  264.     sets.precast.WS['Blade: Ku'] = set_combine(sets.precast.WS, {})
  265.     sets.precast.WS['Blade: Jin'] = set_combine(sets.precast.WS, {back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}})
  266.     sets.precast.WS['Blade: Kamu'] = set_combine(sets.precast.WS, {back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}})
  267.     sets.precast.WS['Blade: Shun'] = {
  268.         Ammo="Seeth. Bomblet +1",
  269.         head="Adhemar Bonnet +1",
  270.         body="Adhemar Jacket +1",
  271.         hands="Adhemar Wrist. +1",
  272.         legs="Samnuha Tights",
  273.         feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  274.         neck="Fotia Gorget",
  275.         waist="Fotia Belt",
  276.         left_ear="Moonshade Earring",
  277.         right_ear="Mache Earring +1",
  278.         left_ring="Ilabrat Ring",
  279.         right_ring="Apate Ring",
  280.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  281.         }
  282.  
  283.     sets.precast.WS['Blade: Yu'] = {
  284.         main="Heishi Shorinken",
  285.         sub={ name="Shigi", augments={'Accuracy+50','Rng.Acc.+50','Damage Taken -5%',}},
  286.         ammo="Seething Bomblet",
  287.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  288.         body={ name="Samnuha Coat", augments={'Mag. Acc.+14','"Mag.Atk.Bns."+13','"Fast Cast"+4','"Dual Wield"+3',}},
  289.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  290.         legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','"Dbl.Atk."+2','MND+9','Mag. Acc.+13','"Mag.Atk.Bns."+15',}},
  291.         feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  292.         neck="Baetyl Pendant",
  293.         waist="Eschan Stone",
  294.         left_ear="Friomisi Earring",
  295.         right_ear="Ishvara Earring",
  296.         left_ring="Epaminondas's Ring",
  297.         right_ring="Shiva Ring +1",
  298.         back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
  299.         }
  300.     sets.precast.WS['Aeolian Edge'] = {
  301.         main="Heishi Shorinken",
  302.         sub={ name="Shigi", augments={'Accuracy+50','Rng.Acc.+50','Damage Taken -5%',}},
  303.         ammo="Seething Bomblet",
  304.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  305.         body={ name="Samnuha Coat", augments={'Mag. Acc.+14','"Mag.Atk.Bns."+13','"Fast Cast"+4','"Dual Wield"+3',}},
  306.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  307.         legs={ name="Herculean Trousers", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','"Dbl.Atk."+2','MND+9','Mag. Acc.+13','"Mag.Atk.Bns."+15',}},
  308.         feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  309.         neck="Baetyl Pendant",
  310.         waist="Eschan Stone",
  311.         left_ear="Friomisi Earring",
  312.         right_ear="Ishvara Earring",
  313.         left_ring="Epaminondas's Ring",
  314.         right_ring="Shiva Ring +1",
  315.         back={ name="Andartia's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
  316. }
  317.  
  318.     --------------------------------------
  319.     -- Midcast sets
  320.     --------------------------------------
  321.  
  322.     sets.midcast.FastRecast = set_combine(sets.precast.FC, {})
  323.        
  324.     sets.midcast.Utsusemi = set_combine(sets.midcast.SelfNinjutsu, {feet="Hattori Kyahan",back="Andartia's Mantle"})
  325.  
  326.     sets.midcast.ElementalNinjutsu = {
  327.         ammo="Pemphredo Tathlum",
  328.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  329.         body="Samnuha Coat",
  330.         hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  331.         legs="Dashing Subligar",
  332.         feet={ name="Herculean Boots", augments={'"Waltz" potency +2%','CHR+10','Weapon skill damage +8%','Accuracy+9 Attack+9','Mag. Acc.+9 "Mag.Atk.Bns."+9',}},
  333.         neck="Sanctity Necklace",
  334.         waist="Eschan Stone",
  335.         left_ear="Friomisi Earring",
  336.         right_ear="Novio Earring",
  337.         left_ring="Stikini Ring +1",
  338.         right_ring="Stikini Ring +1",
  339.         back="Argocham. Mantle",
  340.         }
  341.    
  342.    
  343.     sets.midcast.ElementalNinjutsuSan = sets.midcast.ElementalNinjutsu
  344.    
  345.     sets.midcast.ElementalNinjutsu.Burst = sets.midcast.ElementalNinjutsu
  346.  
  347.     sets.midcast.ElementalNinjutsu.Resistant = sets.midcast.ElementalNinjutsu
  348.  
  349.     sets.midcast.NinjutsuDebuff = sets.midcast.ElementalNinjutsu
  350.  
  351.     --sets.midcast.NinjutsuBuff = {}
  352.  
  353.     sets.midcast.RA = {}
  354.  
  355.     --------------------------------------
  356.     -- Idle/resting/defense/etc sets
  357.     --------------------------------------
  358.    
  359.     -- Resting sets
  360.     sets.resting = {}
  361.    
  362.     -- Idle sets
  363.     sets.idle = {
  364.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  365.         body="Hiza. Haramaki +2",
  366.         hands="Macabre Gaunt. +1",
  367.         legs="Hiza. Hizayoroi +2",
  368.         feet="Hiza. Sune-Ate +2",
  369.         neck="Loricate Torque +1",
  370.         waist="Flume Belt",
  371.         left_ear="Infused Earring",
  372.         right_ear="Dawn Earring",
  373.         left_ring="Defending Ring",
  374.         right_ring="Patricius Ring",
  375.         back="Solemnity Cape",}
  376.  
  377.     sets.idle.Current = set_combine(sets.idle, {})
  378.  
  379.     sets.idle.Town = set_combine(sets.idle, {})
  380.    
  381.     sets.idle.Weak = set_combine(sets.idle, {})
  382.    
  383.     -- Defense sets
  384.     sets.defense.Evasion = {}
  385.  
  386.     sets.defense.PDT = {
  387.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  388.         body="Emet Harness +1",
  389.         hands="Macabre Gaunt. +1",
  390.         legs="Mummu Kecks +2",
  391.         feet="Mummu Gamash. +2",
  392.         neck="Loricate Torque +1",
  393.         waist="Flume Belt",
  394.         left_ear="Mache Earring +1",
  395.         right_ear="Brutal Earring",
  396.         left_ring="Defending Ring",
  397.         right_ring="Patricius Ring",
  398.         back="Solemnity Cape",
  399.         }
  400.  
  401.     sets.defense.MDT = {}
  402.  
  403.     sets.meva = {}
  404.  
  405.     sets.Kiting = {feet=gear.MovementFeet}
  406.    
  407.  
  408.     --------------------------------------
  409.     -- Engaged sets
  410.     --------------------------------------
  411.  
  412.  
  413.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  414.     -- sets if more refined versions aren't defined.
  415.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  416.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  417.    
  418.     -- Normal melee group
  419.     -- Acc 1138/1101    Heishi(Shigi) ::
  420.     sets.engaged = {
  421.         main="Heishi Shorinken",
  422.         sub="Shigi",
  423.         ammo="Seki Shuriken",
  424.         head="Adhemar Bonnet +1",
  425.         body="Adhemar Jacket +1",
  426.         hands="Adhemar Wrist. +1",
  427.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  428.         feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  429.         neck="Moonlight Nodowa",
  430.         waist="Windbuffet Belt +1",
  431.         left_ear="Mache Earring +1",
  432.         right_ear="Brutal Earring",
  433.         left_ring="Epona's Ring",
  434.         right_ring="Ilabrat Ring",
  435.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  436.         }
  437.        
  438.     -- Acc 1043 (Kikoku/Ochu) :: Acc 1070 (Ochu/Shigi) :: Acc 1077 (Ochu/Ochu)
  439.     sets.engaged.Acc = set_combine(sets.engaged, {
  440.         main="Heishi Shorinken",
  441.         sub="Shigi",
  442.         ammo="Seki Shuriken",
  443.         head="Mummu Bonnet +2",
  444.         body="Adhemar Jacket +1",
  445.         hands="Adhemar Wrist. +1",
  446.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  447.         feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  448.         neck="Moonlight Nodowa",
  449.         waist="Windbuffet Belt +1",
  450.         left_ear="Mache Earring +1",
  451.         right_ear="Brutal Earring",
  452.         left_ring="Epona's Ring",
  453.         right_ring="Ilabrat Ring",
  454.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},})
  455.    
  456.     -- Acc 1072 (Kikoku/Ochu) :: Acc 1099 (Ochu/Shigi) :: Acc 1107 (Ochu/Ochu)
  457.     sets.engaged.Acc2 = set_combine(sets.engaged, {})
  458.    
  459.     -- Acc 1139 (Kikoku/Ochu) :: Acc 1168 (Ochu/Shigi) :: Acc 1175 (Ochu/Ochu)
  460.     sets.engaged.Acc3 = set_combine(sets.engaged, {
  461.         head="Mummu Bonnet +2",
  462.         body="Adhemar Jacket +1",
  463.         hands="Adhemar Wrist. +1",
  464.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  465.         feet="Mummu Gamash. +2",
  466.         neck="Moonlight Nodowa",
  467.         waist="Olseni Belt",
  468.         left_ear="Mache Earring +1",
  469.         right_ear="Mache Earring +1",
  470.         left_ring="Patricius Ring",
  471.         right_ring="Cacoethic Ring +1",
  472.         back={ name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  473.         })
  474.  
  475.  
  476.     -- Custom melee group: High Haste (~20% DW)
  477.     sets.engaged.HighHaste = set_combine(sets.engaged, {})
  478.     sets.engaged.Acc.HighHaste = set_combine(sets.engaged.Acc, {})
  479.     sets.engaged.Acc2.HighHaste = set_combine(sets.engaged.Acc2, {})
  480.     sets.engaged.Acc3.HighHaste = set_combine(sets.engaged.Acc3, {})
  481.  
  482.     -- Custom melee group: Embrava Haste (7% DW)
  483.     sets.engaged.EmbravaHaste = set_combine(sets.engaged, {})
  484.     sets.engaged.Acc.EmbravaHaste = set_combine(sets.engaged.Acc, {})
  485.     sets.engaged.Acc2.EmbravaHaste = set_combine(sets.engaged.Acc2, {})
  486.     sets.engaged.Acc3.EmbravaHaste = set_combine(sets.engaged.Acc3, {})
  487.  
  488.     -- Custom melee group: Max Haste (0% DW)
  489.     sets.engaged.MaxHaste = set_combine(sets.engaged, {})
  490.     sets.engaged.Acc.MaxHaste = set_combine(sets.engaged.Acc, {})
  491.     sets.engaged.Acc2.MaxHaste = set_combine(sets.engaged.Acc2, {})
  492.     sets.engaged.Acc3.MaxHaste = set_combine(sets.engaged.Acc3, {})
  493.  
  494.     --------------------------------------
  495.     -- Custom buff sets
  496.     --------------------------------------
  497.  
  498.     sets.buff.Migawari = {}
  499.     sets.buff.Doomed = {}
  500.     sets.buff.Yonin = {}
  501.     sets.buff.Innin = {}
  502.     sets.buff.Sange = {}
  503.  
  504. end
  505.  
  506. -------------------------------------------------------------------------------------------------------------------
  507. -- Job-specific hooks for standard casting events.
  508. -------------------------------------------------------------------------------------------------------------------
  509.  
  510. function job_post_precast(spell, action, spellMap, eventArgs)
  511.     if string.find(spell.name,'Utsusemi') then
  512.       equip(sets.precast.FC.Utsusemi)
  513.     end
  514. end
  515.  
  516.  
  517. -- Run after the general midcast() is done.
  518. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  519. function job_post_midcast(spell, action, spellMap, eventArgs)
  520.     if string.find(spell.name,'Utsusemi') then
  521.       equip(sets.midcast.Utsusemi)
  522.     end
  523.     if spell.type == "WeaponSkill" then
  524.       tpspent = spell.tp_cost
  525.     end
  526.  
  527.     if state.Buff.Doomed then
  528.         equip(sets.buff.Doomed)
  529.     end
  530.     weathercheck(spell.element)
  531. end
  532.  
  533.  
  534. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  535. function job_aftercast(spell, action, spellMap, eventArgs)
  536.     if not spell.interrupted and spell.english == "Migawari: Ichi" then
  537.         state.Buff.Migawari = true
  538.     end
  539.     if state.SpellDebug.value == "On" then
  540.       spelldebug(spell)
  541.     end
  542.  
  543.     equip(sets.idle)
  544. end
  545.  
  546. -------------------------------------------------------------------------------------------------------------------
  547. -- Job-specific hooks for non-casting events.
  548. -------------------------------------------------------------------------------------------------------------------
  549.  
  550. -- Called when a player gains or loses a buff.
  551. -- buff == buff gained or lost
  552. -- gain == true if the buff was gained, false if it was lost.
  553. function job_buff_change(buff, gain)
  554.     -- If we gain or lose any haste buffs, adjust which gear set we target.
  555.     if S{'haste','march','embrava','haste samba'}:contains(buff:lower()) then
  556.         determine_haste_group()
  557.         handle_equipping_gear(player.status)
  558.     elseif state.Buff[buff] ~= nil then
  559.         handle_equipping_gear(player.status)
  560.     end
  561. end
  562.  
  563. function job_status_change(new_status, old_status)
  564.     if new_status == 'Idle' then
  565.         select_movement_feet()
  566.     end
  567. end
  568.  
  569. -------------------------------------------------------------------------------------------------------------------
  570. -- User code that supplements standard library decisions.
  571. -------------------------------------------------------------------------------------------------------------------
  572.  
  573. -- Get custom spell maps
  574. function job_get_spell_map(spell, default_spell_map)
  575.     if spell.skill == "Ninjutsu" then
  576.         if not default_spell_map then
  577.             if spell.target.type == 'SELF' then
  578.                 return 'NinjutsuBuff'
  579.             else
  580.                 return 'NinjutsuDebuff'
  581.             end
  582.         end
  583.     end
  584. end
  585.  
  586. -- Modify the default idle set after it was constructed.
  587. function customize_idle_set(idleSet)
  588.     if state.Buff.Migawari then
  589.         idleSet = set_combine(idleSet, sets.buff.Migawari)
  590.     end
  591.     if state.Buff.Doomed then
  592.         idleSet = set_combine(idleSet, sets.buff.Doomed)
  593.     end
  594.     return idleSet
  595. end
  596.  
  597.  
  598. -- Modify the default melee set after it was constructed.
  599. function customize_melee_set(meleeSet)
  600.     if state.Buff.Migawari then
  601.         meleeSet = set_combine(meleeSet, sets.buff.Migawari)
  602.     end
  603.     if state.Buff.Doomed then
  604.         meleeSet = set_combine(meleeSet, sets.buff.Doomed)
  605.     end
  606.     if state.Buff.Sange then
  607.         meleeSet = set_combine(meleeSet, sets.buff.Sange)
  608.     end
  609.     return meleeSet
  610. end
  611.  
  612. -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
  613. function job_handle_equipping_gear(playerStatus, eventArgs)    
  614.     if player.equipment.back == 'Mecisto. Mantle' or player.equipment.back == 'Nexus Cape' then
  615.         disable('back')
  616.     else
  617.         enable('back')
  618.     end
  619.     if player.equipment.ring1 == 'Warp Ring' or player.equipment.ring1 == 'Vocation Ring' or player.equipment.ring1 == 'Capacity Ring' or player.equipment.ring1 == 'Echad Ring' or player.equipment.ring1 == 'Trizek Ring' then
  620.         disable('ring1')
  621.     else
  622.         enable('ring1')
  623.     end
  624.     if player.equipment.ring2 == 'Warp Ring' or player.equipment.ring2 == 'Vocation Ring' or player.equipment.ring2 == 'Capacity Ring'  or player.equipment.ring2 == 'Echad Ring' or player.equipment.ring2 == 'Trizek Ring' then
  625.         disable('ring2')
  626.     else
  627.         enable('ring2')
  628.     end
  629. end
  630.  
  631. -- Called by the default 'update' self-command.
  632. function job_update(cmdParams, eventArgs)
  633.     update_combat_form()
  634.     select_movement_feet()
  635.     determine_haste_group()
  636. end
  637.  
  638. function job_state_change(stateField, newValue, oldValue)
  639.  
  640.  
  641. end
  642.  
  643. -------------------------------------------------------------------------------------------------------------------
  644. -- Utility functions specific to this job.
  645. -------------------------------------------------------------------------------------------------------------------
  646.  
  647. function update_combat_form()
  648.     -- Check for AM3
  649. --    if player.equipment.main == 'Tizona' and state.Buff['Aftermath: Lv.3'] then
  650. --        state.CombatForm:reset()
  651. --    else
  652. --        state.CombatForm:set('DW')
  653. --    end
  654. end
  655.  
  656. function determine_haste_group()
  657.     -- We have three groups of DW in gear: Hachiya body/legs, Ptica head + DW earrings
  658.    
  659.     -- Standard gear set reaches near capped delay with just Haste (77%-78%, depending on HQs)
  660.  
  661.     -- For high haste, we want to be able to drop one of the 10% groups.
  662.     -- Basic gear hits capped delay (roughly) with:
  663.     -- 1 March + Haste
  664.     -- 2 March
  665.     -- Haste + Haste Samba
  666.     -- 1 March + Haste Samba
  667.     -- Embrava
  668.    
  669.     -- High haste buffs:
  670.     -- 2x Marches + Haste Samba == 19% DW in gear
  671.     -- 1x March + Haste + Haste Samba == 22% DW in gear
  672.     -- Embrava + Haste or 1x March == 7% DW in gear
  673.    
  674.     -- For max haste (capped magic haste + 25% gear haste), we can drop all DW gear.
  675.     -- Max haste buffs:
  676.     -- Embrava + Haste+March or 2x March
  677.     -- 2x Marches + Haste
  678.    
  679.     -- So we want four tiers:
  680.     -- Normal DW
  681.     -- 20% DW -- High Haste
  682.     -- 7% DW (earrings) - Embrava Haste (specialized situation with embrava and haste, but no marches)
  683.     -- 0 DW - Max Haste
  684.     classes.CustomMeleeGroups:clear()
  685.         if ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava) ) or
  686.            ( buffactive[33] and buffactive.march == 2 )  then
  687.             classes.CustomMeleeGroups:append('MaxHaste')
  688.         elseif ( buffactive.embrava and ( buffactive.march == 1 or buffactive[33] ) ) then
  689.             classes.CustomMeleeGroups:append('EmbravaHaste')
  690.         -- This is the line to change for with Koru-Moru
  691.         elseif buffactive[33] and buffactive['haste samba'] and buffactive.march == 1 then
  692.             classes.CustomMeleeGroups:append('MaxHaste')
  693.         elseif (buffactive[33] and buffactive.march == 1) or (buffactive.march == 2 and buffactive['haste samba']) or buffactive[580] then
  694.             classes.CustomMeleeGroups:append('HighHaste')
  695.         elseif buffactive.embrava or buffactive.march == 2 then
  696.             classes.CustomMeleeGroups:append('HighHaste')
  697.         elseif buffactive[33] or buffactive.march == 1 then
  698.             classes.CustomMeleeGroups:append('HighHaste')
  699.         end
  700. end
  701.  
  702.  
  703. function select_movement_feet()
  704.     if world.time >= (17*60) or world.time < (7*60) then
  705.         gear.MovementFeet.name = gear.NightFeet
  706.     else
  707.         gear.MovementFeet.name = gear.DayFeet
  708.     end
  709. end
  710.  
  711. function select_acc_ammo()
  712.     if world.time >= (18*60) or world.time <= (6*60) then
  713.         gear.AccAmmo.name = gear.AccAmmoNight
  714.     else
  715.         gear.AccAmmo.name = gear.AccAmmoDay
  716.     end
  717. end
  718.  
  719.  
  720. -- Select default macro book on initial load or subjob change.
  721. function select_default_macro_book()
  722.     -- Default macro set/book
  723.     if player.sub_job == 'DNC' then
  724.         set_macro_page(1, 6)
  725.     elseif player.sub_job == 'THF' then
  726.         set_macro_page(1, 6)
  727.     else
  728.         set_macro_page(1, 6)
  729.     end
  730. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement