break breaks from loops only. So the break in the if statement
will break out of the for loop.
/wait is not a function, it's a slash command. You can't include that on a line with other code. Can you have a line in a macro with
I'm not sure but I don't think so.
I think /wait has to be on it's own line and you can't use RoMScript or sendMacro because they are for normal code that will be preceded with /script.
You have to use SlashCommand. If I remember correctly I added support for multiline slash commands. Here's the comment in the 758 changelog
- Modified the IGF to be able to run multiline slash commands.
- So now you can effectively run macros from the bot without having to use a SlashCommand per line. Eg.
Code: Select all
SlashCommand("/script TargetNearestFriend()/script UseSkill(1,1)/Script ChoiceOption(8)")
Note: if you are using SlashCommand everything has to be a slash command. So normal functions have to be preceeded be /script as per the example above. So something like this should work.
Code: Select all
SlashCommand('/script CastSpellByName("Shot"); /wait 2 /script CastSpellByName("Shot"); /wait 2 /script CastSpellByName("Shot")')
So effectively every slash is treated like a new like in a macro.