Advertisement
Guest User

Gukai Rng

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