Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Created By: Faloun
- --Modified By: Arrchie
- include("Pup_Utility.lua")
- include('organizer-lib')
- local player = windower.ffxi.get_player()
- --
- --Auto Maneuvers:
- --//gs c automan
- --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.
- --Predict:
- --//gs c predict
- --This will attempt to determine the currently equipped puppet and adjust the Pet Mode and Pet Style.
- --Pet Mode:
- --//gs c mode tank pdt
- --This will change the mode of the pet and the style of the pet.
- --Current Modes: TANK, DD, Mage
- --Current Styles:
- --- Tank: Normal, PDT, MDT, RANGE
- --- DD: Normal, Bone, Spam, OD, ODACC
- --- Mage: Normal, Heal, Support, MB, DD
- --F9
- send_command('bind f9 gs c mode dd normal')
- --CTRL + F9
- send_command('bind ^f9 gs c mode dd bone')
- --ALT + F9
- send_command('bind !f9 gs c mode dd spam')
- --F10
- send_command('bind f10 gs c mode tank normal')
- --CTRL + F10
- send_command('bind ^f10 gs c mode tank pdt')
- --ALT + F10
- send_command('bind !f10 gs c mode tank range')
- --Windows + F10
- send_command('bind @f10 gs c mode tank mdt')
- --F11
- send_command('bind f11 gs c mode mage normal')
- --CTRL + F11
- send_command('bind ^f11 gs c mode mage Heal')
- --ALT + F11
- send_command('bind !f11 gs c mode mage Support')
- --Windows + F11
- send_command('bind @f11 gs c mode mage mb')
- --F12
- send_command('bind f12 gs c mode dd od')
- --CTRL + F12
- send_command('bind ^f12 gs c mode dd odacc')
- --ALT + F12
- send_command('bind !f12 gs c mode mage dd')
- function user_unload()
- send_command('unbind ^f9')
- send_command('unbind !f9')
- send_command('unbind @f9')
- send_command('unbind ^f10')
- send_command('unbind !f10')
- send_command('unbind @f10')
- send_command('unbind ^f11')
- send_command('unbind !f11')
- send_command('unbind @f11')
- send_command('unbind ^f12')
- send_command('unbind !f12')
- send_command('unbind @f12')
- end
- --
- function get_sets()
- user_setup()
- AF_Head = "Foire Taj +1"
- AF_Body = "Foire Tobe +1"
- AF_Hands = "Foire Dastanas +1"
- AF_Legs = "Foire Churidars +1"
- AF_Feet = "Foire Babouches +1"
- Relic_Head = "Pitre Taj +1"
- Relic_Body = "Pitre Tobe +1"
- Relic_Hands = "Pitre Dastanas +1"
- Relic_Legs = ""
- Relic_Feet = ""
- Empy_Head = "Karagoz Cappello"
- Empy_Body = "Karagoz Farsetto"
- Empy_Hands = "Karagoz Guanti"
- Empy_Legs = "Kara. Pantaloni +1"
- Empy_Feet = "Karagoz Scarpe +1"
- Visucius = {}
- Visucius.DT = {
- name = "Visucius's Mantle",
- augments = {
- "Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20",
- "Accuracy+20 Attack+20",
- "Pet: Accuracy+10 Pet: Rng. Acc.+10",
- 'Pet: Haste+10',
- }
- }
- HercHeadSTR = {
- name = "Herculean Helm",
- augments = {"Accuracy+28", "Weapon skill damage +4%", "STR+11", "Attack+13"}
- }
- HercHeadPDT = {name = "Herculean Helm", augments = {"CHR+7", "Accuracy+29", "Phys. dmg. taken -4%"}}
- HercHeadMAB = {
- name = "Herculean Helm",
- augments = {'Mag. Acc.+20 "Mag.Atk.Bns."+20', "Phys. dmg. taken -2%", '"Mag.Atk.Bns."+15'}
- }
- 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'
- }
- }
- HercBootAcc = {
- name = "Herculean Boots",
- augments = {"MND+9", "Pet: STR+8", '"Treasure Hunter"+2', "Accuracy+18 Attack+18"}
- }
- HercBootDEX = {name = "Herculean Boots", augments = {"Attack+18", '"Triple Atk."+3', "DEX+10"}}
- --- DT
- HercLegsPDT = {name = "Herculean Trousers", augments = {"Damage taken-3%", "Attack+3"}}
- HercGlovesPDT = {name = "Herculean Gloves", augments = {"Phys. dmg. taken -5%", "Accuracy+2"}}
- HercBootsPDT = {name = "Herculean Boots", augments = {"Damage taken-2%", "STR+9", "Attack+7"}}
- HercBootBone = {
- name = "Herculean Boots",
- augments = {"Pet: Accuracy+5 Pet: Rng. Acc.+5", 'Pet: "Dbl.Atk."+2 Pet: Crit.hit rate +2', "Pet: VIT+5"}
- }
- HercLegsPET = {
- name = "Herculean Trousers",
- augments = {"Pet: Attack+21 Pet: Rng.Atk.+21", 'Pet: "Store TP"+10', "Pet: VIT+7"}
- }
- HercLegsPetDEX = {
- name = "Herculean Trousers",
- augments = {"Pet: Attack+10 Pet: Rng.Atk.+10", "Pet: DEX+10", 'Pet: "Mag.Atk.Bns."+3'}
- }
- 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: Accuracy+10 Pet: Rng. Acc.+10",
- "Pet: Haste+10",
- "System: 1 ID: 1247 Val: 2"
- }
- }
- JSECAPESTR = {
- name = "Visucius's Mantle",
- augments = {"STR+20", "Accuracy+20 Attack+20", "STR+5", "Crit.hit rate+10"}
- }
- -- RAO WS
- RAOWShead = {name = "Rao Kabuto", augments = {"STR+10", "DEX+10", "Attack+15"}}
- RAOWShands = {name = "Rao Kote", augments = {"Accuracy+10", "Attack+10", "Evasion+15"}}
- RAOWSlegs = {name = "Rao Haidate", augments = {"Accuracy+20", '"Dbl.Atk."+3', "Pet: Accuracy+20"}}
- RAOWSfeet = {name = "Rao Sune-Ate", augments = {"Accuracy+10", "Attack+10", "Evasion+15"}}
- sets.precast = {}
- -- Precast Sets
- -- Fast cast sets for spells
- sets.precast.FC = {
- 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",
- legs="Rawhide Trousers",
- feet="Regal Pumps +1"}
- sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck = "Magoraga Beads"})
- sets.precast.JA = {}
- -- Precast sets to enhance JAs
- sets.precast.JA["Tactical Switch"] = {feet = Empy_Feet}
- sets.precast.JA["Ventriloquy"] = {legs = Relic_Legs}
- sets.precast.JA["Role Reversal"] = {feet = Relic_Feet}
- sets.precast.JA["Overdrive"] = {feet = Relic_Body}
- sets.precast.JA["Repair"] = {feet="Foire Babouches +1",ear1="Guignol Earring",ear2="Pratik Earring",legs="Desultor Tassets"}
- sets.precast.JA["Maintenance"] = sets.precast.JA["Repair"]
- 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"}
- sets.precast.JA["Activate"] = {back = "Visucius's Mantle"}
- sets.precast.JA["Deus Ex Automata"] = sets.precast.JA["Activate"]
- 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"}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {
- head="Herculean Helm",neck="Unmoving Collar +1",ear2="Roundel Earring",ear1="Soil Pearl",
- body="Passion Jacket",hands="Slither Gloves +1",ring1="Niqmaddu Ring",ring2="Titan Ring",
- back="Iximulew Cape",waist="Warwolf Belt",legs="Samnuha Tights",feet="Rawhide Boots"}
- -- Don't need any special gear for Healing Waltz.
- sets.precast.Waltz["Healing Waltz"] = {}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- head="Hizamaru Somen +2",neck="Fotia Gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
- body="Ryuo Domaru",hands="Hizamaru Kote +1",ring1="Niqmaddu Ring",ring2="Epona's Ring",
- back="Visucius's Mantle",waist="Fotia Belt",legs="Rao Haidate",feet="Hiza. Sune-ate +1"} --"Hiza. Hizayoroi +2"
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS["Stringing Pummel"] = set_combine(sets.precast.WS, {head="Lilitu Headpiece",
- body="Abnoba Kaftan",
- hands={ name="Ryuo Tekko", augments={'STR+10','DEX+10','Accuracy+15',}},
- legs="Ta'lab Trousers",
- feet="Hiza. Sune-ate +1",
- neck="Fotia Gorget",
- waist="Fotia Belt",
- back="Rancorous Mantle",
- })
- sets.precast.WS["Stringing Pummel"].Mod = sets.precast.WS
- sets.precast.WS["Victory Smite"] = set_combine(sets.precast.WS, {neck="Fotia Gorget",
- body="Ryuo Domaru",
- waist="Moonbow Belt",
- ring1="Niqmaddu Ring",
- ring2="Begrudging Ring",
- hands={ name="Ryuo Tekko", augments={'STR+10','DEX+10','Accuracy+15',}},
- legs="Rao Haidate",
- feet={ name="Ryuo Sune-Ate", augments={'STR+10','Attack+20','Crit. hit rate+3%',}},
- back="Dispersal Mantle",
- head="Rao Kabuto"})
- sets.precast.WS["Shijin Spiral"] =
- set_combine(sets.precast.WS, {
- head="Lilitu Headpiece",body="Naga Samue",hands="Rawhide Gloves",legs="Samnuha Tights",neck="Fotia Gorget",waist="Fotia Belt"
- })
- sets.precast.WS["Howling Fist"] = set_combine(sets.precast.WS, {
- })
- -- Midcast Sets
- sets.midcast = {}
- sets.midcast.FastRecast = {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="Switch Cape",waist="Witful Belt",
- legs="Rawhide Trousers",
- feet="Regal Pumps +1"}
- -- Midcast sets for pet actions
- sets.midcast.Pet = {}
- 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"}
- sets.midcast.Pet["Elemental Magic"] = {
- 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"
- }
- 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"}
- 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"}
- 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"}
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
- 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"}
- --Chimera Ripper, String Clipper
- sets.midcast.Pet.WS["STR"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
- -- Bone crusher, String Shredder
- sets.midcast.Pet.WS["VIT"] =
- set_combine(
- sets.midcast.Pet.WeaponSkill,
- {waist = "Incarnation Sash",}
- )
- -- Cannibal Blade
- sets.midcast.Pet.WS["MND"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
- -- Armor Piercer, Armor Shatterer
- sets.midcast.Pet.WS["DEX"] = set_combine(sets.midcast.Pet.WeaponSkill, {})
- -- Arcuballista, Daze
- sets.midcast.Pet.WS["DEXFTP"] =
- set_combine(sets.midcast.Pet.WS["DEX"], {head = Empy_Head, back = "Dispersal Mantle"})
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {
- head="Pitre Taj +1",neck="Sanctity Necklace",
- 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"
- }
- -- Idle sets
- sets.idle = {main="Ohtas",ammo="Automat. Oil +3",
- head="Pitre Taj +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Infused Earring",
- body="Hiza. Haramaki +2",hands="Rao Kote",ring1="Matrimony Ring",ring2="Defending Ring",
- back="Contriver's Cape",waist="Isa Belt",legs="Rao Haidate",feet="Hermes' Sandals"}
- sets.idle.Town = sets.idle
- ------------------------------------------------------------------ PET SETS
- -- Set for idle while pet is out (eg: pet regen gear)
- sets.idle.Pet = sets.idle
- -- Idle sets to wear while pet is engaged
- sets.idle.Pet.Engaged = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
- head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
- body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
- sets.idle.Pet.EngagedO = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
- head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
- body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
- sets.idle.Pet.Engaged = sets.idle.Pet.EngagedO
- sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {legs = "Kara. Pantaloni +1"})
- sets.idle.Pet.Engaged.Nuke =
- set_combine(sets.idle.Pet.Engaged, {legs = Relic_Legs, feet = Relic_Feet, ear1 = "Burana Earring"})
- sets.idle.Pet.Engaged.Magic =
- set_combine(sets.idle.Pet.Engaged, {legs = Relic_Legs, feet = Relic_Feet, ear1 = "Burana Earring"})
- sets.petTank = {main="Midnights",range="Animator P +1",ammo="Automat. Oil +3",
- head="Rao Kabuto",neck="Empath Necklace",ear1="Handler's Earring +1",ear2="Enmerkar Earring",
- body="Rao Togi",hands="Rao Kote",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Isa Belt",legs="Tali'ah Sera. +1",feet="Rao Sune-Ate"}
- --PET Enmity Armor goes here
- sets.petEnmity = {
- }
- -- Defense sets
- sets.defense = {}
- sets.defense.Evasion = {
- head = "Whirlpool Mask",
- neck = "Loricate Torque",
- body = "Otronif Harness +1",
- hands = "Otronif Gloves",
- ring1 = "Defending Ring",
- ring2 = "Beeline Ring",
- back = "Ik Cape",
- waist = "Incarnation Sash",
- legs = "Nahtirah Trousers",
- feet = "Otronif Boots +1"
- }
- sets.defense.PDT = {
- head = Relic_Head,
- body = "Udug Jacket",
- hands = "Herculean Gloves",
- legs = "Herculean Trousers",
- feet = "Herculean Boots",
- neck = "Warder's Charm +1",
- waist = "Moonbow Belt",
- left_ear = "Dominance Earring",
- right_ear = "Handler's Earring +1",
- left_ring = "Supershear Ring",
- right_ring = "Kunaji Ring",
- back = "Moonbeam Cape"
- }
- sets.defense.MDT = {
- head = Relic_Head,
- body = "Udug Jacket",
- hands = "Herculean Gloves",
- legs = "Herculean Trousers",
- feet = "Herculean Boots",
- neck = "Warder's Charm +1",
- waist = "Moonbow Belt",
- left_ear = "Dominance Earring",
- right_ear = "Handler's Earring +1",
- left_ring = "Supershear Ring",
- right_ring = "Kunaji Ring",
- back = "Moonbeam Cape"
- }
- sets.Kiting = {feet = "Hermes' Sandals"}
- -- Engaged sets
- -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
- -- sets if more refined versions aren't defined.
- -- If you create a set with both offense and defense modes, the offense mode should be first.
- -- EG: sets.engaged.Dagger.Accuracy.Evasion
- -- Normal melee group
- sets.aftercast = sets.idle
- --Pet Only
- sets.engaged = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
- head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
- body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
- --Pet+Master
- sets.engagedN = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
- head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
- body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
- --Master ONLY
- sets.engagedMO = {ammo="Automat. Oil +3",
- head="Herculean Helm",neck="Asperity Necklace",ear1="Brutal Earring",ear2="Cessance Earring",
- body="Tali'ah Manteel +1",hands="Herculean Gloves",ring1="Niqmaddu Ring",ring2="Epona's Ring",
- 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',}}
- }
- --Pet Affected
- sets.engaged.Acc = {main="Ohtas",range="Animator P +1",ammo="Automat. Oil +3",
- head="Tali'ah Turban +1",neck="Empath Necklace",ear2="Enmerkar Earring",ear1="Domes. Earring",
- body="Pitre Tobe +1",hands="Regimen Mittens",ring1="Varar Ring",ring2="Varar Ring",
- back="Visucius's Mantle",waist="Incarnation Sash",legs="Tali'ah Sera. +1",feet="Naga Kyahan"}
- --Pet
- sets.engaged.DT = {
- head = Relic_Head,
- body = "Udug Jacket",
- hands = "Herculean Gloves",
- legs = "Herculean Trousers",
- feet = "Herculean Boots",
- neck = "Warder's Charm +1",
- waist = "Moonbow Belt",
- left_ear = "Dominance Earring",
- right_ear = "Handler's Earring +1",
- left_ring = "Supershear Ring",
- right_ring = "Kunaji Ring",
- back = "Moonbeam Cape"
- }
- --Pet
- sets.engaged.Acc.DT = {
- head = Relic_Head,
- body = "Udug Jacket",
- hands = "Herculean Gloves",
- legs = "Herculean Trousers",
- feet = "Herculean Boots",
- neck = "Warder's Charm +1",
- waist = "Moonbow Belt",
- left_ear = "Dominance Earring",
- right_ear = "Handler's Earring +1",
- left_ring = "Supershear Ring",
- right_ring = "Kunaji Ring",
- back = "Moonbeam Cape"
- }
- end
- function user_setup()
- set_macros(1, 7) --First Value is Sheet and second is Book
- determinePuppetType()
- setupTextWindow()
- end
- function set_macros(sheet,book)
- if book then
- send_command('@input /macro book '..tostring(book)..';wait .1;input /macro set '..tostring(sheet))
- else
- send_command('@input /macro set '..tostring(sheet))
- end
- end
- ------------------------------------------------------------------------------------------------------------------------
- --------------------------------- DO NOT EDIT BELOW UNLESS YOU KNOW WHAT YOU ARE DOING ---------------------------------
- ------------------------------------------------------------------------------------------------------------------------
- -------------------------------
- --------Global Variables-------
- -------------------------------
- Current_Maneuver = 0
- Auto_Maneuver = false
- OverPower = false
- OverCount = 0
- NextWS = ""
- Master_State = "Idle"
- Pet_State = "Idle"
- Hybrid_State = "Idle"
- Flashbulb_Timer = 45
- Strobe_Timer = 30
- Strobe_Recast = 0
- Flashbulb_Recast = 0
- Flashbulb_Time = 0
- Strobe_Time = 0
- pdt = 0
- Pos_X = 1400
- Pos_Y = 600
- d_mode = false
- visible = true
- time_start = os.time()
- --Default To Set Up the Text Window
- function setupTextWindow()
- tb_name = "pup_gs_helper"
- bg_visible = true
- textinbox = ' '
- windower.text.create(tb_name)
- -- table_name, x, y
- windower.text.set_location(tb_name, Pos_X, Pos_Y)
- -- transparency, rgb
- windower.text.set_bg_color(tb_name, 200, 40, 40, 55)
- windower.text.set_color(tb_name, 255, 147, 161, 161)
- windower.text.set_font(tb_name, "Arial")
- windower.text.set_font_size(tb_name, 11)
- windower.text.set_bold(tb_name, true)
- windower.text.set_italic(tb_name, false)
- windower.text.set_text(tb_name, textinbox)
- windower.text.set_bg_visibility(tb_name, bg_visible)
- windower.text.set_visibility(tb_name, visible)
- end
- --Used to calculate the Hybrid State of you and your pet
- function TotalSCalc()
- if ActualMode == "DD" then
- if buffactive['Overdrive'] then
- Hybrid_State = "Overdrive"
- elseif Master_State == "Idle" and Pet_State == "Idle" then
- Hybrid_State = "Idle"
- elseif Master_State == "Idle" and Pet_State == "Engaged" then
- Hybrid_State = "Pet Only"
- elseif Master_State == "Engaged" and Pet_State == "Engaged" then
- Hybrid_State = "Pet+Master"
- elseif Master_State == "Engaged" and Pet_State == "Idle" then
- Hybrid_State = "Master Only"
- end
- elseif ActualMode == "TANK" then
- if Pet_State == "Idle" then
- Hybrid_State = "Idle"
- else
- Hybrid_State = "Tank"
- end
- else
- Pet_State = "MAGE"
- if Master_State == "Idle" then
- Hybrid_State = "Idle"
- else
- Hybrid_State = "Master Only"
- end
- end
- end
- --Determines Gear based on that Hybrid Set
- function determineGearSet()
- if ActualMode == "TANK" then
- sets.aftercast = sets.petTank
- elseif Hybrid_State == "Idle" then
- sets.aftercast = sets.idle
- elseif Hybrid_State == "Master Only" then
- sets.aftercast = sets.engagedMO
- elseif Hybrid_State == "Pet Only" then
- sets.aftercast = sets.engaged
- elseif Hybrid_State == "Pet+Master" then
- sets.aftercast = sets.engagedN
- elseif Hybrid_State == "Overdrive" then
- sets.aftercast = sets.engaged
- end
- equip(sets.aftercast)
- end
- function refreshWindow()
- textinbox = ' '
- textColorNewLine = '\\cr \n'
- textColorEnd = ' \\cr'
- textColor = '\\cs(125, 125, 0)'
- if pet.isvalid then
- drawPetInfo()
- drawPetSkills()
- end
- textinbox = textinbox..drawTitle(' Mode ')
- textinbox = textinbox..textColor..'Pet Mode : '..ActualMode..textColorNewLine
- textinbox = textinbox..textColor..'Pet Style : '..ActualSubMode..textColorNewLine
- textinbox = textinbox..drawTitle(' State ')
- textinbox = textinbox..textColor..'Master : '..Master_State..textColorNewLine
- textinbox = textinbox..textColor..'Pet : '..Pet_State..textColorNewLine
- textinbox = textinbox..textColor..'Hybrid : '..Hybrid_State..textColorNewLine
- textinbox = textinbox..drawTitle(' Options ')
- textinbox = textinbox..textColor..'Auto Maneuver : '..ternary(Auto_Maneuver, 'ON', 'OFF')..textColorNewLine
- --Debug Variables that are used for testing
- if d_mode then
- textinbox = textinbox..drawTitle("DEBUG")
- textinbox = textinbox..textColor..'Current Maneuvers : '..Current_Maneuver..textColorNewLine
- end
- windower.text.set_text(tb_name, textinbox)
- end
- function drawPetInfo()
- textinbox = textinbox..drawTitle('Pet Info')
- textinbox = textinbox..'- \\cs(0, 0, 125)HP : '..pet.hp..'/'..pet.max_hp..textColorNewLine
- textinbox = textinbox..'- \\cs(0, 125, 0)MP : '..pet.mp..'/'..pet.max_mp..textColorNewLine
- textinbox = textinbox..'- \\cs(255, 0, 0)TP : '..tostring(pet.tp)..textColorNewLine
- end
- function drawPetSkills()
- --- Recast for enmity gears
- if ActualMode == "TANK" then
- textinbox = textinbox..drawTitle("Pet Skills")
- -- Strobe recast
- if Strobe_Recast == 0 then
- if buffactive['Fire Maneuver'] then
- textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(125,0,0)Strobe\\cr \n'
- else
- textinbox = textinbox..'\\cs(125, 125, 125)- Strobe\\cr \n'
- end
- else
- textinbox = textinbox..'\\cs(125, 125, 125)- Strobe ('..Strobe_Recast..')\\cr \n'
- end
- -- Flashbulb recast
- if Flashbulb_Recast == 0 then
- if buffactive['Light Maneuver'] then
- textinbox = textinbox..'\\cs(125, 125, 125)-\\cr \\cs(255,255,255)Flashbulb\\cr \n'
- else
- textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb\\cr \n'
- end
- else
- textinbox = textinbox..'\\cs(125, 125, 125)- Flashbulb ('..Flashbulb_Recast..')\\cr \n'
- end
- end
- end
- --Creates the Title for a section in the Text Screen
- function drawTitle(title)
- return '\\cs(255, 115, 0)'..pad(tostring(title), 6, '=')..'\\cr \n'
- end
- ------------------------------------
- ----------Windower Hooks------------
- ------------------------------------
- --Auto Boost on Certain WS
- function precast(spell,action)
- if spell.english == "Deploy" and pet.tp >= 850 then
- if ActualMode == "TANK" then
- -- Nothing
- else
- equip(sets.midcast.Pet.WeaponSkill)
- end
- elseif string.find(spell.english,'Maneuver') then
- equip(sets.precast.JA.Maneuver)
- elseif sets.precast.JA[spell.english] then
- equip(sets.precast.JA[spell.english])
- elseif sets.precast.WS[spell.english] then
- equip(sets.precast.WS[spell.english])
- if Hybrid_State == "Pet+Master" then
- sets.aftercast = sets.midcast.Pet.WeaponSkill
- end
- else
- equip(sets.precast.FC)
- end
- end
- function midcast(spell,action)
- end
- function aftercast(spell,action)
- enable("ear1")
- if spell.name == null then
- return -- Cancel Aftercast for outofrange/unable to see.
- end
- 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
- ws = SC[pet.frame][spell.english]
- modif = Modifier[ws]
- add_to_chat(392,'*-*-*-*-*-*-*-*-* [ '..pet.name..' is about to '..ws..' ('..modif..') ] *-*-*-*-*-*-*-*-*')
- equip(sets.midcast.Pet.WS[modif])
- else
- if sets.precast.WS[spell.english] and Hybrid_State == "Pet+Master" then
- equip(sets.aftercast)
- else
- determineGearSet()
- end
- end
- end
- function status_change(new,old)
- if new == 'Engaged' then
- Master_State = "Engaged"
- TotalSCalc()
- add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Engaged ] *-*-*-*-*-*-*-*-*')
- else
- Master_State="Idle"
- TotalSCalc()
- add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Idle ] *-*-*-*-*-*-*-*-*')
- end
- determineGearSet()
- end
- function pet_status_change(new,old)
- if new == 'Engaged' then
- Pet_State = "Engaged"
- TotalSCalc()
- add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetEngaged ] *-*-*-*-*-*-*-*-*')
- else
- Pet_State="Idle"
- TotalSCalc()
- add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetIdle ] *-*-*-*-*-*-*-*-*')
- end
- determineGearSet()
- end
- function pet_aftercast(spell)
- determineGearSet()
- end
- function buff_change(status,gain_or_loss, buff_table)
- if status == "sleep" then
- if gain_or_loss then
- equip(set_combine(sets.defense.PDT, {neck="Opo-opo Necklace"}))
- end
- end
- --When you are at 3 Maneuvers and you use the ability you will temporarily go to 4
- --This helps prevent you from trying to cast on losing a buff
- if status:contains("Maneuver") and gain_or_loss then
- Current_Maneuver = Current_Maneuver + 1
- refreshWindow()
- elseif Current_Maneuver > 0 then -- We don't want to see a negative count
- Current_Maneuver = Current_Maneuver - 1
- refreshWindow()
- end
- --Now we can turn on and off the functionailty of automatically maintaining manuevers
- if Auto_Maneuver then
- if status:contains("Maneuver") and gain_or_loss == false and Current_Maneuver < 3 then
- send_command('input /ja "'..status..'" <me>')
- end
- end
- if status == "Overdrive" then
- if gain_or_loss then
- OverPower = true
- OverCount = 1
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
- else
- OverPower = false
- OverCount = 0
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
- end
- end
- end
- windower.raw_register_event('zone change', reset_timers)
- -- Toggles -- SE Macros: /console gs c "command" [case sensitive]
- function self_command(command)
- local current_command = string.upper(command)
- local current_command_table = {}
- if #current_command:split(' ') >= 2 then
- current_command_table = T(current_command:split(' '))
- end
- if type(current_command_table) == 'table' then --We have a multiple inputs
- if current_command_table[1] == "MODE" then
- if PetMode[current_command_table[2]] then
- add_to_chat("Changing Mode To: "..current_command_table[2])
- ActualMode = current_command_table[2]
- if current_command_table[2] == 'TANK' then
- if PetSubMode["TANK"][current_command_table[3]] then
- ActualSubMode = current_command_table[3]
- else
- ActualSubMode = "NORMAL"
- end
- add_to_chat("Changing Pet Style To "..ActualSubMode)
- elseif current_command_table[2] == 'MAGE' then
- if PetSubMode["MAGE"][current_command_table[3]] then
- ActualSubMode = current_command_table[3]
- else
- ActualSubMode = "NORMAL"
- end
- add_to_chat("Changing Pet Style To "..ActualSubMode)
- elseif current_command_table[2] == 'DD' then
- if PetSubMode["DD"][current_command_table[3]] then
- ActualSubMode = current_command_table[3]
- else
- ActualSubMode = "NORMAL"
- end
- add_to_chat("Changing Pet Style To "..ActualSubMode)
- else
- add_to_chat("Unable to determine Pet Style: "..current_command_table[3])
- end
- else
- add_to_chat("Unable to determine Pet Mode: ".. current_command_table[2])
- end
- elseif current_command_table[1] == "PUPHELPER" then
- if type(current_command_table[2]) == 'number' and type(current_command_table[3]) == 'number' then
- Pos_X = tonumber(current_command_table[2])
- Pos_Y = tonumber(current_command_table[3])
- elseif current_command_table[2] == 'VISIBLE' then
- windower.text.set_visibility(tb_name, not visible)
- end
- end
- refreshWindow()
- end
- if current_command == 'PDT' then
- elseif current_command == 'AUTOMAN' then
- Auto_Maneuver = not Auto_Maneuver
- refreshWindow()
- elseif current_command == 'DEBUG' then
- d_mode = not d_mode
- refreshWindow()
- elseif current_command == 'PREDICT' then
- determinePuppetType()
- refreshWindow()
- end
- end
- windower.register_event('prerender', function()
- --Items we want to check every second
- --TODO Further Testing
- if os.time() > time_start then
- time_start = os.time()
- if ActualMode == "TANK" then
- if buffactive['Fire Maneuver'] then
- if Strobe_Recast <= 1 then
- equip(sets.petEnmity)
- end
- end
- if buffactive['Light Maneuver'] then
- if Flashbulb_Recast <= 1 then
- equip(sets.petEnmity)
- end
- end
- end
- if Strobe_Recast > 0 then
- Strobe_Recast = Strobe_Timer -(os.time() - Strobe_Time)
- end
- if Flashbulb_Recast > 0 then
- Flashbulb_Recast = Flashbulb_Timer -(os.time() - Flashbulb_Time)
- end
- TotalSCalc()
- if sets.aftercast == sets.idle then
- else
- if Hybrid_State == "Idle" then
- sets.aftercast = sets.idle
- equip(sets.aftercast)
- end
- end
- if ActualMode == "TANK" then
- -- Nothing
- elseif Hybrid_State == "Pet Only" or Hybrid_State == "Overdrive" then
- if pet.tp >= 950 then
- equip(sets.midcast.Pet.WeaponSkill)
- else
- equip(sets.aftercast)
- end
- end
- refreshWindow()
- end
- end)
- RWSTrigger = S{"Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
- MWSTrigger = S{"Slapstick", "Knockout", "Chimera Ripper", "String Clipper", "Cannibal Blade", "Bone Crusher", "String Shredder"}
- HPWSTrigger = S{"Magic Mortar"}
- wscount=0
- --- Delve Assistant
- windower.register_event('incoming text', function(original, modified, mode)
- local match
- -- OVERDRIVE OPTIMIZER
- if buffactive["Overdrive"] then
- match = original:match(pet.name..' readies ([%s%w]+)%.')
- if match=="Daze" then
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
- refreshWindow()
- OverCount = 2
- elseif match=="Arcuballista" then
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
- refreshWindow()
- OverCount = 3
- elseif match=="Armor Shatterer" then
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
- refreshWindow()
- OverCount = 4
- elseif match=="Armor Piercer" then
- sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
- refreshWindow()
- OverCount = 1
- end
- end
- -- Checking timer for enmity sets
- if ActualMode == "TANK" then
- if buffactive['Fire Maneuver'] then
- if original:contains(pet.name) and original:contains("Provoke") then
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Strobe done ] *-*-*-*-*-*-*-*-*')
- Strobe_Time = os.time()
- Strobe_Recast = Strobe_Timer
- refreshWindow()
- determineGearSet()
- end
- end
- if buffactive['Light Maneuver'] then
- if original:contains(pet.name) and original:contains("Flashbulb") then
- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Flashbulb done ] *-*-*-*-*-*-*-*-*')
- Flashbulb_Time = os.time()
- Flashbulb_Recast = Flashbulb_Timer
- refreshWindow()
- determineGearSet()
- end
- end
- end
- return modified, mode
- end)
- function sub_job_change(new,old)
- determinePuppetType()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement