Results 1 to 3 of 3

Thread: If Private Messges then

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    8
    Rep Power
    0

    If Private Messges then

    Hello,
    I need one action:
    If private msg from player "XYZ" and he write to me "logout" then my character logout.


    Thanks for helping,

  2. #2
    Normal User
    Join Date
    May 2012
    Posts
    33
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    8
    Rep Power
    0
    refresh..,

  3. #3
    Normal User
    Join Date
    Feb 2013
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    4
    Code:
    local myMessages = getnewmessages("Local Chat")
    local countMessages = myMessages.count - 1
    local playerName = "XYZ"
    local message
    
    for i = 0, countMessages do 
        message = myMessages[countMessages - i]
        if (message.type == 6 and message.sender == playerName and message.text:find("logout")) then
            closetibia()
        end
    end
    Last edited by Pompol; 03-06-2013 at 11:15 PM.

Posting Permissions

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