Skip to content

Commit

Permalink
fixing unsync for trials, raids
Browse files Browse the repository at this point in the history
  • Loading branch information
pot0to committed Oct 18, 2024
1 parent 2c4221a commit d778f4b
Show file tree
Hide file tree
Showing 3 changed files with 183 additions and 6 deletions.
154 changes: 154 additions & 0 deletions Dailies/Allied Society Quests.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
--[[
********************************************************************************
* Allied Society Quests *
* Version 0.0.0 *
********************************************************************************
--]]

ToDoList = { "Arkosodara" }

--[[
********************************************************************************
* Code: Don't touch this unless you know what you're doing *
********************************************************************************
]]

AlliedSocietiesTable =
{
arkosodara =
{
alliedSocietyName = "Arkosodara",
questGiver = "Maru",
x = -68.21,
y = 39.99,
z = 323.31,
zoneId = 957,
aetheryteName = "Yedlihmad"
},
loporrits =
{
alliedSocietyName = "Loporrits",
questGiver = "Managingway",
x = -201.27,
y = -49.15,
z = -273.8,
zoneId = 959,
aetheryteName = "Bestways Burrow"
},
omicrons =
{
alliedSocietyName = "Omicrons",
questGiver = "Stigma-4",
x=315.84,
y=481.99,
z=152.08,
zoneId = 960,
aetheryteName = "Base Omicron"
}
}

CharacterCondition = {
dead=2,
mounted=4,
inCombat=26,
casting=27,
occupied31=31,
occupiedShopkeeper=32,
occupied=33,
boundByDuty34=34,
occupiedMateriaExtraction=39,
betweenAreas=45,
jumping48=48,
jumping61=61,
occupiedSummoningBell=50,
betweenAreasForDuty=51,
boundByDuty56=56,
mounting57=57,
mounting64=64,
beingmoved70=70,
beingmoved75=75,
flying=77
}

function GetAlliedSocietyTable(alliedSocietyName)
for _, alliedSociety in pairs(AlliedSocietiesTable) do
if alliedSociety.alliedSocietyName == alliedSocietyName then
return alliedSociety
end
end
end

function CheckAllowances()
if not IsAddonVisible("ContentsInfo") then
yield("/timers")
yield ("/wait 1")
end

for i = 1, 15 do
local timerName = GetNodeText("ContentsInfo", 8, i, 5)
if timerName == "Next Allied Society Daily Quest Allowance" then
return tonumber(GetNodeText("ContentsInfo", 8, i, 4):match("%d+$"))
end
end
return 0
end

function TeleportTo(aetheryteName)
yield("/tp "..aetheryteName)
yield("/wait 1") -- wait for casting to begin
while GetCharacterCondition(CharacterCondition.casting) do
LogInfo("[FATE] Casting teleport...")
yield("/wait 1")
end
yield("/wait 1") -- wait for that microsecond in between the cast finishing and the transition beginning
while GetCharacterCondition(CharacterCondition.betweenAreas) do
LogInfo("[FATE] Teleporting...")
yield("/wait 1")
end
yield("/wait 1")
LastTeleportTimeStamp = EorzeaTimeToUnixTime(GetCurrentEorzeaTimestamp())
end

yield("/at y")
for _, alliedSocietyName in ipairs(ToDoList) do
yield("/echo 1")
local startingAllowances = CheckAllowances()
yield("/echo "..startingAllowances)
local alliedSocietyTable = GetAlliedSocietyTable(alliedSocietyName)
if alliedSocietyTable ~= nil then
if not IsInZone(alliedSocietyTable.zoneId) then
TeleportTo(alliedSocietyTable.aetheryteName)
end

if not GetCharacterCondition(4) then
yield('/gaction "mount roulette"')
end
PathfindAndMoveTo(alliedSocietyTable.x, alliedSocietyTable.y, alliedSocietyTable.z, true)
repeat
yield("/wait 1")
until not PathIsRunning() and not PathfindInProgress()

-- accept 3 allocations
for i=1,3 do
yield("/target "..alliedSocietyTable.questGiver)
yield("/interact")

repeat
yield("/wait 1")
until IsAddonVisible("SelectIconString")
yield("/callback SelectIconString true 0")

repeat
yield("/wait 1")
until not IsPlayerOccupied()
end

yield("/qst start")
repeat
yield("/wait 10")
yield("/echo "..CheckAllowances())
yield("/echo "..startingAllowances)
until CheckAllowances() == startingAllowances - 3
end
end
4 changes: 2 additions & 2 deletions Dailies/Treasure Map Gatherer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Gathers a map, relogs as the next character in the list, and repeat.
* Required Plugins *
********************************************************************************
1. Vnavmesh
2. Gather Buddy Reborn
2. Gather Buddy Reborn - Create an autogather list with your desired map
3. Autoretainer
]]

Expand All @@ -39,7 +39,7 @@ Gathers a map, relogs as the next character in the list, and repeat.
********************************************************************************
]]

MapName = "Timeworn Gazelleskin Map"
MapName = "Timeworn Gazelleskin Map" -- must match the map on your GBR list

Multimode = true
Characters =
Expand Down
31 changes: 27 additions & 4 deletions functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function GetAetheryteName(aetheryteId)
if AetheryteList[i].AetheryteData.GameData.PlaceName.Value ~= nil then
if AetheryteList[i].AetheryteData.GameData.PlaceName.Value.Name ~= nil then
LogInfo(AetheryteList[i].AetheryteData.GameData.PlaceName.Value.Name)
return tostring(AetheryteList[i].AetheryteData.GameData.PlaceName.Value.Name):gsub(": %d+", "")
return tostring(AetheryteList[i].AetheryteData.GameData.PlaceName.Value.Name):match("(.+):")
end
end
end
Expand All @@ -30,6 +30,29 @@ function GetAetherytesInZone(zoneId)
return aetherytes
end

for _, aetheryte in ipairs(GetAetherytesInZone(478)) do
yield("/echo "..aetheryte)
end
-- Svc.AetheryteList.FirstOrDefault(x => x.AetheryteId == aetheryteID)?.AetheryteData.GameData?.Level.FirstOrDefault()?.Value?.X ?? 0;
function GetAetheryteRawPos(aetheryteId)
for i=0,AetheryteList.Count do
if AetheryteList[i] ~= nil then
if AetheryteList[i].AetheryteId == aetheryteId then
if AetheryteList[i].AetheryteData.GameData ~= nil then
if AetheryteList[i].AetheryteData.GameData.Map ~= nil then
yield("/echo map not nil")
local level = AetheryteList[i].AetheryteData.GameData.Map
LogInfo(AetheryteList[i].AetheryteData.GameData.Level[1].X)
if AetheryteList[i].AetheryteData.GameData.Level[1].Value ~= nil then

yield("/echo level value not nil")
return level.Value.X, level.Value.Y, level.Value.Z
end
yield("/echo level value is nil")
end
end
end
end
end
return 0, 0, 0
end

local x,y,z = GetAetheryteRawPos(210)
yield("/echo "..x..", "..y..", "..z)

0 comments on commit d778f4b

Please sign in to comment.