04-15-2019, 03:58 AM
(This post was last modified: 04-15-2019, 03:59 AM by MegaNo0body.)
(04-11-2019, 06:00 PM)micheel15 Wrote: this is a error :
`When` functions can only be executed inside `once` macros (no auto macros/no manual macros)
Make your macro an 'Once'. Where you set how much delay between very macro execution, you must set to Once.
'When' macros are tricky, they keep the macro always listening for that 'when' event (thats why it can only run once, because it runs for ever).
You have to register your 'callback', your label when that event happens
You need two macros, one that will listen for the message 'You have ... unjust' and another that says !kills from time to time, so that you ever receives the messages.
[macro]1 {Message detector}
When.SystemMessage(OnOneUnjustified, "You have 1 unjustified kill.*")
Exit()
{OnOneUnjustified}
Tibia.Close()
[/macro]
[macro]60000 {Say !kills} Self.Say(\!kills)[/macro]