Results 1 to 5 of 5

Thread: Enable action then disable it when message on local chat

  1. #1
    Normal User
    Join Date
    Aug 2012
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    29
    Rep Power
    5

    Enable action then disable it when message on local chat

    Wondering if is this possible

    that when on local chat there is a message "go" (would be good if it would be only working for a player XYZ, not for all) then it turn off targeting and turn off action 1 and action 2 and turn on action 3
    when on local chat there is a message "attack" then it turn on targeting turn on action 1 and action 2... and turn off action 3

    action 1, 2, 3 - names of the action.. can be different

  2. #2
    Normal User SySiO's Avatar
    Join Date
    Dec 2012
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    25
    Rep Power
    5
    I think it will work fine for you.


    local index = 0
    local msgs = getnewmessages("Local Chat")
    local qtd = msgs.count-1
    local name1 = "SySiO"
    local name2 = "SySiO2"
    local name2 = "SySiO3"


    for i=0,qtd do
    if msgs[qtd].sender == name1 and msgs[qtd].text:find('go') or
    msgs[qtd].sender == name2 and msgs[qtd].text:find('go') or
    msgs[qtd].sender == name3 and msgs[qtd].text:find('go') then
    settargeting('off')
    setsettings('Settings\\Actions\\List\\Action1\\Enabled', 'no')
    setsettings('Settings\\Actions\\List\\Action2\\Enabled', 'no')
    setsettings('Settings\\Actions\\List\\Action3\\Enabled', 'yes')
    wait(5000,10000)
    end
    end



    local index = 0
    local msgs = getnewmessages("Local Chat")
    local qtd = msgs.count-1
    local name1 = "SySiO"
    local name2 = "SySiO2"
    local name2 = "SySiO3"


    for i=0,qtd do
    if msgs[qtd].sender == name1 and msgs[qtd].text:find('attack') or
    msgs[qtd].sender == name2 and msgs[qtd].text:find('attack') or
    msgs[qtd].sender == name3 and msgs[qtd].text:find('attack') then
    settargeting('on')
    setsettings('Settings\\Actions\\List\\Action1\\Enabled', 'yes')
    setsettings('Settings\\Actions\\List\\Action2\\Enabled', 'yes')
    setsettings('Settings\\Actions\\List\\Action3\\Enabled', 'no')
    wait(5000,10000)
    end
    end

  3. #3
    Normal User
    Join Date
    Aug 2012
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    29
    Rep Power
    5
    It's working almost perfectly... could you add something in the action of "go" that when a player say it... then it turn off targeting and turn off action 1 and action 2 and turn on action 3 (it's already made) but more it will cast utani hur? when there is no utani hur it will cast it again
    but when "attack" then it turn on targeting turn on action 1 and action 2... and turn off action 3 (this already work) but there wont be utani hur on it

    just add on the 1st action you made
    setsettings('Settings\\Actions\\List\\Action1\\Ena bled', 'no')
    setsettings('Settings\\Actions\\List\\Action2\\Ena bled', 'no')
    setsettings('Settings\\Actions\\List\\Action3\\Ena bled', 'yes')
    setsettings('Settings\\Actions\\List\\Action4\\Ena bled', 'yes')

    Where action 4 will be utani hur? or what to do?

    Thanks in advance!

    Btw: good job so +rep =]

  4. #4
    Normal User SySiO's Avatar
    Join Date
    Dec 2012
    Posts
    355
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    25
    Rep Power
    5
    Just make another hotkey called Action4, in this situation and add there


    if not hasted and not pzone then
    cast("utani hur")
    wait(10000)
    end

  5. #5
    Normal User
    Join Date
    Aug 2012
    Posts
    157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    2 Post(s)
    Reputation
    29
    Rep Power
    5
    yes.. but i should add this thing on the 1st action "go" like i said in previous post?

    Code:
    setsettings('Settings\\Actions\\List\\Action4\\Enabled', 'yes')
    just add this in 1st action you posted for me + create action4, right?

Posting Permissions

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