usnapoleon

Untitled

Mar 29th, 2018
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 15.71 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. MABback = { name="Belenus's Cape", augments={'AGI+20','Mag. Acc+20 /Mag. Dmg.+20','Magic Damage +10','Weapon skill damage +10%',}}
  7.  
  8. MABhead = { name="Herculean Helm", augments={'"Mag.Atk.Bns."+22','Weapon skill damage +3%','Mag. Acc.+12',}}
  9. MABlegs = { name="Herculean Trousers", augments={'"Repair" potency +1%','"Waltz" potency +6%','Weapon skill damage +9%','Mag. Acc.+20 "Mag.Atk.Bns."+20',}}
  10. MABfeet = { name="Herculean Boots", augments={'"Mag.Atk.Bns."+25','Weapon skill damage +4%','DEX+4','Mag. Acc.+3',}}
  11. WSbody = { name="Herculean Vest", augments={'Rng.Acc.+7 Rng.Atk.+7','Weapon skill damage +3%','AGI+12','Rng.Acc.+12',}}
  12.  
  13. Adhemar_M = { name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}}
  14. Adhemar_R = { name="Adhemar Wrist. +1", augments={'AGI+12','Rng.Acc.+20','Rng.Atk.+20',}}
  15.  
  16.  
  17. TP_Index = 1
  18. TH_Index = 1
  19.  
  20. TP_Array = {'TPnormal', 'TPacc', 'PDT'}
  21. TH_Array = {'Normal','TPtreasure'}
  22.  
  23. -------------------------------------------
  24.     -- aftercast for returning to TP and Idle sets
  25.     -- the 'self command' area will change the set defined as aftercast.TP
  26. -------------------------------------------    
  27.     sets.aftercast = {}
  28.     sets.engaged = {}
  29.     sets.precast = {}
  30.     sets.precast.Normal = {}
  31.     sets.precast.Acc = {}
  32.     sets.midcast = {}
  33.     sets.buffs = {}
  34.    
  35.  
  36.     Dex_WS = S{"Wasp Sting","Viper Bite","Mandalic Stab"}
  37.     Dex2_WS = S{"Eviceration"}
  38.     Dex3_WS = S{"Rudra's Storm"}
  39.     DexChr_WS = S{"Shadowstitch","Dancing Edge"}
  40.     DexAgi_WS = S{"Shark Bite"}
  41.     Agi_WS = S{"Exenterator"}
  42.         -- no sets made for this, it's not unlocked
  43.     Str_WS = S{"Mercy Stroke"}
  44.     Mnd_WS = S{"Energy Steal","Energy Drain"}
  45.     MAB_WS = S{"Gust Slash","Cyclone","Aeolian Edge"}
  46.    
  47.        
  48.     sets.aftercast.Idle = {
  49.         ammo="Staunch Tathlum",
  50.         head="Meghanada Visor +2",
  51.         neck="Wiglen Gorget",
  52.         lear="Infused Earring",
  53.         rear="Ethereal Earring",
  54.         body="Meg. Cuirie +2",
  55.         hands="Meg. Gloves +2",
  56.         lring="Sheltered Ring",
  57.         rring="Defending Ring",
  58.         back="Shadow Mantle",
  59.         waist="Kentarch Belt",
  60.         legs="Meg. Chausses +2",
  61.         feet="Fajin Boots"}
  62.  
  63. -------------------------------------------
  64.     -- The outermost table has to be named "sets", but
  65.     -- otherwise there are no restrictions.
  66. -------------------------------------------
  67.  
  68.     sets.engaged.TPnormal = {
  69.         ammo="Yetshila",
  70.         head="Skulker's Bonnet +1",
  71.         neck="Asperity Necklace",
  72.         lear="Heartseeker Earring",
  73.         rear="Dudgeon Earring",
  74.         body="Mummu Jacket +2",
  75.         hands=Adhemar_M,
  76.         lring="Hetairoi Ring",
  77.         rring="Epona's Ring",
  78.         back="Letalis Mantle",
  79.         waist="Windbuffet Belt +1",
  80.         legs="Samnuha Tights",
  81.         feet="Taeon Boots"}
  82.         --8+4+5+6+4=27 haste
  83.        
  84.     sets.engaged.TPacc = set_combine(sets.engaged.TPnormal, {
  85.         ammo="Honed Tathlum",
  86.         lring="Patricius Ring",
  87.         rring="Chirich Ring",
  88.         back="Canny Cape",
  89.         waist="Kentarch Belt"})
  90.         --8+4+5+6+4=27 haste
  91.  
  92.     sets.engaged.PDT = set_combine(sets.engaged.TPnormal, {
  93.         ammo="Staunch Tathlum",
  94.         head="Meghanada Visor +2",
  95.         neck="Loricate Torque +1",
  96.         lear="Digni. Earring",
  97.         rear="Telos Earring",
  98.         body="Meg. Cuirie +2",
  99.         hands="Meg. Gloves +2",
  100.         lring="Defending Ring",
  101.         rring="Patricius Ring",
  102.         waist="Sailfi Belt +1",
  103.         legs="Meg. Chausses +2",
  104.         feet="Meg. Jam. +2"})
  105.         -- Haste: 4+2+4+9+4+2 = 25
  106.        
  107.     sets.engaged.TPtreasure = {
  108.         hands="Plun. Armlets +1",
  109.         feet="Skulk. Poulaines +1"}
  110.  
  111.  
  112.     sets.aftercast.TP = sets.engaged[TP_Array[TP_Index]]
  113.     sets.aftercast.TH = sets.engaged[TH_Array[TH_Index]]
  114.    
  115. -------------------------------------------
  116.     -- DEX WS : Wasp Sting, Viper Bite, Mandalic Stab, Eviceration, Rudra's Storm
  117.         -- Eviceration is built for crit hit (Dex2 sets below)
  118.     -- So it's easy to determine if new obtained gear can replace anything, listed dex stats per piece
  119. -------------------------------------------
  120.     sets.precast.Normal.WSDex = {
  121.         ammo="Ginsen",
  122.         head="Lilitu Headpiece", --26+10aug, 3 wsd
  123.         neck="Fotia Gorget",
  124.         lear="Moonshade Earring",
  125.         rear="Ishvara Earring", --2 wsd
  126.         body="Skulker's Vest +1", --36
  127.         hands="Meg. Gloves +2", --50, 7 wsd
  128.         lring="Ilabrat Ring", --10
  129.         rring="Epona's Ring",
  130.         back="Letalis Mantle",
  131.         waist="Fotia Belt",
  132.         legs="Herculean Trousers", --9 wsd
  133.         feet="Herculean Boots"} --24+4aug, 4 wsd
  134.        
  135.     sets.precast.Acc.WSDex = set_combine(sets.precast.Normal.WSDex, {
  136.         ammo="Honed Tathlum",
  137.         head="Skulker's Bonnet +1", --33
  138.         back="Grounded Mantle",
  139.         legs="Samnuha Tights", --10
  140.         feet="Pill. Poulaines +1"}) --24
  141.  
  142.     sets.precast.Normal.WSDex2 = set_combine(sets.precast.Normal.WSDex, {
  143.         ammo="Yetshila",
  144.         head="Pill. Bonnet +1",
  145.         body="Meg. Cuirie +2",
  146.         hands="Pill. Armlets +1",
  147.         legs="Pill. Culottes +1"})
  148.        
  149.     sets.precast.Acc.WSDex2 = set_combine(sets.precast.Acc.WSDex, {
  150.         ammo="Yetshila",
  151.         head="Pill. Bonnet +1",
  152.         body="Meg. Cuirie +2",
  153.         hands="Pill. Armlets +1",
  154.         legs="Pill. Culottes +1"})
  155.  
  156. -------------------------------------------
  157.     -- DEX/CHR WS Mix : Shadowstitch, Dancing Edge
  158.         -- Shadowstitch is pure CHR but no point making a pure chr set for it
  159.     -- So it's easy to determine if new obtained gear can replace anything, listed dex/chr stats per piece
  160. -------------------------------------------
  161.     sets.precast.Normal.WSDexChr = {
  162.         ammo="Ginsen",
  163.         head="Lilitu Headpiece", --35/18
  164.         neck="Fotia Gorget",
  165.         lear="Moonshade Earring",
  166.         rear="Sherida Earring", --5/0
  167.         body="Skulker's Vest +1", --41/21
  168.         hands="Meg. Gloves +2", --50/27, 7 wsd
  169.         lring="Ilabrat Ring", --10/0
  170.         rring="Epona's Ring",
  171.         back="Letalis Mantle",
  172.         waist="Fotia Belt",
  173.         legs="Herculean Trousers", --0/10, 9 wsd
  174.         feet="Herculean Boots"} --24+4aug/26, 4 wsd
  175.        
  176.     sets.precast.Acc.WSDexChr = set_combine(sets.precast.Normal.WSDexChr, {
  177.         ammo="Honed Tathlum",
  178.         head="Skulker's Bonnet +1", --33/18
  179.         back="Grounded Mantle",
  180.         feet="Pill. Poulaines +1"}) --24/30
  181.  
  182. -------------------------------------------
  183.     -- DEX/AGI WS Mix : Shark Bite
  184.     -- So it's easy to determine if new obtained gear can replace anything, listed dex/agi stats per piece
  185. -------------------------------------------    
  186.     sets.precast.Normal.WSDexAgi = {
  187.         ammo="Ginsen",
  188.         head="Lilitu Headpiece", --35/22
  189.         neck="Fotia Gorget",
  190.         lear="Moonshade Earring",
  191.         rear="Ishvara Earring", --2 wsd
  192.         body="Herculean Vest", --34/30+12aug, 3 wsd
  193.         hands="Meg. Gloves +2", --50/19, 7 wsd
  194.         lring="Ilabrat Ring", --10/10
  195.         rring="Epona's Ring",
  196.         back="Canny Cape", --0/6
  197.         waist="Fotia Belt",
  198.         legs="Herculean Trousers", --0/32, 9 wsd
  199.         feet="Herculean Boots"} --24+4aug/43, 4 wsd
  200.  
  201.     sets.precast.Acc.WSDexAgi = sets.precast.Normal.WSDexAgi
  202.  
  203. -------------------------------------------
  204.     -- STR WS : Mercy Stroke
  205.     -- So it's easy to determine if new obtained gear can replace anything, listed str stats per piece
  206. -------------------------------------------    
  207.     sets.precast.Normal.WSStr = {
  208.         ammo="Ginsen",
  209.         head="Lilitu Headpiece", --22+10aug, 3wsd
  210.         neck="Fotia Gorget",
  211.         lear="Moonshade Earring",
  212.         rear="Ishvara Earring",
  213.         body="Herculean Vest", --28
  214.         hands="Meg. Gloves +2", --23, 7 wsd
  215.         lring="Ilabrat Ring", --10
  216.         rring="Epona's Ring",
  217.         back="Grounded Mantle",
  218.         waist="Fotia Belt",
  219.         legs="Herculean Trousers", --33, 9 wsd
  220.         feet="Herculean Boots"} --16, 4 wsd
  221.  
  222.     sets.precast.Acc.WSStr = sets.precast.Normal.WSStr
  223.        
  224. -------------------------------------------
  225.     -- MND WS : Energy Steal, Energy Drain
  226.     -- So it's easy to determine if new obtained gear can replace anything, listed mnd stats per piece
  227. -------------------------------------------
  228.     sets.precast.Normal.WSMnd = {
  229.         ammo="Pemphredo Tathlum",
  230.         head="Herculean Helm", --16, 12 macc
  231.         neck="Sanctity Necklace", --10 macc
  232.         lear="Moonshade Earring",
  233.         rear="Dignitary's Earring", --10 macc
  234.         body="Samnuha Coat", --20, 23+15 macc
  235.         hands="Leyline Gloves", --30, 18+15aug macc
  236.         lring="Evanescence Ring", --10 drk mag
  237.         rring="Archon Ring", --5 drk mag acc/mab
  238.         back="Grounded Mantle",
  239.         waist="Eschan Stone", --7 macc
  240.         legs="Herculean Trousers", --15, 20 macc
  241.         feet="Herculean Boots"} --11, 10+3aug macc
  242.  
  243.     sets.precast.Acc.WSMnd = sets.precast.Normal.WSMnd
  244.        
  245. -------------------------------------------
  246.     -- Magic WS Mix : Gust Slash, Cyclone, Aeolian Edge
  247.     -- They have an Dex/Int Modifier so using that as a base and applying gear with MAB
  248.     -- So it's easy to determine if new obtained gear can replace anything, listed dex/int stats per piece
  249. -------------------------------------------
  250.     sets.precast.Normal.WSMAB = {
  251.         ammo="Pemphredo Tathlum", --0/4 , 4 mab
  252.         head=MABhead, --28/20, 32 mab, 3 wsd
  253.         neck="Sanctity Necklace", --10 mab
  254.         lear="Moonshade Earring",
  255.         rear="Friomisi Earring", --10 mab
  256.         body="Samnuha Coat", --33/20, 20+15 mab
  257.         hands="Leyline Gloves", --35/12
  258.         lring="Acumen Ring", --0/2, 4 mab
  259.         rring="Dingir Ring", --10 mab
  260.         back="Letalis Mantle",
  261.         waist="Eschan Stone", --7 mab
  262.         legs=MABlegs, --0/29, 20 mab, 9 wsd
  263.         feet=MABfeet} --24+4aug/0, 10+25aug mab, 4 wsd
  264.        
  265.     sets.precast.Acc.WSMAB = sets.precast.Normal.WSMAB
  266.  
  267. -------------------------------------------
  268.     -- Other Melee ws'ing for random times a dagger isn't in use
  269.     -- So it's easy to determine if new obtained gear can replace anything, listed str stats per piece
  270. -------------------------------------------
  271.     sets.precast.Normal.WS = {
  272.         head="Lilitu Headpiece", --22+10aug, 3 wsd
  273.         neck="Fotia Gorget",
  274.         lear="Ishvara Earring",
  275.         rear="Moonshade Earring",
  276.         body="Meg. Cuirie +2", --34
  277.         hands="Meg. Gloves +2", --23
  278.         lring="Apate Ring", --6
  279.         rring="Rajas Ring", --5
  280.         back="Letalis Mantle",
  281.         waist="Fotia Belt",
  282.         legs="Meg. Chausses +2", --40
  283.         feet="Meg. Jam. +2"} --23
  284.        
  285.     sets.precast.Acc.WS = set_combine(sets.precast.Normal.WS, {
  286.         rring="Cacoethic Ring"})
  287.    
  288. -------------------------------------------
  289.     -- Precast sets for fastcast spells
  290. -------------------------------------------
  291.     sets.precast.Fastcast = set_combine(sets.engaged.TPnormal, {
  292.         ammo="Impatiens",
  293.         head=MABhead,
  294.         neck="Voltsurge Torque",
  295.         lear="Loquac. Earring",
  296.         rear="Enchntr. Earring +1",
  297.         body="Samnuha Coat",
  298.         hands="Leyline Gloves",
  299.         lring="Lebeche Ring",
  300.         rring="Prolix Ring",
  301.         waist="Sailfi Belt +1"})
  302.    
  303.     sets.precast.Utsusemi = set_combine(sets.precast.Fastcast, {
  304.         neck="Magoraga Beads",
  305.         body="Passion Jacket"})
  306.        
  307. -------------------------------------------
  308.     -- Job Ability sets
  309.     -- The sets.buff is used when a particular JA requires gear to be worn during the duration of the buff
  310.     -- and not just at the point of activation like the rest.  Rules for both are in the function for precast
  311. -------------------------------------------
  312.        
  313.     sets.precast["Perfect Dodge"] = {hands="Plun. Armlets +1"}
  314.     sets.precast.Steal = {hands="Pill. Armlets +1", legs="Pill. Culottes +1", feet="Pill. Poulaines +1"}
  315.     sets.precast["Sneak Attack"] = {hands="Skulk. Armlets +1"}
  316.     sets.precast.Flee = {feet="Pill. Poulaines +1"}
  317.     sets.precast["Trick Attack"] = {hands="Pill. Armlets +1"}
  318.     sets.precast.Mug = {head="Plun. Bonnet +1"}
  319.     sets.precast.Hide = {body="Pillager's Vest +1"}
  320.     sets.precast.Accomplice = {head="Skulker's Bonnet +1"}
  321.     sets.precast.Collaborator = {head="Skulker's Bonnet +1"}
  322.     sets.precast["Assassin's Charge"] = {feet="Plun. Poulaines +1"}
  323.     sets.precast.Feint = {legs="Plun. Culottes +1"}
  324.     sets.precast.Despoil = {legs="Skulk. Culottes +1", feet="Skulk. Poulaines +1"}
  325.     sets.precast.Conspirator = {body="Skulker's Vest +1"}
  326.     sets.precast.Waltz = {hands="Slither Gloves +1",legs=MABlegs}
  327.    
  328.     send_command('input /macro book 10')
  329. end
  330.  
  331.  
  332. function precast(spell,action)
  333.     equip_sets = {}
  334.     if sets.precast[spell.english] then
  335.         equip(sets.precast[spell.english])
  336.     elseif spell.type == 'WeaponSkill' then
  337.         if sets.aftercast.TP == sets.engaged.TPnormal then
  338.             mode = "Normal"
  339.         else
  340.             mode = "Acc"
  341.         end
  342.         if Dex_WS:contains(spell.english) then
  343.             equip_sets[#equip_sets+1] = sets.precast[mode].WSDex
  344.         elseif Dex2_WS:contains(spell.english) then
  345.             equip_sets[#equip_sets+1] = sets.precast[mode].WSDex2
  346.         elseif Dex3_WS:contains(spell.english) then
  347.             equip_sets[#equip_sets+1] = sets.precast.Acc.WSDex
  348.         elseif DexChr_WS:contains(spell.english) then
  349.             equip_sets[#equip_sets+1] = sets.precast[mode].WSDexChr
  350. --      elseif DexAgi_WS:contains(spell.english) then
  351. --          equip_sets[#equip_sets+1] = sets.precast[mode]WSDexAgi
  352. --      elseif Str_WS:contains(spell.english) then
  353. --          equip_sets[#equip_sets+1] = sets.precast[mode]WSStr
  354. --      elseif Mnd_WS:contains(spell.english) then
  355. --          equip_sets[#equip_sets+1] = sets.precast[mode]WSMnd
  356.         elseif MAB_WS:contains(spell.english) then
  357.             equip_sets[#equip_sets+1] = sets.precast[mode].WSMAB
  358.         else equip_sets[#equip_sets+1] = sets.precast[mode].WS
  359.         end
  360.         if TH_Array == 'TPtreasure' then
  361.             equip_sets[#equip_sets+1] = sets.engaged.TPtreasure
  362.         end
  363.     end
  364.     for buff in pairs(buffactive) do
  365.         equip_sets[#equip_sets+1] = sets.buffs[buff]
  366.     end
  367.     equip(set_combine(table.unpack(equip_sets)))
  368. end
  369.  
  370. function midcast(spell,action)
  371.     if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' then
  372.         if windower.wc_match(spell.english,'Utsusemi') then
  373.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then -- Cancel Copy Image 1 & 2 For Utsusemi: Ichi --
  374.                 send_command('@wait 1.7;cancel Copy Image*')
  375.             end
  376.         elseif spell.english == 'Monomi: Ichi' then -- Cancel Sneak --
  377.             if buffactive['Sneak'] then
  378.                 send_command('@wait 1.7;cancel sneak')
  379.             end
  380.         elseif spell.skill == 'Elemental Magic' or spell.skill == 'Enfeebling Magic' then
  381.             if TH_Array == 'TPtreasure' then
  382.                 equip(set_combine(sets.precast.Fastcast,sets.engaged.TPtreasure))
  383.                 send_command('@input /echo th')
  384.             else
  385.                 equip(sets.precast.Fastcast)
  386.                 send_command('@input /echo not th')
  387.             end
  388.         else
  389.             equip(sets.precast.Fastcast)
  390.         end
  391.     end
  392. end
  393.  
  394. function aftercast(spell)
  395.     if player.status == 'Engaged' then
  396.         equip(sets.aftercast.TP)
  397.         equip(sets.aftercast.TH)
  398.     else
  399.         equip(sets.aftercast.Idle)
  400.     end
  401. end
  402.  
  403. function status_change(new,old)
  404.     if new == 'Idle' then
  405.         equip(sets.aftercast.Idle)
  406.     elseif new == 'Resting' then
  407.         equip(sets.aftercast.Resting)
  408.     elseif new == 'Engaged' then
  409.         equip(sets.aftercast.TP)
  410.         equip(sets.aftercast.TH)
  411.     end
  412. end
  413.  
  414.  
  415. -------------------------------------------
  416.     -- The 'self command' allows you to toggle inbetween sets, based on the TP and TH Arrays identified in the beginning
  417.     -- The TP_Array toggles between a normal, acc, and pdt set
  418.     -- The TH_Array activates Treasure Hunter gear to be used in combination to whatever TP set is active
  419.     -- I binded my ctrl+q & ctrl+w keys in the 'init.txt' file (in the Scripts folder) for the TP and RA toggling
  420.         -- Without being bound, the manual command to toggle would be     //gs c toggle TP set     &     //gs c toggle RA set
  421.         -- The RA command is for my ranger/cor sets but I'm using it to also activate TH, so I didnt have to bind a 3rd button
  422. -------------------------------------------
  423. function self_command(command)
  424.     if command == 'toggle TP set' then
  425.         TP_Index = (TP_Index % #TP_Array) + 1
  426.         sets.aftercast.TP = sets.engaged[TP_Array[TP_Index]]
  427.         status_change(player.status, player.status)
  428.         send_command('@input /echo '..TP_Array[TP_Index]..' SET')
  429.     end
  430.     if command == 'toggle RA set' then
  431.         TH_Index = (TH_Index % #TH_Array) + 1
  432.         sets.aftercast.TH = sets.engaged[TH_Array[TH_Index]]
  433.         status_change(player.status, player.status)
  434.         send_command('@input /echo '..TH_Array[TH_Index]..' SET')
  435.     end
  436. end
Advertisement
Add Comment
Please, Sign In to add comment