Advertisement
FalownPSA

Faloun_PUP

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