Advertisement
FalownPSA

Faloun_PUP WIP

Jun 23rd, 2018
2,938
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 36.12 KB | None | 0 0
  1.  
  2. include("Pup_include.lua")
  3.  
  4. HercHeadSTR = { name="Herculean Helm", augments={'Accuracy+28','Weapon skill damage +4%','STR+11','Attack+13'}}
  5. HercHeadPDT =  {name="Herculean Helm", augments={'CHR+7', 'Accuracy+29','Phys. dmg. taken -4%'}}
  6. HercHeadMAB =  {name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','Phys. dmg. taken -2%','"Mag.Atk.Bns."+15'}}
  7. HercBootMAB = { name="Herculean Boots", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+4%','MND+2','Mag. Acc.+10','"Mag.Atk.Bns."+14'}}
  8. HercBootAcc = { name="Herculean Boots", augments={'MND+9','Pet: STR+8','"Treasure Hunter"+2','Accuracy+18 Attack+18'}}
  9. HercBootDEX = { name="Herculean Boots", augments={'Attack+18','"Triple Atk."+3','DEX+10'}}
  10.  
  11. --- DT
  12. HercLegsPDT = { name="Herculean Trousers", augments={'Damage taken-3%','Attack+3'}}
  13. HercGlovesPDT = { name="Herculean Gloves", augments={'Phys. dmg. taken -5%','Accuracy+2'}}
  14. HercBootsPDT = { name="Herculean Boots", augments={'Damage taken-2%','STR+9','Attack+7'}}
  15.  
  16. HercBootBone = {name="Herculean Boots", augments={'Pet: Accuracy+5 Pet: Rng. Acc.+5','Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2','Pet: VIT+5'}}
  17.  
  18. HercLegsPET = { name="Herculean Trousers", augments={'Pet: Attack+21 Pet: Rng.Atk.+21','Pet: "Store TP"+10','Pet: VIT+7'}}
  19. HercLegsPetDEX = { name="Herculean Trousers", augments={'Pet: Attack+10 Pet: Rng.Atk.+10','Pet: DEX+10','Pet: "Mag.Atk.Bns."+3'}}
  20. include('organizer-lib')
  21.  
  22. JSECAPEPetHaste = {name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','Pet: Haste+10','System: 1 ID: 1247 Val: 2'}}
  23. JSECAPESTR = { name="Visucius's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+5','Crit.hit rate+10'}}
  24.  
  25. -- RAO WS
  26. RAOWShead={ name="Rao Kabuto", augments={'STR+10','DEX+10','Attack+15'}}
  27. RAOWShands={ name="Rao Kote", augments={'Accuracy+10','Attack+10','Evasion+15'}}
  28. RAOWSlegs={ name="Rao Haidate", augments={'Accuracy+20','"Dbl.Atk."+3','Pet: Accuracy+20'}}
  29. RAOWSfeet={ name="Rao Sune-Ate", augments={'Accuracy+10','Attack+10','Evasion+15'}}
  30.  
  31. RMasterS = "Idle"
  32. MasterS = "Idle"
  33. PetS = "Idle"
  34. TotalS = "Idle"
  35. flashbulbtimer = 40
  36. strobetimer = 25
  37. stroberecast = 0
  38. flashbulbrecast = 0
  39. flashbulbtime = 0
  40. strobetime = 0
  41. pdt = 0
  42.  
  43.  
  44. function TotalSCalc()
  45.     if ActualMode == "DD" then
  46.         if buffactive['Overdrive'] then
  47.             TotalS = "Overdrive"
  48.         elseif MasterS == "Idle" and PetS == "Idle" then
  49.             TotalS = "Idle"
  50.         elseif MasterS == "Idle" and PetS == "Engaged" then
  51.             TotalS = "Pet Only"
  52.         elseif MasterS == "Engaged" and PetS == "Engaged" then
  53.             TotalS = "Pet+Master"
  54.         elseif MasterS == "Engaged" and PetS == "Idle" then
  55.             TotalS = "Master Only"
  56.         end
  57.     elseif ActualMode == "Tank" then
  58.         if PetS == "Idle" then
  59.             TotalS = "Idle"
  60.         else
  61.             TotalS = "Tank"
  62.         end
  63.     else
  64.         PetS = "Mage"
  65.         if MasterS == "Idle" then
  66.             TotalS = "Idle"
  67.         else
  68.             TotalS = "Master Only"
  69.         end
  70.     end
  71. end
  72.  
  73. Burden = 0
  74. BurdenLimit = 30+50
  75. Mane = {"Wind","Fire", "Light"}
  76. ManeRound = 1
  77.  
  78. TypeM = S{"Fire", "Water", "Earth", "Wind", "Dark", "Light", "Ice", "Thunder" }
  79.  
  80. --- SKILLCHAIN TABLE
  81. SC = {}
  82. SC['Valoredge Frame'] = {}
  83. SC['Sharpshot Frame'] = {}
  84. SC['Harlequin Frame'] = {}
  85.  
  86. SC['Valoredge Frame']['Stringing Pummel'] = "String Shredder"
  87. SC['Valoredge Frame']['Victory Smite'] = "String Shredder"
  88. SC['Valoredge Frame']['Shijin Spiral'] = "Bone Crusher"
  89. SC['Valoredge Frame']['Howling Fist'] = "String Shredder"
  90.  
  91. SC['Sharpshot Frame']['Stringing Pummel'] = "Armor Shatterer"
  92. SC['Sharpshot Frame']['Victory Smite'] = "Armor Shatterer"
  93. SC['Sharpshot Frame']['Shijin Spiral'] = "Armor Piercer"
  94. SC['Sharpshot Frame']['Howling Fist'] = "Arcuballista"
  95. SC['Sharpshot Frame']['Dragon Kick'] = "Armor Shatterer"
  96. SC['Sharpshot Frame']['One Inch Punch'] = "Daze"
  97. SC['Sharpshot Frame']['Spinning Attack'] = "Armor Shatterer"
  98. SC['Sharpshot Frame']['Base'] = "Arcuballista"
  99.  
  100.  
  101. SC['Harlequin Frame']['Stringing Pummel'] = "Slapstick"
  102. SC['Harlequin Frame']['Victory Smite'] = "Magic Mortar"
  103. SC['Harlequin Frame']['Shijin Spiral'] = "Slapstick"
  104. SC['Harlequin Frame']['Howling Fist'] = "Knockout"
  105.  
  106. Modifier = {}
  107.  
  108. Modifier['String Shredder'] = "VIT"
  109. Modifier['Bone Crusher'] = "VIT"
  110. Modifier['Armor Shatterer']  = "DEX"
  111. Modifier['Armor Piercer']  = "DEX"
  112. Modifier['Arcuballista']  = "DEXFTP"
  113. Modifier['Daze']  = "DEXFTP"
  114. Modifier['Slapstick'] = "DEX"
  115. Modifier['Knockout'] = "AGI"
  116.  
  117.  
  118. Colors = {}
  119. Colors["Fire"] = "\\cs(102, 0, 0)"
  120. Colors["Water"] = "\\cs(0, 51, 102)"
  121. Colors["Wind"] = "\\cs(51, 102, 0)"
  122. Colors["Dark"] = "\\cs(0, 0, 0)"
  123. Colors["Light"] = "\\cs(255, 255, 255)"
  124. Colors["Earth"] = "\\cs(139, 69, 19)"
  125. Colors["Ice"] = "\\cs(0, 204, 204)"
  126. Colors["Thunder"] = "\\cs(51, 0, 102)"
  127.  
  128. --- Pet modes references
  129. PetMode = S{"Tank", "DD", "BLM", "RDM", "WHM"}
  130. PetSubMode = {}
  131. PetSubMode["Tank"] = {"PDT", "MDT", "Range"}
  132. PetSubMode["DD"] = {"Normal", "Bone", "Spam", "OD", "ODAcc"}
  133. NSubMode = {}
  134. NSubMode["Tank"] = 3
  135. NSubMode["DD"] = 5
  136. ActualMode = "DD"
  137. ActualSubMode = "Normal"
  138.  
  139. --- Styles Maneuvers and autocontrol
  140. Style={}
  141. -- Tank Ones
  142. Style["PDT"] = {"paladin", "Light", "Fire", "Earth"}
  143. Style["MDT"] = {"runefencer", "Light", "Fire", "Water"}
  144. Style["Range"] = {"Paladin", "Light", "Fire", "Earth"}
  145. -- DD Ones
  146. Style["Normal"] = {"dd", "Light", "Fire", "Wind"}
  147. Style["Bone"] = {"boneslayer", "Light", "Fire", "Wind"}
  148. Style["Spam"] = {"ddspam", "Light", "Fire", "Wind"}
  149. Style["OD"] = {"overdrive", "Light", "Fire", "Thunder"}
  150. Style["ODAcc"] = {"overdriveacc", "Light", "Fire", "Thunder"}
  151.  
  152.  
  153. tb_name = "puphelp"
  154. visible = true
  155. textinbox = ''
  156.  
  157.     textinbox = textinbox..' \\cs(0, 0, 0) Maneuvers :\\cr '..Colors[Mane[1]]..Mane[1]..'\\cr-'..Colors[Mane[2]]..Mane[2]..'\\cr-'..Colors[Mane[3]]..Mane[3]..' \\cr \n'
  158.     --textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
  159.    
  160.    
  161.  
  162.     windower.text.create(tb_name)
  163.     windower.text.set_location(tb_name, 700, 150)
  164.     windower.text.set_bg_color(tb_name, 200, 96, 96, 96)
  165.     windower.text.set_color(tb_name, 255, 147, 161, 161)
  166.     windower.text.set_font(tb_name, "Arial")
  167.     windower.text.set_font_size(tb_name, 10)
  168.     windower.text.set_bold(tb_name, true)
  169.     windower.text.set_italic(tb_name, false)
  170.     windower.text.set_text(tb_name, textinbox)
  171.     windower.text.set_bg_visibility(tb_name, visible)
  172.  
  173.     local player = windower.ffxi.get_player()
  174.  
  175. function optic()
  176.     value = 0
  177.     ofone = 0
  178.     oftwo = 0
  179.    
  180.     if pet.attachments["Optic Fiber"] then
  181.         if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
  182.             ofone = Attach["Light"]["Optic Fiber"][5]  
  183.         elseif buffactive["Light Maneuver"] then
  184.             ofone = Attach["Light"]["Optic Fiber"][3]
  185.         elseif buffactive["Light Maneuver"] == 2 then
  186.             ofone = Attach["Light"]["Optic Fiber"][4]
  187.         elseif buffactive["Light Maneuver"] == 3 then
  188.             ofone = Attach["Light"]["Optic Fiber"][5]      
  189.         else
  190.             ofone = Attach["Light"]["Optic Fiber"][2]
  191.         end
  192.     end
  193.    
  194.     if pet.attachments["Optic Fiber II"] then
  195.         if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
  196.             ofone = Attach["Light"]["Optic Fiber II"][5]   
  197.         elseif buffactive["Light Maneuver"] then
  198.             ofone = Attach["Light"]["Optic Fiber II"][3]
  199.         elseif buffactive["Light Maneuver"] == 2 then
  200.             ofone = Attach["Light"]["Optic Fiber II"][4]
  201.         elseif buffactive["Light Maneuver"] == 3 then
  202.             ofone = Attach["Light"]["Optic Fiber II"][5]       
  203.         else
  204.             ofone = Attach["Light"]["Optic Fiber II"][2]
  205.         end
  206.     end
  207.     value = 1+ofone+oftwo
  208.     return value
  209. end
  210.    
  211. function get_maneuver()
  212.     j = 1
  213.     textinbox=""
  214.     textt={}
  215.     --print(Attach["Fire"][Attach["Fire"][1]][1])
  216.     while j <= NA do
  217.         i = 1
  218.         textt[j] = ""
  219.         --print(MAN[j].."-"..NAttach[MAN[j]])
  220.         -- Pour chaque maneuver
  221.         while i <= NAttach[MAN[j]] do
  222.             mani={}
  223.             -- Rechercher chaque attachment s'il est actif
  224.             if pet.attachments[Attach[MAN[j]][i]] then
  225.                 -- Rechercher le bonus qui délivre
  226.                 Bonus=""
  227.                 Bonus = Attach[MAN[j]][Attach[MAN[j]][i]][1]
  228.                 if Attach[MAN[j]][i] ~= "Optic Fiber" or Attach[MAN[j]][i] ~= "Optic Fiber II" then
  229.                     if buffactive[MAN[j].." Maneuver"] then
  230.                         if Attach[MAN[j]][i][6] == "%" then
  231.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
  232.                         elseif Attach[MAN[j]][i][6] == "Int" then
  233.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
  234.                         else
  235.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]
  236.                         end
  237.                     elseif buffactive[MAN[j].." Maneuver"] == 2 then
  238.                         if Attach[MAN[j]][i][6] == "%" then
  239.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
  240.                         elseif Attach[MAN[j]][i][6] == "Int" then
  241.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
  242.                         else
  243.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]
  244.                         end
  245.                     elseif buffactive[MAN[j].." Maneuver"] == 3 then
  246.                         if Attach[MAN[j]][i][6] == "%" then
  247.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
  248.                         elseif Attach[MAN[j]][i][6] == "Int" then
  249.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
  250.                         else
  251.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]
  252.                         end
  253.                     else
  254.                         -- TYpe de bonus, %, Int ou String
  255.                         if Attach[MAN[j]][i][6] == "%" then
  256.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
  257.                         elseif Attach[MAN[j]][i][6] == "Int" then
  258.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
  259.                         else
  260.                             BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]
  261.                         end
  262.                     end
  263.                 end
  264.                 textt[j]= textt[j]..""..Bonus.." +"..BonusCalc.."\n"
  265.             end
  266.             i=i+1
  267.         end
  268.         textinbox = textinbox..' \\cs(255, 0, 0) '..textt[j]..'\\cr'
  269.         j=j+1
  270.     end
  271.     return textinbox
  272. end
  273. OverPower = false
  274. OverCount = 0
  275. NextWS = ""
  276.  
  277. function refresh()
  278.     textinbox = ''
  279.    
  280.     -- GEO SPELL
  281.     textinbox = textinbox..' \\cs(0, 0, 0) Maneuvers :\\cr '..Colors[Mane[1]]..Mane[1]..'\\cr-'..Colors[Mane[2]]..Mane[2]..'\\cr-'..Colors[Mane[3]]..Mane[3]..' \\cr \n'
  282.     if (pet) then
  283.     if pet.max_mp then
  284.     textinbox = textinbox..' \\cs(0, 0, 0) '..pet.name..'\\cr \n- \\cs(0, 0, 125)HP : '..pet.hp..'/'..pet.max_hp..'\\cr \n- \\cs(0, 125, 0)MP : '..pet.mp..'/'..pet.max_mp..'\\cr \n- \\cs(125, 0, 0)TP : '..tostring(pet.tp)..' \\cr \n'
  285.     end
  286.     textinbox = textinbox..'- \\cs(0, 0, 0)Head : '..pet.head..' \\cr \n'
  287.     textinbox = textinbox..'- \\cs(0, 0, 0)Frame : '..pet.frame..' \\cr \n'
  288.     end
  289.     textinbox = textinbox..'- \\cs(125, 125, 0)Mode : '..ActualMode..'\\cr \n'
  290.     textinbox = textinbox..'- \\cs(0, 125, 125)Style : '..ActualSubMode..'\\cr \n'
  291.     textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
  292.     textinbox = textinbox..'- \\cs(125, 125, 125)Master : '..MasterS..'\\cr \n'
  293.     textinbox = textinbox..'- \\cs(125, 125, 125)Pet : '..PetS..'\\cr \n'
  294.     textinbox = textinbox..'- \\cs(125, 125, 125)Total : '..TotalS..'\\cr \n'
  295.     --- Recast for enmity gears
  296.     if ActualMode == "Tank" then
  297.     textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
  298.     -- Strobe recast
  299.     if stroberecast == 0 then
  300.         if buffactive['Fire Maneuver'] then
  301.         textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(125,0,0)Strobe\\cr \n'
  302.         else
  303.         textinbox = textinbox..'\\cs(125, 125, 125)- Strobe\\cr \n'
  304.         end
  305.     else
  306.         textinbox = textinbox..'\\cs(125, 125, 125)- Strobe ('..stroberecast..')\\cr \n'
  307.     end
  308.     -- Flashbulb recast
  309.     if flashbulbrecast == 0 then
  310.         if buffactive['Light Maneuver'] then
  311.         textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(255,255,255)Flashbulb\\cr \n'
  312.         else
  313.         textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb\\cr \n'
  314.         end
  315.     else
  316.         textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb ('..flashbulbrecast..')\\cr \n'
  317.     end
  318.     end
  319.    
  320.     if buffactive["Overdrive"] then
  321.     if OverCount == 1 then
  322.     NextWS = "Daze"
  323.     elseif OverCount == 2 then
  324.     NextWS = "Arcuballista"
  325.     elseif OverCount == 3 then
  326.     NextWS = "Armor Shatterer"
  327.     else
  328.     NextWS = "Armor Piercer"
  329.     end
  330.     textinbox = textinbox..'- \\cs(125, 5, 0)Next WS : '..NextWS..'\\cr \n'
  331.    
  332.     end
  333.     --textinbox = textinbox..""..get_maneuver()
  334.    
  335.    
  336.     --if (pet) and Burden <= BurdenLimit then
  337.     --textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
  338.     --elseif (pet) and Burden > BurdenLimit then
  339.     --textinbox = textinbox..' \\cs(255, 0, 0) Burden : '..Burden..'('..BurdenLimit..') - COOLDOWN ASAP\\cr \n'
  340.     --risk = Burden - BurdenLimit + 5
  341.     --textinbox = textinbox..' \\cs(255, 0, 0) Overload risk estimated = '..risk..'%\\cr \n'
  342.     --end
  343.    
  344.     -- Checking Attachments
  345.  
  346.     windower.text.set_text(tb_name, textinbox)
  347. end
  348.  
  349. function user_setup()
  350. -- Default macro set/book
  351. set_macro_page(1, 9)
  352. end
  353.  
  354. function get_sets()
  355.     sets.precast = {}
  356.  
  357.     -- Precast Sets
  358.  
  359.     -- Fast cast sets for spells
  360.     sets.precast.FC = {head="Haruspex Hat",body="Zendik Robe", legs="Orvail Pants +1" ,ear2="Loquacious Earring",hands="Thaumas Gloves", ring1="Prolix Ring",ring2="Lebeche Ring", ear2="Loquac. Earring", neck="Orunmila's Torque"}
  361.  
  362.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
  363.  
  364.     sets.precast.JA = {}
  365.     -- Precast sets to enhance JAs
  366.     sets.precast.JA['Tactical Switch'] = {feet="Cirque Scarpe +2"}
  367.     sets.precast.JA['Ventriloquy'] = {legs="Pitre Churidars +3"}
  368.     sets.precast.JA['Role Reversal'] = {feet="Pitre Babouches +2"}
  369.      sets.precast.JA['Overdrive'] = {feet="Pitre Tobe +3"}
  370.    
  371.     sets.precast.JA['Repair'] = {feet="Foire Babouches", "Guignol Earring"}
  372.  
  373.     sets.precast.JA.Maneuver = {neck="Buffoon's Collar",body="Karagoz Farsetto",hands="Foire Dastanas",back="Dispersal Mantle", ear1="Burana Earring"}
  374.    
  375.     sets.precast.JA['Activate'] = {back="Visucius's Mantle"}
  376.     sets.precast.JA['Deus Ex Automata'] = sets.precast.JA['Activate']
  377.    
  378.     sets.precast.JA['Provoke'] = {feet="Ahosi Leggings", neck="Unmoving Collar", feet="Rager Ledel. +1", hands="Kurys Gloves", ring1="Provocare Ring"}
  379.  
  380.  
  381.  
  382.     -- Waltz set (chr and vit)
  383.     sets.precast.Waltz = {
  384.         head="Whirlpool Mask",ear1="Roundel Earring",
  385.         body="Otronif Harness +1",hands="Otronif Gloves",ring1="Spiral Ring",
  386.         back="Iximulew Cape",legs="Nahtirah Trousers",feet="Thurandaut Boots +1"}
  387.        
  388.     -- Don't need any special gear for Healing Waltz.
  389.     sets.precast.Waltz['Healing Waltz'] = {}
  390.  
  391.        
  392.     -- Weaponskill sets
  393.     -- Default set for any weaponskill that isn't any more specifically defined
  394.     sets.precast.WS = {
  395.         head=RAOWShead,neck="Rancor Collar",ear1="Ishvara Earring",ear2="Moonshade Earring",
  396.         body="Abnoba Kaftan",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
  397.         back=JSECAPESTR,waist="Moonbow Belt",legs="Pitre Churidars +3",feet="Ryuo Sune-Ate"} --"Hiza. Hizayoroi +2"
  398.  
  399.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  400.     sets.precast.WS['Stringing Pummel'] = sets.precast.WS
  401.     sets.precast.WS['Stringing Pummel'].Mod = sets.precast.WS
  402.  
  403.     sets.precast.WS['Victory Smite'] = sets.precast.WS
  404.  
  405.     sets.precast.WS['Shijin Spiral'] = set_combine(sets.precast.WS, {head="Pitre Taj +3", body="Pitre Tobe +3", hands="Pitre Dastanas +3", legs="Pitre Churidars +3", feet="Heyoka leggings", ring1="Apate Ring", ring2="Petrov Ring"})
  406.    
  407.     sets.precast.WS['Howling Fist'] = {
  408.         head=RAOWShead,neck="Fotia Gorget",ear1="Ishvara Earring",ear2="Moonshade Earring",
  409.         body="Foire Tobe +3",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
  410.         back=JSECAPESTR,waist="Moonbow Belt",legs="Hiza. Hizayoroi +2",feet="Ryuo Sune-Ate"}
  411.  
  412.    
  413.     -- Midcast Sets
  414.     sets.midcast ={}
  415.     sets.midcast.FastRecast = {
  416.         head="Haruspex Hat",ear2="Loquacious Earring",
  417.         body="Otronif Harness +1",hands="Regimen Mittens",
  418.         legs="Manibozho Brais",feet="Otronif Boots +1"}
  419.        
  420.  
  421.     -- Midcast sets for pet actions
  422.     sets.midcast.Pet = {}
  423.     sets.midcast.Pet.Cure = {legs="Foire Churidars"}
  424.  
  425.     sets.midcast.Pet['Elemental Magic'] = {feet="Naga Kyahan", ear1="Burana Earring", ear2="Cirque Earring", legs="Pitre Churidars +3"}
  426.  
  427.     sets.midcast.Pet.WeaponSkillNoAcc = {neck="Empath Necklace",head="Karagoz Capello +1", body="Tali'ah Manteel +1", waist="Incarnation Sash", hands="Karagoz Guanti +1", ring1="Varar Ring", ring2="Varar Ring", legs=HercLegsPET, feet="Punchinellos", back="Dispersal Mantle"}
  428.     sets.midcast.Pet.WSNoFTP = {
  429.         neck="Empath Necklace",
  430.         head="Pitre Taj +3",
  431.         body="Tali'ah Manteel +1",
  432.         waist="Incarnation Sash",
  433.         hands="Karagoz Guanti +1",
  434.         ring1="Thurandaut Ring",
  435.         ring2="Varar Ring",
  436.         legs="Kara. Pantaloni +1",
  437.         feet="Naga Kyahan",
  438.         back=JSECAPEPetHaste}
  439.     sets.midcast.Pet.WSFTP = {
  440.         neck="Empath Necklace",
  441.         head="Karagoz Capello +1",
  442.         body="Tali'ah Manteel +1",
  443.         waist="Incarnation Sash",
  444.         hands="Karagoz Guanti +1",
  445.         ring1="Thurandaut Ring",
  446.         ring2="Varar Ring",
  447.         legs="Kara. Pantaloni +1",
  448.         feet="Naga Kyahan",
  449.         back="Dispersal Mantle"}
  450.      sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  451.     sets.midcast.Pet.WS = {}
  452.     --Chimera Ripper, String Clipper
  453.      sets.midcast.Pet.WS["STR"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
  454.      -- Bone crusher, String Shredder
  455.      sets.midcast.Pet.WS["VIT"] = set_combine(sets.midcast.Pet.WeaponSkill, {head="Karagoz Capello +1", legs=HercLegsPET, waist="Incarnation Sash", feet=HercBootBone})
  456.      -- Cannibal Blade
  457.      sets.midcast.Pet.WS["MND"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
  458.      -- Armor Piercer, Armor Shatterer
  459.      sets.midcast.Pet.WS["DEX"] = set_combine(sets.midcast.Pet.WeaponSkill, {legs=HercLegsPetDEX})
  460.      -- Arcuballista, Daze
  461.      sets.midcast.Pet.WS["DEXFTP"] = set_combine(sets.midcast.Pet.WS["DEX"], {head="Karagoz Capello +1",back="Dispersal Mantle"})
  462.      
  463.     -- Sets to return to when not performing an action.
  464.    
  465.     -- Resting sets
  466.     sets.resting = {head="Pitre Taj",neck="Wiglen Gorget",
  467.         ring1="Sheltered Ring",ring2="Paguroidea Ring"}
  468.    
  469.  
  470.     -- Idle sets
  471.  
  472.     sets.idle = {
  473.         head=RAOWShead,neck="Wiglen Gorget",ear1="Infused Earring",ear2="Dawn Earring",
  474.         body="Hiza. Haramaki +1",hands=RAOWShands,ring1="Sheltered Ring",ring2="Paguroidea Ring",
  475.         back="Mecisto. Mantle",waist="Incarnation Sash",legs=RAOWSlegs,feet="Hermes' Sandals"}
  476.  
  477.     sets.idle.Town = sets.idle
  478.  
  479.    
  480.     ------------------------------------------------------------------ PET SETS
  481.     -- Set for idle while pet is out (eg: pet regen gear)
  482.     sets.idle.Pet = sets.idle
  483.  
  484.     -- Idle sets to wear while pet is engaged
  485.     sets.idle.Pet.EngagedO =    {
  486.         head="Tali'ah Turban +2" ,neck="Empath Necklace",ear1="Burana Earring",ear2="Domes. Earring",
  487.         body="Pitre Tobe +3",hands="Tali'ah Gages +1",ring1="Varar Ring",ring2="Varar Ring",
  488.         back=JSECAPEPetHaste,waist="Incarnation Sash",legs=HercLegsPET,feet="Tali'ah Crackows +2"}
  489.  
  490.     sets.idle.Pet.Engaged = sets.idle.Pet.EngagedO
  491.     sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {legs="Kara. Pantaloni +1"})
  492.  
  493.     sets.idle.Pet.Engaged.Nuke = set_combine(sets.idle.Pet.Engaged, {legs="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
  494.  
  495.     sets.idle.Pet.Engaged.Magic = set_combine(sets.idle.Pet.Engaged, {legs="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
  496.    
  497.     sets.petTank = {
  498.         head="Taeon Chapeau",neck="Loricate Torque", ear1="Domes. Earring", ear2="Handler's Earring +1",
  499.         body="Taeon Tabard",hands="Taeon Gloves",ring1="Thurandaut Ring",ring2="Overbearing Ring",
  500.         back=JSECAPEPetHaste,waist="Isa Belt",legs="Taeon Tights",feet="Taeon Boots"}
  501.     sets.petEnmity = {head="Heyoka Cap", body="Heyoka Harness", hands="Heyoka Mittens", legs="Heyoka Subligar", feet="Heyoka Leggings", ear1="Domesticator's Earring" }
  502.  
  503.     -- Defense sets
  504.     sets.defense = {}
  505.     sets.defense.Evasion = {
  506.         head="Whirlpool Mask",neck="Loricate Torque",
  507.         body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Beeline Ring",
  508.         back="Ik Cape",waist="Incarnation Sash",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
  509.        
  510.    
  511.  
  512.     sets.defense.PDT = {
  513.         head=HercHeadPDT,neck="Loricate Torque",
  514.         body="Vrikodara Jupon",hands=HercGlovesPDT,ring1="Defending Ring",ring2="Dark Ring",
  515.         back="Solemnity Cape",waist="Moonbow Belt", legs=HercLegsPDT, feet=HercBootsPDT}
  516.  
  517.     sets.defense.MDT = {
  518.         head="Whirlpool Mask",neck="Loricate Torque",
  519.         body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring",
  520.         back="Tuilha Cape",waist="Incarnation Sash",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
  521.  
  522.     sets.Kiting = {feet="Hermes' Sandals"}
  523.  
  524.     -- Engaged sets
  525.  
  526.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  527.     -- sets if more refined versions aren't defined.
  528.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  529.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  530.    
  531.     -- Normal melee group
  532.     sets.aftercast= sets.idle
  533.     sets.engaged = {
  534.         head="Tali'ah Turban +2" ,neck="Clotharius Torque",ear1="Cessance Earring",ear2="Domes. Earring",
  535.         body="Pitre Tobe +3",hands="Heyoka Mittens",ring1="Varar Ring",ring2="Varar Ring",
  536.         back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Heyoka Leggings"}
  537.     sets.engagedN = {
  538.         head="Tali'ah Turban +2" ,neck="Clotharius Torque",ear1="Cessance Earring",ear2="Domes. Earring",
  539.         body="Herculean Vest",hands="Heyoka Mittens",ring1="Varar Ring",ring2="Varar Ring",
  540.         back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Heyoka Leggings"}
  541.     sets.engagedMO = {
  542.         head=HercHeadPDT ,neck="Clotharius Torque",ear1="Cessance Earring",ear2="Brutal Earring",
  543.         body="Herculean Vest",hands="Herculean Gloves",ring1="Petrov Ring",ring2="Epona's Ring",
  544.         back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Samnuha Tights",feet=HercBootDEX}
  545.    
  546.     sets.engaged.Acc = {
  547.         head="Whirlpool Mask",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  548.         body="Qaaxo Harness",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
  549.         back="Dispersal Mantle",waist="Incarnation Sash",legs="Manibozho Brais",feet=HercBootDEX}
  550.     sets.engaged.DT = {
  551.         head="Karagoz Capello +1",neck="Asperity Necklace",ear1="Burana Earring",ear2="Domes. Earring",
  552.         body="Rawhide Vest",hands=RAOWShands,ring1="Petrov Ring",ring2="Epona's Ring",
  553.         back="Dispersal Mantle",waist="Incarnation Sash",legs=RAOWSlegs,feet=RAOWSfeet}
  554.     sets.engaged.Acc.DT = {
  555.         head="Whirlpool Mask",neck="Loricate Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  556.         body="Otronif Harness +1",hands="Regimen Mittens",ring1="Defending Ring",ring2="Beeline Ring",
  557.         back="Iximulew Cape",waist="Incarnation Sash",legs="Manibozho Brais",feet="Otronif Boots +1"}
  558.    
  559. end
  560.  
  561. function realaftercast()
  562.     if ActualMode == "Tank" then
  563.         sets.aftercast = sets.petTank
  564.     elseif TotalS == "Idle" then
  565.         sets.aftercast = sets.idle
  566.     elseif TotalS == "Master Only" then
  567.         sets.aftercast = sets.engagedMO
  568.     elseif TotalS == "Pet Only" then
  569.         sets.aftercast = sets.engaged
  570.     elseif TotalS == "Pet+Master" then
  571.         sets.aftercast = sets.engagedN
  572.     elseif TotalS == "Overdrive" then
  573.         sets.aftercast = sets.engaged
  574.     end
  575.     equip(sets.aftercast)
  576. end
  577.  
  578.  
  579. --Auto Boost on Certain WS
  580. function precast(spell,action)
  581.     if spell.english == "Deploy" and pet.tp >= 950 then
  582.         if ActualMode == "Tank" then
  583.             -- Nothing
  584.         else
  585.         equip(sets.midcast.Pet.WeaponSkill)
  586.         end
  587.     elseif sets.precast.JA[spell.english] then
  588.         equip(sets.precast.JA[spell.english])
  589.     elseif sets.precast.WS[spell.english] then
  590.         equip(sets.precast.WS[spell.english])
  591.         if TotalS == "Pet+Master" then
  592.             sets.aftercast = sets.midcast.Pet.WeaponSkill
  593.         end
  594.     elseif string.find(spell.english,'Maneuver') then
  595.         if ActualSubMode == "Spam" then
  596.             equip(sets.precast.JA.Maneuver)
  597.         else
  598.             if spell.english ~= Mane[ManeRound]..' Maneuver' and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
  599.                 equip(sets.precast.JA.Maneuver)
  600.             --if buffactive['Food'] then
  601.                 cancel_spell()
  602.                 send_command('input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
  603.             --else
  604.             --  cancel_spell()
  605.             --  send_command('input /item "Akamochi" <me>;wait 5;input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
  606.             --end
  607.             end
  608.         end
  609.     else
  610.         equip(sets.precast.FC)
  611.     end
  612. end
  613.  
  614. function midcast(spell,action)
  615. end
  616.  
  617. function aftercast(spell,action)
  618.     enable("ear1")
  619.     if spell.name == null then
  620.             return -- Cancel Aftercast for outofrange/unable to see.
  621.     end
  622.    
  623.     if (spell.english == "Shijin Spiral" or spell.english == "Victory Smite" or spell.english == "Stringing Pummel" or spell.english == "Howling Fist") and pet.tp >= 850 then
  624.         ws = SC[pet.frame][spell.english]
  625.         modif = Modifier[ws]
  626.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ '..pet.name..' is about to '..ws..' ('..modif..') ] *-*-*-*-*-*-*-*-*')
  627.         equip(sets.midcast.Pet.WS[modif])
  628.     else
  629.         if ActualSubMode == "Spam" then
  630.             equip(sets.precast.JA.Maneuver)
  631.         else
  632.         if string.find(spell.english,'Maneuver') then
  633.             if ManeRound == 1 then
  634.                 ManeRound = 2
  635.             elseif ManeRound == 2 then
  636.                 ManeRound = 3
  637.             else
  638.                 ManeRound = 1
  639.             end
  640.             Burden = Burden +15
  641.         elseif spell.english == "Cooldown" then
  642.             Burden = round(Burden/2)
  643.         end
  644.         end
  645.         if sets.precast.WS[spell.english] and TotalS == "Pet+Master" then
  646.             equip(sets.aftercast)
  647.         else
  648.         realaftercast()
  649.         end
  650.     end
  651.    
  652. end
  653.  
  654. function status_change(new,old)
  655.     if new == 'Engaged' then
  656.         MasterS = "Engaged"
  657.         TotalSCalc()
  658.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Engaged ] *-*-*-*-*-*-*-*-*')
  659.     else
  660.         MasterS="Idle"
  661.         TotalSCalc()
  662.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Idle ] *-*-*-*-*-*-*-*-*')
  663.     end
  664.     realaftercast()
  665.    
  666. end
  667.  
  668. function pet_status_change(new,old)
  669.     if new == 'Engaged' then
  670.         PetS = "Engaged"
  671.         TotalSCalc()
  672.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetEngaged ] *-*-*-*-*-*-*-*-*')
  673.     else
  674.         PetS="Idle"
  675.         TotalSCalc()
  676.             add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetIdle ] *-*-*-*-*-*-*-*-*')
  677.     end
  678.     realaftercast()
  679. end
  680.  
  681. function pet_aftercast(spell)
  682.     realaftercast()
  683. end
  684.  
  685. function buff_change(status,gain_or_loss)
  686.     if status == "sleep" then
  687.         if gain_or_loss then
  688.             equip({neck="Opo-opo Necklace"})
  689.         end
  690.     end
  691.    
  692.     if status == "Overdrive" then
  693.         if gain_or_loss then
  694.             OverPower = true
  695.             OverCount = 1
  696.             sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  697.         else
  698.             OverPower = false
  699.             OverCount = 0
  700.             sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  701.         end
  702.     end
  703.    
  704.    
  705. end
  706.  
  707. -- Toggles -- SE Macros: /console gs c "command" [case sensitive]
  708. function self_command(command)
  709.         if command == 'PDT' then
  710.          if pdt == 0 then
  711.             pdt = 1
  712.             add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT ON ] *-*-*-*-*-*-*-*-*')
  713.             equip(sets.defense.PDT)
  714.             disable("head")
  715.             disable("neck")
  716.             disable("body")
  717.             disable("hands")
  718.             disable("ring1")
  719.             disable("ring2")
  720.             disable("waist")
  721.             disable("legs")
  722.             disable("feet")
  723.          else
  724.             pdt = 0
  725.             add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT OFF ] *-*-*-*-*-*-*-*-*')
  726.             enable("head")
  727.             enable("neck")
  728.             enable("body")
  729.             enable("hands")
  730.             enable("ring1")
  731.             enable("ring2")
  732.             enable("waist")
  733.             enable("legs")
  734.             enable("feet")
  735.             equip(sets.aftercast)
  736.          end
  737.         elseif command == 'normal' then
  738.        
  739.         end
  740.        
  741. end
  742.  
  743.  
  744.  
  745.  
  746. local clock = os.clock
  747. function sleep(n)  -- seconds
  748.   local t0 = clock()
  749.   while clock() - t0 <= n do end
  750. end
  751.  
  752.  
  753.  
  754. fps = 1
  755. sec = 0
  756.  
  757. enga=0
  758. oldtiming = os.time()
  759.  
  760. windower.register_event('prerender', function()
  761.  
  762.     if fps < 50 then
  763.         fps = fps +1
  764.     else
  765.         fps = 1
  766.     end
  767.    
  768.     if fps == 1 then
  769.         timing = os.time()
  770.        
  771.         if ActualMode == "Tank" then
  772.             if buffactive['Fire Maneuver'] then
  773.                 if stroberecast <= 2 then
  774.                     equip(sets.petEnmity)
  775.                 end
  776.             end
  777.            
  778.             if buffactive['Light Maneuver'] then
  779.                 if flashbulbrecast <= 2 then
  780.                     equip(sets.petEnmity)
  781.                 end
  782.             end
  783.             if stroberecast > 0 then
  784.                 stroberecast = strobetimer -(os.time() - strobetime)
  785.                 --add_to_chat(204,"Recast :"..stroberecast)
  786.             end
  787.             if flashbulbrecast > 0 then
  788.                 flashbulbrecast = flashbulbtimer -(os.time() - flashbulbtime)
  789.                 --add_to_chat(204,"Recast :"..stroberecast)
  790.             end
  791.         end
  792.         TotalSCalc()
  793.         if(timing-oldtiming > 3) then
  794.             if Burden > 0 then
  795.                 Burden = Burden -1
  796.             end
  797.             oldtiming = os.time()
  798.         end
  799.        
  800.         if sets.aftercast == sets.idle then
  801.        
  802.         else
  803.             if TotalS == "Idle" then
  804.             sets.aftercast = sets.idle
  805.             equip(sets.aftercast)
  806.             end
  807.         end
  808.        
  809.         if ActualMode == "Tank" then
  810.             -- Nothing
  811.         elseif TotalS == "Pet Only" or TotalS == "Overdrive" then
  812.             if pet.tp >= 850 then
  813.                 equip(sets.midcast.Pet.WeaponSkill)
  814.             else
  815.                 equip(sets.aftercast)
  816.             end
  817.         end
  818.         --print(player.status)
  819.         --[[if player.status == 1 then
  820.             add_to_chat(204,"Engaged")
  821.             if enga == 0 then
  822.             send_command("input /p go")
  823.             add_to_chat(204,"Engaging")
  824.             enga = 1
  825.             end
  826.         elseif player.status == 0 then
  827.             add_to_chat(204,"Idled")
  828.             if enga == 1 then
  829.             send_command("input /p fc")
  830.             add_to_chat(204,"Idling")
  831.             enga = 0
  832.             end
  833.         end]]--
  834.        
  835.         --- AUTOMANEUVER
  836.         --if not buffactive[Mane[1]..' Maneuver'] and autos then
  837.         --  add_to_chat(204,"Maneuver lost")
  838.         --  send_command('input /ja "Fire Maneuver" <me>')
  839.         --elseif not buffactive[Mane[2]..' Maneuver'] and autos then
  840.         --  add_to_chat(204,"Maneuver lost")
  841.         --  send_command('input /ja "Fire Maneuver" <me>')
  842.         --elseif not buffactive[Mane[2]..' Maneuver'] and autos then
  843.         --  add_to_chat(204,"Maneuver lost")
  844.         --  send_command('input /ja "Fire Maneuver" <me>')
  845.         --end
  846.        
  847.        
  848.         refresh()
  849.     end
  850.    
  851. end)
  852.  
  853.  
  854.  
  855. choosing = false       
  856. wchoos = 0     
  857. modchos = false
  858. submodechos = false
  859. windower.register_event('chat message', function(original, sender, mode, gm)
  860.     local match
  861.  
  862.                 if sender == player.name then
  863.                     if (original == "mode" or original == "MODE" or original == "Mode" or original == "mod") and modchos == false then
  864.                         add_to_chat(204,"Choose your pet mode(Tank, DD, BLM, WHM, RDM)")
  865.                         modchos = true
  866.                         submodechos = false
  867.                     elseif modchos == true and PetMode:contains(original) then
  868.                         ActualMode = original
  869.                         stext = ""
  870.                         i = 1
  871.                         if ActualMode == "Tank" then
  872.                         sets.aftercast = sets.petTank
  873.                         else
  874.                         sets.aftercast = sets.idle
  875.                         end
  876.                         while i <= NSubMode[ActualMode] do
  877.                             stext = stext..PetSubMode[ActualMode][i].." - "
  878.                             i=i+1
  879.                         end
  880.                         add_to_chat(204,"Choose your "..ActualMode.." style : "..stext)
  881.                         submodechos = true
  882.                         modchos = false
  883.                     elseif submodechos == true then
  884.                         i = 1
  885.                         while i <= NSubMode[ActualMode] do
  886.                             if original == PetSubMode[ActualMode][i] then
  887.                                 ActualSubMode = original
  888.                                 send_command('input //autocontrol equipset '..Style[ActualSubMode][1])
  889.                                 Mane[1] = Style[ActualSubMode][2]
  890.                                 Mane[2] = Style[ActualSubMode][3]
  891.                                 Mane[3] = Style[ActualSubMode][4]
  892.                                 submodechos = false
  893.                             end
  894.                             i=i+1
  895.                         end
  896.                        
  897.                     elseif original == "man" or original == "Man" or original == "Maneuver" or original == "maneuver" then
  898.                         if ManeRound == 1 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
  899.                             send_command('input /ja "'..Mane[1]..' Maneuver" <me>')
  900.                         elseif ManeRound == 2 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
  901.                             send_command('input /ja "'..Mane[2]..' Maneuver" <me>')
  902.                         elseif ManeRound == 3 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
  903.                             send_command('input /ja "'..Mane[3]..' Maneuver" <me>')
  904.                         end
  905.                     elseif original == "1" and not choosing then
  906.                         wchoos = 1
  907.                         add_to_chat(204,"Choose your First maneuver :")
  908.                         choosing = true
  909.                     elseif original == "2" and not choosing then
  910.                         wchoos = 2
  911.                         add_to_chat(204,"Choose your Second maneuver :")
  912.                         choosing = true
  913.                     elseif original == "3" and not choosing then
  914.                         wchoos = 3
  915.                         add_to_chat(204,"Choose your Third maneuver :")
  916.                         choosing = true
  917.                     elseif choosing then
  918.                         if TypeM:contains(original) then
  919.                             add_to_chat(204,""..original.." Maneuver choosed")
  920.                             Mane[wchoos] = original
  921.                             wchoos = 0
  922.                             choosing = false
  923.                         end
  924.                     elseif original == "start" then
  925.                         autos= true
  926.                         add_to_chat(204,"AutoManeuver started")
  927.                         --print(autos)
  928.                     elseif original == "stop" then
  929.                         autos= false
  930.                         add_to_chat(204,"AutoManeuver stoped")
  931.                     else
  932.                         comd = string.split(original, ",")
  933.                         for i=1, 3, 1 do
  934.                        
  935.                             if TypeM:contains(comd[i]) then
  936.                                 add_to_chat(204,"Maneuver "..i.." = "..comd[i].."")
  937.                                 Mane[i] = comd[i]
  938.                             end
  939.                         end
  940.                     end
  941.                 end
  942.                
  943.                
  944.  
  945.     return sender, mode, gm
  946. end)
  947.  
  948. function round(num, dec)
  949.   local mult = 10^(dec or 0)
  950.   return math.floor(num * mult + 0.5) / mult
  951. end
  952.  
  953. RWSTrigger = S{"Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
  954. MWSTrigger = S{"Slapstick", "Knockout", "Chimera Ripper", "String Clipper", "Cannibal Blade", "Bone Crusher", "String Shredder"}
  955. HPWSTrigger = S{"Magic Mortar"}
  956. wscount=0
  957. --- Delve Assistant
  958. windower.register_event('incoming text', function(original, modified, mode)
  959.     local match
  960.        
  961.         -- OVERDRIVE OPTIMIZER
  962.             if buffactive["Overdrive"] then
  963.                 match = original:match(pet.name..' readies ([%s%w]+)%.')
  964.                 if match=="Daze" then
  965.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  966.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  967.                     refresh()
  968.                     OverCount = 2
  969.                 elseif match=="Arcuballista" then
  970.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  971.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  972.                     refresh()
  973.                     OverCount = 3
  974.                 elseif match=="Armor Shatterer" then
  975.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  976.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  977.                     refresh()
  978.                     OverCount = 4
  979.                 elseif match=="Armor Piercer" then
  980.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  981.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  982.                     refresh()
  983.                     OverCount = 1
  984.                 end
  985.             end
  986.             -- Checking timer for enmity sets
  987.             if ActualMode == "Tank" then
  988.                 if buffactive['Fire Maneuver'] then
  989.                     match = original:match(pet.name..' uses Provoke')
  990.                    
  991.                     if match then
  992.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Strobe done ] *-*-*-*-*-*-*-*-*')
  993.                         strobetime = os.time()
  994.                         stroberecast = strobetimer
  995.                         equip(sets.aftercast)
  996.                     end
  997.                 end
  998.                
  999.                 if buffactive['Light Maneuver'] then
  1000.                     match = original:match(pet.name..' uses Flashbulb.')
  1001.                    
  1002.                     if match then
  1003.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Flashbulb done ] *-*-*-*-*-*-*-*-*')
  1004.                         flashbulbtime = os.time()
  1005.                         flashbulbrecast = flashbulbtimer
  1006.                         equip(sets.aftercast)
  1007.                     end
  1008.                 end
  1009.             end
  1010.         -- AutoWS trigger
  1011.        
  1012.             --match = original:match('Genta readies ([%s%w]+)%.')
  1013.        
  1014.             --if RWSTrigger:contains(match) then
  1015.             --  equip(sets.midcast.Pet.WeaponSkill)
  1016.             --  add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Range WSing ] *-*-*-*-*-*-*-*-*')
  1017.             --elseif MWSTrigger:contains(match) then
  1018.             --  equip(sets.midcast.Pet.WeaponSkill)
  1019.             --  add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Melee WSing ] *-*-*-*-*-*-*-*-*')
  1020.             --elseif HPWSTrigger:contains(match) then
  1021.             --  equip(sets.midcast.Pet.WeaponSkill)
  1022.             --  add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Magic Mortaring ] *-*-*-*-*-*-*-*-*')       
  1023.             --end
  1024.         --[[    match = original:match('Genta uses')
  1025.             if match then
  1026.                 -- After Bone crusher
  1027.                 equip(sets.engaged)
  1028.             end
  1029.             match = original:match('defeats the Apex Eft')
  1030.             if match then
  1031.                
  1032.                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ dead ] *-*-*-*-*-*-*-*-*')
  1033.                 send_command('wait 1; input /p fc')
  1034.             end
  1035.        
  1036.         if original then
  1037.         --if player.target.name then
  1038.            
  1039.             match = original:match('Trueamerstwin uses Cross Reaper.')
  1040.             if match then
  1041.                 wscount=wscount+1
  1042.                 add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Dark SC started, closing with LS -WS = '..wscount..' ] *-*-*-*-*-*-*-*-*')
  1043.                 send_command('wait 3; input /ws "Stringing Pummel" <t>')
  1044.             end
  1045.            
  1046.         --end
  1047.         end]]--
  1048.        
  1049.     return modified, mode
  1050. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement