Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusion on how to loop lua macros #126

Open
Zimmerson opened this issue Mar 26, 2023 · 0 comments
Open

Confusion on how to loop lua macros #126

Zimmerson opened this issue Mar 26, 2023 · 0 comments

Comments

@Zimmerson
Copy link

Zimmerson commented Mar 26, 2023

Hi all,

VERY new to writing lua, ie, i've literally only touched upon Lua today and I've made this so far.

-- /requirestats 3900 3600 580
if (HasStats(3900, 3600, 580))
then
yield('/echo "You have the appropiate Stats"')
else
yield('/echo "you do not have the required stats to make this item"')
yield('/runmacro "WellFed"')
end

-- if you're below 10% durability, full repair
if (NeedsRepair(5))
then
yield('/echo "Initiating Repairs"')
yield('/runmacro "Repair Gear"')
else
yield('/echo "Your durability is fine"')
end

if CanExtractMateria(100)
then
yield('/runmacro "MateriaExtraction"')
end

-- Crafts
yield('/craft 10')

--Craft Macro
"-----"
"-----"
yield('/click synthesize <wait.3>')
yield('/ac "Muscle Memory" <wait.3>')
yield('/ac Manipulation <wait.2>')
yield('/ac Veneration <wait.2>')
yield('/ac "Waste Not" <wait.2>')
yield('/ac "Final Appraisal" <wait.2>')
yield('/ac "Groundwork" <wait.3>')
yield('/ac "Groundwork" <wait.3>')
yield('/ac "Groundwork" <wait.3>')
yield('/ac "Innovation" <wait.2>')
yield('/ac "Prudent Touch" <wait.3>')
yield('/ac "Basic Touch" <wait.3>')
yield('/ac "Standard Touch" <wait.3>')
yield('/ac "Advanced Touch" <wait.3>')
yield('/ac Manipulation <wait.2>')
yield('/ac Innovation <wait.2>')
yield('/ac "Basic Touch" <wait.3>')
yield('/ac "Basic Touch" <wait.3>')
yield('/ac "Standard Touch" <wait.3>')
yield('/ac "Advanced Touch" <wait.3>')
yield('/ac Innovation <wait.2>')
yield('/ac "Great Strides" <wait.2>')
yield('/ac "Byregot's Blessing" <wait.3>')
yield('/ac "Basic Synthesis" <wait.3>')
yield('/echo Craft finished <se.2>')
yield('/wait 1')

I'm REALLY struggling to know how the hell I loop this macro. I did have:
yield("/recipe Grade 7 Tincture of Strength <wait.5>")
yield('/click synthesis_material2_hq <wait.1>')

These two commands linked where the "-----"s were. But if I have them there - it crashes as the recipe crafting log is already open.

So - I put it on another macro that calls the main crafting Macro (ie the one above). Which then leads me to my current issue.

How the hell do you loop this?! I want to loop this macro X amount of times. I've been trying to figure this out all day and i'm spent.

Does anyone have any ideas?

Many thanks,

Zimmerson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant