LauEra

NIN.lua

May 28th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.60 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.dusktildawn = {"Koga Tekko +1"}
  10.  
  11.     -- Load and initialize the include file.
  12.     include('Mote-Include.lua')
  13. end
  14.  
  15.  
  16. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  17. function job_setup()
  18.  
  19. end
  20.  
  21. -------------------------------------------------------------------------------------------------------------------
  22. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  23. -------------------------------------------------------------------------------------------------------------------
  24.  
  25. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  26. function user_setup()
  27.     state.OffenseMode:options('Normal', 'Acc', 'Eva')
  28.     state.HybridMode:options('Normal', 'Evasion', 'PDT')
  29.     state.WeaponskillMode:options('Normal', 'Acc', 'Mod')
  30.     state.CastingMode:options('Normal', 'Resistant')
  31.     state.PhysicalDefenseMode:options('PDT', 'Evasion')
  32.  
  33.     select_default_macro_book()
  34. end
  35.  
  36.  
  37. -- Define sets and vars used by this job file.
  38. function init_gear_sets()
  39.     --------------------------------------
  40.     -- Precast sets
  41.     --------------------------------------
  42.  
  43.     -- Precast sets to enhance JAs
  44.  
  45.     sets.precast.JA['Sange'] = {}
  46.  
  47.     -- Waltz set (chr and vit)
  48.     sets.precast.Waltz = {}
  49.        
  50.     -- Don't need any special gear for Healing Waltz.
  51.     sets.precast.Waltz['Healing Waltz'] = {}
  52.  
  53.     -- Set for acc on steps, since Yonin drops acc a fair bit
  54.     sets.precast.Step = {}
  55.  
  56.     -- Fast cast sets for spells
  57.    
  58.     sets.precast.FC = {
  59.         head={ name="Walahra Turban", augments={'"Store TP"+8',}},
  60.         body="Arhat's Gi +1",
  61.         hands="Dusk Gloves +1",
  62.         legs="Byakko's Haidate",
  63.         feet="Fuma Sune-Ate",
  64.         neck="Ritter Gorget",
  65.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  66.         left_ear="Ethereal Earring",
  67.         right_ear={ name="Loquac. Earring", augments={'Dark magic skill +13',}},
  68.         left_ring="Defending Ring",
  69.         right_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  70.         back="Cerb. Mantle +1"}
  71.        
  72.     sets.precast.FC.Utsusemi = {
  73.         head={ name="Walahra Turban", augments={'"Store TP"+8',}},
  74.         body="Arhat's Gi +1",
  75.         hands="Dusk Gloves +1",
  76.         legs="Byakko's Haidate",
  77.         feet="Fuma Sune-Ate",
  78.         neck="Ritter Gorget",
  79.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  80.         left_ear="Ethereal Earring",
  81.         right_ear={ name="Loquac. Earring", augments={'Dark magic skill +13',}},
  82.         left_ring="Defending Ring",
  83.         right_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  84.         back="Cerb. Mantle +1"}
  85.  
  86.     -- Snapshot for ranged
  87.     sets.precast.RA = {hands="Zha'Go's Barbut"}
  88.        
  89.     -- Weaponskill sets
  90.     -- Default set for any weaponskill that isn't any more specifically defined
  91.     sets.precast.WS = {
  92.         head="Gnadbhod's Helm",
  93.         body="Hachiryu Haramaki",
  94.         hands="Alkyoneus's Brc.",
  95.         legs="Hachiryu Haidate",
  96.         feet="Rutter Sabatons",
  97.         neck="Hope Torque",
  98.         waist="Warwolf Belt",
  99.         left_ear="Harmonius Earring",
  100.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  101.         left_ring="Flame Ring",
  102.         right_ring="Rajas Ring",
  103.         back="Cerb. Mantle +1"}
  104.        
  105.  
  106.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  107.     sets.precast.WS['Blade: Jin'] = set_combine(sets.precast.WS,
  108.         {neck="Breeze Gorget"})
  109.  
  110.     sets.precast.WS['Blade: Ku'] = set_combine(sets.precast.WS,
  111.         {neck="Soil Gorget"})
  112.  
  113.     sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS,
  114.         {neck="Flame Gorget"})
  115.    
  116.     --------------------------------------
  117.     -- Midcast sets
  118.     --------------------------------------
  119.  
  120.     sets.midcast.FastRecast = {
  121.         head={ name="Walahra Turban", augments={'"Store TP"+8',}},
  122.         body="Arhat's Gi +1",
  123.         hands="Dusk Gloves +1",
  124.         legs="Byakko's Haidate",
  125.         feet="Fuma Sune-Ate",
  126.         neck="Ritter Gorget",
  127.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  128.         left_ear="Ethereal Earring",
  129.         right_ear={ name="Loquac. Earring", augments={'Dark magic skill +13',}},
  130.         left_ring="Defending Ring",
  131.         right_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  132.         back="Cerb. Mantle +1"}
  133.        
  134.     sets.midcast.Utsusemi = {
  135.         head={ name="Walahra Turban", augments={'"Store TP"+8',}},
  136.         body="Antares Harness",
  137.         hands="Dusk Gloves +1",
  138.         legs="Byakko's Haidate",
  139.         feet="Fuma Sune-Ate",
  140.         neck="Evasion Torque",
  141.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  142.         left_ear="Suppanomimi",
  143.         right_ear="Ethereal Earring",
  144.         left_ring="Defending Ring",
  145.         right_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  146.         back="Boxer's Mantle"}
  147.  
  148.     sets.midcast.ElementalNinjutsu = {}
  149.  
  150.     sets.midcast.ElementalNinjutsu.Resistant = {}
  151.  
  152.     sets.midcast.NinjutsuDebuff = {}
  153.  
  154.     sets.midcast.NinjutsuBuff = {}
  155.  
  156.     sets.midcast.RA = {
  157.         head="Optical Hat",
  158.         body="Koga Chainmail +1",
  159.         hands="Seiryu's Kote",
  160.         legs="Oily Trousers",
  161.         feet="Hachiryu Sune-Ate",
  162.         neck="Peacock Amulet",
  163.         waist="Scouter's Rope",
  164.         left_ear="Suppanomimi",
  165.         right_ear="Ethereal Earring",
  166.         left_ring="Merman's Ring",
  167.         right_ring="Rajas Ring",
  168.         back="Amemet Mantle +1"}
  169.  
  170.     --------------------------------------
  171.     -- Idle/resting/defense/etc sets
  172.     --------------------------------------
  173.    
  174.     -- Resting sets
  175.     sets.resting = {}
  176.    
  177.     -- Idle sets
  178.     sets.idle = {
  179.         head="Optical Hat",
  180.         body="Arhat's Gi +1",
  181.         hands="Seiryu's Kote",
  182.         legs="Byakko's Haidate",
  183.         feet="Hachiryu Sune-Ate",
  184.         neck="Orochi Nodowa +1",
  185.         waist="Scouter's Rope",
  186.         left_ear="Ethereal Earring",
  187.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  188.         left_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  189.         right_ring="Defending Ring",
  190.         back="Boxer's Mantle"}
  191.  
  192.     sets.idle.Town = {
  193.         head={ name="Walahra Turban", augments={'"Store TP"+8',}},
  194.         body="Hachiryu Haramaki",
  195.         hands="Hachiryu Kote",
  196.         legs="Hachiryu Haidate",
  197.         feet="Hachiryu Sune-Ate",
  198.         neck="Hope Torque",
  199.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  200.         left_ear="Suppanomimi",
  201.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  202.         left_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  203.         right_ring="Defending Ring",
  204.         back="Cerb. Mantle +1"}
  205.    
  206.     -- Defense sets
  207.     sets.defense.Evasion = {}
  208.  
  209.     sets.defense.PDT = {}
  210.  
  211.     sets.defense.MDT = {}
  212.  
  213.  
  214.     sets.Kiting = {}
  215.  
  216.  
  217.     --------------------------------------
  218.     -- Engaged sets
  219.     --------------------------------------
  220.  
  221.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  222.     -- sets if more refined versions aren't defined.
  223.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  224.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  225.    
  226.     -- Normal melee group
  227.     sets.engaged = {
  228.         body="Hachiryu Haramaki",
  229.         hands="Dusk Gloves +1",
  230.         legs="Byakko's Haidate",
  231.         feet="Fuma Sune-Ate",
  232.         neck="Hope Torque",
  233.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  234.         left_ear="Suppanomimi",
  235.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  236.         left_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  237.         right_ring={ name="Toreador's Ring", augments={'"Triple Atk."+2','Accuracy+1',}},
  238.         back="Cerb. Mantle +1"}
  239.    
  240.     sets.engaged.Acc = {
  241.         head="Optical Hat",
  242.         body="Hachiryu Haramaki",
  243.         hands="Dusk Gloves +1",
  244.         legs="Byakko's Haidate",
  245.         feet="Fuma Sune-Ate",
  246.         neck="Hope Torque",
  247.         waist={ name="Velocious Belt", augments={'DEX+3','Fire resistance+20','Fire resistance+20',}},
  248.         left_ear="Suppanomimi",
  249.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  250.         left_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  251.         right_ring={ name="Toreador's Ring", augments={'"Triple Atk."+2','Accuracy+1',}},
  252.         back="Cuchulain's Mantle"}
  253.    
  254.     sets.engaged.Evasion = {
  255.         head="Optical Hat",
  256.         body="Antares Harness",
  257.         hands="Seiryu's Kote",
  258.         legs="Byakko's Haidate",
  259.         feet="Hachiryu Sune-Ate",
  260.         neck="Evasion Torque",
  261.         waist="Scouter's Rope",
  262.         left_ear="Suppanomimi",
  263.         right_ear={ name="Brutal Earring", augments={'"Dbl.Atk."+2','"Dbl.Atk."+1',}},
  264.         left_ring={ name="Toreador's Ring", augments={'Crit.hit rate+1','"Triple Atk."+2',}},
  265.         right_ring={ name="Toreador's Ring", augments={'"Triple Atk."+2','Accuracy+1',}},
  266.         back="Boxer's Mantle"}
  267.  
  268.     --------------------------------------
  269.     -- Custom buff sets
  270.     --------------------------------------
  271.  
  272. end
  273.  
  274. -------------------------------------------------------------------------------------------------------------------
  275. -- Job-specific hooks for standard casting events.
  276. -------------------------------------------------------------------------------------------------------------------
  277.  
  278. -- Run after the general midcast() is done.
  279. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  280. function job_post_midcast(spell, action, spellMap, eventArgs)
  281.     if world.time >= 17*60 or world.time < 7*60 then
  282.         equip(sets.dusktildawn)
  283.     end
  284. end
  285.  
  286.  
  287. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  288. function job_aftercast(spell, action, spellMap, eventArgs)
  289.  
  290. end
  291.  
  292. -------------------------------------------------------------------------------------------------------------------
  293. -- Job-specific hooks for non-casting events.
  294. -------------------------------------------------------------------------------------------------------------------
  295.  
  296. -- Called when a player gains or loses a buff.
  297. -- buff == buff gained or lost
  298. -- gain == true if the buff was gained, false if it was lost.
  299. function job_buff_change(buff, gain)
  300.  
  301. end
  302.  
  303. function job_status_change(new_status, old_status)
  304.    
  305. end
  306.  
  307.  
  308. -------------------------------------------------------------------------------------------------------------------
  309. -- User code that supplements standard library decisions.
  310. -------------------------------------------------------------------------------------------------------------------
  311.  
  312. -- Get custom spell maps
  313. function job_get_spell_map(spell, default_spell_map)
  314.  
  315. end
  316.  
  317. -------------------------------------------------------------------------------------------------------------------
  318. -- Utility functions specific to this job.
  319. -------------------------------------------------------------------------------------------------------------------
  320.  
  321. -- Select default macro book on initial load or subjob change.
  322. function select_default_macro_book()
  323.     -- Default macro set/book
  324.     if player.sub_job == 'DNC' then
  325.         set_macro_page(9, 2)
  326.     elseif player.sub_job == 'THF' then
  327.         set_macro_page(9, 2)
  328.     else
  329.         set_macro_page(9, 2)
  330.     end
  331. end
Advertisement
Add Comment
Please, Sign In to add comment