vm0d

vmod_THF

Jun 16th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 36.75 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job.  Generally should not be modified.
  3. -- Modified JUN 29 2018
  4. -------------------------------------------------------------------------------------------------------------------
  5.  
  6. --[[
  7.     Custom commands:
  8.  
  9.     gs c cycle treasuremode (set on ctrl-= by default): Cycles through the available treasure hunter modes.
  10.    
  11.     Treasure hunter modes:
  12.         None - Will never equip TH gear
  13.         Tag - Will equip TH gear sufficient for initial contact with a mob (either melee, ranged hit, or Aeolian Edge AOE)
  14.         SATA - Will equip TH gear sufficient for initial contact with a mob, and when using SATA
  15.         Fulltime - Will keep TH gear equipped fulltime
  16.  
  17. --]]
  18.  
  19. -- Initialization function for this job file.
  20. function get_sets()
  21.     mote_include_version = 2
  22.    
  23.     -- Load and initialize the include file.
  24.     include('Mote-Include.lua')
  25. end
  26.  
  27. -- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  28. function job_setup()
  29.     state.Buff['Sneak Attack'] = buffactive['Sneak Attack'] or false
  30.     state.Buff['Trick Attack'] = buffactive['Trick Attack'] or false
  31.     state.Buff['Feint'] = buffactive['Feint'] or false
  32.     state.Buff["Assassin's Charge"] = buffactive["Assassin's Charge"] or false
  33.     state.Buff['Perfect Dodge'] = buffactive['Perfect Dodge'] or false
  34.     state.Buff['Flee'] = buffactive['Perfect Dodge'] or false
  35.     state.Buff['sleep'] = buffactive['Sleep'] or false
  36.     state.Buff['Bio'] = buffactive['Bio'] or false
  37.     state.Buff['Poison'] = buffactive['Poison'] or false
  38.     state.Buff['Doom'] = buffactive['Doom'] or false
  39.     state.Buff['Reive Mark'] = buffactive['Reive Mark'] or false
  40.     state.Buff['Elvorseal'] = buffactive['Elvorseal'] or false
  41.    
  42.     include('Mote-TreasureHunter')
  43.  
  44.     -- For th_action_check():
  45.     -- JA IDs for actions that always have TH: Provoke, Animated Flourish
  46.     info.default_ja_ids = S{35, 204}
  47.     -- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
  48.     info.default_u_ja_ids = S{201, 202, 203, 205, 207}
  49. end
  50.  
  51. -------------------------------------------------------------------------------------------------------------------
  52. -- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
  53. -------------------------------------------------------------------------------------------------------------------
  54.  
  55. -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
  56. function user_setup()
  57.     state.OffenseMode:options('Normal', 'Acc', 'PDT', 'Salvage', 'MDT')
  58.     state.RangedMode:options('Normal', 'Acc')
  59.     state.WeaponskillMode:options('Normal', 'Acc')
  60.    
  61.     select_default_macro_book()
  62.  
  63.     -- Gear Definitions
  64.     gear.DarkRing = {name="Dark Ring"}
  65.     gear.Reive = {name="Ygnas's Resolve +1"}
  66.     gear.JPcape = {name="Mecistopins Mantle"}
  67.     gear.HasteBelt = {name="Sailfi Belt +1"}
  68.     gear.Sleep = {name="Frenzy Sallet"}
  69.  
  70.     -- Iuitl Set
  71.     -- This entire set should be acquired, +1, and aug for DT
  72.     -- Iuitl head is for DT, ta
  73.     gear.IHead = {name="Iuitl Headgear +1"}
  74.     -- Iuitl body is for DT, acc, r.acc, subtle blow
  75.     gear.IBody = {name="Iuitl Vest +1"}
  76.     -- Iuitl hands is for DT, acc, r.acc, snapshot
  77.     -- Best aug is snapshot 1-3, for Precast ra
  78.     gear.IHands = {name="Iuitl Wristbands +1"}
  79.     -- Iuitl legs is for DT, m.acc, mab, stp
  80.     gear.ILegs = {name="Iuitl Tights +1"}
  81.     -- Iuitl feet is for DT, atk, r.atk, m.acc
  82.     gear.IFeet = {name="Iuitl Gaiters +1"}
  83.    
  84.     -- Artifact set
  85.     -- Artifact Head has acc, r.acc, crit dmg
  86.     gear.AFHead = {name="Pillager's Bonnet +1"}
  87.     -- Artifact Body has acc, crit dmg, aug: Hide
  88.     gear.AFBody = {name="Pillager's Vest +1"}
  89.     -- Artifact Hands have steal, crit dmg, increased trick dmg
  90.     gear.AFHands = {name="Pillager's Armlets +1"}
  91.     -- Artifact Legs have acc, atk, steal, crit dmg
  92.     gear.AFLegs = {name="Pillager's Culottes +1"}
  93.     -- Artifact Feet have acc, r.acc, steal, movement+12%, aug: Flee
  94.     gear.AFFeet = {name="Pillager's Poulaines +1"}
  95.    
  96.     -- Relic set
  97.     -- Relic Head has acc, mug, aug: Aura Steal
  98.     gear.RHead = {name="Plunderer's Bonnet +1"}
  99.     -- Relic Body has crit rate, crit dmg, aug: Ambush
  100.     gear.RBody = {name="Plunderer's Vest +1"}
  101.     -- Relic Hands have acc, th, aug: Perfect Dodge
  102.     gear.RHands = {name="Plunderer's Armlets +1"}
  103.     -- Relic Legs have acc, gilfinder, aug: Feint
  104.     gear.RLegs = {name="Plunderer's Culottes +1"}
  105.     -- Relic Feet have ta, ta dmg, aug: Assassin's Charge
  106.     gear.RFeet = {name="Plunderer's Poulaines +1"}
  107.  
  108.     -- Empyrean set
  109.     -- Empyrean set has a unique set bonus which applies with as little as 2 pieces.
  110.     -- Empyrean Head is for ta, aug: Accomplice, aug: Collaborator
  111.     gear.EmpHead = {name="Skulker's Bonnet +1"}
  112.     -- Empyrean Body is for aug: Conspirator
  113.     gear.EmpBody = {name="Skulker's Vest +1"}
  114.     -- Empyrean Hands are for sa dmg
  115.     gear.EmpHands = {name="Skulker's Armlets +1"}
  116.     -- Empyrean Legs are for crit rate, despoil
  117.     gear.EmpLegs = {name="Skulker's Culottes +1"}
  118.     -- Empyrean Feet are for th, despoil
  119.     gear.EmpFeet = {name="Skulker's Poulaines +1"}
  120.  
  121.     -- Taeon set, all pieces aug: atk or atk/acc, dw, crit
  122.     -- Taeon head is for acc, r.acc, crit rate
  123.     gear.THead = {name="Taeon Chapeau"}
  124.     -- Taeon body is for atk, r.atk, fast cast
  125.     gear.TBody = {name="Taeon Tabard"}
  126.     -- Taeon hands is for m.acc, mab
  127.     gear.THands = {name="Taeon Gloves"}
  128.     -- Taeon legs is for acc, r.acc, ta
  129.     gear.TLegs = {name="Taeon Tights"}
  130.     -- Taeon feet is for acc, r.acc, m.acc, dw
  131.     gear.TFeet = {name="Taeon Boots"}
  132.  
  133.     -- Pursuer's set
  134.     -- Pursuer's head is for ratk, marks, stp
  135.     gear.PHead = {name="Pursuer's Beret"}
  136.     -- Pursuer's body is for racc, ratk, stp
  137.     gear.PBody = {name="Pursuer's Doublet"}
  138.     -- Pursuer's hands is for ratk, enm-
  139.     gear.PHands = {name="Pursuer's Cuffs"}
  140.     -- Pursuer's legs is for racc, ratk, rapid shot
  141.     gear.PLegs = {name="Pursuer's Pants"}
  142.     -- Pursuer's feet is for racc, enm-
  143.     gear.PFeet = {name="Pursuer's Gaiters"}
  144.  
  145.     -- Rawhide set
  146.     -- Rawhide head is for atk, refresh
  147.     gear.RawHead = {name="Rawhide Mask"}
  148.     -- Rawhide body is for acc, atk, matk, ta
  149.     gear.RawBody = {name="Rawhide Vest"}
  150.     -- Rawhide hands is for acc, m.acc, blue magic skill, spell int-
  151.     gear.RawHands = {name="Rawhide Gloves"}
  152.     -- Rawhide legs is for m.acc, enh magic skill, tactical parry
  153.     gear.RawLegs = {name="Rawhide Trousers"}
  154.     -- Rawhide feet is for acc, dw, waltz pot
  155.     gear.RawFeet = {name="Rawhide Boots"}
  156.  
  157.     -- Herculean set, Ranged Path aug
  158.     -- Herculean head is for atk, ratk, mab, fc
  159.     gear.HHeadR = {name="Herculean Helm", augments={'AGI+7'}}
  160.     -- Herculean body is for acc, racc, enm-, stp, crit hit rate
  161.     gear.HBodyR = {name="Herculean Vest", augments={''}}
  162.     -- Herculean hands is for acc, racc, ta, sb, pdt
  163.     gear.HHandsR = {name="Herculean Gloves", augments={'AGI+8'}}
  164.     -- Herculean legs is for ratk, enm-, stp, pdt
  165.     gear.HLegsR = {name="Herculean Trousers", augments={'AGI+8'}}
  166.     -- Herculean feet is for acc, atk, racc, ratk, macc, mab, ta, sb, pdt
  167.     gear.HFeetR = {name="Herculean Boots", augments={'AGI+10'}}
  168.  
  169.     -- Herculean set, Magic Path aug
  170.     -- Herculean head is for atk, ratk, mab, fc
  171.     gear.HHeadM = {name="Herculean Helm", augments={'AGI+15'}}
  172.     -- Herculean body is for acc, racc, enm-, stp, crit hit rate
  173.     gear.HBodyM = {name="Herculean Vest", augments={''}}
  174.     -- Herculean hands is for acc, racc, ta, sb, pdt
  175.     gear.HHandsM = {name="Herculean Gloves", augments={''}}
  176.     -- Herculean legs is for ratk, enm-, stp, pdt
  177.     gear.HLegsM = {name="Herculean Trousers", augments={'Weapon skill damage +2%'}}
  178.     -- Herculean feet is for acc, atk, racc, ratk, macc, mab, ta, sb, pdt
  179.     gear.HFeetM = {name="Herculean Boots", augments={'AGI+8'}}
  180.  
  181.     -- Meghanada set
  182.     -- Meghanada head is for
  183.     gear.MegHead = {name="Meghanada Visor +1"}
  184.     -- Meghanada body is for
  185.     gear.MegBody = {name="Meghanada Cuirie +1"}
  186.     -- Meghanada hands is for
  187.     gear.MegHands = {name="Meghanada Gloves +1"}
  188.     -- Meghanada legs is for
  189.     gear.MegLegs = {name="Meghanada Chausses +1"}
  190.     -- Meghanada feet is for
  191.     gear.MegFeet = {name="Meghanada Jambeaux +1"}
  192.  
  193.     gear.AugCanny = {name="Canny Cape", augments={'"Dual Wield"+5'}}
  194.     gear.AugAmbuSTP = {name="Toutatis's Cape", augments={'"Store TP"+10'}}
  195.     gear.AugAmbuWS = {name="Toutatis's Cape", augments={'Weapon skill damage +10%'}}
  196.  
  197.     gear.default.weaponskill_neck = "Fotia Gorget"
  198.     gear.default.weaponskill_waist = "Fotia Belt"
  199.  
  200.  
  201.     -- Additional local binds
  202.     -- F10, F11, F12 are occupied by default as follows:
  203.     -- f10 reset DefenseMode
  204.     -- ^f10 DefenseMode Physical
  205.     -- !f10 DefenseMode Magical
  206.     -- f11 toggle CP
  207.     -- ^f11 toggle Kiting
  208.     -- !f11 EquipStop
  209.     -- f12 update user
  210.     -- ^f12 IdleMode
  211.     send_command('bind f9 gs c cycle OffenseMode')
  212.     send_command('bind ^f9 gs c cycle WeaponskillMode')
  213.     send_command('bind !f9 gs c cycle RangedMode')
  214.    
  215.     send_command('bind ^` input /ja "Flee" <me>')
  216.     send_command('bind !` gs c cycle treasuremode')
  217. end
  218.  
  219. -- Called when this job file is unloaded (eg: job change)
  220. function user_unload()
  221.     send_command('unbind ^`')
  222.     send_command('unbind !`')
  223. end
  224.  
  225. -- Define sets and vars used by this job file.
  226. function init_gear_sets()
  227.     --------------------------------------
  228.     -- Special sets (required by rules)
  229.     --------------------------------------
  230.  
  231.     -- Globally defined sets
  232.     sets.Kiting = {main="Odium",body="Samnuha Coat",ring1="Warden's Ring",ring2="Shadow Ring"}
  233.     sets.TreasureHunter = {hands=gear.RHands, feet=gear.EmpFeet}
  234.     sets.CP = {back=gear.JPcape}
  235.    
  236.     -- vm0d's Custom Sets
  237.     -- Sets to augment the Idle set
  238.     sets.ExtraRegen = {head="Ocelomeh Headpiece +1",neck="Sanctity Necklace",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
  239.     sets.Refresh = {head=gear.RawHead,body="Mekosuchinae Harness",legs=gear.RawLegs}
  240.     sets.CureRcvd = {ear1="Oneiros Earring",hands="Buremte Gloves",ring2="Kunaji Ring",belt="Gishdubar Sash"}
  241.     sets.Roll = {ring1="Roller's Ring"}
  242.     sets.Aries = {back="Aries Mantle"}
  243.     sets.ProSh = {ring1="Sheltered Ring"}
  244.     -- Sets that augment various sets
  245.     sets.Moonshade = {ear2="Moonshade Earring"}
  246.  
  247.     -- Buff sets: Gear that needs to be worn to enhance an active player buff.
  248.     sets.buff['Sneak Attack'] = {hands=gear.EmpHands}
  249.     sets.buff['Trick Attack'] = {hands=gear.RHands}
  250.     sets.buff["Assassin's Charge"] = {waist="Chiner's Belt +1",feet=gear.RFeet}
  251.     sets.buff['Flee'] = {feet="Skadi's Jambeaux +1"}
  252.     sets.buff['Sleep'] = {head=gear.Sleep}
  253.     sets.buff['Doom'] = {ring1="Purity Ring",waist="Gishdubar Sash"}
  254.     sets.buff['Reive Mark'] = {neck=gear.Reive}
  255.     sets.buff['Elvorseal'] = {head=gear.MegHead,body="Ashera Harness",hands=gear.MegHands,legs=gear.MegLegs,feet=gear.MegFeet}
  256.  
  257.  
  258.     --------------------------------------
  259.     -- Precast sets
  260.     --------------------------------------
  261.  
  262.     -- Precast sets to enhance JAs
  263.     sets.precast.JA['Collaborator'] = {head=gear.EmpHead}
  264.     sets.precast.JA['Accomplice'] = {head=gear.EmpHead}
  265.     sets.precast.JA['Flee'] = {feet=gear.AFFeet}
  266.     sets.precast.JA['Hide'] = {body=gear.AFBody}
  267.     sets.precast.JA['Conspirator'] = {body=gear.EmpBody}
  268.     sets.precast.JA['Steal'] = {head=gear.RHead,hands="Thief's Kote",neck="Pentalagus Charm",waist="Key Ring Belt",legs=gear.AFLegs,feet=gear.AFFeet}
  269.     sets.precast.JA['Despoil'] = {legs=gear.EmpLegs,feet=gear.EmpFeet}
  270.     sets.precast.JA['Mug'] = {head=gear.RHead}
  271.     sets.precast.JA['Perfect Dodge'] = {hands=gear.RHands}
  272.     sets.precast.JA['Feint'] = {legs=gear.RLegs}
  273.     sets.precast.JA['Sneak Attack'] = set_combine(sets.buff['Sneak Attack'], {})
  274.     sets.precast.JA['Trick Attack'] = set_combine(sets.buff['Trick Attack'], {})
  275.  
  276.     -- Actions we want to use to tag TH.
  277.     sets.precast.JA.Provoke = set_combine(sets.TreasureHunter, {})
  278.     sets.precast.JA['Animated Flourish'] = set_combine(sets.TreasureHunter, {})
  279.  
  280.     -- DNC actions
  281.     -- Curing/Divine Waltz set
  282.     -- Anwig Salade (Augment):   Waltz Recast -2 Seconds
  283.     -- HP Cured = floor((Waltz Potency gear + Waltz Potency Received) ×floor( M×(User's CHR + Target's VIT) + B + 2*(Waltz Job Point Tiers) ) )
  284.     -- As THF, you will most often be waltzing yourself, so CHR and VIT are both helpful
  285.     -- Waltz Potency gear caps at 50%, while Waltz received potency caps at 30%.
  286.     sets.precast.Waltz = {ammo="Yamarang",head="Anwig Salade",feet=gear.RawFeet}
  287.     -- Healing Waltz set
  288.     -- Removes status ailments and does not have stat modifiers, but still uses augmented Anwig Salade for recast reduction.
  289.     sets.precast.JA['Healing Waltz'] = {head="Anwig Salade"}
  290.     -- Steps are affected by accuracy
  291.     sets.precast.Step = {ammo="Yamarang",
  292.         head=gear.MegHead,neck="Sanctity Necklace",ear1="Heartseeker Earring",ear2="Zennaroi Earring",
  293.         body="Ashera Harness",hands=gear.MegHands,ring1="Ramuh Ring +1",ring2="Ramuh Ring +1",
  294.         back=gear.AugAmbuSTP,waist="Olseni Belt",legs=gear.MegLegs,feet=gear.MegFeet}
  295.  
  296.     -- Fast cast sets for spells
  297.     sets.precast.FC = {head=gear.HHeadM,body=gear.TBody,hands="Leyline Gloves",legs=gear.AFLegs,feet=gear.AFFeet}
  298.     sets.precast.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
  299.  
  300.     -- Ranged snapshot gear
  301.     sets.precast.RA = {head="Aurore Beret +1",body=gear.PBody,hands=gear.IHands,legs="Adhemar Kecks",feet=gear.MegFeet}
  302.  
  303.     -- Weaponskill sets
  304.     -- Default set for any weaponskill that isn't any more specifically defined
  305.     sets.precast.WS = {ammo="Seething Bomblet",
  306.         head=gear.MegHead,neck="Fotia Gorget",ear1="Tati Earring",ear2="Tati Earring",
  307.         body=gear.MegBody,hands=gear.MegHands,ring1="Petrov Ring",ring2="Karieyh Ring",
  308.         back=gear.AugAmbuWS,waist="Fotia Belt",legs=gear.MegLegs,feet=gear.MegFeet}
  309.     sets.precast.WS.Acc = set_combine(sets.precast.WS, {ear2="Zennaroi Earring",ring1="Ramuh Ring +1"})
  310.  
  311.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  312.  
  313.     -- Exenterator
  314.     -- Delivers a fourfold attack that decreases target's accuracy. Duration of effect varies with TP.
  315.     -- 73% AGI mod on 1st merit, +3% for 2nd-5th merits. 85% AGI mod at 5/5.
  316.     -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
  317.     sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {ring1="Garuda Ring +1",ring2="Garuda Ring +1"})
  318.     sets.precast.WS['Exenterator'].Acc = set_combine(sets.precast.WS['Exenterator'], {ear2="Zennaroi Earring"})
  319.     sets.precast.WS['Exenterator'].SA = set_combine(sets.precast.WS['Exenterator'], {ammo="Yetshila"})
  320.     sets.precast.WS['Exenterator'].TA = set_combine(sets.precast.WS['Exenterator'], {ammo="Yetshila"})
  321.  
  322.     -- Dancing Edge
  323.     -- Delivers a fivefold attack. Accuracy varies with TP.
  324.     -- 40% CHR / 40% DEX
  325.     -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
  326.     sets.precast.WS['Dancing Edge'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  327.     sets.precast.WS['Dancing Edge'].Acc = set_combine(sets.precast.WS['Dancing Edge'], {ear2="Zennaroi Earring"})
  328.     sets.precast.WS['Dancing Edge'].SA = set_combine(sets.precast.WS['Dancing Edge'], {ammo="Yetshila"})
  329.     sets.precast.WS['Dancing Edge'].TA = set_combine(sets.precast.WS['Dancing Edge'], {ammo="Yetshila"})
  330.  
  331.     -- Evisceration
  332.     -- Delivers an attack comprised of five hits. Critical hit rate varies with TP.
  333.     -- 50% DEX
  334.     -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
  335.     sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  336.     sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {ear2="Zennaroi Earring"})
  337.     sets.precast.WS['Evisceration'].SA = set_combine(sets.precast.WS['Evisceration'], {ammo="Yetshila"})
  338.     sets.precast.WS['Evisceration'].TA = set_combine(sets.precast.WS['Evisceration'], {ammo="Yetshila"})
  339.  
  340.     -- Rudra's Storm
  341.     -- Deals quintuple damage and weighs target down. Damage varies with TP.
  342.     -- 80% DEX
  343.     sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  344.     sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS["Rudra's Storm"], {ear2="Zennaroi Earring"})
  345.     sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Yetshila"})
  346.     sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Yetshila"})
  347.    
  348.     -- Mercy Stroke
  349.     -- Deals quintuple damage and weighs target down. Damage varies with TP.
  350.     -- 80% DEX
  351.     sets.precast.WS['Mercy Stroke'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  352.     sets.precast.WS['Mercy Stroke'].Acc = set_combine(sets.precast.WS['Mercy Stroke'], {ear2="Zennaroi Earring"})
  353.     sets.precast.WS["Mercy Stroke"].SA = set_combine(sets.precast.WS["Mercy Stroke"], {ammo="Yetshila"})
  354.     sets.precast.WS["Mercy Stroke"].TA = set_combine(sets.precast.WS["Mercy Stroke"], {ammo="Yetshila"})
  355.  
  356.  
  357.     -- Shark Bite
  358.     --  Delivers a twofold attack. Damage varies with TP.
  359.     -- 40% DEX 40% AGI
  360.     sets.precast.WS["Shark Bite"] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  361.     sets.precast.WS['Shark Bite'].Acc = set_combine(sets.precast.WS['Shark Bite'], {ear2="Zennaroi Earring"})
  362.     sets.precast.WS['Shark Bite'].SA = set_combine(sets.precast.WS['Shark Bite'], {ammo="Yetshila"})
  363.     sets.precast.WS['Shark Bite'].TA = set_combine(sets.precast.WS['Shark Bite'], {ammo="Yetshila"})
  364.  
  365.     -- Mandalic Stab
  366.     -- Damage varies with TP.
  367.     -- 60% DEX
  368.     sets.precast.WS['Mandalic Stab'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
  369.     sets.precast.WS['Mandalic Stab'].Acc = set_combine(sets.precast.WS['Mandalic Stab'], {ear2="Zennaroi Earring"})
  370.     sets.precast.WS['Mandalic Stab'].SA = set_combine(sets.precast.WS['Mandalic Stab'], {ammo="Yetshila"})
  371.     sets.precast.WS['Mandalic Stab'].TA = set_combine(sets.precast.WS['Mandalic Stab'], {ammo="Yetshila"})
  372.  
  373.     -- Aeolian Edge
  374.     -- Delivers an area attack that deals wind elemental damage. Damage varies with TP.
  375.     -- 40% DEX / 40% INT
  376.     sets.precast.WS['Aeolian Edge'] = {ammo="Seething Bomblet",
  377.         head=gear.HHeadM,neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
  378.         body="Mekosuchinae Harness",hands="Leyline Gloves",ring1="Shiva Ring +1",ring2="Ramuh Ring +1",
  379.         back=gear.AugAmbuWS,waist="Eschan Stone",legs=gear.HLegsM,feet=gear.HFeetM}
  380.  
  381.     -- Cyclone (TH set)
  382.     -- Delivers an area of effect wind elemental attack. Damage varies with TP.
  383.     -- Can be used at range (15'+), and the area of effect is target-centered.
  384.     sets.precast.WS['Cyclone'] = set_combine(sets.precast.WS['Aeolian Edge'], sets.TreasureHunter)
  385.  
  386.     --------------------------------------
  387.     -- Midcast sets
  388.     --------------------------------------
  389.  
  390.     sets.midcast.FastRecast = {
  391.         head=gear.AFHead,
  392.         body=gear.AFBody,hands=gear.AFHands,
  393.         waist=gear.HasteBelt,legs=gear.AFLegs,feet=gear.AFFeet}
  394.  
  395.     -- Specific spells
  396.     sets.midcast.Utsusemi = {
  397.         head=gear.AFHead,
  398.         body=gear.AFBody,hands=gear.AFHands,
  399.         waist=gear.HasteBelt,legs=gear.AFLegs,feet=gear.AFFeet}
  400.  
  401.     -- Ranged gear
  402.     sets.midcast.RA = {
  403.         head=gear.MegHead,neck="Marked Gorget",ear1="Enervating Earring",ear2="Clearview Earring",
  404.         body="Ashera Harness",hands=gear.MegHands,ring1="Hajduk Ring",ring2="Paqichikaji Ring",
  405.         back="Kayapa Cape",waist="Yemaya Belt",legs=gear.MegLegs,feet=gear.MegFeet}
  406.    
  407.     -- Max Racc set for gashing bolts
  408.     sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {})
  409.  
  410.  
  411.     --------------------------------------
  412.     -- Idle/resting/defense sets
  413.     --------------------------------------
  414.  
  415.     -- Idle sets
  416.     sets.idle = {ammo="Vanir Battery",
  417.         head=gear.MegHead,neck="Loricate Torque +1",ear1="Eabani Earring",ear2="Sanare Earring",
  418.         body="Ashera Harness",hands=gear.MegHands,ring1="Defending Ring",ring2="Karieyh Ring",
  419.         back="Solemnity Cape",waist="Flume Belt",legs=gear.MegLegs,feet="Skadi's Jambeaux +1"}
  420.  
  421.     sets.idle.Town = set_combine(sets.idle, {})
  422.        
  423.     sets.idle.Field = set_combine(sets.idle, {})
  424.  
  425.     sets.idle.Weak = set_combine(sets.idle, {})
  426.  
  427.  
  428.     -- Defense sets
  429.  
  430.     sets.defense.PDT = set_combine(sets.idle, {ring2="Dark Ring",feet=gear.MegFeet})
  431.  
  432.     sets.defense.MDT = set_combine(sets.idle, {neck="Warder's Charm",ring2="Dark Ring",feet=gear.MegFeet})
  433.  
  434.     -- Resting sets
  435.     sets.resting = set_combine(sets.idle, sets.ExtraRegen, sets.CureRcvd)
  436.  
  437.  
  438.     --------------------------------------
  439.     -- Melee sets
  440.     --------------------------------------
  441.     --  rather than F9 cycling, i recommend making macros
  442.     --  FORMAT BELOW (Acc example):
  443.     --      /echo Acc set (full accuracy), is that correct?
  444.     --      /ta <stpt>
  445.     --      /console gs c set OffenseMode Acc
  446.     --      /console gs equip sets.engaged.Acc
  447.     --------------------------------------
  448.  
  449.     -- Normal melee group
  450.     -- No buffs
  451.     -- Taeon head/body/hands/legs/feet need Dual Wield +4-5 aug.
  452.     -- Canny with Dual Wield +5 aug or 550 JP gift
  453.     sets.engaged = {ammo="Yetshila",
  454.         head=gear.THead,neck="Nefarious Collar +1",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
  455.         body=gear.TBody,hands=gear.THands,ring1="Begrudging Ring",ring2="Epona's Ring",
  456.         back=gear.AugAmbuSTP,waist="Patentia Sash",legs=gear.TLegs,feet=gear.TFeet}
  457.  
  458.     -- Acc with DW7 (12 including 550 JP gift)
  459.     sets.engaged.Acc = {ammo="Yamarang",
  460.         head=gear.MegHead,neck="Nefarious Collar +1",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
  461.         body="Ashera Harness",hands=gear.MegHands,ring1="Ramuh Ring +1",ring2="Ramuh Ring +1",
  462.         back=gear.AugAmbuSTP,waist=gear.HasteBelt,legs=gear.MegLegs,feet=gear.MegFeet}
  463.        
  464.     -- PDT with a little Acc
  465.     sets.engaged.PDT = set_combine(sets.engaged, {})
  466.  
  467.     -- Salvage set, for use with drain samba
  468.     -- Jugo Kukri's add'l effect is not overwritten by drain samba
  469.     sets.engaged.Salvage = set_combine(sets.engaged, {})
  470.  
  471.     -- Fire Absorb, for Cerberus
  472.     sets.engaged.MDT = set_combine(sets.engaged, {neck="Loricate Torque +1",back="Engulfer Cape +1"})
  473.  
  474.     -- STP
  475.     -- Theoretical, for max haste in settings where limiting TP feed is optimal
  476.     --sets.engaged.STP = {
  477.     --  head="Whirlpool Mask",neck="Houyi's Gorget",ear1="Tripudio Earring",ear2="Brutal Earring",
  478.     --  body="Qaaxo Harness",hands="Aetosaur Gloves +1",ring1="Petrov Ring",ring2="Rajas Ring",
  479.     --  back=gear.JPcape,waist="Patentia Sash",legs="Iuitl Tights +1",feet="Qaaxo Leggings"}
  480.  
  481. end
  482.  
  483.  
  484. -------------------------------------------------------------------------------------------------------------------
  485. -- Job-specific hooks for standard casting events.
  486. -------------------------------------------------------------------------------------------------------------------
  487.  
  488. -- Run after the general precast() is done.
  489. function job_post_precast(spell, action, spellMap, eventArgs)
  490.     if spell.english == 'Sneak Attack' or spell.english == 'Trick Attack' then
  491.         if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
  492.             equip(sets.TreasureHunter)
  493.         end
  494.     end
  495.     if spell.type:lower() == 'weaponskill' then
  496.         if buffactive["Assassin's Charge"] then
  497.             equip(sets.buff["Assassin's Charge"])
  498.         end
  499.         if buffactive['Sneak Attack'] then
  500.             equip(sets.buff['Sneak Attack'])
  501.         elseif buffactive['Trick Attack'] then
  502.             equip(sets.buff['Trick Attack'])
  503.         end
  504.         if (player.tp > 1749 and player.tp < 2000) or (player.tp > 2749 and player.tp < 3000) then
  505.             equip(sets.Moonshade)
  506.         end
  507.     end
  508.     if spell.type == 'Waltz' and spell.english ~= 'Healing Waltz' and spell.target.type == 'SELF' then
  509.         equip(sets.CureRcvd)
  510.     end
  511. end
  512.  
  513. -- Run after the general midcast() set is constructed.
  514. function job_post_midcast(spell, action, spellMap, eventArgs)
  515.     if state.TreasureMode.value ~= 'None' and spell.action_type == 'Ranged Attack' then
  516.         equip(sets.TreasureHunter)
  517.     end
  518. end
  519.  
  520. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  521. function job_aftercast(spell, action, spellMap, eventArgs)
  522.     -- Weaponskills wipe SATA/Feint.  Turn those state vars off before default gearing is attempted.
  523.     if spell.type == 'WeaponSkill' and not spell.interrupted then
  524.         state.Buff['Sneak Attack'] = false
  525.         state.Buff['Trick Attack'] = false
  526.         state.Buff['Feint'] = false
  527.         state.Buff["Assassin's Charge"] = false
  528.     end
  529.  
  530.     --Countdowns--
  531.     if not spell.interrupted then
  532.         if spell.english == "Steal" then
  533.             coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
  534.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
  535.         elseif spell.english == "Despoil" then
  536.             coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
  537.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
  538.         elseif spell.english == "Assassin's Charge" then
  539.             coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
  540.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
  541.         elseif spell.english == "Conspirator" then
  542.             coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
  543.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
  544.         elseif spell.english == "Sneak Attack" then
  545.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 49)
  546.         elseif spell.english == "Trick Attack" then
  547.             coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 59)
  548.         elseif spell.english == "Bully" then
  549.             send_command('timers create "Bully" 30 down')
  550.         elseif spell.english == "Quickstep" then
  551.             send_command('timers create "Quickstep" 60 down')
  552.         elseif spell.english == "Box Step" then
  553.             send_command('timers create "Box Step" 60 down')
  554.         elseif spell.english == "Stutter Step" then
  555.             send_command('timers create "Stutter Step" 60 down')
  556.         end
  557.     end
  558. end
  559.  
  560. -- Called after the default aftercast handling is complete.
  561. function job_post_aftercast(spell, action, spellMap, eventArgs)
  562.     -- If Feint is active, put that gear set on on top of regular gear.
  563.     -- This includes overlaying SATA gear.
  564.     check_buff('Feint', eventArgs)
  565. end
  566.  
  567. -------------------------------------------------------------------------------------------------------------------
  568. -- Job-specific hooks for non-casting events.
  569. -------------------------------------------------------------------------------------------------------------------
  570.  
  571. -- Called when a player gains or loses a buff.
  572. -- buff == buff gained or lost
  573. -- gain == true if the buff was gained, false if it was lost.
  574. function job_buff_change(buff, gain)
  575.     -- Check if we're slept
  576.     if buff == "sleep" then
  577.         if gain then
  578.             -- should be "player.hp > 100 and player.status == "Engaged" and not buffactive['Bio'] and not buffactive['Poison']"
  579.             -- for safety
  580.             if player.hp > 100 and player.status == "Engaged" then
  581.                 equip(sets.buff['Sleep'])
  582.                 --send_command('@input /p Buff sleep ON !')
  583.                 if buffactive.stoneskin then
  584.                     send_command('cancel Stoneskin')
  585.                 end
  586.             else
  587.                 equip(set_combine(sets.engaged.MDT, sets.Aries))
  588.             end
  589.         elseif not gain then
  590.             if buffactive['Elvorseal'] and player.sub_job == "DNC" and player.tp > 400 and player.hpp < 90 then
  591.                 send_command('@input /ja "Divine Waltz" <me>')
  592.                 --send_command('@input /p Buff Sleep OFF !')
  593.             else
  594.                 status_change(player.status)
  595.             end
  596.         end
  597.     end
  598.  
  599.     -- Check if we're in a Reive
  600.     if buff == "Reive Mark" then
  601.         if player.inventory[sets.buff['Reive Mark']] or player.wardrobe[sets.buff['Reive Mark']] or player.wardrobe2[sets.buff['Reive Mark']] or player.wardrobe3[sets.buff['Reive Mark']] or player.wardrobe4[sets.buff['Reive Mark']] then
  602.             if gain then
  603.                 equip(sets.buff['Reive Mark'])
  604.                 disable('neck')
  605.             elseif not gain then
  606.                 enable('neck')
  607.                 status_change(player.status)
  608.             end
  609.         end
  610.     end
  611.  
  612.     if buff == "Terror" or buff == "Petrification" or buff == "Stun" or buff == "Curse" or buff == "Weakness" then
  613.         if gain then
  614.             equip(sets.defense.MDT)
  615.         elseif not gain then
  616.             status_change(player.status)
  617.         end
  618.     end
  619.  
  620.     if buff == "Doom" then
  621.         if gain then
  622.             equip(sets.buff['Doom'])
  623.             disable('ring1','waist')
  624.             send_command('@input /p Doomed !')
  625.         elseif not gain then
  626.             enable('ring1','waist')
  627.             send_command('@input /p All better')
  628.             status_change(player.status)
  629.         end
  630.     end
  631.  
  632.     if buff == "Charm" then
  633.         if gain then
  634.             send_command('@input /p Charmed !')
  635.         elseif not gain then
  636.             send_command('@input /p All better')
  637.         end
  638.     end
  639. end
  640.  
  641. -- Handle notifications of general user state change.
  642. function job_state_change(stateField, newValue, oldValue)
  643.     -- Equip capacity point gear
  644.     if stateField == 'CP' then
  645.         if newValue ~= false then
  646.             equip(sets.CP)
  647.             disable('back','ring1')
  648.         else
  649.             enable('back','ring1')
  650.         end
  651.     end
  652. end
  653.  
  654. -------------------------------------------------------------------------------------------------------------------
  655. -- User code that supplements standard library decisions.
  656. -------------------------------------------------------------------------------------------------------------------
  657.  
  658. function get_custom_wsmode(spell, spellMap, defaut_wsmode)
  659.     if state.WeaponskillMode.value ~= 'Acc' then
  660.         local wsmode
  661.         if buffactive['Sneak Attack'] then
  662.             wsmode = 'SA'
  663.         elseif buffactive['Trick Attack'] then
  664.             wsmode = 'TA'
  665.         end
  666.         return wsmode
  667.     end
  668. end
  669.  
  670. -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
  671. function job_handle_equipping_gear(playerStatus, eventArgs)
  672.     -- Check that ranged slot is locked, if necessary
  673.     check_range_lock()
  674.    
  675.     -- Check for SATA when equipping gear.
  676.     -- If either is active, equip that gear specifically, and block equipping default gear.
  677.     check_buff('Sneak Attack', eventArgs)
  678.     check_buff('Trick Attack', eventArgs)
  679. end
  680.  
  681.  
  682. function customize_idle_set(idleSet)
  683.     if player.hpp < 99 then
  684.         idleSet = set_combine(idleSet, sets.ExtraRegen)
  685.     end
  686.  
  687.     if player.hpp < 65 then
  688.         idleSet = set_combine(idleSet, sets.CureRcvd)
  689.     end
  690.  
  691.     if player.mpp < 30 then
  692.         idleSet = set_combine(idleSet, sets.Refresh)
  693.     end
  694.  
  695.     if buffactive["Dancer's Roll"] or buffactive["Evoker's Roll"] or buffactive["Corsair's Roll"] or buffactive["Bolter's Roll"] then
  696.         idleSet = set_combine(idleSet, sets.Roll)
  697.     end
  698.  
  699.     if buffactive["Fighter's Roll"] or buffactive["Rogue's Roll"] or buffactive["Hunter's Roll"] or buffactive["Chaos Roll"] then
  700.         idleSet = set_combine(idleSet, sets.Roll)
  701.     end
  702.  
  703.     if buffactive["Wizard's Roll"] or buffactive["Warlock's Roll"] or buffactive["Caster's Roll"] or buffactive["Courser's Roll"] then
  704.         idleSet = set_combine(idleSet, sets.Roll)
  705.     end
  706.  
  707.     if buffactive["Samurai Roll"] or buffactive["Blitzer's Roll"] or buffactive["Tactician's Roll"] or buffactive["Miser's Roll"] then
  708.         idleSet = set_combine(idleSet, sets.Roll)
  709.     end
  710.  
  711.     if buffactive['Flee'] then
  712.         idleSet = set_combine(idleSet, sets.buff['Flee'])
  713.     end
  714.  
  715.     if buffactive['Elvorseal'] then
  716.         idleSet = set_combine(idleSet, sets.buff['Elvorseal'])
  717.     end
  718.  
  719.     if not buffactive['Protect'] or not buffactive['Shell'] then
  720.         idleSet = set_combine(idleSet, sets.ProSh)
  721.     end
  722.  
  723.     return idleSet
  724. end
  725.  
  726.  
  727. function customize_melee_set(melee_set)
  728.     if state.TreasureMode.value == 'Fulltime' then
  729.         melee_set = set_combine(melee_set, sets.TreasureHunter)
  730.     end
  731.     if state.OffenseMode ~= Acc then
  732.         if player.mp < 100 then
  733.             melee_set = set_combine(melee_set, {ring1="Petrov Ring"})
  734.         end
  735.     end
  736.     return melee_set
  737. end
  738.  
  739.  
  740. -- Called by the 'update' self-command.
  741. function job_update(cmdParams, eventArgs)
  742.     th_update(cmdParams, eventArgs)
  743.     --update_combat_form()
  744. end
  745.  
  746. -- Function to display the current relevant user state when doing an update.
  747. -- Return true if display was handled, and you don't want the default info shown.
  748. function display_current_job_state(eventArgs)
  749.     determine_haste()
  750.    
  751.     local msg = 'Thief'
  752.    
  753.     if state.CombatForm.has_value then
  754.         msg = msg .. ' (' .. state.CombatForm.value .. ')'
  755.     end
  756.    
  757.     msg = msg .. ', Offense: ' .. state.OffenseMode.value
  758.    
  759.     msg = msg .. ', WS: ' .. state.WeaponskillMode.value
  760.    
  761.     msg = msg .. ', RA: ' .. state.RangedMode.value
  762.    
  763.     if state.DefenseMode.value ~= 'None' then
  764.         msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
  765.     end
  766.    
  767.     if state.Kiting.value == true then
  768.         msg = msg .. ', Kiting ON'
  769.     end
  770.  
  771.     if state.CP.value == true then
  772.         msg = msg .. ', CP ON'
  773.     end
  774.  
  775.     msg = msg .. ', TH: ' .. state.TreasureMode.value
  776.  
  777.     add_to_chat(122, msg)
  778.  
  779.     eventArgs.handled = true
  780. end
  781.  
  782. -------------------------------------------------------------------------------------------------------------------
  783. -- Utility functions specific to this job.
  784. -------------------------------------------------------------------------------------------------------------------
  785.  
  786. -- State buff checks that will equip buff gear and mark the event as handled.
  787. function check_buff(buff_name, eventArgs)
  788.     if state.Buff[buff_name] then
  789.         equip(sets.buff[buff_name] or {})
  790.         if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
  791.             equip(sets.TreasureHunter)
  792.         end
  793.         eventArgs.handled = true
  794.     end
  795. end
  796.  
  797. -- Check for various actions that we've specified in user code as being used with TH gear.
  798. -- This will only ever be called if TreasureMode is not 'None'.
  799. -- Category and Param are as specified in the action event packet.
  800. function th_action_check(category, param)
  801.     if category == 2 or -- any ranged attack
  802.         category == 4 or -- any magic action
  803.         --(category == 3 and param == 30) or -- Aeolian Edge
  804.         (category == 6 and info.default_ja_ids:contains(param)) --or -- Provoke, Animated Flourish
  805.         --(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
  806.         then return true
  807.     end
  808. end
  809.  
  810. -- Function to lock various equipments based on the ranged slot equipment.
  811. function check_range_lock()
  812.     if player.equipment.range ~= 'empty' then
  813.         disable('range', 'ammo')
  814.     else
  815.         enable('range', 'ammo')
  816.     end
  817.  
  818.     -- This function works, but i have no way to deal with th_lock/th_unlock
  819.     -- Settled for a macro that equips fishing gear and unloads gs. :[
  820.     --if player.equipment.range == "Lu Shang's F. Rod" then
  821.     --  disable('main', 'sub', 'range', 'ammo', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
  822.     --elseif player.equipment.range ~= 'empty' then
  823.     --  enable('main', 'sub', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
  824.     --  disable('range', 'ammo')
  825.     --else
  826.     --  enable('main', 'sub', 'range', 'ammo', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
  827.     --end
  828. end
  829.  
  830. -- Select default macro book on initial load or subjob change.
  831. function select_default_macro_book()
  832.     -- Default macro set/book
  833.     if player.sub_job == 'DNC' then
  834.         set_macro_page(1, 6)
  835.     elseif player.sub_job == 'WAR' then
  836.         set_macro_page(2, 6)
  837.     elseif player.sub_job == 'NIN' then
  838.         set_macro_page(2, 6)
  839.     else
  840.         set_macro_page(1, 6)
  841.     end
  842. end
  843.  
  844. function determine_haste()
  845.     -- assuming +4 for marches (ghorn has +5)
  846.     -- Haste (white magic) 15%
  847.     -- Haste Samba (Sub) 5%
  848.     -- Haste (Merited DNC) 10% (never account for this)
  849.     -- Victory March +0/+3/+4/+5    9.4/14%/15.6%/17.1% +0
  850.     -- Advancing March +0/+3/+4/+5  6.3/10.9%/12.5%/14%  +0
  851.     -- Embrava 30% with 500 enhancing skill
  852.     -- Mighty Guard - 15%
  853.     -- buffactive[580] = indi/geo haste
  854.     -- buffactive[33] = regular haste/haste2
  855.     -- buffactive[604] = mighty guard
  856.     -- state.HasteMode = toggle for when you know Haste II is being cast on you
  857.     -- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
  858.    
  859.     --spells.Haste = S{buffactive[33],buffactive[580],buffactive.embrava,buffactive.march,buffactive[604]}
  860.  
  861.     if  ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or  -- geo haste + anything
  862.         ( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or  -- embrava + anything
  863.         ( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or  -- two marches + anything
  864.         ( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
  865.             add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
  866.     elseif(
  867.         ( buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
  868.         ( buffactive.march == 2 and buffactive['haste samba'] ) or
  869.         ( buffactive[580] and buffactive['haste samba'] ) then
  870.             add_to_chat(8, '-------------Haste 35%-------------')
  871.     elseif
  872.         ( buffactive.march == 2 ) or -- two marches from ghorn
  873.         ( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or  -- MG or haste + 1 march
  874.         ( buffactive[580] ) or  -- geo haste
  875.         ( buffactive[33] and buffactive[604] ) then  -- haste with MG
  876.             add_to_chat(8, '-------------Haste 30%-------------')
  877.     elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
  878.             add_to_chat(8, '-------------Haste 15%-------------')
  879.     end
  880.  
  881. end
Advertisement
Add Comment
Please, Sign In to add comment