Advertisement
Vamperica

THF

Aug 4th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.90 KB | None | 0 0
  1. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  2. function user_setup()
  3.     -- Options: Override default values
  4.     state.OffenseMode:options('Normal','SomeAcc','Acc','FullAcc','Fodder')
  5.     state.HybridMode:options('Normal','PDT')
  6.     state.RangedMode:options('Normal', 'Acc')
  7.     state.WeaponskillMode:options('Match','Normal','SomeAcc','Acc','FullAcc','Fodder')
  8.     state.IdleMode:options('Normal', 'Sphere')
  9.     state.PhysicalDefenseMode:options('PDT')
  10.     state.MagicalDefenseMode:options('MDT')
  11.     state.ResistDefenseMode:options('MEVA')
  12.     state.Weapons:options('Aeneas','MagicWeapons','LowBuff','Throwing')
  13.  
  14.     state.ExtraMeleeMode = M{['description']='Extra Melee Mode','None','Suppa','DWEarrings','DWMax'}
  15.     state.AmbushMode = M(false, 'Ambush Mode')
  16.  
  17.     -- Additional local binds
  18.     send_command('bind ^` input /ja "Flee" <me>')
  19.     send_command('bind !` input /ra <t>')
  20.     send_command('bind @` gs c cycle SkillchainMode')
  21.     send_command('bind @f10 gs c toggle AmbushMode')
  22.     send_command('bind ^backspace gs c weapons Throwing;gs c update')
  23.     send_command('bind !backspace input /ja "Hide" <me>')
  24.     send_command('bind !r gs c weapons MagicWeapons;gs c update')
  25.     send_command('bind ^\\\\ input /ja "Despoil" <t>')
  26.     send_command('bind !\\\\ input /ja "Mug" <t>')
  27.  
  28.     select_default_macro_book()
  29. end
  30.  
  31. -- Define sets and vars used by this job file.
  32. function init_gear_sets()
  33.     --------------------------------------
  34.     -- Special sets (required by rules)
  35.     --------------------------------------
  36.  
  37.     sets.TreasureHunter = set_combine(sets.TreasureHunter, {hands="Plunderer's Armlets +1",waist="Chaac Belt"})
  38.     sets.ExtraRegen = {}
  39.     sets.Kiting = {feet="Skadi's Jambeaux +1"}
  40.  
  41.     sets.buff.Doom = set_combine(sets.buff.Doom, {})
  42.     sets.buff.Sleep = {head="Frenzy Sallet"}
  43.    
  44.     sets.buff['Sneak Attack'] = {}
  45.     sets.buff['Trick Attack'] = {}
  46.        
  47.     -- Extra Melee sets.  Apply these on top of melee sets.
  48.     sets.Knockback = {}
  49.     sets.Suppa = {}
  50.     sets.DWEarrings = {}
  51.     sets.DWMax = {}
  52.     sets.Ambush = {} --body="Plunderer's Vest +1"
  53.    
  54.     -- Weapons sets
  55.     sets.weapons.Aeneas = {main="Aeneas",sub="Taming Sari"}
  56.     sets.weapons.LowBuff = {main="Aeneas",sub="Blurred Knife +1"}
  57.     sets.weapons.MagicWeapons = {main="Malevolence",sub="Malevolence"}
  58.     sets.weapons.Throwing = {}
  59.    
  60.     -- Actions we want to use to tag TH.
  61.     sets.precast.Step = {}
  62.        
  63.     sets.precast.JA['Violent Flourish'] = {}
  64.        
  65.     sets.precast.JA['Animated Flourish'] = sets.TreasureHunter
  66.     sets.precast.JA.Provoke = sets.TreasureHunter
  67.  
  68.     --------------------------------------
  69.     -- Precast sets
  70.     --------------------------------------
  71.  
  72.     -- Precast sets to enhance JAs
  73.     sets.precast.JA['Collaborator'] = {} --head="Skulker's Bonnet"
  74.     sets.precast.JA['Accomplice'] = {} --head="Skulker's Bonnet"
  75.     sets.precast.JA['Flee'] = {} --feet="Pillager's Poulaines +1"
  76.     sets.precast.JA['Hide'] = {} --body="Pillager's Vest +1"
  77.     sets.precast.JA['Conspirator'] = {} --body="Skulker's Vest"
  78.     sets.precast.JA['Steal'] = {hands="Pill. Armlets +1"}
  79.     sets.precast.JA['Mug'] = {}
  80.     sets.precast.JA['Despoil'] = {}
  81.     sets.precast.JA['Perfect Dodge'] = {hands="Plunderer's Armlets +1"}
  82.     sets.precast.JA['Feint'] = {} -- {}
  83.  
  84.     sets.precast.JA['Sneak Attack'] = sets.buff['Sneak Attack']
  85.     sets.precast.JA['Trick Attack'] = sets.buff['Trick Attack']
  86.  
  87.     -- Waltz set (chr and vit)
  88.     sets.precast.Waltz = {}
  89.  
  90.     sets.Self_Waltz = {}
  91.        
  92.     -- Don't need any special gear for Healing Waltz.
  93.     sets.precast.Waltz['Healing Waltz'] = {}
  94.  
  95.  
  96.     -- Fast cast sets for spells
  97.     sets.precast.FC = {}
  98.  
  99.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
  100.  
  101.  
  102.     -- Ranged snapshot gear
  103.     sets.precast.RA = {}
  104.  
  105.  
  106.     -- Weaponskill sets
  107.  
  108.     -- Default set for any weaponskill that isn't any more specifically defined
  109.     sets.precast.WS = {
  110.         ammo="Falcon Eye",
  111.         head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  112.         body="Meg. Cuirie +2",
  113.         hands="Meg. Gloves +2",
  114.         legs={ name="Herculean Trousers", augments={'Accuracy+18 Attack+18','Weapon skill damage +4%','STR+8',}},
  115.         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',}},
  116.         neck="Combatant's Torque",
  117.         waist="Prosilio Belt +1",
  118.         left_ear="Ishvara Earring",
  119.         right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  120.         left_ring="Ilabrat Ring",
  121.         right_ring="Epaminondas's Ring",
  122.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  123.         }
  124.  
  125.     sets.precast.WS.SomeAcc = set_combine(sets.precast.WS, {})
  126.     sets.precast.WS.Acc = set_combine(sets.precast.WS, {})
  127.     sets.precast.WS.FullAcc = set_combine(sets.precast.WS, {})
  128.  
  129.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  130.     sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {})
  131.     sets.precast.WS["Rudra's Storm"].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
  132.     sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS.Acc, {})
  133.     sets.precast.WS["Rudra's Storm"].FullAcc = set_combine(sets.precast.WS.FullAcc, {})
  134.     sets.precast.WS["Rudra's Storm"].Fodder = set_combine(sets.precast.WS["Rudra's Storm"], {})
  135.     sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {})
  136.     sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {})
  137.     sets.precast.WS["Rudra's Storm"].SATA = set_combine(sets.precast.WS["Rudra's Storm"].Fodder, {})
  138.  
  139.     sets.precast.WS["Mandalic Stab"] = set_combine(sets.precast.WS, {})
  140.     sets.precast.WS["Mandalic Stab"].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
  141.     sets.precast.WS["Mandalic Stab"].Acc = set_combine(sets.precast.WS.Acc, {})
  142.     sets.precast.WS["Mandalic Stab"].FullAcc = set_combine(sets.precast.WS.FullAcc, {})
  143.     sets.precast.WS["Mandalic Stab"].Fodder = set_combine(sets.precast.WS["Mandalic Stab"], {})
  144.     sets.precast.WS["Mandalic Stab"].SA = set_combine(sets.precast.WS["Mandalic Stab"].Fodder, {})
  145.     sets.precast.WS["Mandalic Stab"].TA = set_combine(sets.precast.WS["Mandalic Stab"].Fodder, {})
  146.     sets.precast.WS["Mandalic Stab"].SATA = set_combine(sets.precast.WS["Mandalic Stab"].Fodder, {})
  147.  
  148.     sets.precast.WS["Shark Bite"] = set_combine(sets.precast.WS, {})
  149.     sets.precast.WS["Shark Bite"].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
  150.     sets.precast.WS["Shark Bite"].Acc = set_combine(sets.precast.WS.Acc, {})
  151.     sets.precast.WS["Shark Bite"].FullAcc = set_combine(sets.precast.WS.FullAcc, {})
  152.     sets.precast.WS["Shark Bite"].Fodder = set_combine(sets.precast.WS["Shark Bite"], {})
  153.     sets.precast.WS["Shark Bite"].SA = set_combine(sets.precast.WS["Shark Bite"].Fodder, {})
  154.     sets.precast.WS["Shark Bite"].TA = set_combine(sets.precast.WS["Shark Bite"].Fodder, {})
  155.     sets.precast.WS["Shark Bite"].SATA = set_combine(sets.precast.WS["Shark Bite"].Fodder, {})
  156.    
  157.     sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {
  158.     hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  159.     legs="Meg. Chausses +2",
  160.     feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  161.     neck="Fotia Gorget",
  162.     waist="Fotia Belt",
  163.     left_ear="Sherida Earring",
  164.     right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  165.     right_ring="Begrudging Ring",
  166.         })
  167.  
  168.     sets.precast.WS['Evisceration'].SomeAcc = set_combine(sets.precast.WS.SomeAcc, {})
  169.     sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS.Acc, {})
  170.     sets.precast.WS['Evisceration'].FullAcc = set_combine(sets.precast.WS.FullAcc, {})
  171.     sets.precast.WS['Evisceration'].Fodder = set_combine(sets.precast.WS['Evisceration'], {})
  172.     sets.precast.WS['Evisceration'].SA = set_combine(sets.precast.WS['Evisceration'].Fodder, {})
  173.     sets.precast.WS['Evisceration'].TA = set_combine(sets.precast.WS['Evisceration'].Fodder, {})
  174.     sets.precast.WS['Evisceration'].SATA = set_combine(sets.precast.WS['Evisceration'].Fodder, {})
  175.  
  176.     sets.precast.WS['Last Stand'] = {}
  177.  
  178.     sets.precast.WS['Aeolian Edge'] = {
  179.         ammo="Pemphredo Tathlum",
  180.         head={ name="Herculean Helm", augments={'Magic dmg. taken -5%','"Mag.Atk.Bns."+30','Accuracy+5 Attack+5','Mag. Acc.+17 "Mag.Atk.Bns."+17',}},
  181.         body={ name="Samnuha Coat", augments={'Mag. Acc.+14','"Mag.Atk.Bns."+13','"Fast Cast"+4','"Dual Wield"+3',}},
  182.         hands="Meg. Gloves +2",
  183.         legs={ name="Herculean Trousers", augments={'INT+10','Mag. Acc.+16','Accuracy+20 Attack+20','Mag. Acc.+16 "Mag.Atk.Bns."+16',}},
  184.         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',}},
  185.         neck="Baetyl Pendant",
  186.         waist="Eschan Stone",
  187.         left_ear="Friomisi Earring",
  188.         right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  189.         left_ring="Dingir Ring",
  190.         right_ring="Epaminondas's Ring",
  191.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  192.         }
  193.  
  194.     sets.precast.WS['Aeolian Edge'].TH = set_combine(sets.precast.WS['Aeolian Edge'], sets.TreasureHunter)
  195.  
  196.     -- Swap to these on Moonshade using WS if at 3000 TP
  197.     sets.MaxTP = {ear2="Sherida Earring"}
  198.     sets.AccMaxTP = sets.MaxTP
  199.  
  200.     --------------------------------------
  201.     -- Midcast sets
  202.     --------------------------------------
  203.  
  204.     sets.midcast.FastRecast = {}
  205.  
  206.     -- Specific spells
  207.     sets.midcast.Utsusemi = set_combine(sets.midcast.FastRecast, {})
  208.  
  209.     sets.midcast.Dia = set_combine(sets.midcast.FastRecast, sets.TreasureHunter)
  210.     sets.midcast.Diaga = set_combine(sets.midcast.FastRecast, sets.TreasureHunter)
  211.     sets.midcast['Dia II'] = set_combine(sets.midcast.FastRecast, sets.TreasureHunter)
  212.     sets.midcast.Bio = set_combine(sets.midcast.FastRecast, sets.TreasureHunter)
  213.     sets.midcast['Bio II'] = set_combine(sets.midcast.FastRecast, sets.TreasureHunter)
  214.  
  215.     -- Ranged gear
  216.  
  217.     sets.midcast.RA = {}
  218.  
  219.     sets.midcast.RA.Acc = {}
  220.  
  221.     --------------------------------------
  222.     -- Idle/resting/defense sets
  223.     --------------------------------------
  224.  
  225.     -- Resting sets
  226.     sets.resting = {}
  227.  
  228.     -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  229.  
  230.     sets.idle = {
  231.         ammo="Staunch Tathlum +1",
  232.         head="Meghanada Visor +2",
  233.         body="Meg. Cuirie +2",
  234.         hands="Meg. Gloves +2",
  235.         legs="Meg. Chausses +2",
  236.         feet="Skd. Jambeaux +1",
  237.         neck="Loricate Torque +1",
  238.         waist="Flume Belt",
  239.         left_ear="Infused Earring",
  240.         right_ear="Etiolation Earring",
  241.         left_ring="Defending Ring",
  242.         right_ring="Patricius Ring",
  243.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  244.         }
  245.        
  246.     sets.idle.Sphere = set_combine(sets.idle, {})
  247.  
  248.     sets.idle.Weak = set_combine(sets.idle, {})
  249.  
  250.     sets.DayIdle = set_combine(sets.idle, {})
  251.     sets.NightIdle = set_combine(sets.idle, {})
  252.  
  253.     -- Defense sets
  254.  
  255.     sets.defense.PDT = {
  256.         ammo="Staunch Tathlum +1",
  257.         head="Meghanada Visor +2",
  258.         body="Meg. Cuirie +2",
  259.         hands="Meg. Gloves +2",
  260.         legs="Meg. Chausses +2",
  261.         feet="Skd. Jambeaux +1",
  262.         neck="Loricate Torque +1",
  263.         waist="Flume Belt",
  264.         left_ear="Infused Earring",
  265.         right_ear="Etiolation Earring",
  266.         left_ring="Defending Ring",
  267.         right_ring="Patricius Ring",
  268.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  269.         }
  270.  
  271.     sets.defense.MDT = sets.defense.PDT
  272.        
  273.     sets.defense.MEVA = sets.defense.PDT
  274.  
  275.  
  276.     --------------------------------------
  277.     -- Melee sets  
  278.     --------------------------------------
  279.  
  280.     -- Normal melee group
  281.     sets.engaged = {
  282.         ammo="Ginsen",
  283.         head="Adhemar Bonnet +1",
  284.         body="Adhemar Jacket +1",
  285.         hands="Adhemar Wrist. +1",
  286.         legs={ name="Samnuha Tights", augments={'STR+10','DEX+10','"Dbl.Atk."+3','"Triple Atk."+3',}},
  287.         feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  288.         neck="Combatant's Torque",
  289.         waist="Windbuffet Belt +1",
  290.         left_ear="Sherida Earring",
  291.         right_ear="Suppanomimi",
  292.         left_ring="Epona's Ring",
  293.         right_ring="Ilabrat Ring",
  294.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  295.         }
  296.        
  297.     sets.engaged.SomeAcc = set_combine(sets.engaged, {})
  298.    
  299.     sets.engaged.Acc = set_combine(sets.engaged, {})
  300.        
  301.     sets.engaged.FullAcc = set_combine(sets.engaged, {})
  302.  
  303.     sets.engaged.Fodder = set_combine(sets.engaged, {})
  304.  
  305.     sets.engaged.PDT = {
  306.         ammo="Staunch Tathlum +1",
  307.         head="Meghanada Visor +2",
  308.         body="Adhemar Jacket +1",
  309.         hands="Meg. Gloves +2",
  310.         legs="Meg. Chausses +2",
  311.         feet={ name="Herculean Boots", augments={'Accuracy+30','"Triple Atk."+3','Attack+12',}},
  312.         neck="Loricate Torque +1",
  313.         waist="Flume Belt",
  314.         left_ear="Sherida Earring",
  315.         right_ear="Suppanomimi",
  316.         left_ring="Defending Ring",
  317.         right_ring="Epona's Ring",
  318.         back={ name="Mecisto. Mantle", augments={'Cap. Point+46%','Mag. Acc.+2','DEF+13',}},
  319.         }
  320.  
  321.     sets.engaged.SomeAcc.PDT = set_combine(sets.engaged.PDT, {})
  322.        
  323.     sets.engaged.Acc.PDT = set_combine(sets.engaged.PDT, {})
  324.  
  325.     sets.engaged.FullAcc.PDT = set_combine(sets.engaged.PDT, {})
  326.        
  327.     sets.engaged.Fodder.PDT = set_combine(sets.engaged.PDT, {})
  328.        
  329. end
  330.  
  331. -- Select default macro book on initial load or subjob change.
  332. function select_default_macro_book()
  333.     -- Default macro set/book
  334.     if player.sub_job == 'DNC' then
  335.         set_macro_page(6, 1)
  336.     elseif player.sub_job == 'WAR' then
  337.         set_macro_page(6, 1)
  338.     elseif player.sub_job == 'NIN' then
  339.         set_macro_page(6, 1)
  340.     else
  341.         set_macro_page(6, 1)
  342.     end
  343. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement