Advertisement
Boposhopo

DRK LUA

Nov 30th, 2024
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 21.16 KB | Gaming | 0 0
  1.  
  2.  
  3. -- Initialization function for this job file.
  4. function get_sets()
  5.     mote_include_version = 2
  6.      -- Load and initialize the include file.
  7.     include('Mote-Include.lua')
  8. end
  9.  
  10.  
  11. -- Setup vars that are user-independent.
  12. function job_setup()
  13.     state.Buff.Aftermath = buffactive.Aftermath or false
  14.     state.Buff.Souleater = buffactive.Souleater or false
  15.     state.Buff['Dark Seal'] = buffactive['Dark Seal'] or false
  16.     state.Buff['Last Resort'] = buffactive['Last Resort'] or false
  17.     state.Buff['Doom'] = buffactive['Doom'] or false
  18.     state.Buff['Curse'] = buffactive['Curse'] or false
  19.  
  20.     LowTierNuke = S{
  21.         'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
  22.         'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
  23.         'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
  24.         'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
  25.         'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
  26.        
  27.     Absorbs = S{'Absorb-STR', 'Absorb-DEX', 'Absorb-VIT', 'Absorb-AGI', 'Absorb-INT', 'Absorb-MND', 'Absorb-CHR', 'Absorb-Attri', 'Absorb-ACC', 'Absorb-TP'}
  28.    
  29.     send_command('wait 6;input /lockstyleset 11')
  30.    
  31. end
  32.  
  33. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  34. function user_setup()
  35.     -- Options: Override default values
  36.     state.OffenseMode:options('Normal', 'GS', 'AM3')
  37.     state.WeaponskillMode:options('Normal', 'ATK')
  38.     state.HybridMode:options('Normal', 'DT')
  39.     state.CastingMode:options('Normal', 'Resist')
  40.     state.IdleMode:options('Normal','DT')
  41.  
  42.     select_default_macro_book()
  43. end
  44.  
  45.  
  46.  
  47. -- Define sets and vars used by this job file.
  48. function init_gear_sets()
  49. -- Precast sets
  50.     sets.precast.JA['Diabolic Eye'] = {hands="Fallen's Finger Gauntlets +2"}
  51.     sets.precast.JA['Arcane Circle'] = {feet="Ignominy Sollerets +1"}
  52.     sets.precast.JA['Nether Void'] = {legs="Heathen's Flanchard +2"}
  53.     sets.precast.JA['Souleater'] = {head="Ignominy Burgeonet +1"}
  54.     sets.precast.JA['Last Resort'] = {feet="Fallen's Sollerets +1"}
  55.     sets.precast.JA['Weapon Bash'] = {hands="Ignominy Gauntlets +2"}
  56.     sets.precast.JA['Blood Weapon'] = {body="Fallen's Cuirass +1"}
  57.     sets.precast.JA['Dark Seal']    = {head="Fallen's Burgeonet +1"}
  58.  
  59. -- Waltz set (chr and vit)
  60.     sets.precast.Waltz = {}
  61.  
  62. -- Fast cast sets for spells
  63.     sets.precast.FC = {ammo="Sapience Orb",
  64.         head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
  65.         body="Sacro Breastplate",
  66.         hands={ name="Leyline Gloves", augments={'Accuracy+7','Mag. Acc.+5',}},
  67.         feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}},
  68.         left_ear="Malignance Earring",
  69.         right_ear="Loquac. Earring",
  70.         left_ring="Kishar Ring",}
  71.  
  72.     sets.precast.FC.Impact = set_combine(sets.precast.FC, {
  73.         head=empty, body="Twilight Cloak"})
  74.  
  75. -- Midcast Sets
  76.     sets.midcast.FastRecast = {}
  77.  
  78. -- Specific spells
  79.     sets.midcast['Dark Magic'] = {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  80.         head="Igno. Burgeonet +1",
  81.         body="Carmine Scale Mail +1",
  82.         hands={ name="Fall. Fin. Gaunt. +2", augments={'Enhances "Diabolic Eye" effect',}},
  83.         legs={ name="Fall. Flanchard +1", augments={'Enhances "Muted Soul" effect',}},
  84.         feet="Ratri Sollerets +1",
  85.         neck="Erra Pendant",
  86.         waist="Eschan Stone",}
  87.        
  88.     sets.midcast['Dark Magic'].Resistant = set_combine(sets.midcast['Dark Magic'], {})
  89.    
  90.     sets.midcast['Enfeebling Magic'] = {}
  91.    
  92.     sets.midcast['Enfeebling Magic'].Resistant = set_combine(sets.midcast['Enfeebling Magic'], {})
  93.  
  94. -- Based on HP when casted.
  95.     sets.midcast['Dread Spikes'] = {head="Hjarrandi Helm",
  96.         body="Heathen's Cuirass +2",
  97.         hands="Sakpata's Gauntlets",
  98.         legs="Sakpata's Cuisses",
  99.         feet="Ratri Sollerets +1",
  100.         neck={ name="Unmoving Collar +1", augments={'Path: A',}},
  101.         waist="Carrier's Sash",
  102.         left_ear="Tuisto Earring",
  103.         right_ear="Odnowa Earring +1",
  104.         left_ring="Moonbeam Ring",
  105.         right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  106.         back="Moonbeam Cape",}
  107.  
  108. -- Absorbs
  109.     sets.midcast.Absorb = {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  110.         head="Igno. Burgeonet +1",
  111.         body="Carmine Scale Mail +1",
  112.         hands="Pavor Gauntlets",
  113.         legs={ name="Fall. Flanchard +1", augments={'Enhances "Muted Soul" effect',}},
  114.         feet="Ratri Sollerets +1",
  115.         neck="Erra Pendant",
  116.         waist="Eschan Stone",
  117.         left_ring="Kishar Ring",
  118.         right_ring="Stikini Ring",
  119.         back="Chuparrosa Mantle",}
  120.  
  121.     sets.midcast['Absorb-TP'] = set_combine(sets.midcast.Absorb, {hands="Heathen's Gauntlets +2"})
  122.     sets.midcast['Absorb-TP'].Resistant = set_combine(sets.midcast.Absorb.Resistant, {hands="Heathen's Gauntlets +2"})
  123.  
  124.     sets.midcast.Stun = {}
  125.  
  126.     sets.midcast.Stun.Resistant =set_combine(sets.midcast.Stun, {})
  127.        
  128.     sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
  129.         head={ name="Fall. Burgeonet +1", augments={'Enhances "Dark Seal" effect',}},
  130.         body="Carmine Scale Mail +1",
  131.         hands={ name="Fall. Fin. Gaunt. +2", augments={'Enhances "Diabolic Eye" effect',}},
  132.         legs={ name="Fall. Flanchard +1", augments={'Enhances "Muted Soul" effect',}},
  133.         feet="Igno. Sollerets +1",
  134.         neck="Erra Pendant",
  135.         waist="Austerity Belt +1",
  136.         left_ear="Hirudinea Earring",
  137.         left_ring="Archon Ring",
  138.         right_ring="Evanescence Ring",})
  139.    
  140.     sets.midcast.Drain.Resistant = set_combine(sets.midcast['Dark Magic'].Resistant, {})
  141.  
  142.     sets.midcast['Drain III'] = set_combine(sets.midcast.Drain, {feet="Ratri Sollerets +1"})
  143.        
  144.     sets.midcast.Aspir = set_combine(sets.midcast.Drain, {})
  145.     sets.midcast.Aspir.Resistant = set_combine(sets.midcast.Drain, {})
  146.  
  147.     sets.midcast.Impact = set_combine(sets.midcast['Dark Magic'], {head=empty, body="Twilight Cloak"})
  148.     sets.midcast.Impact.Resistant = set_combine(sets.midcast['Dark Magic'].Resistant, {head=empty, body="Twilight Cloak"})
  149.  
  150. -- Elemental Magic sets are default for handling low-tier nukes.
  151.     sets.midcast.LowTierNuke = {}
  152.  
  153.     sets.midcast.LowTierNuke.Resistant = {}
  154.  
  155.     -- Custom classes for high-tier nukes.
  156.     sets.midcast.HighTierNuke = {}
  157.     sets.midcast.HighTierNuke.Resistant = {}
  158.  
  159. -- Resting sets
  160.     sets.resting = {}
  161.  
  162. -- Idle sets
  163.     sets.idle = {ammo="Staunch Tathlum",
  164.         head="Sakpata's Helm",
  165.         body="Sacro Breastplate",
  166.         hands="Sakpata's Gauntlets",
  167.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  168.         feet="Sakpata's Leggings",
  169.         neck="Loricate Torque +1",
  170.         waist="Carrier's Sash",
  171.         left_ear="Etiolation Earring",
  172.         right_ear="Cryptic Earring",
  173.         left_ring="Defending Ring",
  174.         right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  175.         back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  176.  
  177.     sets.idle.DT = {}
  178.  
  179.     sets.idle.Town = {ammo="Staunch Tathlum",
  180.         head="Sakpata's Helm",
  181.         body="Sacro Breastplate",
  182.         hands="Sakpata's Gauntlets",
  183.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  184.         feet="Sakpata's Leggings",
  185.         neck="Loricate Torque +1",
  186.         waist="Carrier's Sash",
  187.         left_ear="Etiolation Earring",
  188.         right_ear="Cryptic Earring",
  189.         left_ring="Defending Ring",
  190.         right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  191.         back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  192.  
  193.  
  194.     sets.Kiting = {legs="Carmine Cuisses +1"}
  195.  
  196. -- Custom buff sets
  197.     sets.Souleater = {head="Ignominy Burgeonet +1"}
  198.     sets['Last Resort'] = {}
  199.     sets.Doom = {}
  200.     sets['Dark Seal'] = {head="Fallen's Burgeonet +1"}
  201.     sets.Aftermath = {}
  202.  
  203. -- Engaged Sets
  204.  
  205.     sets.engaged = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  206.         head={ name="Sakpata's Helm", augments={'Path: A',}},
  207.         body={ name="Sakpata's Plate", augments={'Path: A',}},
  208.         hands={ name="Sakpata's Gauntlets", augments={'Path: A',}},
  209.         legs="Ig. Flanchard +3",
  210.         feet="Flam. Gambieras +2",
  211.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  212.         waist="Ioskeha Belt +1",
  213.         left_ear={ name="Schere Earring", augments={'Path: A',}},
  214.         right_ear="Telos Earring",
  215.         left_ring="Chirich Ring +1",
  216.         right_ring="Chirich Ring +1",
  217.         back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  218.  
  219.     sets.engaged.GS = set_combine(sets.engaged, {left_ear="Cessance Earring"})
  220.  
  221.     sets.engaged.AM3 = {ammo="Yetshila +1",
  222.         head={ name="Sakpata's Helm", augments={'Path: A',}},
  223.         body={ name="Sakpata's Plate", augments={'Path: A',}},
  224.         hands={ name="Sakpata's Gauntlets", augments={'Path: A',}},
  225.         legs="Ig. Flanchard +3",
  226.         feet="Sakpata's Leggings",
  227.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  228.         waist="Ioskeha Belt +1",
  229.         left_ear={ name="Schere Earring", augments={'Path: A',}},
  230.         right_ear="Telos Earring",
  231.         left_ring="Niqmaddu Ring",
  232.         right_ring="Regal Ring",
  233.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
  234.  
  235. -- Weaponskill sets
  236.     sets.precast.WS = {ammo="Knobkierrie",
  237.         head={ name="Nyame Helm", augments={'Path: B',}},
  238.         body={ name="Nyame Mail", augments={'Path: B',}},
  239.         hands="Sakpata's Gauntlets",
  240.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  241.         feet="Sulev. Leggings +2",
  242.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  243.         waist="Fotia Belt",
  244.         left_ear="Thrud Earring",
  245.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  246.         left_ring="Niqmaddu Ring",
  247.         right_ring="Regal Ring",
  248.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  249.        
  250.     sets.precast.WS.ATK = set_combine(sets.precast.WS, {neck="Abyssal Beads +2"})
  251.  
  252. -- Insurgency - FTP 0.5, 3.25, 6.0 - STR 20%, INT 20% -- Fusion/Compression
  253.     sets.precast.WS['Insurgency'] = {ammo="Knobkierrie",
  254.         head={ name="Nyame Helm", augments={'Path: B',}},
  255.         body={ name="Nyame Mail", augments={'Path: B',}},
  256.         hands="Sakpata's Gauntlets",
  257.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  258.         feet="Ratri Sollerets +1",
  259.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  260.         waist="Fotia Belt",
  261.         left_ear="Thrud Earring",
  262.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  263.         left_ring="Niqmaddu Ring",
  264.         right_ring="Regal Ring",
  265.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  266.        
  267.     sets.precast.WS['Insurgency'].ATK = set_combine(sets.precast.WS['Insurgency'], {body="Sakpata's Plate"})
  268.  
  269. -- Entropy - FTP 0.75, 1.25, 2.0, - INT 85% -- Gravitation/Reverberation
  270.     sets.precast.WS['Entropy'] = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  271.         head="Hjarrandi Helm",
  272.         body={ name="Sakpata's Plate", augments={'Path: A',}},
  273.         hands="Sakpata's Gauntlets",
  274.         legs="Ignominy Flanchard +3",
  275.         feet="Flam. Gambieras +2",
  276.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  277.         waist="Fotia Belt",
  278.         left_ear="Thrud Earring",
  279.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  280.         left_ring="Niqmaddu Ring",
  281.         right_ring="Regal Ring",
  282.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  283.        
  284.     sets.precast.WS['Entropy'].ATK = set_combine(sets.precast.WS['Entropy'], {})
  285.        
  286. -- Catastrophe - FTP 2.75 - STR 40%, INT 40% - WSdmg% -- Darkness/Gravitation
  287.     sets.precast.WS['Infernal Scythe'] = {ammo="Staunch Tathlum",
  288.         head="Sakpata's Helm",
  289.         body="Sacro Breastplate",
  290.         hands="Sakpata's Gauntlets",
  291.         legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
  292.         feet="Sakpata's Leggings",
  293.         neck="Loricate Torque +1",
  294.         waist="Carrier's Sash",
  295.         left_ear="Etiolation Earring",
  296.         right_ear="Cryptic Earring",
  297.         left_ring="Defending Ring",
  298.         right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
  299.         back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  300.        
  301.  
  302. -- Cross Reaper - FTP 2.75 - STR 40%, INT 40% - WSdmg% -- Darkness/Gravitation
  303.     sets.precast.WS['Cross Reaper'] = {ammo="Knobkierrie",
  304.         head={ name="Nyame Helm", augments={'Path: B',}},
  305.         body={ name="Nyame Mail", augments={'Path: B',}},
  306.         hands="Sakpata's Gauntlets",
  307.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  308.         feet="Ratri Sollerets +1",
  309.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  310.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  311.         left_ear="Thrud Earring",
  312.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  313.         left_ring="Niqmaddu Ring",
  314.         right_ring="Regal Ring",
  315.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  316.    
  317.     sets.precast.WS['Cross Reaper'].ATK = set_combine(sets.precast.WS['Cross Reaper'], {head="Sakpata's Helm"})
  318.  
  319. -- Quietus - FTP 3.0, - STR 60% MND 60% - Triple Dmg, Ignores Defense -- Darkness/Distortion
  320.     sets.precast.WS['Quietus'] = {ammo="Knobkierrie",
  321.         head={ name="Nyame Helm", augments={'Path: B',}},
  322.         body={ name="Nyame Mail", augments={'Path: B',}},
  323.         hands="Sakpata's Gauntlets",
  324.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  325.         feet="Ratri Sollerets +1",
  326.         neck={ name="Abyssal Beads +2", augments={'Path: A',}},
  327.         waist={ name="Sailfi Belt +1", augments={'Path: A',}},
  328.         left_ear="Thrud Earring",
  329.         right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  330.         left_ring="Niqmaddu Ring",
  331.         right_ring="Regal Ring",
  332.         back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
  333.        
  334.     sets.precast.WS['Quietus'].ATK = set_combine(sets.precast.WS['Quietus'], {head="Sakpata's Helm"})
  335.  
  336. -- Resolution - FTP .71, 1.5, 2.25, - STR 85% Multi Hit -- Fragmentation/Scission
  337.     sets.precast.WS['Resolution'] = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
  338.         head="Sakpata's Helm",
  339.         body={ name="Sakpata's Plate", augments={'Path: A',}},
  340.         hands="Sakpata's Gauntlets",
  341.         legs="Sakpata's Cuisses",
  342.         feet="Flam. Gambieras +2",
  343.         neck="Fotia Gorget",
  344.         waist="Fotia Belt",
  345.         left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  346.         right_ear="Lugra Earring +1",
  347.         left_ring="Regal Ring",
  348.         right_ring="Niqmaddu Ring",
  349.         back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},}
  350.        
  351.     sets.precast.WS['Resolution'].ATK = set_combine(sets.precast.WS['Resolution'], {neck="Abyssal Beads +2"})
  352.  
  353. -- Torcleaver - FTP 4.75, 7.5, 10, - VIT 80% -- Light/Distortion
  354.     sets.precast.WS['Torcleaver'] = {ammo="Knobkierrie",
  355.         head="Nyame Helm",
  356.         body={ name="Sakpata's Plate", augments={'Path: A',}},
  357.         hands="Sakpata's Gauntlets",
  358.         legs={ name="Nyame Flanchard", augments={'Path: B',}},
  359.         feet="Nyame Sollerets",
  360.         neck="Fotia Gorget",
  361.         waist="Fotia Belt",
  362.         left_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
  363.         right_ear="Thrud Earring",
  364.         left_ring="Regal Ring",
  365.         right_ring="Niqmaddu Ring",
  366.         back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}},}
  367.        
  368.     sets.precast.WS['Torcleaver'].ATK = set_combine(sets.precast.WS['Torcleaver'], {})
  369.        
  370.    
  371. -- Savage - FTP 4.0, 10.25, 13.75 - MND 50% STR 50% - Fragmentation/Scission
  372.     sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS['Torcleaver'], {})
  373.    
  374.     sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {})
  375.  
  376. -- Judgment
  377.     sets.precast.WS['Judgment'] = set_combine(sets.precast.WS['Torcleaver'], {})
  378. end
  379.  
  380. function job_pretarget(spell, action, spellMap, eventArgs)
  381.     if spell.type:endswith('Magic') and buffactive.silence then
  382.         eventArgs.cancel = true
  383.         send_command('input /item "Remedy" <me>')
  384.     end
  385. end
  386.  
  387. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  388. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  389. function job_precast(spell, action, spellMap, eventArgs)
  390.  
  391. end
  392.  
  393. function job_post_precast(spell, action, spellMap, eventArgs)
  394.     -- Make sure abilities using head gear don't swap
  395.     if spell.type:lower() == 'weaponskill' then
  396.         if player.tp > 2999 then
  397.             equip(sets.BrutalLugra)
  398.         else -- use Lugra + moonshade
  399.         if world.time >= (17*60) or world.time <= (7*60) then
  400.             equip(sets.Lugra)
  401.         else
  402.             -- do nothing.
  403.         end
  404.         end
  405.     end
  406. end
  407.  
  408.  
  409. -- Job-specific hooks for standard casting events.
  410. function job_midcast(spell, action, spellMap, eventArgs)
  411.  
  412. end
  413.  
  414. -- Run after the default midcast() is done.
  415. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  416. function job_post_midcast(spell, action, spellMap, eventArgs)
  417.     if spellMap == 'Cure' and spell.target.type == 'SELF' then
  418.         equip(sets.midcast.CureSelf)
  419.     end
  420.     if buffactive['Dark Seal'] and S{"Drain III"}:contains(spell.english)then
  421.         equip({head="Fallen's Burgeonet +1"})
  422.     end
  423. end
  424.  
  425. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  426. function job_aftercast(spell, action, spellMap, eventArgs)
  427.  
  428. end
  429.  
  430. function job_post_aftercast(spell, action, spellMap, eventArgs)
  431.  
  432. end
  433.  
  434. ---------------------------------------------------------------------
  435. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  436. ---------------------------------------------------------------------
  437.  
  438. -- Called before the Include starts constructing melee/idle/resting sets.
  439. -- Can customize state or custom melee class values at this point.
  440. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  441. function job_handle_equipping_gear(status, eventArgs)
  442.  
  443. end
  444.  
  445. -- Modify the default idle set after it was constructed.
  446. function customize_idle_set(idleSet)
  447.     if state.Buff['Doom'] or state.Buff['Curse'] then
  448.         idleSet = set_combine(idleSet, sets.Doom)
  449.     end
  450.     return idleSet
  451. end
  452.  
  453. -- Modify the default melee set after it was constructed.
  454. function customize_melee_set(meleeSet)
  455.     if state.Buff.Souleater then
  456.         meleeSet = set_combine(meleeSet, sets.Souleater)
  457.     end
  458.     if state.Buff['Doom'] or state.Buff['Curse'] then
  459.         meleeSet = set_combine(meleeSet, sets.Doom)
  460.     end
  461.     return meleeSet
  462. end
  463.  
  464.  
  465. ---------------------------------------------------------------------
  466. -- General hooks for other events.
  467. ---------------------------------------------------------------------
  468.  
  469. -- Called when the player's status changes.
  470. function job_status_change(newStatus, oldStatus, eventArgs)
  471.  
  472. end
  473.  
  474. -- Called when a player gains or loses a buff.
  475. -- buff == buff gained or lost
  476. -- gain == true if the buff was gained, false if it was lost.
  477. function job_buff_change(buff, gain)
  478.     if state.Buff[buff] ~= nil then
  479.         handle_equipping_gear(player.status)
  480.     end
  481.     if buff == "Souleater" then
  482.         handle_equipping_gear(player.status)
  483.     end
  484.     if buff == "Doom" or buff == "Curse" then
  485.         if gain then
  486.             equip(sets.doom)
  487.         else
  488.             handle_equipping_gear(player.status)
  489.         end
  490.     end
  491. end
  492.  
  493. ----------------------------------------------------------------------
  494. -- User code that supplements self-commands.
  495. -----------------------------------------------------------------------
  496.  
  497. -- Called by the 'update' self-command, for common needs.
  498. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  499. --function job_update(cmdParams, eventArgs)
  500.     --get_combat_form()
  501.     --get_combat_weapon()
  502. --end
  503.  
  504.  
  505. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  506. -- Handle notifications of general user state change.
  507. function job_state_change(stateField, newValue, oldValue)
  508.  
  509. end
  510.  
  511. -- Custom spell mapping.
  512. function job_get_spell_map(spell, default_spell_map)
  513.     if spell.skill == 'Dark Magic' and Absorbs:contains(spell.english) then
  514.         return 'Absorb'
  515.     end
  516.  
  517.     if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
  518.         if LowTierNuke:contains(spell.english) then
  519.             return 'LowTierNuke'
  520.         else
  521.             return 'HighTierNuke'
  522.         end
  523.     end
  524. end
  525.  
  526. function select_earring()
  527.     if world.time >= (17*60) or world.time <= (7*60) then
  528.         return sets.Lugra
  529.     else
  530.         -- do nothing
  531.     end
  532. end
  533.  
  534. function update_melee_groups()
  535.  
  536. end
  537.  
  538. -- Select default macro book on initial load or subjob change.
  539. function select_default_macro_book()
  540.     -- Default macro set/book
  541.     if player.sub_job == 'SAM' then
  542.         set_macro_page(1, 12)
  543.     else
  544.         set_macro_page(1, 12)
  545.     end
  546. end
Tags: FFXI
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement