|
PUP Gearswap WIP
Phoenix.Faloun
サーバ: Phoenix
Game: FFXI
Posts: 81
By Phoenix.Faloun 2018-07-02 07:32:14
Hello everyone,
Just a little post to share my pup gearswap lua, which is still in progress :
Actually it support tank automaton, and dd automaton, but I wrote nothing for mage automatons yet
Here is link for it :
- PUP lua : https://pastebin.com/7aVYsMsr
- PUP include (needed, but for future improvement) : https://pastebin.com/ihpG04Tt
- My autocontrol setting(the addon that switch attachment sets) : https://pastebin.com/qNfWDkTc
Last one is needed cause the PUP lua will automatically switch attachment sets when you ask him to
To setup your automaton, you need to say to yourself "Mode", then it'll ask you for Tank, DD...(Only Tank and DD works atm)
Then it'll ask you for different mode of tanks(PDT, MDT), and different mode of DDs(Normal, Boneslayer, WS Spammer, Overdrive, and Overdrive with tons of acc)
When you are on Tank mode, it'll automatically switch to pet:enmity+ set when flashbulb or strobe is ready :
YouTube Video Placeholder
When you are on Normal or Boneslayer DD mode :
The lua will try to guess which ws your pet will use once you used a ws if you melee with pet. If you let pet fight alone, it'll switch to petws gear once the pet have enough tp to ws)
When on Overdrive Mode (with Overdrive buff on), it'll try to guess which ws is next for your pet :
YouTube Video Placeholder
Hope you'll enjoy it
Tell me if you find bugs to fix
Tell me if you have any idea to improve this lua
Have a nice day
Asura.Psylo
サーバ: Asura
Game: FFXI
Posts: 446
By Asura.Psylo 2018-07-02 08:47:09
Gonna check this ! (joli boulot si ça marche vraiment)
Phoenix.Faloun
サーバ: Phoenix
Game: FFXI
Posts: 81
By Phoenix.Faloun 2018-07-02 11:54:26
Btw, autocontrol file is set for 1200JP pup
サーバ: Ragnarok
Game: FFXI
Posts: 91
By Ragnarok.Neyochimaru 2018-07-03 06:53:22
pup include, line 71, you misspelled 'Snapshot'
Phoenix.Faloun
サーバ: Phoenix
Game: FFXI
Posts: 81
By Phoenix.Faloun 2018-07-03 08:35:00
True strike. This file isn't really needed yet. It's something I'm working on To display automaton buffs and potency depending on current maneuvers used
サーバ: Asura
Game: FFXI
Posts: 81
By Asura.Fabiano 2018-07-03 09:57:52
This looks awesome!
I didn't get a chance to try it out yet, but I'll definitely be checking it out as soon as I can and will let you know my thoughts.
Quetzalcoatl.Xilkk
サーバ: Quetzalcoatl
Game: FFXI
Posts: 1411
By Quetzalcoatl.Xilkk 2018-07-03 11:00:18
I would suggest setting up aliases or binding a toggle key to change the PetMode instead of sending yourself tells. sending tells seems a little strange. binding a key to a toggle command is a well used practice and more convenient.
I'm really interested in how this goes forward also.
One problem w/ Mote's is that it selects pet mode based on head choice. Which doesn't really work right. I've a mage tank setup using Harleyquin body and soulsouther head. the body/head choice all scream "MAGE!" but the attachment layout is very much a tank.
I'll include a modified snippit that I pilfered from Falkirk's bst lua:
Code state.PetMode = M{['description']='Pet Mode', 'Tank', 'Melee', 'WHM, 'RDM', 'BLM'}
send_command('bind !f8 gs c cycle PetMode')
Phoenix.Faloun
サーバ: Phoenix
Game: FFXI
Posts: 81
By Phoenix.Faloun 2018-07-03 11:51:43
When you have too many choices binding cycle keys can be boring. Sending a tell to yourself is easier, I think. That's what I use for my corsair gearswap(which is more finished). It can seem weird at start but I like it that way.
[+]
Quetzalcoatl.Xilkk
サーバ: Quetzalcoatl
Game: FFXI
Posts: 1411
By Quetzalcoatl.Xilkk 2018-07-13 16:16:34
I've been trying to wrap my head around your lua, in hopes of adding the functionality into a mote-based lua.
I see your pup_include does not have all the attachments yet, it only has 3 elementals worth, though it looks like it would not be hard to simply fill in the data portions of it.
I'm not very good at lua coding. I was hoping for some Meta data in your lua to try to understand your functions better.
If I understand correctly, the TotalSCalc() function is for organizing which status has priority for gear selection. This is a combination of master and pet idle vs engaged status AND what mode of fighting you are doing, which is mostly whether you are tanking or DD.
I'm also assuming the Skillchain table is for predicting what skillchain the automaton will use, following a skillchain from the master.
Is more of a table needed when the automaton is skill-chaining from itself?
would it be possible to put some notes on each function describing the purpose?
I have alot of functionality moved from Falkirk's bst lua, that I really like on pup that I dont' want to lose. but ofcourse i would love to add the fantastic code you built.
By Sylph.Atigevomega 2018-07-28 09:34:20
Faloun this looks amazing, i am so going to try it out today.
Asura.Psylo
サーバ: Asura
Game: FFXI
Posts: 446
By Asura.Psylo 2018-07-28 17:40:50
I'm have made some test, but i have some issue.
after a ws, all the gear don't go back to the initial set (for me was the iddle set), main hands stay in petWs set etc.
By Teuphist 2018-08-02 07:45:10
I like that it determines which WS the Automaton will use next and swaps to the proper gear. Will it change again if the determined WS changes due to a change in the upcoming SC property? I may have missed it in the video if so.
Necro Bump Detected!
[47 days between previous and next post]
Asura.Tureni
サーバ: Asura
Game: FFXI
Posts: 3
By Asura.Tureni 2018-09-17 23:44:57
This is awesome. Please keep us updated on the progress. I'm glad there are players still working on PUP gearswaps. My feeble coding skills can't come up with anything useful or that actually works the majority of the time :(
Carbuncle.Kyawind
サーバ: Carbuncle
Game: FFXI
Posts: 49
By Carbuncle.Kyawind 2018-10-10 11:31:23
anyone know how do i remove , the UI on the screen???
Carbuncle.Kyawind
サーバ: Carbuncle
Game: FFXI
Posts: 49
By Carbuncle.Kyawind 2018-10-10 12:52:52
having trouble... i cant use the manuvers i want myself.. it just keeps locking into doing those 3... help...
By mohgeroth 2018-10-10 13:25:12
Quote: anyone know how do i remove , the UI on the screen???
Line 154: change to "visible = false" --- Will hide the box background
Comment out line 326 "windower.text.set_text(tb_name, textinbox)"
This will prevent the texbox from being set with all that text.
It's much more work to remove all the bits that fill up the UI that's shown so the simple solution is just to keep it empty and hide it without changing the rest of the Lua.
I'm not home to test this (car getting serviced). Will look into your second question.
By mohgeroth 2018-10-10 13:29:47
Quote: having trouble... i cant use the manuvers i want myself.. it just keeps locking into doing those 3... help...
Around line 859 it appears to me that this is where this is occurring. I need the client to test to confirm, but in that function is some bits that send out the /ja command to use a maneuver.
In both this case and the one above I'm referring to the "Pup.lua" file.
Good luck Kya!
Carbuncle.Kyawind
サーバ: Carbuncle
Game: FFXI
Posts: 49
By Carbuncle.Kyawind 2018-10-10 14:44:06
ok thx ^^
Carbuncle.Kyawind
サーバ: Carbuncle
Game: FFXI
Posts: 49
By Carbuncle.Kyawind 2018-10-10 14:47:21
the line 859 around there dono which code it is..
moh if u can maybe have the line like u did with 326 list it out so i can see thx ^^
Necro Bump Detected!
[55 days between previous and next post]
By Blackhalo714 2018-12-04 04:21:13
Did you find a way to be able to code this different so can freely use maneuvers? Also having a issue where in Tank-PDT mode it starts me off in correct Petdt gear. Activating a light or fire maneuver will change to petenmity gear like it should. But will not switch back. After troubleshooting the one I modified- I went back and used the authors original one. But it was doing the same thing. In his video you can see his gear changing correctly. So I have no idea what is wrong.
By Katyusha 2018-12-06 19:22:58
Did you find a way to be able to code this different so can freely use maneuvers? Also having a issue where in Tank-PDT mode it starts me off in correct Petdt gear. Activating a light or fire maneuver will change to petenmity gear like it should. But will not switch back. After troubleshooting the one I modified- I went back and used the authors original one. But it was doing the same thing. In his video you can see his gear changing correctly. So I have no idea what is wrong. Code
include("Pup_include.lua")
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'}}
HercGlovesTA = { name="Herculean Gloves", augments={'Accuracy+29','"Triple Atk."+3','STR+5','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'}}
include('organizer-lib')
JSECAPEPetHaste = {name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3'}}
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'}}
RMasterS = "Idle"
MasterS = "Idle"
PetS = "Idle"
TotalS = "Idle"
flashbulbtimer = 40
strobetimer = 25
stroberecast = 0
flashbulbrecast = 0
flashbulbtime = 0
strobetime = 0
pdt = 0
function TotalSCalc()
if ActualMode == "DD" then
if buffactive['Overdrive'] then
TotalS = "Overdrive"
elseif MasterS == "Idle" and PetS == "Idle" then
TotalS = "Idle"
elseif MasterS == "Idle" and PetS == "Engaged" then
TotalS = "Pet Only"
elseif MasterS == "Engaged" and PetS == "Engaged" then
TotalS = "Pet+Master"
elseif MasterS == "Engaged" and PetS == "Idle" then
TotalS = "Master Only"
end
elseif ActualMode == "Tank" then
if PetS == "Idle" then
TotalS = "Idle"
else
TotalS = "Tank"
end
else
PetS = "Mage"
if MasterS == "Idle" then
TotalS = "Idle"
else
TotalS = "Master Only"
end
end
end
Burden = 0
BurdenLimit = 30+50
Mane = {"Wind","Fire", "Light"}
ManeRound = 1
TypeM = S{"Fire", "Water", "Earth", "Wind", "Dark", "Light", "Ice", "Thunder" }
--- SKILLCHAIN TABLE
SC = {}
SC['Valoredge Frame'] = {}
SC['Sharpshot Frame'] = {}
SC['Harlequin Frame'] = {}
SC['Valoredge Frame']['Stringing Pummel'] = "String Shredder"
SC['Valoredge Frame']['Victory Smite'] = "String Shredder"
SC['Valoredge Frame']['Shijin Spiral'] = "Bone Crusher"
SC['Valoredge Frame']['Howling Fist'] = "String Shredder"
SC['Sharpshot Frame']['Stringing Pummel'] = "Armor Shatterer"
SC['Sharpshot Frame']['Victory Smite'] = "Armor Shatterer"
SC['Sharpshot Frame']['Shijin Spiral'] = "Armor Piercer"
SC['Sharpshot Frame']['Howling Fist'] = "Arcuballista"
SC['Sharpshot Frame']['Dragon Kick'] = "Armor Shatterer"
SC['Sharpshot Frame']['One Inch Punch'] = "Daze"
SC['Sharpshot Frame']['Spinning Attack'] = "Armor Shatterer"
SC['Sharpshot Frame']['Base'] = "Arcuballista"
SC['Harlequin Frame']['Stringing Pummel'] = "Slapstick"
SC['Harlequin Frame']['Victory Smite'] = "Magic Mortar"
SC['Harlequin Frame']['Shijin Spiral'] = "Slapstick"
SC['Harlequin Frame']['Howling Fist'] = "Knockout"
Modifier = {}
Modifier['String Shredder'] = "VIT"
Modifier['Bone Crusher'] = "VIT"
Modifier['Armor Shatterer'] = "DEX"
Modifier['Armor Piercer'] = "DEX"
Modifier['Arcuballista'] = "DEXFTP"
Modifier['Daze'] = "DEXFTP"
Modifier['Slapstick'] = "DEX"
Modifier['Knockout'] = "AGI"
Colors = {}
Colors["Fire"] = "\\cs(102, 0, 0)"
Colors["Water"] = "\\cs(0, 51, 102)"
Colors["Wind"] = "\\cs(51, 102, 0)"
Colors["Dark"] = "\\cs(0, 0, 0)"
Colors["Light"] = "\\cs(255, 255, 255)"
Colors["Earth"] = "\\cs(139, 69, 19)"
Colors["Ice"] = "\\cs(0, 204, 204)"
Colors["Thunder"] = "\\cs(51, 0, 102)"
--- Pet modes references
PetMode = S{"Tank", "DD", "BLM", "RDM", "WHM"}
PetSubMode = {}
PetSubMode["Tank"] = {"PDT", "MDT", "Range"}
PetSubMode["DD"] = {"Normal", "Bone", "Spam", "OD", "ODAcc"}
NSubMode = {}
NSubMode["Tank"] = 3
NSubMode["DD"] = 5
ActualMode = "DD"
ActualSubMode = "Normal"
--- Styles Maneuvers and autocontrol
Style={}
-- Tank Ones
Style["PDT"] = {"paladin", "Light", "Fire", "Earth"}
Style["MDT"] = {"runefencer", "Light", "Fire", "Water"}
Style["Range"] = {"Sharptank", "Light", "Fire", "Wind"}
-- DD Ones
Style["Normal"] = {"dd", "Light", "Fire", "Wind"}
Style["Bone"] = {"boneslayer", "Light", "Fire", "Wind"}
Style["Spam"] = {"ddspam", "Light", "Fire", "Wind"}
Style["OD"] = {"overdrive", "Light", "Fire", "Thunder"}
Style["ODAcc"] = {"overdriveacc", "Light", "Fire", "Thunder"}
tb_name = "puphelp"
visible = true
textinbox = ''
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'
--textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
windower.text.create(tb_name)
windower.text.set_location(tb_name, 700, 150)
windower.text.set_bg_color(tb_name, 200, 96, 96, 96)
windower.text.set_color(tb_name, 255, 147, 161, 161)
windower.text.set_font(tb_name, "Arial")
windower.text.set_font_size(tb_name, 10)
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, visible)
local player = windower.ffxi.get_player()
function optic()
value = 0
ofone = 0
oftwo = 0
if pet.attachments["Optic Fiber"] then
if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
ofone = Attach["Light"]["Optic Fiber"][5]
elseif buffactive["Light Maneuver"] then
ofone = Attach["Light"]["Optic Fiber"][3]
elseif buffactive["Light Maneuver"] == 2 then
ofone = Attach["Light"]["Optic Fiber"][4]
elseif buffactive["Light Maneuver"] == 3 then
ofone = Attach["Light"]["Optic Fiber"][5]
else
ofone = Attach["Light"]["Optic Fiber"][2]
end
end
if pet.attachments["Optic Fiber II"] then
if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
ofone = Attach["Light"]["Optic Fiber II"][5]
elseif buffactive["Light Maneuver"] then
ofone = Attach["Light"]["Optic Fiber II"][3]
elseif buffactive["Light Maneuver"] == 2 then
ofone = Attach["Light"]["Optic Fiber II"][4]
elseif buffactive["Light Maneuver"] == 3 then
ofone = Attach["Light"]["Optic Fiber II"][5]
else
ofone = Attach["Light"]["Optic Fiber II"][2]
end
end
value = 1+ofone+oftwo
return value
end
function get_maneuver()
j = 1
textinbox=""
textt={}
--print(Attach["Fire"][Attach["Fire"][1]][1])
while j <= NA do
i = 1
textt[j] = ""
--print(MAN[j].."-"..NAttach[MAN[j]])
-- For each maneuver
while i <= NAttach[MAN[j]] do
mani={}
-- Search each attachment if its active
if pet.attachments[Attach[MAN[j]][i]] then
-- Look for the bonus that delivers
Bonus=""
Bonus = Attach[MAN[j]][Attach[MAN[j]][i]][1]
if Attach[MAN[j]][i] ~= "Optic Fiber" or Attach[MAN[j]][i] ~= "Optic Fiber II" then
if buffactive[MAN[j].." Maneuver"] then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]
end
elseif buffactive[MAN[j].." Maneuver"] == 2 then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]
end
elseif buffactive[MAN[j].." Maneuver"] == 3 then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]
end
else
-- TYpe de bonus, %, Int ou String
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]
end
end
end
textt[j]= textt[j]..""..Bonus.." +"..BonusCalc.."\n"
end
i=i+1
end
textinbox = textinbox..' \\cs(255, 0, 0) '..textt[j]..'\\cr'
j=j+1
end
return textinbox
end
OverPower = false
OverCount = 0
NextWS = ""
function refresh()
textinbox = ''
-- GEO SPELL
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'
if (pet) then
if pet.max_mp then
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'
end
textinbox = textinbox..'- \\cs(0, 0, 0)Head : '..pet.head..' \\cr \n'
textinbox = textinbox..'- \\cs(0, 0, 0)Frame : '..pet.frame..' \\cr \n'
end
textinbox = textinbox..'- \\cs(125, 125, 0)Mode : '..ActualMode..'\\cr \n'
textinbox = textinbox..'- \\cs(0, 125, 125)Style : '..ActualSubMode..'\\cr \n'
textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Master : '..MasterS..'\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Pet : '..PetS..'\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Total : '..TotalS..'\\cr \n'
--- Recast for enmity gears
if ActualMode == "Tank" then
textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
-- Strobe recast
if stroberecast == 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 ('..stroberecast..')\\cr \n'
end
-- Flashbulb recast
if flashbulbrecast == 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 ('..flashbulbrecast..')\\cr \n'
end
end
if buffactive["Overdrive"] then
if OverCount == 1 then
NextWS = "Daze"
elseif OverCount == 2 then
NextWS = "Arcuballista"
elseif OverCount == 3 then
NextWS = "Armor Shatterer"
else
NextWS = "Armor Piercer"
end
textinbox = textinbox..'- \\cs(125, 5, 0)Next WS : '..NextWS..'\\cr \n'
end
--textinbox = textinbox..""..get_maneuver()
--if (pet) and Burden <= BurdenLimit then
--textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
--elseif (pet) and Burden > BurdenLimit then
--textinbox = textinbox..' \\cs(255, 0, 0) Burden : '..Burden..'('..BurdenLimit..') - COOLDOWN ASAP\\cr \n'
--risk = Burden - BurdenLimit + 5
--textinbox = textinbox..' \\cs(255, 0, 0) Overload risk estimated = '..risk..'%\\cr \n'
--end
-- Checking Attachments
windower.text.set_text(tb_name, textinbox)
end
function user_setup()
-- Default macro set/book
set_macro_page(3, 1)
end
function get_sets()
sets.precast = {}
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.FC.Dia =
{head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
sets.precast.JA = {}
-- Precast sets to enhance JAs
sets.precast.JA['Tactical Switch'] = {feet="Cirque Scarpe +2"}
sets.precast.JA['Ventriloquy'] = {legs="Pitre Churidars +3"}
sets.precast.JA['Role Reversal'] = {feet="Pitre Babouches +2"}
sets.precast.JA['Overdrive'] = {feet="Pitre Tobe +2"}
sets.precast.JA['Repair'] = {feet="Foire Babouches", "Guignol Earring"}
sets.precast.JA.Maneuver = {neck="Buffoon's Collar",body="Karagoz Farsetto",hands="Foire Dastanas",back="Dispersal 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'] = {feet="Ahosi Leggings", neck="Unmoving Collar", feet="Rager Ledel. +1", hands="Kurys Gloves", ring1="Provocare Ring"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",ear1="Roundel Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Spiral Ring",
back="Iximulew Cape",legs="Nahtirah Trousers",feet="Thurandaut Boots +1"}
-- 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=RAOWShead,neck="Rancor Collar",ear1="Ishvara Earring",ear2="Moonshade Earring",
body="Abnoba Kaftan",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
back=JSECAPESTR,waist="Moonbow Belt",legs="Pitre Churidars +3",feet="Ryuo Sune-Ate"} --"Hiza. Hizayoroi +2"
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Stringing Pummel'] = sets.precast.WS
sets.precast.WS['Stringing Pummel'].Mod = sets.precast.WS
sets.precast.WS['Victory Smite'] = sets.precast.WS
sets.precast.WS['Shijin Spiral'] = set_combine(sets.precast.WS, {head="Pitre Taj +3", body="Pitre Tobe +2", hands="Pitre Dastanas +3", legs="Pitre Churidars +3", feet="Heyoka leggings", ring1="Apate Ring", ring2="Petrov Ring"})
sets.precast.WS['Howling Fist'] = {
head=RAOWShead,neck="Fotia Gorget",ear1="Ishvara Earring",ear2="Moonshade Earring",
body="Foire Tobe +3",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
back=JSECAPESTR,waist="Moonbow Belt",legs="Hiza. Hizayoroi +2",feet="Ryuo Sune-Ate"}
-- Midcast Sets
sets.midcast ={}
sets.midcast.FastRecast = {
head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
-- Midcast sets for pet actions
sets.midcast.Pet = {}
sets.midcast.Pet.Cure = {legs="Foire Churidars"}
sets.midcast.Pet['Elemental Magic'] = {feet="Naga Kyahan", ear1="Burana Earring", ear2="Cirque Earring", legs="Pitre Churidars +3"}
sets.midcast.Pet.WeaponSkillNoAcc = {neck="Empath Necklace",head="Karagoz Capello +1", body="Tali'ah Manteel +2", waist="Incarnation Sash", hands="Karagoz Guanti +1", ring1="Varar Ring", ring2="Varar Ring", legs=HercLegsPET, feet="Punchinellos", back="Dispersal Mantle"}
sets.midcast.Pet.WSNoFTP = {
neck="Empath Necklace",
head="Karagoz Capello +1",
body="Tali'ah Manteel +2",
waist="Incarnation Sash",
hands="Karagoz Guanti +1",
ear1="Burana Earring",
ear2="Domes. Earring",
ring1="Varar Ring",
ring2="Varar Ring",
legs="Kara. Pantaloni +1",
feet="Naga Kyahan",
back=JSECAPEPetHaste}
sets.midcast.Pet.WSFTP = {
neck="Empath Necklace",
head="Karagoz Capello +1",
body="Tali'ah Manteel +2",
waist="Incarnation Sash",
hands="Karagoz Guanti +1",
ring1="Thurandaut Ring",
ring2="Varar Ring",
legs="Kara. Pantaloni +1",
feet="Naga Kyahan",
back="Dispersal Mantle"}
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
sets.midcast.Pet.WS = {}
--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, {head="Karagoz Capello +1", legs=HercLegsPET, waist="Incarnation Sash", feet=HercBootBone})
-- 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, {legs=HercLegsPetDEX})
-- Arcuballista, Daze
sets.midcast.Pet.WS["DEXFTP"] = set_combine(sets.midcast.Pet.WeaponSkill, {back="Dispersal Mantle"})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {head="Pitre Taj",neck="Wiglen Gorget",
ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
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.EngagedO = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
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="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
sets.idle.Pet.Engaged.Magic = set_combine(sets.idle.Pet.Engaged, {legs="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
sets.petTank = {
head="Anwig salade",neck="Loricate Torque", ear1="Enmerkar earring", ear2="Handler's Earring +1",
body="Rao togi",hands="Rao Kote",ring1="Thurandaut Ring",ring2="Overbearing Ring",
back=JSECAPEPetHaste,waist="Isa Belt",legs="Rao Haidate",feet="Taeon Boots"}
sets.petEnmity = {head="Heyoka Cap", body="Heyoka Harness", hands="Heyoka Mittens", legs="Heyoka Subligar", feet="Heyoka Leggings", ear2="Domesticator's Earring" }
-- 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=HercHeadPDT,neck="Loricate Torque",
body="Vrikodara Jupon",hands=HercGlovesPDT,ring1="Defending Ring",ring2="Dark Ring",
back="Solemnity Cape",waist="Moonbow Belt", legs=HercLegsPDT, feet=HercBootsPDT}
sets.defense.MDT = {
head="Whirlpool Mask",neck="Loricate Torque",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Incarnation Sash",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
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
sets.engaged = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
sets.engagedN = {
head="Tali'ah Turban +1" ,neck="Empath Necklace",ear1="Telos Earring",ear2="Domes. Earring",
body="Pitre Tobe +2",hands=HercGlovesTA,ring1="Varar Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Tali'ah Crackows +1"}
sets.engagedMO = {
head=HercHeadPDT ,neck="Empath Necklace",ear1="Telos Earring",ear2="Brutal Earring",
body="Herculean Vest",hands=HercGlovesTA,ring1="Petrov Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Tali'ah Crackows +1"}
sets.engaged.Acc = {
head="Whirlpool Mask",neck="Empath Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Dispersal Mantle",waist="Incarnation Sash",legs="Manibozho Brais",feet="Tali'ah Crackows +1"}
sets.engaged.DT = {
head="Karagoz Capello +1",neck="Empath Necklace",ear1="Burana Earring",ear2="Domes. Earring",
body="Rawhide Vest",hands=RAOWShands,ring1="Petrov Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Incarnation Sash",legs=RAOWSlegs,feet=RAOWSfeet}
sets.engaged.Acc.DT = {
head="Whirlpool Mask",neck="Empath Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Regimen Mittens",ring1="Defending Ring",ring2="Beeline Ring",
back=JSECAPEPetHaste,waist="Incarnation Sash",legs="Manibozho Brais",feet="Otronif Boots +1"}
end
function realaftercast()
if ActualMode == "Tank" then
sets.aftercast = sets.petTank
elseif TotalS == "Idle" then
sets.aftercast = sets.idle
elseif TotalS == "Master Only" then
sets.aftercast = sets.engagedMO
elseif TotalS == "Pet Only" then
sets.aftercast = sets.engaged
elseif TotalS == "Pet+Master" then
sets.aftercast = sets.engagedN
elseif TotalS == "Overdrive" then
sets.aftercast = sets.engaged
end
equip(sets.aftercast)
end
--Auto Boost on Certain WS
function precast(spell,action)
if spell.english == "Deploy" and pet.tp >= 950 then
if ActualMode == "Tank" then
-- Nothing
else
equip(sets.midcast.Pet.WeaponSkill)
end
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 TotalS == "Pet+Master" then
sets.aftercast = sets.midcast.Pet.WeaponSkill
end
elseif string.find(spell.english,'Maneuver') then
if ActualSubMode == "Spam" then
equip(sets.precast.JA.Maneuver)
else
if spell.english ~= Mane[ManeRound]..' Maneuver' and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
equip(sets.precast.JA.Maneuver)
--if buffactive['Food'] then
--cancel_spell()
--send_command('input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
--else
-- cancel_spell()
-- send_command('input /item "Akamochi" <me>;wait 5;input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
--end
end
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 ActualSubMode == "Spam" then
equip(sets.precast.JA.Maneuver)
else
if string.find(spell.english,'Maneuver') then
if ManeRound == 1 then
ManeRound = 2
elseif ManeRound == 2 then
ManeRound = 3
else
ManeRound = 1
end
Burden = Burden +15
elseif spell.english == "Cooldown" then
Burden = round(Burden/2)
end
end
if sets.precast.WS[spell.english] and TotalS == "Pet+Master" then
equip(sets.aftercast)
else
realaftercast()
end
end
end
function status_change(new,old)
if new == 'Engaged' then
MasterS = "Engaged"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Engaged ] *-*-*-*-*-*-*-*-*')
else
MasterS="Idle"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Idle ] *-*-*-*-*-*-*-*-*')
end
realaftercast()
end
function pet_status_change(new,old)
if new == 'Engaged' then
PetS = "Engaged"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetEngaged ] *-*-*-*-*-*-*-*-*')
else
PetS="Idle"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetIdle ] *-*-*-*-*-*-*-*-*')
end
realaftercast()
end
function pet_aftercast(spell)
realaftercast()
end
function buff_change(status,gain_or_loss)
if status == "sleep" then
if gain_or_loss then
equip({neck="Opo-opo Necklace"})
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
-- Toggles -- SE Macros: /console gs c "command" [case sensitive]
function self_command(command)
if command == 'PDT' then
if pdt == 0 then
pdt = 1
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT ON ] *-*-*-*-*-*-*-*-*')
equip(sets.defense.PDT)
disable("head")
disable("neck")
disable("body")
disable("hands")
disable("ring1")
disable("ring2")
disable("waist")
disable("legs")
disable("feet")
else
pdt = 0
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT OFF ] *-*-*-*-*-*-*-*-*')
enable("head")
enable("neck")
enable("body")
enable("hands")
enable("ring1")
enable("ring2")
enable("waist")
enable("legs")
enable("feet")
equip(sets.aftercast)
end
elseif command == 'normal' then
end
end
local clock = os.clock
function sleep(n) -- seconds
local t0 = clock()
while clock() - t0 <= n do end
end
fps = 1
sec = 0
enga=0
oldtiming = os.time()
windower.register_event('prerender', function()
if fps < 50 then
fps = fps +1
else
fps = 1
end
if fps == 1 then
timing = os.time()
if ActualMode == "Tank" then
if buffactive['Fire Maneuver'] then
if stroberecast <= 2 then
equip(sets.petEnmity)
end
end
if buffactive['Light Maneuver'] then
if flashbulbrecast <= 2 then
equip(sets.petEnmity)
end
end
if stroberecast > 0 then
stroberecast = strobetimer -(os.time() - strobetime)
--add_to_chat(204,"Recast :"..stroberecast)
end
if flashbulbrecast > 0 then
flashbulbrecast = flashbulbtimer -(os.time() - flashbulbtime)
--add_to_chat(204,"Recast :"..stroberecast)
end
end
TotalSCalc()
if(timing-oldtiming > 3) then
if Burden > 0 then
Burden = Burden -1
end
oldtiming = os.time()
end
if sets.aftercast == sets.idle then
else
if TotalS == "Idle" then
sets.aftercast = sets.idle
equip(sets.aftercast)
end
end
if ActualMode == "Tank" then
-- Nothing
elseif TotalS == "Pet Only" or TotalS == "Overdrive" then
if pet.tp >= 850 then
equip(sets.midcast.Pet.WeaponSkill)
else
equip(sets.aftercast)
end
end
--print(player.status)
--[[if player.status == 1 then
add_to_chat(204,"Engaged")
if enga == 0 then
send_command("input /p go")
add_to_chat(204,"Engaging")
enga = 1
end
elseif player.status == 0 then
add_to_chat(204,"Idled")
if enga == 1 then
send_command("input /p fc")
add_to_chat(204,"Idling")
enga = 0
end
end]]--
--AUTOMANEUVER
--if not buffactive[Mane[1]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--elseif not buffactive[Mane[2]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--elseif not buffactive[Mane[2]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--end
refresh()
end
end)
choosing = false
wchoos = 0
modchos = false
submodechos = false
windower.register_event('chat message', function(original, sender, mode, gm)
local match
if sender == player.name then
if (original == "mode" or original == "MODE" or original == "Mode" or original == "mod") and modchos == false then
add_to_chat(204,"Choose your pet mode(Tank, DD, BLM, WHM, RDM)")
modchos = true
submodechos = false
elseif modchos == true and PetMode:contains(original) then
ActualMode = original
stext = ""
i = 1
if ActualMode == "Tank" then
sets.aftercast = sets.petTank
else
sets.aftercast = sets.idle
end
while i <= NSubMode[ActualMode] do
stext = stext..PetSubMode[ActualMode][i].." - "
i=i+1
end
add_to_chat(204,"Choose your "..ActualMode.." style : "..stext)
submodechos = true
modchos = false
elseif submodechos == true then
i = 1
while i <= NSubMode[ActualMode] do
if original == PetSubMode[ActualMode][i] then
ActualSubMode = original
send_command('input //autocontrol equipset '..Style[ActualSubMode][1])
Mane[1] = Style[ActualSubMode][2]
Mane[2] = Style[ActualSubMode][3]
Mane[3] = Style[ActualSubMode][4]
submodechos = false
end
i=i+1
end
elseif original == "man" or original == "Man" or original == "Maneuver" or original == "maneuver" then
if ManeRound == 1 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[1]..' Maneuver" <me>')
elseif ManeRound == 2 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[2]..' Maneuver" <me>')
elseif ManeRound == 3 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[3]..' Maneuver" <me>')
end
elseif original == "1" and not choosing then
wchoos = 1
add_to_chat(204,"Choose your First maneuver :")
choosing = true
elseif original == "2" and not choosing then
wchoos = 2
add_to_chat(204,"Choose your Second maneuver :")
choosing = true
elseif original == "3" and not choosing then
wchoos = 3
add_to_chat(204,"Choose your Third maneuver :")
choosing = true
elseif choosing then
if TypeM:contains(original) then
add_to_chat(204,""..original.." Maneuver choosed")
Mane[wchoos] = original
wchoos = 0
choosing = false
end
elseif original == "start" then
autos= true
add_to_chat(204,"AutoManeuver started")
print(autos)
elseif original == "stop" then
autos= false
add_to_chat(204,"AutoManeuver stoped")
else
comd = string.split(original, ",")
for i=1, 3, 1 do
if TypeM:contains(comd[i]) then
add_to_chat(204,"Maneuver "..i.." = "..comd[i].."")
Mane[i] = comd[i]
end
end
end
end
return sender, mode, gm
end)
function round(num, dec)
local mult = 10^(dec or 0)
return math.floor(num * mult + 0.5) / mult
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 ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 2
elseif match=="Arcuballista" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 3
elseif match=="Armor Shatterer" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 4
elseif match=="Armor Piercer" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 1
end
end
-- Checking timer for enmity sets
if ActualMode == "Tank" then
if buffactive['Fire Maneuver'] then
match = original:match(pet.name..' uses Provoke')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Strobe done ] *-*-*-*-*-*-*-*-*')
strobetime = os.time()
stroberecast = strobetimer
equip(sets.aftercast)
end
end
if buffactive['Light Maneuver'] then
match = original:match(pet.name..' uses Flashbulb.')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Flashbulb done ] *-*-*-*-*-*-*-*-*')
flashbulbtime = os.time()
flashbulbrecast = flashbulbtimer
equip(sets.aftercast)
end
end
end
-- AutoWS trigger
--match = original:match('Genta readies ([%s%w]+)%.')
--if RWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Range WSing ] *-*-*-*-*-*-*-*-*')
--elseif MWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Melee WSing ] *-*-*-*-*-*-*-*-*')
--elseif HPWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Magic Mortaring ] *-*-*-*-*-*-*-*-*')
--end
--[[ match = original:match('Genta uses')
if match then
-- After Bone crusher
equip(sets.engaged)
end
match = original:match('defeats the Apex Eft')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ dead ] *-*-*-*-*-*-*-*-*')
send_command('wait 1; input /p fc')
end
if original then
--if player.target.name then
match = original:match('Trueamerstwin uses Cross Reaper.')
if match then
wscount=wscount+1
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Dark SC started, closing with LS -WS = '..wscount..' ] *-*-*-*-*-*-*-*-*')
send_command('wait 3; input /ws "Stringing Pummel" <t>')
end
--end
end]]--
return modified, mode
end)
Necro Bump Detected!
[42 days between previous and next post]
By KeiMontague 2019-01-17 21:17:10
Did you find a way to be able to code this different so can freely use maneuvers? Also having a issue where in Tank-PDT mode it starts me off in correct Petdt gear. Activating a light or fire maneuver will change to petenmity gear like it should. But will not switch back. After troubleshooting the one I modified- I went back and used the authors original one. But it was doing the same thing. In his video you can see his gear changing correctly. So I have no idea what is wrong. Code
include("Pup_include.lua")
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'}}
HercGlovesTA = { name="Herculean Gloves", augments={'Accuracy+29','"Triple Atk."+3','STR+5','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'}}
include('organizer-lib')
JSECAPEPetHaste = {name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3'}}
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'}}
RMasterS = "Idle"
MasterS = "Idle"
PetS = "Idle"
TotalS = "Idle"
flashbulbtimer = 40
strobetimer = 25
stroberecast = 0
flashbulbrecast = 0
flashbulbtime = 0
strobetime = 0
pdt = 0
function TotalSCalc()
if ActualMode == "DD" then
if buffactive['Overdrive'] then
TotalS = "Overdrive"
elseif MasterS == "Idle" and PetS == "Idle" then
TotalS = "Idle"
elseif MasterS == "Idle" and PetS == "Engaged" then
TotalS = "Pet Only"
elseif MasterS == "Engaged" and PetS == "Engaged" then
TotalS = "Pet+Master"
elseif MasterS == "Engaged" and PetS == "Idle" then
TotalS = "Master Only"
end
elseif ActualMode == "Tank" then
if PetS == "Idle" then
TotalS = "Idle"
else
TotalS = "Tank"
end
else
PetS = "Mage"
if MasterS == "Idle" then
TotalS = "Idle"
else
TotalS = "Master Only"
end
end
end
Burden = 0
BurdenLimit = 30+50
Mane = {"Wind","Fire", "Light"}
ManeRound = 1
TypeM = S{"Fire", "Water", "Earth", "Wind", "Dark", "Light", "Ice", "Thunder" }
--- SKILLCHAIN TABLE
SC = {}
SC['Valoredge Frame'] = {}
SC['Sharpshot Frame'] = {}
SC['Harlequin Frame'] = {}
SC['Valoredge Frame']['Stringing Pummel'] = "String Shredder"
SC['Valoredge Frame']['Victory Smite'] = "String Shredder"
SC['Valoredge Frame']['Shijin Spiral'] = "Bone Crusher"
SC['Valoredge Frame']['Howling Fist'] = "String Shredder"
SC['Sharpshot Frame']['Stringing Pummel'] = "Armor Shatterer"
SC['Sharpshot Frame']['Victory Smite'] = "Armor Shatterer"
SC['Sharpshot Frame']['Shijin Spiral'] = "Armor Piercer"
SC['Sharpshot Frame']['Howling Fist'] = "Arcuballista"
SC['Sharpshot Frame']['Dragon Kick'] = "Armor Shatterer"
SC['Sharpshot Frame']['One Inch Punch'] = "Daze"
SC['Sharpshot Frame']['Spinning Attack'] = "Armor Shatterer"
SC['Sharpshot Frame']['Base'] = "Arcuballista"
SC['Harlequin Frame']['Stringing Pummel'] = "Slapstick"
SC['Harlequin Frame']['Victory Smite'] = "Magic Mortar"
SC['Harlequin Frame']['Shijin Spiral'] = "Slapstick"
SC['Harlequin Frame']['Howling Fist'] = "Knockout"
Modifier = {}
Modifier['String Shredder'] = "VIT"
Modifier['Bone Crusher'] = "VIT"
Modifier['Armor Shatterer'] = "DEX"
Modifier['Armor Piercer'] = "DEX"
Modifier['Arcuballista'] = "DEXFTP"
Modifier['Daze'] = "DEXFTP"
Modifier['Slapstick'] = "DEX"
Modifier['Knockout'] = "AGI"
Colors = {}
Colors["Fire"] = "\\cs(102, 0, 0)"
Colors["Water"] = "\\cs(0, 51, 102)"
Colors["Wind"] = "\\cs(51, 102, 0)"
Colors["Dark"] = "\\cs(0, 0, 0)"
Colors["Light"] = "\\cs(255, 255, 255)"
Colors["Earth"] = "\\cs(139, 69, 19)"
Colors["Ice"] = "\\cs(0, 204, 204)"
Colors["Thunder"] = "\\cs(51, 0, 102)"
--- Pet modes references
PetMode = S{"Tank", "DD", "BLM", "RDM", "WHM"}
PetSubMode = {}
PetSubMode["Tank"] = {"PDT", "MDT", "Range"}
PetSubMode["DD"] = {"Normal", "Bone", "Spam", "OD", "ODAcc"}
NSubMode = {}
NSubMode["Tank"] = 3
NSubMode["DD"] = 5
ActualMode = "DD"
ActualSubMode = "Normal"
--- Styles Maneuvers and autocontrol
Style={}
-- Tank Ones
Style["PDT"] = {"paladin", "Light", "Fire", "Earth"}
Style["MDT"] = {"runefencer", "Light", "Fire", "Water"}
Style["Range"] = {"Sharptank", "Light", "Fire", "Wind"}
-- DD Ones
Style["Normal"] = {"dd", "Light", "Fire", "Wind"}
Style["Bone"] = {"boneslayer", "Light", "Fire", "Wind"}
Style["Spam"] = {"ddspam", "Light", "Fire", "Wind"}
Style["OD"] = {"overdrive", "Light", "Fire", "Thunder"}
Style["ODAcc"] = {"overdriveacc", "Light", "Fire", "Thunder"}
tb_name = "puphelp"
visible = true
textinbox = ''
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'
--textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
windower.text.create(tb_name)
windower.text.set_location(tb_name, 700, 150)
windower.text.set_bg_color(tb_name, 200, 96, 96, 96)
windower.text.set_color(tb_name, 255, 147, 161, 161)
windower.text.set_font(tb_name, "Arial")
windower.text.set_font_size(tb_name, 10)
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, visible)
local player = windower.ffxi.get_player()
function optic()
value = 0
ofone = 0
oftwo = 0
if pet.attachments["Optic Fiber"] then
if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
ofone = Attach["Light"]["Optic Fiber"][5]
elseif buffactive["Light Maneuver"] then
ofone = Attach["Light"]["Optic Fiber"][3]
elseif buffactive["Light Maneuver"] == 2 then
ofone = Attach["Light"]["Optic Fiber"][4]
elseif buffactive["Light Maneuver"] == 3 then
ofone = Attach["Light"]["Optic Fiber"][5]
else
ofone = Attach["Light"]["Optic Fiber"][2]
end
end
if pet.attachments["Optic Fiber II"] then
if buffactive["Light Maneuver"] and buffactive["Overdrive"] then
ofone = Attach["Light"]["Optic Fiber II"][5]
elseif buffactive["Light Maneuver"] then
ofone = Attach["Light"]["Optic Fiber II"][3]
elseif buffactive["Light Maneuver"] == 2 then
ofone = Attach["Light"]["Optic Fiber II"][4]
elseif buffactive["Light Maneuver"] == 3 then
ofone = Attach["Light"]["Optic Fiber II"][5]
else
ofone = Attach["Light"]["Optic Fiber II"][2]
end
end
value = 1+ofone+oftwo
return value
end
function get_maneuver()
j = 1
textinbox=""
textt={}
--print(Attach["Fire"][Attach["Fire"][1]][1])
while j <= NA do
i = 1
textt[j] = ""
--print(MAN[j].."-"..NAttach[MAN[j]])
-- For each maneuver
while i <= NAttach[MAN[j]] do
mani={}
-- Search each attachment if its active
if pet.attachments[Attach[MAN[j]][i]] then
-- Look for the bonus that delivers
Bonus=""
Bonus = Attach[MAN[j]][Attach[MAN[j]][i]][1]
if Attach[MAN[j]][i] ~= "Optic Fiber" or Attach[MAN[j]][i] ~= "Optic Fiber II" then
if buffactive[MAN[j].." Maneuver"] then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][3]
end
elseif buffactive[MAN[j].." Maneuver"] == 2 then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][4]
end
elseif buffactive[MAN[j].." Maneuver"] == 3 then
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][5]
end
else
-- TYpe de bonus, %, Int ou String
if Attach[MAN[j]][i][6] == "%" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
elseif Attach[MAN[j]][i][6] == "Int" then
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]*optic()
else
BonusCalc = Attach[MAN[j]][Attach[MAN[j]][i]][2]
end
end
end
textt[j]= textt[j]..""..Bonus.." +"..BonusCalc.."\n"
end
i=i+1
end
textinbox = textinbox..' \\cs(255, 0, 0) '..textt[j]..'\\cr'
j=j+1
end
return textinbox
end
OverPower = false
OverCount = 0
NextWS = ""
function refresh()
textinbox = ''
-- GEO SPELL
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'
if (pet) then
if pet.max_mp then
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'
end
textinbox = textinbox..'- \\cs(0, 0, 0)Head : '..pet.head..' \\cr \n'
textinbox = textinbox..'- \\cs(0, 0, 0)Frame : '..pet.frame..' \\cr \n'
end
textinbox = textinbox..'- \\cs(125, 125, 0)Mode : '..ActualMode..'\\cr \n'
textinbox = textinbox..'- \\cs(0, 125, 125)Style : '..ActualSubMode..'\\cr \n'
textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Master : '..MasterS..'\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Pet : '..PetS..'\\cr \n'
textinbox = textinbox..'- \\cs(125, 125, 125)Total : '..TotalS..'\\cr \n'
--- Recast for enmity gears
if ActualMode == "Tank" then
textinbox = textinbox..'\\cs(0, 75, 125)--------------------------------\\cr \n'
-- Strobe recast
if stroberecast == 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 ('..stroberecast..')\\cr \n'
end
-- Flashbulb recast
if flashbulbrecast == 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 ('..flashbulbrecast..')\\cr \n'
end
end
if buffactive["Overdrive"] then
if OverCount == 1 then
NextWS = "Daze"
elseif OverCount == 2 then
NextWS = "Arcuballista"
elseif OverCount == 3 then
NextWS = "Armor Shatterer"
else
NextWS = "Armor Piercer"
end
textinbox = textinbox..'- \\cs(125, 5, 0)Next WS : '..NextWS..'\\cr \n'
end
--textinbox = textinbox..""..get_maneuver()
--if (pet) and Burden <= BurdenLimit then
--textinbox = textinbox..' \\cs(0, 0, 0) Burden : '..Burden..'('..BurdenLimit..')\\cr \n'
--elseif (pet) and Burden > BurdenLimit then
--textinbox = textinbox..' \\cs(255, 0, 0) Burden : '..Burden..'('..BurdenLimit..') - COOLDOWN ASAP\\cr \n'
--risk = Burden - BurdenLimit + 5
--textinbox = textinbox..' \\cs(255, 0, 0) Overload risk estimated = '..risk..'%\\cr \n'
--end
-- Checking Attachments
windower.text.set_text(tb_name, textinbox)
end
function user_setup()
-- Default macro set/book
set_macro_page(3, 1)
end
function get_sets()
sets.precast = {}
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
sets.precast.FC.Dia =
{head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
sets.precast.JA = {}
-- Precast sets to enhance JAs
sets.precast.JA['Tactical Switch'] = {feet="Cirque Scarpe +2"}
sets.precast.JA['Ventriloquy'] = {legs="Pitre Churidars +3"}
sets.precast.JA['Role Reversal'] = {feet="Pitre Babouches +2"}
sets.precast.JA['Overdrive'] = {feet="Pitre Tobe +2"}
sets.precast.JA['Repair'] = {feet="Foire Babouches", "Guignol Earring"}
sets.precast.JA.Maneuver = {neck="Buffoon's Collar",body="Karagoz Farsetto",hands="Foire Dastanas",back="Dispersal 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'] = {feet="Ahosi Leggings", neck="Unmoving Collar", feet="Rager Ledel. +1", hands="Kurys Gloves", ring1="Provocare Ring"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Whirlpool Mask",ear1="Roundel Earring",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Spiral Ring",
back="Iximulew Cape",legs="Nahtirah Trousers",feet="Thurandaut Boots +1"}
-- 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=RAOWShead,neck="Rancor Collar",ear1="Ishvara Earring",ear2="Moonshade Earring",
body="Abnoba Kaftan",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
back=JSECAPESTR,waist="Moonbow Belt",legs="Pitre Churidars +3",feet="Ryuo Sune-Ate"} --"Hiza. Hizayoroi +2"
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Stringing Pummel'] = sets.precast.WS
sets.precast.WS['Stringing Pummel'].Mod = sets.precast.WS
sets.precast.WS['Victory Smite'] = sets.precast.WS
sets.precast.WS['Shijin Spiral'] = set_combine(sets.precast.WS, {head="Pitre Taj +3", body="Pitre Tobe +2", hands="Pitre Dastanas +3", legs="Pitre Churidars +3", feet="Heyoka leggings", ring1="Apate Ring", ring2="Petrov Ring"})
sets.precast.WS['Howling Fist'] = {
head=RAOWShead,neck="Fotia Gorget",ear1="Ishvara Earring",ear2="Moonshade Earring",
body="Foire Tobe +3",hands="Pitre Dastanas +3",ring1="Shukuyu Ring",ring2="Rufescent Ring",
back=JSECAPESTR,waist="Moonbow Belt",legs="Hiza. Hizayoroi +2",feet="Ryuo Sune-Ate"}
-- Midcast Sets
sets.midcast ={}
sets.midcast.FastRecast = {
head="Tali'ah Turban +1",
body="Tali'ah Manteel +2",
hands="Tali'ah Gages +1",
legs="Tali'ah Sera. +1",
feet="Tali'ah Crackows +1",
neck="Incanter's Torque",
waist="Famine Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Stikini Ring",
right_ring="Stikini Ring",}
-- Midcast sets for pet actions
sets.midcast.Pet = {}
sets.midcast.Pet.Cure = {legs="Foire Churidars"}
sets.midcast.Pet['Elemental Magic'] = {feet="Naga Kyahan", ear1="Burana Earring", ear2="Cirque Earring", legs="Pitre Churidars +3"}
sets.midcast.Pet.WeaponSkillNoAcc = {neck="Empath Necklace",head="Karagoz Capello +1", body="Tali'ah Manteel +2", waist="Incarnation Sash", hands="Karagoz Guanti +1", ring1="Varar Ring", ring2="Varar Ring", legs=HercLegsPET, feet="Punchinellos", back="Dispersal Mantle"}
sets.midcast.Pet.WSNoFTP = {
neck="Empath Necklace",
head="Karagoz Capello +1",
body="Tali'ah Manteel +2",
waist="Incarnation Sash",
hands="Karagoz Guanti +1",
ear1="Burana Earring",
ear2="Domes. Earring",
ring1="Varar Ring",
ring2="Varar Ring",
legs="Kara. Pantaloni +1",
feet="Naga Kyahan",
back=JSECAPEPetHaste}
sets.midcast.Pet.WSFTP = {
neck="Empath Necklace",
head="Karagoz Capello +1",
body="Tali'ah Manteel +2",
waist="Incarnation Sash",
hands="Karagoz Guanti +1",
ring1="Thurandaut Ring",
ring2="Varar Ring",
legs="Kara. Pantaloni +1",
feet="Naga Kyahan",
back="Dispersal Mantle"}
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
sets.midcast.Pet.WS = {}
--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, {head="Karagoz Capello +1", legs=HercLegsPET, waist="Incarnation Sash", feet=HercBootBone})
-- 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, {legs=HercLegsPetDEX})
-- Arcuballista, Daze
sets.midcast.Pet.WS["DEXFTP"] = set_combine(sets.midcast.Pet.WeaponSkill, {back="Dispersal Mantle"})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {head="Pitre Taj",neck="Wiglen Gorget",
ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
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.EngagedO = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
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="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
sets.idle.Pet.Engaged.Magic = set_combine(sets.idle.Pet.Engaged, {legs="Pitre Churidars +3", feet="Pitre Babouches +2", ear1="Burana Earring"})
sets.petTank = {
head="Anwig salade",neck="Loricate Torque", ear1="Enmerkar earring", ear2="Handler's Earring +1",
body="Rao togi",hands="Rao Kote",ring1="Thurandaut Ring",ring2="Overbearing Ring",
back=JSECAPEPetHaste,waist="Isa Belt",legs="Rao Haidate",feet="Taeon Boots"}
sets.petEnmity = {head="Heyoka Cap", body="Heyoka Harness", hands="Heyoka Mittens", legs="Heyoka Subligar", feet="Heyoka Leggings", ear2="Domesticator's Earring" }
-- 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=HercHeadPDT,neck="Loricate Torque",
body="Vrikodara Jupon",hands=HercGlovesPDT,ring1="Defending Ring",ring2="Dark Ring",
back="Solemnity Cape",waist="Moonbow Belt", legs=HercLegsPDT, feet=HercBootsPDT}
sets.defense.MDT = {
head="Whirlpool Mask",neck="Loricate Torque",
body="Otronif Harness +1",hands="Otronif Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Incarnation Sash",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
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
sets.engaged = {
head={ name="Herculean Helm", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+11','Pet: Attack+12 Pet: Rng.Atk.+12',}},
body={ name="Pitre Tobe +2", augments={'Enhances "Overdrive" effect',}},
hands={ name="Herculean Gloves", augments={'Pet: Accuracy+26 Pet: Rng. Acc.+26','Pet: "Store TP"+8','Pet: DEX+4','Pet: Attack+14 Pet: Rng.Atk.+14',}},
legs={ name="Herculean Trousers", augments={'Pet: Accuracy+18 Pet: Rng. Acc.+18','Pet: "Store TP"+9','Pet: AGI+9','Pet: Attack+8 Pet: Rng.Atk.+8','Pet: "Mag.Atk.Bns."+11',}},
feet={ name="Herculean Boots", augments={'Pet: Accuracy+29 Pet: Rng. Acc.+29','Pet: "Store TP"+10','Pet: DEX+5','Pet: Attack+1 Pet: Rng.Atk.+1',}},
neck="Empath Necklace",
waist="Incarnation Sash",
left_ear="Enmerkar Earring",
right_ear="Domes. Earring",
left_ring="Thurandaut Ring",
right_ring="Varar Ring",
back={ name="Visucius's Mantle", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Accuracy+20 Attack+20','STR+4','Pet: Haste+10','System: 1 ID: 1247 Val: 3',}},
}
sets.engagedN = {
head="Tali'ah Turban +1" ,neck="Empath Necklace",ear1="Telos Earring",ear2="Domes. Earring",
body="Pitre Tobe +2",hands=HercGlovesTA,ring1="Varar Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Tali'ah Crackows +1"}
sets.engagedMO = {
head=HercHeadPDT ,neck="Empath Necklace",ear1="Telos Earring",ear2="Brutal Earring",
body="Herculean Vest",hands=HercGlovesTA,ring1="Petrov Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Moonbow Belt",legs="Heyoka Subligar",feet="Tali'ah Crackows +1"}
sets.engaged.Acc = {
head="Whirlpool Mask",neck="Empath Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Otronif Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Dispersal Mantle",waist="Incarnation Sash",legs="Manibozho Brais",feet="Tali'ah Crackows +1"}
sets.engaged.DT = {
head="Karagoz Capello +1",neck="Empath Necklace",ear1="Burana Earring",ear2="Domes. Earring",
body="Rawhide Vest",hands=RAOWShands,ring1="Petrov Ring",ring2="Varar Ring",
back=JSECAPEPetHaste,waist="Incarnation Sash",legs=RAOWSlegs,feet=RAOWSfeet}
sets.engaged.Acc.DT = {
head="Whirlpool Mask",neck="Empath Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Regimen Mittens",ring1="Defending Ring",ring2="Beeline Ring",
back=JSECAPEPetHaste,waist="Incarnation Sash",legs="Manibozho Brais",feet="Otronif Boots +1"}
end
function realaftercast()
if ActualMode == "Tank" then
sets.aftercast = sets.petTank
elseif TotalS == "Idle" then
sets.aftercast = sets.idle
elseif TotalS == "Master Only" then
sets.aftercast = sets.engagedMO
elseif TotalS == "Pet Only" then
sets.aftercast = sets.engaged
elseif TotalS == "Pet+Master" then
sets.aftercast = sets.engagedN
elseif TotalS == "Overdrive" then
sets.aftercast = sets.engaged
end
equip(sets.aftercast)
end
--Auto Boost on Certain WS
function precast(spell,action)
if spell.english == "Deploy" and pet.tp >= 950 then
if ActualMode == "Tank" then
-- Nothing
else
equip(sets.midcast.Pet.WeaponSkill)
end
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 TotalS == "Pet+Master" then
sets.aftercast = sets.midcast.Pet.WeaponSkill
end
elseif string.find(spell.english,'Maneuver') then
if ActualSubMode == "Spam" then
equip(sets.precast.JA.Maneuver)
else
if spell.english ~= Mane[ManeRound]..' Maneuver' and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
equip(sets.precast.JA.Maneuver)
--if buffactive['Food'] then
--cancel_spell()
--send_command('input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
--else
-- cancel_spell()
-- send_command('input /item "Akamochi" <me>;wait 5;input /ja "'..Mane[ManeRound]..' Maneuver" <me>')
--end
end
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 ActualSubMode == "Spam" then
equip(sets.precast.JA.Maneuver)
else
if string.find(spell.english,'Maneuver') then
if ManeRound == 1 then
ManeRound = 2
elseif ManeRound == 2 then
ManeRound = 3
else
ManeRound = 1
end
Burden = Burden +15
elseif spell.english == "Cooldown" then
Burden = round(Burden/2)
end
end
if sets.precast.WS[spell.english] and TotalS == "Pet+Master" then
equip(sets.aftercast)
else
realaftercast()
end
end
end
function status_change(new,old)
if new == 'Engaged' then
MasterS = "Engaged"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Engaged ] *-*-*-*-*-*-*-*-*')
else
MasterS="Idle"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ Idle ] *-*-*-*-*-*-*-*-*')
end
realaftercast()
end
function pet_status_change(new,old)
if new == 'Engaged' then
PetS = "Engaged"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetEngaged ] *-*-*-*-*-*-*-*-*')
else
PetS="Idle"
TotalSCalc()
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PetIdle ] *-*-*-*-*-*-*-*-*')
end
realaftercast()
end
function pet_aftercast(spell)
realaftercast()
end
function buff_change(status,gain_or_loss)
if status == "sleep" then
if gain_or_loss then
equip({neck="Opo-opo Necklace"})
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
-- Toggles -- SE Macros: /console gs c "command" [case sensitive]
function self_command(command)
if command == 'PDT' then
if pdt == 0 then
pdt = 1
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT ON ] *-*-*-*-*-*-*-*-*')
equip(sets.defense.PDT)
disable("head")
disable("neck")
disable("body")
disable("hands")
disable("ring1")
disable("ring2")
disable("waist")
disable("legs")
disable("feet")
else
pdt = 0
add_to_chat(392,'*-*-*-*-*-*-*-*-* [ PDT OFF ] *-*-*-*-*-*-*-*-*')
enable("head")
enable("neck")
enable("body")
enable("hands")
enable("ring1")
enable("ring2")
enable("waist")
enable("legs")
enable("feet")
equip(sets.aftercast)
end
elseif command == 'normal' then
end
end
local clock = os.clock
function sleep(n) -- seconds
local t0 = clock()
while clock() - t0 <= n do end
end
fps = 1
sec = 0
enga=0
oldtiming = os.time()
windower.register_event('prerender', function()
if fps < 50 then
fps = fps +1
else
fps = 1
end
if fps == 1 then
timing = os.time()
if ActualMode == "Tank" then
if buffactive['Fire Maneuver'] then
if stroberecast <= 2 then
equip(sets.petEnmity)
end
end
if buffactive['Light Maneuver'] then
if flashbulbrecast <= 2 then
equip(sets.petEnmity)
end
end
if stroberecast > 0 then
stroberecast = strobetimer -(os.time() - strobetime)
--add_to_chat(204,"Recast :"..stroberecast)
end
if flashbulbrecast > 0 then
flashbulbrecast = flashbulbtimer -(os.time() - flashbulbtime)
--add_to_chat(204,"Recast :"..stroberecast)
end
end
TotalSCalc()
if(timing-oldtiming > 3) then
if Burden > 0 then
Burden = Burden -1
end
oldtiming = os.time()
end
if sets.aftercast == sets.idle then
else
if TotalS == "Idle" then
sets.aftercast = sets.idle
equip(sets.aftercast)
end
end
if ActualMode == "Tank" then
-- Nothing
elseif TotalS == "Pet Only" or TotalS == "Overdrive" then
if pet.tp >= 850 then
equip(sets.midcast.Pet.WeaponSkill)
else
equip(sets.aftercast)
end
end
--print(player.status)
--[[if player.status == 1 then
add_to_chat(204,"Engaged")
if enga == 0 then
send_command("input /p go")
add_to_chat(204,"Engaging")
enga = 1
end
elseif player.status == 0 then
add_to_chat(204,"Idled")
if enga == 1 then
send_command("input /p fc")
add_to_chat(204,"Idling")
enga = 0
end
end]]--
--AUTOMANEUVER
--if not buffactive[Mane[1]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--elseif not buffactive[Mane[2]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--elseif not buffactive[Mane[2]..' Maneuver'] and autos then
--add_to_chat(204,"Maneuver lost")
--send_command('input /ja "Fire Maneuver" <me>')
--end
refresh()
end
end)
choosing = false
wchoos = 0
modchos = false
submodechos = false
windower.register_event('chat message', function(original, sender, mode, gm)
local match
if sender == player.name then
if (original == "mode" or original == "MODE" or original == "Mode" or original == "mod") and modchos == false then
add_to_chat(204,"Choose your pet mode(Tank, DD, BLM, WHM, RDM)")
modchos = true
submodechos = false
elseif modchos == true and PetMode:contains(original) then
ActualMode = original
stext = ""
i = 1
if ActualMode == "Tank" then
sets.aftercast = sets.petTank
else
sets.aftercast = sets.idle
end
while i <= NSubMode[ActualMode] do
stext = stext..PetSubMode[ActualMode][i].." - "
i=i+1
end
add_to_chat(204,"Choose your "..ActualMode.." style : "..stext)
submodechos = true
modchos = false
elseif submodechos == true then
i = 1
while i <= NSubMode[ActualMode] do
if original == PetSubMode[ActualMode][i] then
ActualSubMode = original
send_command('input //autocontrol equipset '..Style[ActualSubMode][1])
Mane[1] = Style[ActualSubMode][2]
Mane[2] = Style[ActualSubMode][3]
Mane[3] = Style[ActualSubMode][4]
submodechos = false
end
i=i+1
end
elseif original == "man" or original == "Man" or original == "Maneuver" or original == "maneuver" then
if ManeRound == 1 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[1]..' Maneuver" <me>')
elseif ManeRound == 2 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[2]..' Maneuver" <me>')
elseif ManeRound == 3 and windower.ffxi.get_ability_recasts()[210] and not buffactive.amnesia then
send_command('input /ja "'..Mane[3]..' Maneuver" <me>')
end
elseif original == "1" and not choosing then
wchoos = 1
add_to_chat(204,"Choose your First maneuver :")
choosing = true
elseif original == "2" and not choosing then
wchoos = 2
add_to_chat(204,"Choose your Second maneuver :")
choosing = true
elseif original == "3" and not choosing then
wchoos = 3
add_to_chat(204,"Choose your Third maneuver :")
choosing = true
elseif choosing then
if TypeM:contains(original) then
add_to_chat(204,""..original.." Maneuver choosed")
Mane[wchoos] = original
wchoos = 0
choosing = false
end
elseif original == "start" then
autos= true
add_to_chat(204,"AutoManeuver started")
print(autos)
elseif original == "stop" then
autos= false
add_to_chat(204,"AutoManeuver stoped")
else
comd = string.split(original, ",")
for i=1, 3, 1 do
if TypeM:contains(comd[i]) then
add_to_chat(204,"Maneuver "..i.." = "..comd[i].."")
Mane[i] = comd[i]
end
end
end
end
return sender, mode, gm
end)
function round(num, dec)
local mult = 10^(dec or 0)
return math.floor(num * mult + 0.5) / mult
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 ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 2
elseif match=="Arcuballista" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 3
elseif match=="Armor Shatterer" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSNoFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 4
elseif match=="Armor Piercer" then
sets.midcast.Pet.WeaponSkill = sets.midcast.Pet.WSFTP
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ '..match..' done ] *-*-*-*-*-*-*-*-*')
refresh()
OverCount = 1
end
end
-- Checking timer for enmity sets
if ActualMode == "Tank" then
if buffactive['Fire Maneuver'] then
match = original:match(pet.name..' uses Provoke')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Strobe done ] *-*-*-*-*-*-*-*-*')
strobetime = os.time()
stroberecast = strobetimer
equip(sets.aftercast)
end
end
if buffactive['Light Maneuver'] then
match = original:match(pet.name..' uses Flashbulb.')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Flashbulb done ] *-*-*-*-*-*-*-*-*')
flashbulbtime = os.time()
flashbulbrecast = flashbulbtimer
equip(sets.aftercast)
end
end
end
-- AutoWS trigger
--match = original:match('Genta readies ([%s%w]+)%.')
--if RWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Range WSing ] *-*-*-*-*-*-*-*-*')
--elseif MWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Melee WSing ] *-*-*-*-*-*-*-*-*')
--elseif HPWSTrigger:contains(match) then
-- equip(sets.midcast.Pet.WeaponSkill)
-- add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Genta is Magic Mortaring ] *-*-*-*-*-*-*-*-*')
--end
--[[ match = original:match('Genta uses')
if match then
-- After Bone crusher
equip(sets.engaged)
end
match = original:match('defeats the Apex Eft')
if match then
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ dead ] *-*-*-*-*-*-*-*-*')
send_command('wait 1; input /p fc')
end
if original then
--if player.target.name then
match = original:match('Trueamerstwin uses Cross Reaper.')
if match then
wscount=wscount+1
add_to_chat(204, '*-*-*-*-*-*-*-*-* [ Dark SC started, closing with LS -WS = '..wscount..' ] *-*-*-*-*-*-*-*-*')
send_command('wait 3; input /ws "Stringing Pummel" <t>')
end
--end
end]]--
return modified, mode
end) I also am having that issue of PetEnmity gear being fulltimed in Tank mode with a fire and.or light maneuver up. I tried to use the lua you offered, assuming it fixed the previous poster's issue, but it's still doing it. Any idea what's wrong?
By Blackhalo714 2019-01-18 04:40:21
I could never get the original one to work correctly. Here is a newer version that was built around this original author. Still a continuing wip but has come a long way. Should solve that gear change issue.
https://github.com/atperry7/pup_gearswap?files=1
By KeiMontague 2019-01-20 02:51:40
I could never get the original one to work correctly. Here is a newer version that was built around this original author. Still a continuing wip but has come a long way. Should solve that gear change issue.
https://github.com/atperry7/pup_gearswap?files=1Thank you muchly! I'll try it out after the weekend.
By Numquam 2019-01-21 11:17:17
How do you use the toggles?
Necro Bump Detected!
[119 days between previous and next post]
Ragnarok.Cpttn
By Ragnarok.Cpttn 2019-05-20 22:12:32
How maneuvers work command ?? And file location put ??
I try send my self not work
Only install and work or need add some thing
Any one know anything for maneuvers auto work tell pls
Cerberus.Jiko
サーバ: Cerberus
Game: FFXI
Posts: 1741
By Cerberus.Jiko 2019-05-21 07:48:45
Not gonna lie, I'm horrible as far as it comes to understanding GS. Can someone help me out? Way back when the other one was out (the one where you used .txt files to swap gear I was great with, but I can't understand java for the life of me. Sending links honestly hasn't helped me in the slightest.
If anyone could take the time to step by step to really help me out, i'd really appreciate the help. Thank you.
By Arrchie 2019-05-21 11:55:02
Not gonna lie, I'm horrible as far as it comes to understanding GS. Can someone help me out? Way back when the other one was out (the one where you used .txt files to swap gear I was great with, but I can't understand java for the life of me. Sending links honestly hasn't helped me in the slightest.
If anyone could take the time to step by step to really help me out, i'd really appreciate the help. Thank you.
I don't believe Faloun supports this anymore. (This is lua and not java).
You are welcome to join us over on: https://www.ffxiah.com/forum/topic/53071/pup-gearswap-testers-needed/
This is a redesign and has tons of support and even a discord channel you can join to get assistance. We have tons of active members that can help. It has become very stable and we have a nice HUB window to go along with it.
Ragnarok.Cpttn
By Ragnarok.Cpttn 2019-05-22 12:14:03
XML file miss and not found it pls if you hae link to download it send here and how change file from txt to xml help
Ragnarok.Cpttn
By Ragnarok.Cpttn 2019-05-24 17:41:37
xml file downloaded txt file not xml
any one can upload xml and can download xml not txt file
i can convert it pls help
Hello everyone,
Just a little post to share my pup gearswap lua, which is still in progress :
Actually it support tank automaton, and dd automaton, but I wrote nothing for mage automatons yet
Here is link for it :
- PUP lua : https://pastebin.com/7aVYsMsr
- PUP include (needed, but for future improvement) : https://pastebin.com/ihpG04Tt
- My autocontrol setting(the addon that switch attachment sets) : https://pastebin.com/qNfWDkTc
Last one is needed cause the PUP lua will automatically switch attachment sets when you ask him to
To setup your automaton, you need to say to yourself "Mode", then it'll ask you for Tank, DD...(Only Tank and DD works atm)
Then it'll ask you for different mode of tanks(PDT, MDT), and different mode of DDs(Normal, Boneslayer, WS Spammer, Overdrive, and Overdrive with tons of acc)
When you are on Tank mode, it'll automatically switch to pet:enmity+ set when flashbulb or strobe is ready :
YouTube Video Placeholder
When you are on Normal or Boneslayer DD mode :
The lua will try to guess which ws your pet will use once you used a ws if you melee with pet. If you let pet fight alone, it'll switch to petws gear once the pet have enough tp to ws)
When on Overdrive Mode (with Overdrive buff on), it'll try to guess which ws is next for your pet :
YouTube Video Placeholder
Hope you'll enjoy it
Tell me if you find bugs to fix
Tell me if you have any idea to improve this lua
Have a nice day
|
|