Do you know a loop macro that says "Hello" 900 times
or casts Flame 100 times etc. ?
like:
/script for:1,99, do say Hello; end;
or
/script for:1,99, do CastSpellByName("Flame");end;
...
Do you know a loop macro that says "Hello" 900 times
or casts Flame 100 times etc. ?
like:
/script for:1,99, do say Hello; end;
or
/script for:1,99, do CastSpellByName("Flame");end;
...
To print text multiple times:
If you want to write it in a chat that other players can see, use e. g. SendChatMessage("Hello", "say"). Note that the game blocks your messages if you send a lot of them in a short period of time, so don't expect to see more than 5 "Hello"s appear. This does not apply to your own UI, so writing to ChatFrame1 (or literally any text widget) will work as expected.
Anything that the game considers an action, e. g. casting a spell, using an item etc., can not be done more than once in a loop.
To use multiple actions within a single macro, you have to use a construction like this:
The waiting duration can of course be optimized for each action. Using "/cast xyz" is a shortcut for "/run CastSpellByName("xyz")" and saves precious characters. since macros have a size limit.
There are further optimizations to put more repetitions into a single macro (define a function or a slash command and call those in the macro, saving more space), but the limitation of needing to wait between executions remains.
And for the sake of completeness, here's more information regarding the for statement in Lua: >Link<
Great explanation above
If they allowed this kind of function it would easily allow afk botting using only ingame macros