Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error macro
04-11-2019, 06:00 PM (This post was last modified: 04-11-2019 06:13 PM by micheel15.)
Post: #1
error macro
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)
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
04-15-2019, 03:58 AM (This post was last modified: 04-15-2019 03:59 AM by MegaNo0body.)
Post: #2
RE: error macro
(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.
Message detector (once)
1 {Message detector}
When.SystemMessage(OnOneUnjustified, "You have 1 unjustified kill.*")
Exit()
{OnOneUnjustified}
Tibia.Close()


Say !kills (auto: 60000ms)
60000 {Say !kills} Self.Say(\!kills)

Give Reputation to this user

Visit this user's website Find all posts by this user
Quote this message in a reply
04-15-2019, 07:06 PM (This post was last modified: 04-15-2019 07:08 PM by micheel15.)
Post: #3
RE: error macro
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?
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
04-15-2019, 10:02 PM
Post: #4
RE: error macro
try When.AnyMessage then.
Give Reputation to this user

Visit this user's website Find all posts by this user
Quote this message in a reply
04-15-2019, 10:24 PM (This post was last modified: 04-15-2019 10:27 PM by micheel15.)
Post: #5
RE: error macro
even using When.AnyMessage
still does not recognize the message!

https://imgur.com/PLu4VUz
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)