auto responder - Printable Version +- BBot - The best bot of the world (https://forums.bmega.net) +-- Forum: Scripts & Macros (https://forums.bmega.net/forum-4.html) +--- Forum: Requests (https://forums.bmega.net/forum-17.html) +--- Thread: auto responder (/thread-20931.html) Pages:
1
2
|
auto responder - paradex - 09-24-2018 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. RE: auto responder - MegaNo0body - 09-24-2018 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 RE: auto responder - paradex - 09-24-2018 (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: After create "once macro" paste the line and "enable auto macros" my bbot enter in Panic mode. RE: auto responder - Catar - 09-25-2018 (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. Because that isn't finished macro yet. I'm still trying to figure out it RE: auto responder - paradex - 09-25-2018 (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. OK, I am wait RE: auto responder - Catar - 09-25-2018 (09-25-2018, 11:31 AM)paradex Wrote: OK, I am wait 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. RE: auto responder - paradex - 09-25-2018 (09-25-2018, 12:36 PM)Catar Wrote:(09-25-2018, 11:31 AM)paradex Wrote: OK, I am wait 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. RE: auto responder - paradex - 09-26-2018 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? RE: auto responder - MegaNo0body - 09-27-2018 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] RE: auto responder - paradex - 09-27-2018 (09-27-2018, 01:29 PM)MegaNo0body Wrote: Updated Dosen't work I am respond 13:00 Xxxxxxx [xxx]: !r ?Str.Match.1 I need respond: MRSQ"OUWTV2 But this string is random... RE: auto responder - MegaNo0body - 09-27-2018 (09-27-2018, 04:04 PM)paradex Wrote:(09-27-2018, 01:29 PM)MegaNo0body Wrote: Updated Please, screenshoot your Variables screen after you receive the message. RE: auto responder - paradex - 09-27-2018 https://imageshack.com/a/img922/5296/3YzGKq.png RE: auto responder - MegaNo0body - 09-27-2018 Are you sure you`re using the last version? RE: auto responder - paradex - 09-28-2018 (09-27-2018, 06:41 PM)MegaNo0body Wrote: Are you sure you`re using the last version? Yes... 84.1 see my print... RE: auto responder - MegaNo0body - 09-28-2018 The last version of the macro I mean, because in your variables, I see AntiBotMessagePattern is totally wrong. RE: auto responder - paradex - 09-28-2018 (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... RE: auto responder - paradex - 09-28-2018 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 RE: auto responder - MegaNo0body - 09-29-2018 (09-28-2018, 07:06 PM)paradex Wrote: Mega... Please, read the documentation http://wiki.bmega.net/doku.php?id=macros_commands#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. RE: auto responder - paradex - 09-30-2018 (09-29-2018, 11:59 AM)MegaNo0body Wrote:(09-28-2018, 07:06 PM)paradex Wrote: Mega... 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 RE: auto responder - paradex - 10-03-2018 any solution? |