Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: About messages

  1. #1
    Normal User
    Join Date
    Jul 2012
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Red face About messages

    Hello guys, i need some help with an action to get the sender, and the context of the private message. If the context = "x" and sender = "y" then send "z" message to "y"

    Someone can help me? =) I'm new with this bot

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Not sure you can, can anyone else confirm?

  3. #3
    Normal User
    Join Date
    Jul 2012
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Thank you anyway pink ^^

    And about an action to transfer all gp that my char have, not only in the open backpack, can i make it?

  4. #4
    Normal User sirmate's Avatar
    Join Date
    Mar 2012
    Location
    Poland
    Posts
    176
    Mentioned
    2 Post(s)
    Tagged
    3 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    105
    Rep Power
    6
    Test it and report back.

    Code:
    local CONFIG = {
        MESSAGE_SENDER = "CHARACTER_NAME",
        EXPECTED_MESSAGE = "MESSAGE_CONTENT",
        MESSAGE_TO_SEND = "MESSAGE_CONTENT",
    }
    
    -- [[ DO NOT CHANGE ANYTHING BELOW THIS LINE. ]] --
    
    local CHAT_MESSAGES = getnewmessages("Local Chat")
    local CHAT_MESSAGES_QUANTITY = CHAT_MESSAGES.count - 1
    
    for INDEX = 0, CHAT_MESSAGES_QUANTITY do
        if (CHAT_MESSAGES[CHAT_MESSAGES_QUANTITY - INDEX].text:find(CONFIG.EXPECTED_MESSAGE)) then
            if (ischannel(CONFIG.MESSAGE_SENDER)) then
                say(CONFIG.MESSAGE_TO_SEND, CONFIG.MESSAGE_SENDER)
            else
                say('@' .. CONFIG.MESSAGE_SENDER .. '@ ' .. CONFIG.MESSAGE_TO_SEND)
            end
            
            break
        end
    end
    
    local CHAT_MESSAGES = getnewmessages(CONFIG.MESSAGE_SENDER)
    local CHAT_MESSAGES_QUANTITY = CHAT_MESSAGES.count - 1
    
    for INDEX = 0, CHAT_MESSAGES_QUANTITY do
        if (CHAT_MESSAGES[CHAT_MESSAGES_QUANTITY - INDEX].text:find(CONFIG.EXPECTED_MESSAGE)) then
            if (ischannel(CONFIG.MESSAGE_SENDER)) then
                say(CONFIG.MESSAGE_TO_SEND, CONFIG.MESSAGE_SENDER)
            else
                say('@' .. CONFIG.MESSAGE_SENDER .. '@ ' .. CONFIG.MESSAGE_TO_SEND)
            end
            
            break
        end
    end
    (๏̯͡๏ )

  5. #5
    Normal User
    Join Date
    Jul 2012
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Im at work now, later im going to test and i ll post here ^^
    Really thanks ^^

  6. #6
    Normal User Onehit's Avatar
    Join Date
    Mar 2012
    Location
    Cwb
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    117
    Rep Power
    7
    Is there a way to create a script to detect when someone wask if botting? Example, the person says "bot?" and auto answer, "no". Is it possible?

  7. #7
    Normal User FrogZ's Avatar
    Join Date
    Jul 2012
    Location
    Laguna Island - LB
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    yeah just change
    EXPECTED_MESSAGE = "MESSAGE_CONTENT" to bot? and MESSAGE_TO_SEND = "MESSAGE_CONTENT" to no

    well atleast it should work like that but i didnt try this action anyway so you should test by yourself.


  8. #8
    Normal User
    Join Date
    Jul 2012
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    It didn't work to me >_< i tested it right now >_< i send the message and nothing happens

    But relly thanks for the support ^^

  9. #9
    Normal User FrogZ's Avatar
    Join Date
    Jul 2012
    Location
    Laguna Island - LB
    Posts
    239
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5
    any error msg in debug?

  10. #10
    Normal User
    Join Date
    Jul 2012
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    How can i use debbug only in this action? >_<
    I dont know how to use this bot perfect yet

Posting Permissions

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