Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
auto responder
#1
Hello.

I see version 84.1 and in this version the bbot read messages on the client.

Please, i need a example for system message.

[Sistema Anti-Bot] Responda a pergunta a seguir através do comando !r ". Se não responder corretamente será banido. PERGUNTA: Responda essa sequencia: MRSQ"OUWTV2
Exemplo de resposta: !r QWXV@TZLY{3

R) !r MRSQ"OUWTV2


I need only example.
Reply
#2
I loved this request! I don't have BBot here, but I believe the final macro will be similar to this:

Outdated, new version below!
[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^\\[Sistema Anti-Bot\\].*: \(.*?\)$) When.SystemMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]

This regex can be seen here: https://regex101.com/r/45XrhL/1
As you can see, this regex will match a system message similar to the one you describe, it uses a (matching group) to capture anything after the : symbol. Then, it will simply Self.Say(...) that match.

Note: the Macro Engine requires several escaping of the regex (adding \ before some characters), because the regex contains some special symbols that BBot also recognizes. Escaping them makes them normal characters Smile
Reply
#3
(09-24-2018, 01:43 PM)MegaNo0body Wrote: I loved this request! I don't have BBot here, but I believe the final macro will be similar to this:

[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^\\[Sistema Anti-Bot\\].*: \(.*?\)$) When.SystemMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]

This regex can be seen here: https://regex101.com/r/45XrhL/1
As you can see, this regex will match a system message similar to the one you describe, it uses a (matching group) to capture anything after the : symbol. Then, it will simply Self.Say(...) that match.

Note: the Macro Engine requires several escaping of the regex (adding \ before some characters), because the regex contains some special symbols that BBot also recognizes. Escaping them makes them normal characters Smile

After create "once macro" paste the line and "enable auto macros" my bbot enter in Panic mode.
Sad
Reply
#4
(09-24-2018, 09:20 PM)paradex Wrote: After create "once macro" paste the line and "enable auto macros" my bbot enter in Panic mode.
Sad

Because that isn't finished macro yet.

I'm still trying to figure out it Smile
Reply
#5
(09-25-2018, 06:19 AM)Catar Wrote:
(09-24-2018, 09:20 PM)paradex Wrote: After create "once macro" paste the line and "enable auto macros" my bbot enter in Panic mode.
Sad

Because that isn't finished macro yet.

I'm still trying to figure out it Smile

OK, I am wait Wink
Reply
#6
(09-25-2018, 11:31 AM)paradex Wrote: OK, I am wait Wink

I didnt mean this one in particular, i meant that string reading and when macros overall.

instead of wait, try to understand it also, google how RegEx works (regular expressions)
analyze what BMega made in casino macro.
Reply
#7
(09-25-2018, 12:36 PM)Catar Wrote:
(09-25-2018, 11:31 AM)paradex Wrote: OK, I am wait Wink

I didnt mean this one in particular, i meant that string reading and when macros overall.

instead of wait, try to understand it also, google how RegEx works (regular expressions)
analyze what BMega made in casino macro.

Sorry, i am not waiting the solution, i am Talk wrong. (Sorry for that)
I am testing That.
----------------//------------------
Str.Set(A, oi)
When.PrivateMessage(WhenOI, !A)
Exit()

{WhenOI}
Self.say(oi)
Exit()
----------------//------------------

That Still work greath.
I am go working in respond "antibot" I am need get character in position 158 at 169.
I think is more easy.

Sorry my bad ingles.
Reply
#8
First change Str.set to Str.Regex and stop panic error.

But I dont understand Regex.


Str.Regex(AntiBotMessagePattern, ^\[Sistema Anti-Bot\].*: \(.*?\)$)
When.SystemMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern)
Exit()
{WhenReceivedAntiBotMessage}
Self.Say(\!r !Str.Match.1)
exit()


In red It is pieces i a dont understand.
I think so, get positional caracter 158 at 169 is more easy.

You have regex for get this characters?
Reply
#9
Updated

[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^.*?\\[Sistema Anti-Bot\\].*?: \(.*?\)$) When.AnyMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() Comment(Testing tip, only after Message.Text is set) Str.Regex(AntiBotMessagePattern, Message.Text) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]
Reply
#10
(09-27-2018, 01:29 PM)MegaNo0body Wrote: Updated

[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^.*?\\[Sistema Anti-Bot\\].*?: \(.*?\)$) When.AnyMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() Comment(Testing tip, only after Message.Text is set) Str.Regex(AntiBotMessagePattern, Message.Text) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]

Dosen't work Sad

I am respond
13:00 Xxxxxxx [xxx]: !r ?Str.Match.1

I need respond: MRSQ"OUWTV2
But this string is random...
Reply
#11
(09-27-2018, 04:04 PM)paradex Wrote:
(09-27-2018, 01:29 PM)MegaNo0body Wrote: Updated

[macro]1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^.*?\\[Sistema Anti-Bot\\].*?: \(.*?\)$) When.AnyMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() Comment(Testing tip, only after Message.Text is set) Str.Regex(AntiBotMessagePattern, Message.Text) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)[/macro]

Dosen't work Sad

I am respond
13:00 Xxxxxxx [xxx]: !r ?Str.Match.1

I need respond: MRSQ"OUWTV2
But this string is random...

Please, screenshoot your Variables screen after you receive the message.
Reply
#12
Photo 
https://imageshack.com/a/img922/5296/3YzGKq.png
Reply
#13
Are you sure you`re using the last version?
Reply
#14
(09-27-2018, 06:41 PM)MegaNo0body Wrote: Are you sure you`re using the last version?

Yes...
84.1

see my print...
Reply
#15
The last version of the macro I mean, because in your variables, I see AntiBotMessagePattern is totally wrong.
Reply
#16
(09-28-2018, 02:46 PM)MegaNo0body Wrote: The last version of the macro I mean, because in your variables, I see AntiBotMessagePattern is totally wrong.

ahhh sorry.

I have one modifications.


1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, ^.*?\[Sistema Anti-Bot\].*?: \(.*?\)$) When.AnyMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() Comment(Testing tip, only after Message.Text is set) Str.Regex(AntiBotMessagePattern, Message.Text) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)

for
1 {Anti Bot Responder} Str.Set(AntiBotMessagePattern, Anti) When.AnyMessage(WhenReceivedAntiBotMessage, !AntiBotMessagePattern) Exit() Comment(Testing tip, only after Message.Text is set) Str.Regex(AntiBotMessagePattern, Message.Text) Exit() {WhenReceivedAntiBotMessage} Self.Say(\!r !Str.Match.1)

If i use "^.*?\[Sistema Anti-Bot\].*?: \(.*?\)$" my bbot receive "panic mode".


I think so change Str.Set to STR.Regex. but doesn't work too.


PS: I am hunting now and wait this message for more tests...
Reply
#17
Mega...

I am change in your macro only string "str.Set" to "str.Regex" Because Str.Set causes panic mode in bbot if i use Regex sintax...

See that.

Variables:
https://imageshack.us/i/poQGuiu4p

Macro:
https://imageshack.us/i/plw3XCkCp

Answer:
https://imageshack.us/i/pnZPtjG4p

I need get de Bold and underlined characters:
15:57 [Sistema Anti-Bot] Responda a pergunta a seguir através do comando !r ". Se não responder corretamente será banido. PERGUNTA: Responda essa sequencia: DNOM*KQBPR6
Exemplo de resposta: !r QWXV@TZLY{3
Reply
#18
(09-28-2018, 07:06 PM)paradex Wrote: Mega...

I am change in your macro only string "str.Set" to "str.Regex" Because Str.Set causes panic mode in bbot if i use Regex sintax...

See that.

Variables:
https://imageshack.us/i/poQGuiu4p

Macro:
https://imageshack.us/i/plw3XCkCp

Answer:
https://imageshack.us/i/pnZPtjG4p

I need get de Bold and underlined characters:
15:57 [Sistema Anti-Bot] Responda a pergunta a seguir através do comando !r ". Se não responder corretamente será banido. PERGUNTA: Responda essa sequencia: DNOM*KQBPR6
Exemplo de resposta: !r QWXV@TZLY{3

Please, read the documentation http://wiki.bmega.net/doku.php?id=macros...nds#string

You can`t simply change the Str.Set to Str.Regex, because they do different things. Also, When requires a Str.Set.

Tweaks you can do:
1. change the When.SystemMessage to When.AnyMessage
2. change the pattern to something valid, 'anti' is not a valid pattern. Regular Expressions are an advanced topic and there's no way to make them simpler. The one I gave you on the sample should work for most of the cases, just try modifing it so that it will filter the right message.
Reply
#19
(09-29-2018, 11:59 AM)MegaNo0body Wrote:
(09-28-2018, 07:06 PM)paradex Wrote: Mega...

I am change in your macro only string "str.Set" to "str.Regex" Because Str.Set causes panic mode in bbot if i use Regex sintax...

See that.

Variables:
https://imageshack.us/i/poQGuiu4p

Macro:
https://imageshack.us/i/plw3XCkCp

Answer:
https://imageshack.us/i/pnZPtjG4p

I need get de Bold and underlined characters:
15:57 [Sistema Anti-Bot] Responda a pergunta a seguir através do comando !r ". Se não responder corretamente será banido. PERGUNTA: Responda essa sequencia: DNOM*KQBPR6
Exemplo de resposta: !r QWXV@TZLY{3

Please, read the documentation http://wiki.bmega.net/doku.php?id=macros...nds#string

You can`t simply change the Str.Set to Str.Regex, because they do different things. Also, When requires a Str.Set.

Tweaks you can do:
1. change the When.SystemMessage to When.AnyMessage
2. change the pattern to something valid, 'anti' is not a valid pattern. Regular Expressions are an advanced topic and there's no way to make them simpler. The one I gave you on the sample should work for most of the cases, just try modifing it so that it will filter the right message.

MegaNobody... You dont understand...

If I use, str.set i receiver bbot panic error, see this.
https://imageshack.com/a/img922/5563/AUvLwb.png

See variables:
https://imageshack.com/a/img924/4186/0KpEyy.png
Reply
#20
any solution?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)