Advertisement
Guest User

Untitled

a guest
Jul 13th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.98 KB | None | 0 0
  1. function get_sets()
  2. TPback = { name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','"Store TP"+10',}}
  3. DEXback = { name="Belenus's Cape", augments={'DEX+20','Rng.Acc.+20 Rng.Atk.+20','DEX+10','Crit.hit rate+10',}}
  4. AGIback = { name="Belenus's Cape", augments={'AGI+20','Rng.Acc.+20 Rng.Atk.+20','AGI+10','Weapon skill damage +10%',}}
  5. SNAPback = { name="Belenus's Cape", augments={'"Snapshot"+10',}}
  6.  
  7. TP_Index = 1
  8.  
  9. TP_Array = {'TPnormal', 'TPacc'}
  10. -------------------------------------------
  11.     -- aftercast for returning to TP and Idle sets
  12.     -- the 'self command' area will change the set defined as aftercast.TP
  13. -------------------------------------------    
  14.     sets.aftercast = {}
  15.     sets.engaged = {}
  16.     sets.precast = {}
  17.     sets.midcast = {}
  18.     sets.midcast.Ranged = {}
  19.     sets.midcast.Ranged.TPnormal = {}
  20.    
  21.  
  22.     Str_WS = S{"Refulgent Arrow"}
  23.     StrAgi_WS = S{"Flaming Arrow","Piercing Arrow","Dulling Arrow","Blast Arrow","Arching Arrow","Empyreal Arrow","Namas Arrow"}
  24.     StrAgi2_WS = S{"Sidewinder","Apex Arrow"}
  25.     Agi_WS = S{"Hot Shot","Split Shot","Sniper Shot","Blast Shot","Heavy Shot","Detonator","Numbing Shot"}
  26.     Agi2_WS = S{"Last Stand","Slug Shot"}
  27.     MAB_WS = S{"Trueflight","Wildfire"}
  28.     Dex_WS = S{"Jishnu's Radiance"}
  29.    
  30.        
  31.     sets.aftercast.Idle = {
  32.         head="Orion Beret +3",
  33.         neck="Wiglen Gorget",
  34.         lear="Infused Earring",
  35.         rear="Ethereal Earring",
  36.         body="Mummu Jacket +1",
  37.         hands="Garden Bangles",
  38.         lring="Sheltered Ring",
  39.         rring="Shneddick Ring",
  40.         back="Shadow Mantle",
  41.         waist="Kwahu Kachina Belt",
  42.         legs="Taeon Tights",
  43.         feet="Fajin Boots"}
  44.  
  45. -------------------------------------------
  46. -- The outermost table has to be named "sets", but
  47. -- otherwise there are no restrictions.
  48. -------------------------------------------
  49.  
  50.     sets.engaged.TPnormal = {
  51.         head="Meghanada Visor +1",
  52.         neck="Asperity Necklace",
  53.         lear="Bladeborn Earring",
  54.         rear="Steelflash Earring",
  55.         body="Thaumas Coat",
  56.         hands="Meg. Gloves +2",
  57.         lring="Hetairoi Ring",
  58.         rring="Epona's Ring",
  59.         back="Letalis Mantle",
  60.         waist="Goading Belt",
  61.         legs="Taeon Tights",
  62.         feet="Taeon Boots"} --8+4+4+5+6+4=31 haste
  63.        
  64.     sets.engaged.TPacc = set_combine(sets.engaged.TPnormal, {
  65.         neck="Erudit. Necklace",
  66.         body="Meg. Cuirie +2",
  67.         lring="Patricius Ring",
  68.         rring="Mars's Ring",
  69.         waist="Sailfi Belt +1"}) --8+2+3+8+6+4=31 haste
  70.    
  71.     sets.aftercast.TP = sets.engaged.TPnormal
  72. -------------------------------------------
  73.     -- Ranged sets:  
  74.     --   Precast is Snapshot (SS) / Rapid Shot (RS)
  75.          -- Snapshot reduces aiming delay by %, Rapid Shot reduces aiming delay by chance procs
  76.          -- Snapshot goal 70 without Flurry (merits 5/5 = 10)
  77.          -- Flurry build allows for more RS to be input because 70 SS achieved easier
  78.     --   Midcast is the TP builds, showing a normal and acc build
  79.          -- default is the set used for Fomalhaut, it has the least STP because the TP return is highest naturally
  80.          -- specific sets for Fail-Not & Yoichinoyumi
  81. -------------------------------------------
  82.     sets.precast.Ranged = {
  83.         head="Amini Gapette +1", --7/0
  84.         lear="Enervating Earring", --just in case instant-shot
  85.         rear="Telos Earring", --just in case instant-shot
  86.         body="Amini Caban +1",
  87.         hands="Carmine Fin. Ga. +1", --8/11
  88.         back=SNAPback, --10/0
  89.         waist="Impulse Belt", --3/0
  90.         legs="Adhemar Kecks", --9/10
  91.         feet="Meg. Jam. +2"} --10/0
  92.         --snapshot: 10 merits+7+8+10+3+9+10=57
  93.  
  94.     sets.precast.Ranged.Flurry = {
  95.         head="Orion Beret +3", --0/18
  96.         lear="Enervating Earring", --just in case instant-shot
  97.         rear="Telos Earring", --just in case instant-shot
  98.         body="Amini Caban +1",
  99.         hands="Carmine Fin. Ga. +1", --8/11
  100.         back=SNAPback, --10/0
  101.         waist="Yemaya Belt", --0/5
  102.         legs="Adhemar Kecks", --9/10
  103.         feet="Arcadian Socks +1"} --0/6
  104.         --snapshot: 30 flurry II + 10 merits+8+10+9=67
  105.  
  106.     sets.midcast.Ranged.TPnormal.default = {
  107.         head="Orion Beret +3", --0
  108.         neck="Ocachi Gorget", --5
  109.         lear="Enervating Earring", --4
  110.         rear="Telos Earring", --5
  111.         body="Mummu Jacket +1", --5
  112.         hands="Amini Glove. +1", --9
  113.         lring="Paqichikaji Ring", --0
  114.         rring="Bellona's Ring", --0
  115.         back=TPback, --10
  116.         waist="Yemaya Belt", --4
  117.         legs="Amini Brague +1", --10
  118.         feet="Meg. Jam. +2"} --0
  119.        
  120.     sets.midcast.Ranged.TPnormal["Fail-Not"] = set_combine(sets.midcast.Ranged.TPnormal.Fomalhaut, {
  121.         rring="Rajas Ring"}) --5
  122.    
  123.     sets.midcast.Ranged.TPnormal.Yoichinoyumi = set_combine(sets.midcast.Ranged.TPnormal.Fomalhaut, {
  124.         lring="Apate Ring", --6
  125.         rring="Rajas Ring"}) --5
  126.    
  127.         -- STP totals: 5+4+5+5+9+10+4+10=52 STP, w/o weapon factoring
  128.         -- STP totals: 62 for Fomal & Fail
  129.        
  130.         --1384 racc yoichi +knife/shield
  131.         --1284 racc fomal/fail +knife/shield
  132.        
  133.         --normal 27.3tp w/fomal   racc 22.8 w/fomal
  134.             --normal 19.9tp ws   racc 19.0 ws
  135.         --normal 23.2tp w/yoichi   racc 19.1 w/yoichi
  136.             --normal 16.5tp ws   racc 15.7 ws
  137.         --normal 25.5tp w/fail   racc 21.3 w/fail
  138.             --normal 18.6tp ws   racc 17.5 ws
  139.            
  140.         --i need 30 more stp for yoichi bow... can swap out neck for iskur when I get it
  141.         --That would be +3 stp and +30 racc.  swap out rings for +10stp and -22racc
  142.         --Net so far +13 stp +8 racc
  143.         --with yoichi, not possible to get 30stp, but the above changes would allow Fail to 4hit
  144.        
  145.     sets.midcast.Ranged.TPacc = set_combine(sets.midcast.Ranged.TPnormal, {
  146.         neck="Erudit. Necklace", --6
  147.         body="Meg. Cuirie +2", --0
  148.         hands="Meg. Gloves +2", --0
  149.         waist="Kwahu Kachina Belt", --0
  150.         legs="Meg. Chausses +2"}) --0
  151.         -- STP totals: 52-5+6-5-9-4-10=25
  152.  
  153.     sets.aftercast.Ranged = sets.midcast.Ranged.TPnormal
  154.    
  155. -------------------------------------------
  156.     -- STR WS : Refulgent Arrow
  157.     -- So it's easy to determine if new obtained gear can replace anything, listed str stats per piece
  158. -------------------------------------------
  159.     sets.precast.WSStr = {
  160.         head="Orion Beret +3", --33
  161.         neck="Fotia Gorget",
  162.         lear="Moonshade Earring",
  163.         rear="Ishvara Earring",
  164.         body="Meg. Cuirie +2", --34
  165.         hands="Meg. Gloves +2", --23
  166.         lring="Apate Ring", --6
  167.         rring="Rajas Ring", --5
  168.         back=AGIback,
  169.         waist="Fotia Belt",
  170.         legs="Meg. Chausses +2", --40
  171.         feet="Meg. Jam. +2"} --23
  172.         -- STP totals: 52-5-4-5-5-9+3+5-10-4-10=8
  173.        
  174.     sets.precast.WSStrAcc = set_combine(sets.precast.WSStr, {
  175.         rring="Paqichikaji Ring"})
  176.         -- STP totals: 8-5=3
  177.    
  178. -------------------------------------------
  179.     -- STR/AGI WS Mix : Flaming Arrow, Piercing Arrow, Dulling Arrow, Sidewinder, Blast Arrow, Arching Arrow, Empyreal Arrow, Namas Arrow
  180.     -- Apex Arrow ws also included even though it's purely AGI, the main modifiers for the above WS's are AGI anyways
  181.     -- So it's easy to determine if new obtained gear can replace anything, listed str/agi stats per piece
  182. -------------------------------------------
  183.     sets.precast.WSStrAgi = {
  184.         head="Orion Beret +3", --33/39
  185.         neck="Fotia Gorget",
  186.         lear="Moonshade Earring",
  187.         rear="Ishvara Earring",
  188.         body="Meg. Cuirie +2", --34/41
  189.         hands="Meg. Gloves +2", --23/19
  190.         lring="Apate Ring", --6/6
  191.         rring="Rajas Ring", --5/0
  192.         back=AGIback, --0/30
  193.         waist="Fotia Belt",
  194.         legs="Meg. Chausses +2", --40/42
  195.         feet="Meg. Jam. +2"} --23/54
  196.         -- STP totals: 52-5-4-5-5-9+3+5-10-4-10=8
  197.        
  198.     sets.precast.WSStrAgiAcc = set_combine(sets.precast.WSStrAgi, {
  199.         rring="Paqichikaji Ring"})
  200.  
  201. -------------------------------------------
  202.     -- AGI WS Mix : All Marksmanship WS's (except Trueflight/Wildfire -magic ws- & Coronach -Relic WS-)
  203.     -- So it's easy to determine if new obtained gear can replace anything, listed agi stats per piece
  204. -------------------------------------------
  205.     sets.precast.WSAgi = {
  206.         head="Orion Beret +3", --39
  207.         neck="Fotia Gorget",
  208.         lear="Moonshade Earring",
  209.         rear="Ishvara Earring",
  210.         body="Meg. Cuirie +2", --41
  211.         hands="Meg. Gloves +2", --19
  212.         lring="Apate Ring", --6
  213.         rring="Petrov Ring", --3
  214.         back=AGIback, --30
  215.         waist="Fotia Belt",
  216.         legs="Meg. Chausses +2", --42
  217.         feet="Meg. Jam. +2"} --54
  218.        
  219.     sets.precast.WSAgiAcc = set_combine(sets.precast.WSAgi, {
  220.         rring="Paqichikaji Ring"})
  221.    
  222. -------------------------------------------
  223.     -- DEX WS : Jishnu's Radiance
  224.     -- So it's easy to determine if new obtained gear can replace anything, listed dex stats per piece
  225. -------------------------------------------
  226.     sets.precast.WSDex = {
  227.         head="Orion Beret +3", --34
  228.         neck="Fotia Gorget",
  229.         lear="Moonshade Earring",
  230.         rear="Sherida Earring", --5
  231.         body="Meg. Cuirie +2", --45
  232.         hands="Meg. Gloves +2", --50
  233.         lring="Begrudging Ring",
  234.         rring="Apate Ring", --6
  235.         back=DEXback,
  236.         waist="Fotia Belt",
  237.         legs="Darraigner's Brais",
  238.         feet="Meg. Jam. +2"} --34
  239.        
  240.     sets.precast.WSDexAcc = set_combine(sets.precast.WSDex, {
  241.         rring="Paqichikaji Ring"})
  242.        
  243. -------------------------------------------
  244.     -- Magic WS Mix : Trueflight & Wildfire
  245.     -- They have an AGI Modifier so using that as a base and applying gear with MAB
  246.     -- Applying notes for gear chosen
  247. -------------------------------------------
  248.     sets.precast.WSMAB = {
  249.         head="Orion Beret +3", --39 agi, keeping for racc
  250.         neck="Sanctity Necklace", --10 mab/mac/racc
  251.         lear="Friomisi Earring", --10 mab
  252.         rear="Crematio Earring", --6 mab
  253.         body="Samnuha Coat", --34 mab, 36 mac, 8 mbd II
  254.         hands="Carmine Fin. Ga. +1", --42 mab
  255.         lring="Apate Ring", --6 agi
  256.         rring="Acumen Ring", --4 mab
  257.         back=AGIback, --30 agi
  258.         waist="Eschan Stone", --7 mab/mac, 15 racc/ratk
  259.         legs="Meg. Chausses +2", --42 agi, keeping for racc
  260.         feet="Meg. Jam. +2"} --need adhemar feet
  261.        
  262.     sets.precast.WSMABAcc = set_combine(sets.precast.WSMAB, {
  263.         rring="Paqichikaji Ring"})
  264.    
  265. -------------------------------------------
  266.     -- Precast sets for fastcast spells
  267. -------------------------------------------
  268.     sets.precast.Fastcast = set_combine(sets.engaged.TPnormal, {
  269.         head="Athos's Chapeau",
  270.         neck="Voltsurge Torque",
  271.         lear="Loquac. Earring",
  272.         rear="Enchntr. Earring +1",
  273.         body="Samnuha Coat",
  274.         hands="Leyline Gloves",
  275.         lring="Lebeche Ring",
  276.         rring="Prolix Ring",
  277.         waist="Sailfi Belt +1",
  278.         legs="Limbo Trousers"})
  279.    
  280.     sets.precast.Utsusemi = set_combine(sets.precast.Fastcast, {
  281.         neck="Magoraga Beads"})
  282.        
  283. -------------------------------------------
  284.     -- Job Ability sets
  285. -------------------------------------------
  286.        
  287.     sets.precast["Eagle Eye Shot"] = set_combine(sets.precast.WSDex, {legs="Arc. Braccae +1"})
  288.     sets.precast.Sharpshot = {legs="Orion Braccae +1"}
  289.     sets.precast.Scavage = {feet="Orion Socks +1"}
  290.     sets.precast.Camouflage = {body="Orion Jerkin +2"}
  291.     sets.precast.Barrage = {hands="Orion Bracers +3"}
  292.     sets.precast.Shadowbind = {hands="Orion Bracers +3"}
  293.     sets.precast["Velocity Shot"] = {body="Amini Caban +1"}
  294.     sets.precast["Unlimited Shot"] = {feet="Amini Bottillons +1"}
  295.     sets.precast["Flashy Shot"] = {hands="Arc. Bracers +1"}
  296.     sets.precast["Stealth Shot"] = {feet="Arcadian Socks +1"}
  297.     sets.precast["Double Shot"] = {head="Amini Gapette +1"}
  298.     sets.precast["Bounty Shot"] = {hands="Amini Glove. +1"}
  299.     sets.precast.Waltz = {hands="Slither Gloves +1"}
  300.    
  301.     send_command('input /macro book 3')
  302. end
  303.  
  304. function precast(spell,action)
  305.     if spell.action_type == 'Ranged Attack' and buffactive['Flurry'] then
  306.         equip(sets.precast.Ranged.Flurry)
  307.     elseif sets.precast[spell.english] then
  308.         equip(sets.precast[spell.english])
  309.     elseif spell.type == 'WeaponSkill' then
  310.         if sets.aftercast.TP == sets.engaged.TPnormal then
  311.             if Str_WS:contains(spell.english) then
  312.                 equip(sets.precast.WSStr)
  313.             elseif StrAgi_WS:contains(spell.english) then
  314.                 equip(sets.precast.WSStrAgi)
  315.             elseif StrAgi2_WS:contains(spell.english) then
  316.                 equip(sets.precast.WSStrAgiAcc)
  317.             elseif Agi_WS:contains(spell.english) then
  318.                 equip(sets.precast.WSAgi)
  319.             elseif Agi2_WS:contains(spell.english) then
  320.                 equip(sets.precast.WSAgiAcc)
  321.             elseif MAB_WS:contains(spell.english) then
  322.                 equip(sets.precast.WSMAB)
  323.             elseif Dex_WS:contains(spell.english) then
  324.                 equip(sets.precast.WSDex)
  325.             else equip(sets.precast.WSDex)  -- when mainhand is a dagger
  326.             end
  327.         elseif sets.aftercast.TP == sets.engaged.TPacc then
  328.             if Str_WS:contains(spell.english) then
  329.                 equip(sets.precast.WSStrAcc)
  330.             elseif StrAgi_WS:contains(spell.english) then
  331.                 equip(sets.precast.WSStrAgiAcc)
  332.             elseif StrAgi2_WS:contains(spell.english) then
  333.                 equip(sets.precast.WSStrAgiAcc)
  334.             elseif Agi_WS:contains(spell.english) then
  335.                 equip(sets.precast.WSAgiAcc)
  336.             elseif Agi2_WS:contains(spell.english) then
  337.                 equip(sets.precast.WSAgiAcc)
  338.             elseif MAB_WS:contains(spell.english) then
  339.                 equip(sets.precast.WSMABAcc)
  340.             elseif Dex_WS:contains(spell.english) then
  341.                 equip(sets.precast.WSDexAcc)
  342.             else equip(sets.precast.WSDexAcc)  -- when mainhand is a dagger
  343.             end
  344.         end
  345.     end
  346. end
  347.  
  348. function midcast(spell,action)
  349. -------------------------------------------
  350. --this has to be at the top of the midcast function, thats to make sure the correct aftercast
  351. --ranged is set if you have changed weapon
  352.     if sets.midcast.Ranged[TP_Array[TP_Index]][player.equipment.range] then
  353.         sets.aftercast.Ranged = sets.midcast.Ranged[TP_Array[TP_Index]][player.equipment.range]
  354.     else
  355.         sets.aftercast.Ranged = sets.midcast.Ranged[TP_Array[TP_Index]].default
  356.     end
  357. -------------------------------------------
  358.     if spell.name == "Ranged" then
  359.         equip(sets.aftercast.Ranged)
  360.     end
  361.     if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  362.         if windower.wc_match(spell.english,'Utsusemi') then
  363.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then -- Cancel Copy Image 1 & 2 For Utsusemi: Ichi --
  364.                 send_command('@wait 1.7;cancel Copy Image*')
  365.             end
  366.         elseif spell.english == 'Monomi: Ichi' then -- Cancel Sneak --
  367.             if buffactive['Sneak'] then
  368.                 send_command('@wait 1.7;cancel sneak')
  369.             end
  370.         else equip(sets.precast.Fastcast)
  371.         end
  372.     end
  373. end
  374.  
  375. function aftercast(spell)
  376.     if player.status == 'Engaged' then
  377.         equip(sets.aftercast.TP)
  378.     else
  379.         equip(sets.aftercast.Idle)
  380.     end
  381. end
  382.  
  383. function buff_change(new,old)
  384.     if buffactive['Barrage'] then
  385.         equip(sets.precast.Barrage)
  386.     end
  387.  end
  388.  
  389. function status_change(new,old)
  390.     if new == 'Idle' then
  391.         equip(sets.aftercast.Idle)
  392.     elseif new == 'Resting' then
  393.         equip(sets.aftercast.Resting)
  394.     elseif new == 'Engaged' then
  395.         equip(sets.aftercast.TP)
  396.     end
  397. end
  398.  
  399. function self_command(command)
  400.     if command == 'toggle TP set' then
  401.         TP_Index = (TP_Index % #TP_Array) + 1
  402.         sets.aftercast.TP = sets.engaged[TP_Array[TP_Index]]
  403.         if sets.midcast.Ranged[TP_Array[TP_Index]][player.equipment.range] then
  404.             sets.aftercast.Ranged = sets.midcast.Ranged[TP_Array[TP_Index]][player.equipment.range]
  405.         else
  406.             sets.aftercast.Ranged = sets.midcast.Ranged[TP_Array[TP_Index]].default
  407.         end
  408.         send_command('@input /echo '[TP_Array[TP_Index]]' SET')
  409.     end
  410.        
  411. --      if sets.aftercast.TP == sets.engaged.TPnormal then
  412. --          sets.aftercast.TP = sets.engaged.TPacc
  413. --          sets.aftercast.Ranged = sets.midcast.Ranged.TPacc
  414. --          send_command('@input /echo ACC SET')
  415. --      elseif sets.aftercast.TP == sets.engaged.TPacc then
  416. --          sets.aftercast.TP = sets.engaged.TPnormal
  417. --          sets.aftercast.Ranged = sets.midcast.Ranged.TPnormal
  418. --          send_command('@input /echo NORMAL SET')
  419. --      end
  420. --  end
  421. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement