-
Notifications
You must be signed in to change notification settings - Fork 79
LUA Code Example
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