Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error macro
#1
I am trying to create a macro to check if the character has some kill and if it has, it will close the tibia, if it is not going to continue hunting

I'm trying this way, I do not understand much, can anyone help me?

the macro I made was this:

Exitno =:False
Exityes =:True
Self.Say(!kills)
When.Yell(!Exitno!, "You do not have any unjustified kill.*") [else2]
Exit()

{else2}
When.Yell(!Exityes!, "You have 1 unjustified kill.*") Tibia.Close()
Exit()



Could someone tell me where I'm going wrong?
this is a error :
`When` functions can only be executed inside `once` macros (no auto macros/no manual macros)
Reply
#2
(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]
Reply
#3
I tried and macro you sent me, but it seems to me that it is not recognizing the type of message, is it because it is not related to the system message like the invasions of bosses?

I posted the image in imgur if you can take a look, it uses the talk macro! kills, plus the close client does not recognize the message

photo:
https://imgur.com/aPkIiCW

would you have to put the whole message?
Reply
#4
try When.AnyMessage then.
Reply
#5
even using When.AnyMessage
still does not recognize the message!

https://imgur.com/PLu4VUz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)