Signup Now
Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22
  1. #11
    Free User Dolmero's Avatar
    Join Date
    Jun 2016
    Location
    Sweden
    Posts
    118
    Reputation
    56
    Rep Power
    16
    I can't test this and I'm not the best at regex, but give it a try.

    auto(500)
    foreach newmessage m do
    if m.type == 14 then
    if string.find(m.content, "^{Anti Bot System}") then
    q,w,e = string.match(m.content, ".*(%d+).*(%d+).*(%d+).*")
    say("!antibot "..w+e)
    end
    end
    end
    Last edited by Dolmero; 09-03-2016 at 08:20 PM.

  2. #12
    Free User Dolmero's Avatar
    Join Date
    Jun 2016
    Location
    Sweden
    Posts
    118
    Reputation
    56
    Rep Power
    16
    Quote Originally Posted by Imba View Post
    Try this
    auto(100)
    foreach newmessage m do
    if m.type == 14 and string.match(m.content, "{Anti Bot System}") then
    local q1, q2 = string.match(m.content, "(%d+)%d%+%s(%d+)")
    say(q1+q2)
    end
    end
    Beat me to it

  3. #13
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,578
    Reputation
    149
    Rep Power
    27
    @Dolmero actually both mine and your code wouldn't work, because there are both addiotion and subtraction. I edited my code tho, check it.

  4. #14
    Free User
    Join Date
    Jul 2016
    Posts
    22
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    Try this
    auto(100)
    foreach newmessage m do
    if m.type == 14 and string.match(m.content, "{Anti Bot System}") and m.sender == "" then
    local q1 = string.match(m.content, "é%s(.-)%.")
    if string.match(q, "^[%d%s%+%-%/%*]+$") then
    exec("say('!antibot '.."..q..")")
    end
    end
    end
    nothing happened

  5. #15
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,578
    Reputation
    149
    Rep Power
    27
    Quote Originally Posted by marshallfx View Post
    nothing happened
    oh sorry, i did typo
    auto(100)
    foreach newmessage m do
    if m.type == 14 and string.match(m.content, "{Anti Bot System}") and m.sender == "" then
    local q = string.match(m.content, "é%s(.-)%.")
    if string.match(q, "^[%d%s%+%-%/%*]+$") then
    exec("say('!antibot '.."..q..")")
    end
    end
    end

  6. #16
    Free User Dolmero's Avatar
    Join Date
    Jun 2016
    Location
    Sweden
    Posts
    118
    Reputation
    56
    Rep Power
    16
    Quote Originally Posted by Imba View Post
    @Dolmero actually both mine and your code wouldn't work, because there are both addiotion and subtraction. I edited my code tho, check it.
    Oh I see

  7. #17
    Free User
    Join Date
    Jul 2016
    Posts
    22
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    oh sorry, i did typo
    auto(100)
    foreach newmessage m do
    if m.type == 14 and string.match(m.content, "{Anti Bot System}") and m.sender == "" then
    local q = string.match(m.content, "é%s(.-)%.")
    if string.match(q, "^[%d%s%+%-%/%*]+$") then
    exec("say('!antibot '.."..q..")")
    end
    end
    end

    Thank You So much! Love u guys

    It works.

  8. #18
    Free User
    Join Date
    Jul 2016
    Posts
    22
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    oh sorry, i did typo
    auto(100)
    foreach newmessage m do
    if m.type == 14 and string.match(m.content, "{Anti Bot System}") and m.sender == "" then
    local q = string.match(m.content, "é%s(.-)%.")
    if string.match(q, "^[%d%s%+%-%/%*]+$") then
    exec("say('!antibot '.."..q..")")
    end
    end
    end

    IMBA I have a question.... the action..... answer 1 or 2 times.... then antibot come again but the windbot do nothing....


    if I enable and disable..... the persistent back work again


    the question was 23+5
    Last edited by marshallfx; 09-05-2016 at 02:31 AM.

  9. #19
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,578
    Reputation
    149
    Rep Power
    27
    You mean it answer 1 or 2 times per 1 received message or 1-2 times on different questions and then stops? Are you sure message is the same? You aren't run Dolmero's code that scans your msg and post it here

  10. #20
    Free User
    Join Date
    Jul 2016
    Posts
    22
    Reputation
    10
    Rep Power
    0
    Quote Originally Posted by Imba View Post
    You mean it answer 1 or 2 times per 1 received message or 1-2 times on different questions and then stops? Are you sure message is the same? You aren't run Dolmero's code that scans your msg and post it here
    No.... some times it answer some times not answer at all.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •