You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Morgan Quinn edited this page Jan 6, 2023
·
2 revisions
I've seen some questions regarding how to write loops with LUA, so I'll happily share mine! This is my actual loop that I use. If food or potion is not needed, those sections can be commented out.
while true do
yield('/wait 1')
if(NeedsRepair())
then
yield('/runmacro Repair')
end
yield('/wait 1')
if(CanExtractMateria())
then
yield('/runmacro Materia')
end
yield('/wait 1')
if (not HasStatus("Well Fed"))
then
yield('/runmacro FoodBuff')
end
yield('/wait 1')
if (not HasStatus("Medicated"))
then
yield('/runmacro PotBuff')
end
yield('/runmacro CPLUA')
end