Advertisement
Kuroganashi

PUP (Testing Dec 8 2018)

Dec 8th, 2018
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 36.18 KB | None | 0 0
  1. --Created By: Faloun
  2. --Modified By: Arrchie
  3.  
  4. include("Pup_Utility.lua")
  5. include('organizer-lib')
  6.  
  7. local player = windower.ffxi.get_player()
  8. --
  9. --Auto Maneuvers:
  10. --//gs c automan
  11.  
  12. --Currently, the way this works is it will simply recast the maneuver that wears off. This way you can cast any maneuvers you want and it will simply attempt to maintain what you have active.
  13.  
  14. --Predict:
  15. --//gs c predict
  16.  
  17. --This will attempt to determine the currently equipped puppet and adjust the Pet Mode and Pet Style.
  18.  
  19. --Pet Mode:
  20. --//gs c mode tank pdt
  21.  
  22. --This will change the mode of the pet and the style of the pet.
  23. --Current Modes: TANK, DD, Mage
  24. --Current Styles:
  25. --- Tank: Normal, PDT, MDT, RANGE
  26. --- DD: Normal, Bone, Spam, OD, ODACC
  27. --- Mage: Normal, Heal, Support, MB, DD
  28.  
  29.     --F9
  30.     send_command('bind f9 gs c mode dd normal')
  31.     --CTRL + F9
  32.     send_command('bind ^f9 gs c mode dd bone')
  33.     --ALT + F9
  34.     send_command('bind !f9 gs c mode dd spam')
  35.  
  36.     --F10
  37.     send_command('bind f10 gs c mode tank normal')
  38.     --CTRL + F10
  39.     send_command('bind ^f10 gs c mode tank pdt')
  40.     --ALT + F10
  41.     send_command('bind !f10 gs c mode tank range')
  42.     --Windows + F10
  43.     send_command('bind @f10 gs c mode tank mdt')
  44.  
  45.     --F11
  46.     send_command('bind f11 gs c mode mage normal')
  47.     --CTRL + F11   
  48.     send_command('bind ^f11 gs c mode mage Heal')
  49.     --ALT + F11
  50.     send_command('bind !f11 gs c mode mage Support')
  51.     --Windows + F11
  52.     send_command('bind @f11 gs c mode mage mb')
  53.    
  54.     --F12
  55.     send_command('bind f12 gs c mode dd od')
  56.     --CTRL + F12
  57.     send_command('bind ^f12 gs c mode dd odacc')
  58.     --ALT + F12
  59.     send_command('bind !f12 gs c mode mage dd')
  60.  
  61.  
  62.   function user_unload()
  63.     send_command('unbind ^f9')
  64.     send_command('unbind !f9')
  65.     send_command('unbind @f9')
  66.     send_command('unbind ^f10')
  67.     send_command('unbind !f10')
  68.     send_command('unbind @f10')
  69.     send_command('unbind ^f11')
  70.     send_command('unbind !f11')
  71.     send_command('unbind @f11')
  72.     send_command('unbind ^f12')
  73.     send_command('unbind !f12')
  74.     send_command('unbind @f12')
  75. end
  76.    
  77. --
  78. function get_sets()
  79.     user_setup()
  80.  
  81.     AF_Head = "Foire Taj +1"
  82.     AF_Body = "Foire Tobe +1"
  83.     AF_Hands = "Foire Dastanas +1"
  84.     AF_Legs = "Foire Churidars +1"
  85.     AF_Feet = "Foire Babouches +1"
  86.  
  87.     Relic_Head = "Pitre Taj +1"
  88.     Relic_Body = "Pitre Tobe +1"
  89.     Relic_Hands = "Pitre Dastanas +1"
  90.     Relic_Legs = ""
  91.     Relic_Feet = ""
  92.  
  93.     Empy_Head = "Karagoz Cappello"
  94.     Empy_Body = "Karagoz Farsetto"
  95.     Empy_Hands = "Karagoz Guanti"
  96.     Empy_Legs = "Kara. Pantaloni +1"
  97.     Empy_Feet = "Karagoz Scarpe +1"
  98.  
  99.     Visucius = {}
  100.     Visucius.DT = {
  101.         name = "Visucius's Mantle",
  102.         augments = {
  103.             "Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20",
  104.             "Accuracy+20 Attack+20",
  105.             "Pet: Accuracy+10 Pet: Rng. Acc.+10",
  106.             'Pet: Haste+10',
  107.         }
  108.     }
  109.  
  110.     HercHeadSTR = {
  111.         name = "Herculean Helm",
  112.         augments = {"Accuracy+28", "Weapon skill damage +4%", "STR+11", "Attack+13"}
  113.     }
  114.     HercHeadPDT = {name = "Herculean Helm", augments = {"CHR+7", "Accuracy+29", "Phys. dmg. taken -4%"}}
  115.     HercHeadMAB = {
  116.         name = "Herculean Helm",
  117.         augments = {'Mag. Acc.+20 "Mag.Atk.Bns."+20', "Phys. dmg. taken -2%", '"Mag.Atk.Bns."+15'}
  118.     }
  119.     HercBootMAB = {
  120.         name = "Herculean Boots",
  121.         augments = {
  122.             'Mag. Acc.+18 "Mag.Atk.Bns."+18',
  123.             "Magic burst mdg.+4%",
  124.             "MND+2",
  125.             "Mag. Acc.+10",
  126.             '"Mag.Atk.Bns."+14'
  127.         }
  128.     }
  129.     HercBootAcc = {
  130.         name = "Herculean Boots",
  131.         augments = {"MND+9", "Pet: STR+8", '"Treasure Hunter"+2', "Accuracy+18 Attack+18"}
  132.     }
  133.     HercBootDEX = {name = "Herculean Boots", augments = {"Attack+18", '"Triple Atk."+3', "DEX+10"}}
  134.  
  135.     --- DT
  136.     HercLegsPDT = {name = "Herculean Trousers", augments = {"Damage taken-3%", "Attack+3"}}
  137.     HercGlovesPDT = {name = "Herculean Gloves", augments = {"Phys. dmg. taken -5%", "Accuracy+2"}}
  138.     HercBootsPDT = {name = "Herculean Boots", augments = {"Damage taken-2%", "STR+9", "Attack+7"}}
  139.  
  140.     HercBootBone = {
  141.         name = "Herculean Boots",
  142.         augments = {"Pet: Accuracy+5 Pet: Rng. Acc.+5", 'Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2', "Pet: VIT+5"}
  143.     }
  144.  
  145.     HercLegsPET = {
  146.         name = "Herculean Trousers",
  147.         augments = {"Pet: Attack+21 Pet: Rng.Atk.+21", 'Pet: "Store TP"+10', "Pet: VIT+7"}
  148.     }
  149.     HercLegsPetDEX = {
  150.         name = "Herculean Trousers",
  151.         augments = {"Pet: Attack+10 Pet: Rng.Atk.+10", "Pet: DEX+10", 'Pet: "Mag.Atk.Bns."+3'}
  152.     }
  153.  
  154.     JSECAPEPetHaste = {
  155.         name = "Visucius's Mantle",
  156.         augments = {
  157.             "Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20",
  158.             "Accuracy+20 Attack+20",
  159.             "Pet: Accuracy+10 Pet: Rng. Acc.+10",
  160.             "Pet: Haste+10",
  161.             "System: 1 ID: 1247 Val: 2"
  162.         }
  163.     }
  164.     JSECAPESTR = {
  165.         name = "Visucius's Mantle",
  166.         augments = {"STR+20", "Accuracy+20 Attack+20", "STR+5", "Crit.hit rate+10"}
  167.     }
  168.  
  169.     -- RAO WS
  170.     RAOWShead = {name = "Rao Kabuto", augments = {"STR+10", "DEX+10", "Attack+15"}}
  171.     RAOWShands = {name = "Rao Kote", augments = {"Accuracy+10", "Attack+10", "Evasion+15"}}
  172.     RAOWSlegs = {name = "Rao Haidate", augments = {"Accuracy+20", '"Dbl.Atk."+3', "Pet: Accuracy+20"}}
  173.     RAOWSfeet = {name = "Rao Sune-Ate", augments = {"Accuracy+10", "Attack+10", "Evasion+15"}}
  174.  
  175.     sets.precast = {}
  176.  
  177.     -- Precast Sets
  178.  
  179.     -- Fast cast sets for spells
  180.     sets.precast.FC = {
  181.     head="Herculean Helm",body="Taeon Tabard",neck="Voltsurge Torque",ring1="Weatherspoon Ring",ring2="Prolix Ring",ear1="Enchntr. Earring +1",ear2="Loquacious Earring",hands="Thaumas Gloves",back="Ogapepo Cape",waist="Witful Belt",
  182.     legs="Rawhide Trousers",
  183.     feet="Regal Pumps +1"}
  184.  
  185.     sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck = "Magoraga Beads"})
  186.  
  187.     sets.precast.JA = {}
  188.     -- Precast sets to enhance JAs
  189.     sets.precast.JA["Tactical Switch"] = {feet = Empy_Feet}
  190.     sets.precast.JA["Ventriloquy"] = {legs = Relic_Legs}
  191.     sets.precast.JA["Role Reversal"] = {feet = Relic_Feet}
  192.     sets.precast.JA["Overdrive"] = {feet = Relic_Body}
  193.  
  194.     sets.precast.JA["Repair"] = {feet="Foire Babouches +1",ear1="Guignol Earring",ear2="Pratik Earring",legs="Desultor Tassets"}
  195.    
  196.     sets.precast.JA["Maintenance"] = sets.precast.JA["Repair"]
  197.    
  198.     sets.precast.JA.Maneuver = {main="Midnights",neck="Buffoon's Collar +1",body="Karagoz Farsetto",hands="Foire Dastanas +1",back="Visucius's Mantle",ear1="Burana Earring"}
  199.  
  200.     sets.precast.JA["Activate"] = {back = "Visucius's Mantle"}
  201.     sets.precast.JA["Deus Ex Automata"] = sets.precast.JA["Activate"]
  202.  
  203.     sets.precast.JA["Provoke"] = {ear1="Friomisi Earring",ear2="Cryptic Earring",neck="Unmoving Collar +1",body="Passion Jacket",hands="Kurys Gloves",ring1="Petrov Ring",ring2="Begrudging Ring",legs="Obatala Subligar",feet="Ahosi Leggings"}
  204.  
  205.     -- Waltz set (chr and vit)
  206.     sets.precast.Waltz = {
  207.         head="Herculean Helm",neck="Unmoving Collar +1",ear2="Roundel Earring",ear1="Soil Pearl",
  208.         body="Passion Jacket",hands="Slither Gloves +1",ring1="Niqmaddu Ring",ring2="Titan Ring",
  209.         back="Iximulew Cape",waist="Warwolf Belt",legs="Samnuha Tights",feet="Rawhide Boots"}
  210.  
  211.     -- Don't need any special gear for Healing Waltz.
  212.     sets.precast.Waltz["Healing Waltz"] = {}
  213.  
  214.     -- Weaponskill sets
  215.     -- Default set for any weaponskill that isn't any more specifically defined
  216.     sets.precast.WS = {
  217.     head="Hizamaru Somen +2",neck="Fotia Gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
  218.         body="Ryuo Domaru",hands="Hizamaru Kote +1",ring1="Niqmaddu Ring",ring2="Epona's Ring",
  219.         back="Visucius's Mantle",waist="Fotia Belt",legs="Rao Haidate",feet="Hiza. Sune-ate +1"} --"Hiza. Hizayoroi +2"
  220.  
  221.     -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
  222.     sets.precast.WS["Stringing Pummel"] = set_combine(sets.precast.WS, {head="Lilitu Headpiece",
  223.     body="Abnoba Kaftan",
  224.     hands={ name="Ryuo Tekko", augments={'STR+10','DEX+10','Accuracy+15',}},
  225.     legs="Ta'lab Trousers",
  226.     feet="Hiza. Sune-ate +1",
  227.     neck="Fotia Gorget",
  228.     waist="Fotia Belt",
  229.     back="Rancorous Mantle",
  230.     })
  231.    
  232.     sets.precast.WS["Stringing Pummel"].Mod = sets.precast.WS
  233.  
  234.     sets.precast.WS["Victory Smite"] = set_combine(sets.precast.WS, {neck="Fotia Gorget",
  235.     body="Ryuo Domaru",
  236.     waist="Moonbow Belt",
  237.     ring1="Niqmaddu Ring",
  238.     ring2="Begrudging Ring",
  239.     hands={ name="Ryuo Tekko", augments={'STR+10','DEX+10','Accuracy+15',}},
  240.     legs="Rao Haidate",
  241.     feet={ name="Ryuo Sune-Ate", augments={'STR+10','Attack+20','Crit. hit rate+3%',}},
  242.     back="Dispersal Mantle",
  243.     head="Rao Kabuto"})
  244.  
  245.     sets.precast.WS["Shijin Spiral"] =
  246.         set_combine(sets.precast.WS,  {
  247.         head="Lilitu Headpiece",body="Naga Samue",hands="Rawhide Gloves",legs="Samnuha Tights",neck="Fotia Gorget",waist="Fotia Belt"
  248.         })
  249.  
  250.     sets.precast.WS["Howling Fist"] = set_combine(sets.precast.WS,  {
  251.     })
  252.  
  253.     -- Midcast Sets
  254.     sets.midcast = {}
  255.     sets.midcast.FastRecast = {head="Herculean Helm",body="Taeon Tabard",neck="Voltsurge Torque",ring1="Weatherspoon Ring",ring2="Prolix Ring",
  256.     ear1="Enchntr. Earring +1",ear2="Loquacious Earring",hands="Thaumas Gloves",back="Switch Cape",waist="Witful Belt",
  257.     legs="Rawhide Trousers",
  258.     feet="Regal Pumps +1"}
  259.  
  260.     -- Midcast sets for pet actions
  261.     sets.midcast.Pet = {}
  262.     sets.midcast.Pet.Cure = {range="Animator P II",ear2="Enmerkar Earring",ear1="Burana Earring",back="Visucius's Mantle",legs="Foire Churidars +1",waist="Ukko Sash",neck="Adad Amulet"}
  263.  
  264.     sets.midcast.Pet["Elemental Magic"] = {
  265.         range="Animator P II",ear2="Enmerkar Earring",ear1="Burana Earring",back="Visucius's Mantle",head="Tali'ah Turban +1",body="Tali'ah Manteel +1",hands="Naga Tekko",legs="Tali'ah Sera. +1",feet="Tali'ah Crackows +1",waist="Ukko Sash",neck="Adad Amulet"
  266.     }
  267.  
  268.     sets.midcast.Pet.WeaponSkillNoAcc = {neck="Empath Necklace",head="Karagoz Capello",body="Tali'ah Manteel +1",hands="Karagoz Guanti",legs="Kara. Pantaloni +1",feet="Naga Kyahan",back="Dispersal Mantle",ear1="Burana Earring",ear2="Enmerkar Earring",waist="Incarnation Sash",ring1="Overbearing Ring",ring2="Varar Ring"}
  269.    
  270.     sets.midcast.Pet.WSNoFTP = {neck="Empath Necklace",head="Karagoz Capello",body="Tali'ah Manteel +1",hands="Karagoz Guanti",legs="Kara. Pantaloni +1",feet="Naga Kyahan",back="Dispersal Mantle",ear1="Burana Earring",ear2="Enmerkar Earring",waist="Incarnation Sash",ring1="Overbearing Ring",ring2="Varar Ring"}
  271.    
  272.     sets.midcast.Pet.WSFTP = {neck="Empath Necklace",head="Karagoz Capello",body="Tali'ah Manteel +1",hands="Karagoz Guanti",legs="Kara. Pantaloni +1",feet="Naga Kyahan",back="Dispersal Mantle",ear1="Burana Earring",ear2="Enmerkar Earring",waist="Incarnation Sash",ring1="Overbearing Ring",ring2="Varar Ring"}
  273.    
  274.     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  275.     sets.midcast.Pet.WS = {neck="Empath Necklace",head="Karagoz Capello",body="Tali'ah Manteel +1",hands="Karagoz Guanti",legs="Kara. Pantaloni +1",feet="Naga Kyahan",back="Dispersal Mantle",ear1="Burana Earring",ear2="Enmerkar Earring",waist="Incarnation Sash",ring1="Overbearing Ring",ring2="Varar Ring"}
  276.    
  277.     --Chimera Ripper, String Clipper
  278.     sets.midcast.Pet.WS["STR"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
  279.     -- Bone crusher, String Shredder
  280.     sets.midcast.Pet.WS["VIT"] =
  281.         set_combine(
  282.         sets.midcast.Pet.WeaponSkill,
  283.         {waist = "Incarnation Sash",}
  284.     )
  285.     -- Cannibal Blade
  286.     sets.midcast.Pet.WS["MND"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
  287.     -- Armor Piercer, Armor Shatterer
  288.     sets.midcast.Pet.WS["DEX"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
  289.     -- Arcuballista, Daze
  290.     sets.midcast.Pet.WS["DEXFTP"] =
  291.         set_combine(sets.midcast.Pet.WS["DEX"], {head = Empy_Head, back = "Dispersal Mantle"})
  292.  
  293.     -- Sets to return to when not performing an action.
  294.  
  295.     -- Resting sets
  296.     sets.resting = {
  297.     head="Pitre Taj +1",neck="Sanctity Necklace",
  298.         ring1="Chirich Ring",ring2="Chirich Ring",back="Contriver's Cape",ear1="Infused Earring",waist="Isa Belt",feet="Rao Sune-Ate",legs="Rao Haidate",hands="Rao Kote"
  299.         }
  300.  
  301.     -- Idle sets
  302.  
  303.     sets.idle = {main="Ohtas",ammo="Automat. Oil +3",
  304.         head="Pitre Taj +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Infused Earring",
  305.         body="Hiza. Haramaki +2",hands="Rao Kote",ring1="Matrimony Ring",ring2="Defending Ring",
  306.         back="Contriver's Cape",waist="Isa Belt",legs="Rao Haidate",feet="Hermes' Sandals"}
  307.  
  308.     sets.idle.Town = sets.idle
  309.  
  310.     ------------------------------------------------------------------ PET SETS
  311.     -- Set for idle while pet is out (eg: pet regen gear)
  312.     sets.idle.Pet = sets.idle
  313.  
  314.     -- Idle sets to wear while pet is engaged
  315.     sets.idle.Pet.Engaged = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
  316.         head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
  317.         body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
  318.         back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
  319.        
  320.     sets.idle.Pet.EngagedO = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
  321.         head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
  322.         body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
  323.         back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
  324.  
  325.     sets.idle.Pet.Engaged = sets.idle.Pet.EngagedO
  326.     sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {legs = "Kara. Pantaloni +1"})
  327.  
  328.     sets.idle.Pet.Engaged.Nuke =
  329.         set_combine(sets.idle.Pet.Engaged, {legs = Relic_Legs, feet = Relic_Feet, ear1 = "Burana Earring"})
  330.  
  331.     sets.idle.Pet.Engaged.Magic =
  332.         set_combine(sets.idle.Pet.Engaged, {legs = Relic_Legs, feet = Relic_Feet, ear1 = "Burana Earring"})
  333.  
  334.     sets.petTank = {main="Midnights",range="Animator P +1",ammo="Automat. Oil +3",
  335.         head="Rao Kabuto",neck="Empath Necklace",ear1="Handler's Earring +1",ear2="Enmerkar Earring",
  336.         body="Rao Togi",hands="Rao Kote",ring1="Varar Ring",ring2="Varar Ring",
  337.         back="Visucius's Mantle",waist="Isa Belt",legs="Tali'ah Sera. +1",feet="Rao Sune-Ate"}
  338.  
  339.     --PET Enmity Armor goes here
  340.     sets.petEnmity = {
  341.     }
  342.  
  343.     -- Defense sets
  344.     sets.defense = {}
  345.     sets.defense.Evasion = {
  346.         head = "Whirlpool Mask",
  347.         neck = "Loricate Torque",
  348.         body = "Otronif Harness +1",
  349.         hands = "Otronif Gloves",
  350.         ring1 = "Defending Ring",
  351.         ring2 = "Beeline Ring",
  352.         back = "Ik Cape",
  353.         waist = "Incarnation Sash",
  354.         legs = "Nahtirah Trousers",
  355.         feet = "Otronif Boots +1"
  356.     }
  357.  
  358.     sets.defense.PDT = {
  359.         head = Relic_Head,
  360.         body = "Udug Jacket",
  361.         hands = "Herculean Gloves",
  362.         legs = "Herculean Trousers",
  363.         feet = "Herculean Boots",
  364.         neck = "Warder's Charm +1",
  365.         waist = "Moonbow Belt",
  366.         left_ear = "Dominance Earring",
  367.         right_ear = "Handler's Earring +1",
  368.         left_ring = "Supershear Ring",
  369.         right_ring = "Kunaji Ring",
  370.         back = "Moonbeam Cape"
  371.     }
  372.  
  373.     sets.defense.MDT = {
  374.         head = Relic_Head,
  375.         body = "Udug Jacket",
  376.         hands = "Herculean Gloves",
  377.         legs = "Herculean Trousers",
  378.         feet = "Herculean Boots",
  379.         neck = "Warder's Charm +1",
  380.         waist = "Moonbow Belt",
  381.         left_ear = "Dominance Earring",
  382.         right_ear = "Handler's Earring +1",
  383.         left_ring = "Supershear Ring",
  384.         right_ring = "Kunaji Ring",
  385.         back = "Moonbeam Cape"
  386.     }
  387.  
  388.     sets.Kiting = {feet = "Hermes' Sandals"}
  389.  
  390.     -- Engaged sets
  391.  
  392.     -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
  393.     -- sets if more refined versions aren't defined.
  394.     -- If you create a set with both offense and defense modes, the offense mode should be first.
  395.     -- EG: sets.engaged.Dagger.Accuracy.Evasion
  396.  
  397.     -- Normal melee group
  398.     sets.aftercast = sets.idle
  399.     --Pet Only
  400.     sets.engaged = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
  401.         head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
  402.         body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
  403.         back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
  404.    
  405.     --Pet+Master
  406.     sets.engagedN = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
  407.         head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
  408.         body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
  409.         back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
  410.        
  411.     --Master ONLY
  412.     sets.engagedMO = {ammo="Automat. Oil +3",
  413.         head="Herculean Helm",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Cessance Earring",
  414.         body="Tali'ah Manteel +1",hands="Herculean Gloves",ring1="Niqmaddu Ring",ring2="Epona's Ring",
  415.         back="Dispersal Mantle",waist="Moonbow Belt",legs={ name="Herculean Trousers", augments={'"Triple Atk."+4','STR+2','Attack+3',}},feet={ name="Herculean Boots", augments={'Attack+19','"Triple Atk."+4','Accuracy+10',}}
  416.         }
  417.    
  418.     --Pet Affected
  419.     sets.engaged.Acc = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
  420.         head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
  421.         body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
  422.         back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
  423.    
  424.     --Pet
  425.     sets.engaged.DT = {
  426.         head = Relic_Head,
  427.         body = "Udug Jacket",
  428.         hands = "Herculean Gloves",
  429.         legs = "Herculean Trousers",
  430.         feet = "Herculean Boots",
  431.         neck = "Warder's Charm +1",
  432.         waist = "Moonbow Belt",
  433.         left_ear = "Dominance Earring",
  434.         right_ear = "Handler's Earring +1",
  435.         left_ring = "Supershear Ring",
  436.         right_ring = "Kunaji Ring",
  437.         back = "Moonbeam Cape"
  438.     }
  439.    
  440.     --Pet
  441.     sets.engaged.Acc.DT = {
  442.         head = Relic_Head,
  443.         body = "Udug Jacket",
  444.         hands = "Herculean Gloves",
  445.         legs = "Herculean Trousers",
  446.         feet = "Herculean Boots",
  447.         neck = "Warder's Charm +1",
  448.         waist = "Moonbow Belt",
  449.         left_ear = "Dominance Earring",
  450.         right_ear = "Handler's Earring +1",
  451.         left_ring = "Supershear Ring",
  452.         right_ring = "Kunaji Ring",
  453.         back = "Moonbeam Cape"
  454.     }
  455. end
  456.  
  457. function user_setup()
  458.     set_macros(1, 7) --First Value is Sheet and second is Book
  459.     determinePuppetType()
  460.     setupTextWindow()
  461. end
  462.  
  463. function set_macros(sheet,book)
  464.     if book then
  465.         send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
  466.     else
  467.         send_command('@input /macro set '..tostring(sheet))
  468.     end
  469. end
  470.  
  471. ------------------------------------------------------------------------------------------------------------------------
  472. --------------------------------- DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ---------------------------------
  473. ------------------------------------------------------------------------------------------------------------------------
  474.  
  475. -------------------------------
  476. --------Global Variables-------
  477. -------------------------------
  478. Current_Maneuver = 0
  479. Auto_Maneuver = false
  480. OverPower = false
  481. OverCount = 0
  482. NextWS = ""
  483.  
  484. Master_State = "Idle"
  485. Pet_State = "Idle"
  486. Hybrid_State = "Idle"
  487. Flashbulb_Timer = 45
  488. Strobe_Timer = 30
  489. Strobe_Recast = 0
  490. Flashbulb_Recast = 0
  491. Flashbulb_Time = 0
  492. Strobe_Time = 0
  493. pdt = 0
  494.  
  495. Pos_X = 1400
  496. Pos_Y = 600
  497.  
  498. d_mode = false
  499.  
  500. visible = true
  501.  
  502. time_start = os.time()
  503.  
  504. --Default To Set Up the Text Window
  505. function setupTextWindow()
  506.     tb_name = "pup_gs_helper"
  507.     bg_visible = true
  508.     textinbox = ' '
  509.  
  510.     windower.text.create(tb_name)
  511.     -- table_name, x, y
  512.     windower.text.set_location(tb_name, Pos_X, Pos_Y)
  513.     -- transparency, rgb
  514.     windower.text.set_bg_color(tb_name, 200, 40, 40, 55)
  515.     windower.text.set_color(tb_name, 255, 147, 161, 161)
  516.     windower.text.set_font(tb_name, "Arial")
  517.     windower.text.set_font_size(tb_name, 11)
  518.     windower.text.set_bold(tb_name, true)
  519.     windower.text.set_italic(tb_name, false)
  520.     windower.text.set_text(tb_name, textinbox)
  521.     windower.text.set_bg_visibility(tb_name, bg_visible)
  522.     windower.text.set_visibility(tb_name, visible)
  523. end
  524.  
  525. --Used to calculate the Hybrid State of you and your pet
  526. function TotalSCalc()
  527.     if ActualMode == "DD" then
  528.         if buffactive['Overdrive'] then
  529.             Hybrid_State = "Overdrive"
  530.         elseif Master_State == "Idle" and Pet_State == "Idle" then
  531.             Hybrid_State = "Idle"
  532.         elseif Master_State == "Idle" and Pet_State == "Engaged" then
  533.             Hybrid_State = "Pet Only"
  534.         elseif Master_State == "Engaged" and Pet_State == "Engaged" then
  535.             Hybrid_State = "Pet+Master"
  536.         elseif Master_State == "Engaged" and Pet_State == "Idle" then
  537.             Hybrid_State = "Master Only"
  538.         end
  539.     elseif ActualMode == "TANK" then
  540.         if Pet_State == "Idle" then
  541.             Hybrid_State = "Idle"
  542.         else
  543.             Hybrid_State = "Tank"
  544.         end
  545.     else
  546.         Pet_State = "MAGE"
  547.         if Master_State == "Idle" then
  548.             Hybrid_State = "Idle"
  549.         else
  550.             Hybrid_State = "Master Only"
  551.         end
  552.     end
  553. end
  554.  
  555. --Determines Gear based on that Hybrid Set
  556. function determineGearSet()
  557.     if ActualMode == "TANK" then
  558.         sets.aftercast = sets.petTank
  559.     elseif Hybrid_State == "Idle" then
  560.         sets.aftercast = sets.idle
  561.     elseif Hybrid_State == "Master Only" then
  562.         sets.aftercast = sets.engagedMO
  563.     elseif Hybrid_State == "Pet Only" then
  564.         sets.aftercast = sets.engaged
  565.     elseif Hybrid_State == "Pet+Master" then
  566.         sets.aftercast = sets.engagedN
  567.     elseif Hybrid_State == "Overdrive" then
  568.         sets.aftercast = sets.engaged
  569.     end
  570.  
  571.     equip(sets.aftercast)
  572. end
  573.  
  574. function refreshWindow()
  575.     textinbox = ' '
  576.     textColorNewLine = '\\cr \n'
  577.     textColorEnd = ' \\cr'
  578.     textColor = '\\cs(125, 125, 0)'
  579.  
  580.     if pet.isvalid then
  581.         drawPetInfo()
  582.         drawPetSkills()
  583.     end
  584.  
  585.     textinbox = textinbox..drawTitle('   Mode   ')
  586.     textinbox = textinbox..textColor..'Pet Mode : '..ActualMode..textColorNewLine
  587.     textinbox = textinbox..textColor..'Pet Style : '..ActualSubMode..textColorNewLine
  588.      
  589.     textinbox = textinbox..drawTitle('    State    ')
  590.     textinbox = textinbox..textColor..'Master : '..Master_State..textColorNewLine
  591.     textinbox = textinbox..textColor..'Pet : '..Pet_State..textColorNewLine
  592.     textinbox = textinbox..textColor..'Hybrid : '..Hybrid_State..textColorNewLine
  593.  
  594.     textinbox = textinbox..drawTitle('  Options  ')
  595.     textinbox = textinbox..textColor..'Auto Maneuver : '..ternary(Auto_Maneuver, 'ON', 'OFF')..textColorNewLine
  596.  
  597.     --Debug Variables that are used for testing
  598.     if d_mode then
  599.         textinbox = textinbox..drawTitle("DEBUG")
  600.         textinbox = textinbox..textColor..'Current Maneuvers : '..Current_Maneuver..textColorNewLine
  601.     end
  602.  
  603.     windower.text.set_text(tb_name, textinbox)
  604. end
  605.  
  606. function drawPetInfo()
  607.     textinbox = textinbox..drawTitle('Pet Info')
  608.     textinbox = textinbox..'- \\cs(0, 0, 125)HP : '..pet.hp..'/'..pet.max_hp..textColorNewLine
  609.     textinbox = textinbox..'- \\cs(0, 125, 0)MP : '..pet.mp..'/'..pet.max_mp..textColorNewLine
  610.     textinbox = textinbox..'- \\cs(255, 0, 0)TP : '..tostring(pet.tp)..textColorNewLine
  611. end
  612.  
  613. function drawPetSkills()
  614.     --- Recast for enmity gears
  615.     if ActualMode == "TANK" then
  616.         textinbox = textinbox..drawTitle("Pet Skills")
  617.         -- Strobe recast
  618.         if Strobe_Recast == 0 then
  619.             if buffactive['Fire Maneuver'] then
  620.                 textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(125,0,0)Strobe\\cr \n'
  621.             else
  622.                 textinbox = textinbox..'\\cs(125, 125, 125)- Strobe\\cr \n'
  623.             end
  624.         else
  625.             textinbox = textinbox..'\\cs(125, 125, 125)- Strobe ('..Strobe_Recast..')\\cr \n'
  626.         end
  627.          
  628.         -- Flashbulb recast    
  629.         if Flashbulb_Recast == 0 then
  630.             if buffactive['Light Maneuver'] then
  631.                 textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(255,255,255)Flashbulb\\cr \n'
  632.             else
  633.                 textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb\\cr \n'
  634.             end
  635.         else
  636.             textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb ('..Flashbulb_Recast..')\\cr \n'
  637.         end
  638.     end
  639. end
  640.  
  641. --Creates the Title for a section in the Text Screen
  642. function drawTitle(title)
  643.     return '\\cs(255, 115, 0)'..pad(tostring(title), 6, '=')..'\\cr \n'
  644. end
  645.  
  646. ------------------------------------
  647. ----------Windower Hooks------------
  648. ------------------------------------
  649.  
  650. --Auto Boost on Certain WS
  651. function precast(spell,action)
  652.      
  653.     if spell.english == "Deploy" and pet.tp >= 850 then
  654.         if ActualMode == "TANK" then
  655.             -- Nothing
  656.         else
  657.             equip(sets.midcast.Pet.WeaponSkill)
  658.         end
  659.     elseif string.find(spell.english,'Maneuver') then
  660.         equip(sets.precast.JA.Maneuver)
  661.     elseif sets.precast.JA[spell.english] then
  662.         equip(sets.precast.JA[spell.english])
  663.     elseif sets.precast.WS[spell.english] then
  664.         equip(sets.precast.WS[spell.english])
  665.         if Hybrid_State == "Pet+Master" then
  666.             sets.aftercast = sets.midcast.Pet.WeaponSkill
  667.         end
  668.     else
  669.         equip(sets.precast.FC)
  670.     end
  671. end
  672.  
  673. function midcast(spell,action)
  674. end
  675.  
  676. function aftercast(spell,action)
  677.     enable("ear1")
  678.      
  679.     if spell.name == null then
  680.         return -- Cancel Aftercast for outofrange/unable to see.
  681.     end
  682.    
  683.     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
  684.         ws = SC[pet.frame][spell.english]
  685.         modif = Modifier[ws]
  686.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ '..pet.name..' is about to '..ws..' ('..modif..') ] *-*-*-*-*-*-*-*-*')
  687.         equip(sets.midcast.Pet.WS[modif])
  688.     else
  689.         if sets.precast.WS[spell.english] and Hybrid_State == "Pet+Master" then
  690.             equip(sets.aftercast)
  691.         else
  692.             determineGearSet()
  693.         end
  694.     end
  695.    
  696. end
  697.  
  698. function status_change(new,old)
  699.     if new == 'Engaged' then
  700.         Master_State = "Engaged"
  701.         TotalSCalc()
  702.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Engaged ] *-*-*-*-*-*-*-*-*')
  703.     else
  704.         Master_State="Idle"
  705.         TotalSCalc()
  706.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Idle ] *-*-*-*-*-*-*-*-*')
  707.     end
  708.      
  709.     determineGearSet()
  710.    
  711. end
  712.  
  713. function pet_status_change(new,old)
  714.     if new == 'Engaged' then
  715.         Pet_State = "Engaged"
  716.         TotalSCalc()
  717.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetEngaged ] *-*-*-*-*-*-*-*-*')
  718.     else
  719.         Pet_State="Idle"
  720.         TotalSCalc()
  721.         add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetIdle ] *-*-*-*-*-*-*-*-*')
  722.     end
  723.      
  724.     determineGearSet()
  725.  
  726. end
  727.  
  728. function pet_aftercast(spell)
  729.     determineGearSet()
  730. end
  731.  
  732.  
  733. function buff_change(status,gain_or_loss, buff_table)
  734.      
  735.     if status == "sleep" then
  736.         if gain_or_loss then
  737.             equip(set_combine(sets.defense.PDT, {neck="Opo-opo Necklace"}))
  738.         end
  739.     end
  740.  
  741.     --When you are at 3 Maneuvers and you use the ability you will temporarily go to 4
  742.     --This helps prevent you from trying to cast on losing a buff
  743.     if status:contains("Maneuver") and gain_or_loss then
  744.         Current_Maneuver = Current_Maneuver + 1
  745.         refreshWindow()
  746.     elseif Current_Maneuver > 0 then -- We don't want to see a negative count
  747.         Current_Maneuver = Current_Maneuver - 1
  748.         refreshWindow()
  749.     end
  750.  
  751.     --Now we can turn on and off the functionailty of automatically maintaining manuevers
  752.     if Auto_Maneuver then
  753.         if status:contains("Maneuver") and gain_or_loss == false and Current_Maneuver < 3 then
  754.             send_command('input /ja "'..status..'" <me>')
  755.         end
  756.     end
  757.  
  758.     if status == "Overdrive" then
  759.         if gain_or_loss then
  760.             OverPower = true
  761.             OverCount = 1
  762.             sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  763.         else
  764.             OverPower = false
  765.             OverCount = 0
  766.             sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  767.         end
  768.     end
  769.    
  770. end
  771.  
  772. windower.raw_register_event('zone change', reset_timers)
  773.  
  774. -- Toggles -- SE Macros: /console gs c "command" [case sensitive]
  775. function self_command(command)
  776.     local current_command = string.upper(command)
  777.     local current_command_table = {}
  778.  
  779.     if #current_command:split(' ') >= 2 then
  780.         current_command_table = T(current_command:split(' '))
  781.     end
  782.  
  783.     if type(current_command_table) == 'table' then --We have a multiple inputs
  784.         if current_command_table[1] == "MODE" then
  785.             if PetMode[current_command_table[2]] then
  786.                 add_to_chat("Changing Mode To: "..current_command_table[2])
  787.                 ActualMode = current_command_table[2]
  788.  
  789.                 if current_command_table[2] == 'TANK' then
  790.                     if PetSubMode["TANK"][current_command_table[3]] then
  791.                         ActualSubMode = current_command_table[3]
  792.                     else
  793.                         ActualSubMode = "NORMAL"
  794.                     end
  795.  
  796.                     add_to_chat("Changing Pet Style To "..ActualSubMode)
  797.                 elseif current_command_table[2] == 'MAGE' then
  798.                     if PetSubMode["MAGE"][current_command_table[3]] then
  799.                         ActualSubMode = current_command_table[3]
  800.                     else
  801.                         ActualSubMode = "NORMAL"
  802.                     end
  803.  
  804.                     add_to_chat("Changing Pet Style To "..ActualSubMode)
  805.                 elseif current_command_table[2] == 'DD' then
  806.                     if PetSubMode["DD"][current_command_table[3]] then
  807.                         ActualSubMode = current_command_table[3]
  808.                     else
  809.                         ActualSubMode = "NORMAL"
  810.                     end
  811.  
  812.                     add_to_chat("Changing Pet Style To "..ActualSubMode)
  813.                 else
  814.                     add_to_chat("Unable to determine Pet Style: "..current_command_table[3])
  815.                 end
  816.  
  817.             else
  818.                 add_to_chat("Unable to determine Pet Mode: ".. current_command_table[2])
  819.             end
  820.         elseif current_command_table[1] == "PUPHELPER" then
  821.             if type(current_command_table[2]) == 'number' and type(current_command_table[3]) == 'number' then
  822.                 Pos_X = tonumber(current_command_table[2])
  823.                 Pos_Y = tonumber(current_command_table[3])
  824.             elseif current_command_table[2] == 'VISIBLE' then
  825.                 windower.text.set_visibility(tb_name, not visible)
  826.             end
  827.         end
  828.          
  829.         refreshWindow()
  830.     end
  831.      
  832.     if current_command == 'PDT' then
  833.  
  834.     elseif current_command == 'AUTOMAN' then
  835.         Auto_Maneuver = not Auto_Maneuver
  836.         refreshWindow()
  837.     elseif current_command == 'DEBUG' then
  838.         d_mode = not d_mode
  839.         refreshWindow()
  840.     elseif current_command == 'PREDICT' then
  841.         determinePuppetType()
  842.         refreshWindow()
  843.     end
  844.  
  845. end
  846.  
  847. windower.register_event('prerender', function()
  848.  
  849.     --Items we want to check every second
  850.     --TODO Further Testing
  851.     if os.time() > time_start then
  852.         time_start = os.time()
  853.  
  854.         if ActualMode == "TANK" then
  855.             if buffactive['Fire Maneuver'] then
  856.                 if Strobe_Recast <= 1 then
  857.                     equip(sets.petEnmity)
  858.                 end
  859.             end
  860.  
  861.             if buffactive['Light Maneuver'] then
  862.                 if Flashbulb_Recast <= 1 then
  863.                     equip(sets.petEnmity)
  864.                 end
  865.             end
  866.         end
  867.  
  868.         if Strobe_Recast > 0 then
  869.             Strobe_Recast = Strobe_Timer -(os.time() - Strobe_Time)
  870.         end
  871.        
  872.         if Flashbulb_Recast > 0 then
  873.             Flashbulb_Recast = Flashbulb_Timer -(os.time() - Flashbulb_Time)
  874.         end
  875.  
  876.         TotalSCalc()
  877.        
  878.         if sets.aftercast == sets.idle then
  879.        
  880.         else
  881.             if Hybrid_State == "Idle" then
  882.             sets.aftercast = sets.idle
  883.             equip(sets.aftercast)
  884.             end
  885.         end
  886.        
  887.         if ActualMode == "TANK" then
  888.             -- Nothing
  889.         elseif Hybrid_State == "Pet Only" or Hybrid_State == "Overdrive" then
  890.             if pet.tp >= 950 then
  891.                 equip(sets.midcast.Pet.WeaponSkill)
  892.             else
  893.                 equip(sets.aftercast)
  894.             end
  895.         end
  896.  
  897.         refreshWindow()
  898.     end
  899.    
  900. end)
  901.  
  902. RWSTrigger = S{"Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
  903. MWSTrigger = S{"Slapstick", "Knockout", "Chimera Ripper", "String Clipper", "Cannibal Blade", "Bone Crusher", "String Shredder"}
  904. HPWSTrigger = S{"Magic Mortar"}
  905. wscount=0
  906. --- Delve Assistant
  907. windower.register_event('incoming text', function(original, modified, mode)
  908.     local match
  909.  
  910.         -- OVERDRIVE OPTIMIZER
  911.             if buffactive["Overdrive"] then
  912.                 match = original:match(pet.name..' readies ([%s%w]+)%.')
  913.                 if match=="Daze" then
  914.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  915.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  916.                     refreshWindow()
  917.                     OverCount = 2
  918.                 elseif match=="Arcuballista" then
  919.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  920.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  921.                     refreshWindow()
  922.                     OverCount = 3
  923.                 elseif match=="Armor Shatterer" then
  924.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
  925.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  926.                     refreshWindow()
  927.                     OverCount = 4
  928.                 elseif match=="Armor Piercer" then
  929.                     sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
  930.                     add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
  931.                     refreshWindow()
  932.                     OverCount = 1
  933.                 end
  934.             end
  935.             -- Checking timer for enmity sets
  936.             if ActualMode == "TANK" then
  937.                 if buffactive['Fire Maneuver'] then
  938.                     if original:contains(pet.name) and original:contains("Provoke") then
  939.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Strobe done ] *-*-*-*-*-*-*-*-*')
  940.                         Strobe_Time = os.time()
  941.                         Strobe_Recast = Strobe_Timer
  942.                         refreshWindow()
  943.                         determineGearSet()
  944.                     end
  945.                 end
  946.                  
  947.                 if buffactive['Light Maneuver'] then
  948.                     if original:contains(pet.name) and original:contains("Flashbulb") then
  949.                         add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Flashbulb done ] *-*-*-*-*-*-*-*-*')
  950.                         Flashbulb_Time = os.time()
  951.                         Flashbulb_Recast = Flashbulb_Timer
  952.                         refreshWindow()
  953.                         determineGearSet()
  954.                     end
  955.                 end
  956.             end
  957.        
  958.     return modified, mode
  959. end)
  960.  
  961. function sub_job_change(new,old)
  962.     determinePuppetType()
  963. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement