Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Need help with action follow

  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

    Need help with action follow

    I use action that when a player say word "go" it will enable action that follow a player which is

    Code:
    followcreature("player1")
    when a player say stop it disable the action but the char still have follow on the player1.. only way to stop follow on the player is to move somewhere... north/south/east/west

    any suggestion how make it faster? make it on bot.. so i dont have to do it manually

    Thanks in advance,

  2. #2
    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
    upppp

  3. #3
    Normal User
    Join Date
    Sep 2012
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    43
    Rep Power
    5
    Try
    PHP Code:
    stopattack() 

  4. #4
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9

    local CONFIG = {
    MAIN = "soder", -- Your char to send messages/follow
    }

    local MESSAGES = getnewmessages("Local Chat")
    local MESSAGES_QUANTITY = MESSAGES.count - 1

    for INDEX = 0, MESSAGES_QUANTITY do
    local MSG = MESSAGES[MESSAGES_QUANTITY - INDEX]
    if (MSG.text:find("go") and MSG.sender == CONFIG.MAIN) then
    followcreature(CONFIG.MAIN) wait(1000)
    elseif (MSG.text:find("stop") and MSG.sender == CONFIG.MAIN) then
    keyevent(0x1B) wait(1000) -- Press ESCAPE(ESC)
    end
    end

    Code:
    keyevent(0x1B)  -- Press ESCAPE(ESC)

  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
    thank you so much!

    +rep

    btw sometimes i have to repeat 2 or 3 times.. so it works...
    but working as expected :P

  6. #6
    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
    btw atm if i have 3 characters and load that script.... every character will follow just one char..
    is this possible that char 3 will follow 2.. then player 2 follow player 1..

    I used before followcreature("player1") and every char had the other name of the player so it worked
    but when I used this code

    Code:
    local index = 0 
    
    local msgs = getnewmessages("Local Chat")
    
    local qtd = msgs.count-1
    
    local name1 = "player1"
    
    local name2 = "player2"
    
    local name2 = "player3"
    
    
    
    
    
       for i=0,qtd do
    
       if msgs[qtd].sender == name1 and msgs[qtd].text:find('stop') or
    
       msgs[qtd].sender == name2 and msgs[qtd].text:find('stop') or
    
       msgs[qtd].sender == name3 and msgs[qtd].text:find('stop') then
    
           settargeting('on')
           
                  setsettings('Settings\\Healer\\Rules\\Exura\\Enabled', 'no')
                  setsettings('Settings\\Healer\\Rules\\Exura gran\\Enabled', 'no')
                  setsettings('Settings\\Healer\\Rules\\Exura gran san\\Enabled', 'no')
                  setsettings('Settings\\Healer\\Rules\\Para\\Enabled', 'no')
               setsettings('Settings\\Healer\\Rules\\Smp\\Enabled', 'yes')
           
               setsettings('Settings\\Healer\\Enabled', 'yes')
    
           setsettings('Settings\\Healer\\Rules\\Smp\\Enabled', 'yes')
           
           setsettings('Settings\\Actions\\List\\Div\\Enabled', 'yes')
           
           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
    @^ action of SySio thanks for him

    so when I said "go" it enabled action 3 which is followcreature("name of player") it's working nice.. but when I'm saying stop I can see on the bot that SOMETIMES (like 80% of times) it is disabling action 3.. but after a while enabling it again... :[ any solution Mr soder?

    Thanks in advance,

    Greetings,
    Last edited by kralik88; 10-06-2013 at 04:06 PM.

  7. #7
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    PHP Code:
    local index 
    local msgs 
    getnewmessages("Local Chat")
    local qtd msgs.count-1
    local name1 
    "player1"
    local name2 "player2"
    local name2 "player3"

    for i=0,qtd do
       if (
    msgs[qtd].sender == name1 and msgs[qtd].text:find('stop')) or (msgs[qtd].sender == name2 and msgs[qtd].text:find('stop')) or (msgs[qtd].sender == name3 and msgs[qtd].text:find('stop')) then

           settargeting
    ('on')
           
           
    setsettings('Settings\\Healer\\Rules\\Exura\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran san\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Para\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Smp\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Enabled''yes')

           
    setsettings('Settings\\Actions\\List\\Div\\Enabled''yes')
           
    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 
    show us second action with turning on
    Last edited by RafiXWPT; 10-06-2013 at 06:03 PM.

  8. #8
    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
    action with go
    PHP Code:
    local index 

    local msgs 
    getnewmessages("Local Chat")

    local qtd msgs.count-1

    local name1 
    "player1"

    local name2 "player2"

    local name2 "player3"





       
    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\\Healer\\Rules\\Exura\\Enabled''yes')
            
    setsettings('Settings\\Healer\\Rules\\Exura gran\\Enabled''yes')
             
    setsettings('Settings\\Healer\\Rules\\Exura gran san\\Enabled''yes')
              
    setsettings('Settings\\Healer\\Rules\\Para\\Enabled''yes')
               
    setsettings('Settings\\Healer\\Rules\\Smp\\Enabled''yes')
               
                          
    setsettings('Settings\\Healer\\Enabled''yes')

           
    setsettings('Settings\\Actions\\List\\Div\\Enabled''no')
           
           
    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 

    btw if on the begining of the script where is player1 player2 player3... i will type the same name will it be wrong? (I mean it can bug or smth?) or I just should type on one place?

    Thanks in advance,

  9. #9
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    delete that dwo actions and use: (also do not use 3 same names, if ur nick is for example "Knight" and u dont wana use more names, use name1 = "Knight", name2 = "player2", name3 = "player3";

    PHP Code:
    local qtd msgs.count-1
    local name1 
    "player1"
    local name2 "player2"
    local name3 "player3"

       
    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\\Healer\\Rules\\Exura\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran san\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Rules\\Para\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Rules\\Smp\\Enabled''yes'
           
    setsettings('Settings\\Healer\\Enabled''yes')
           
    setsettings('Settings\\Actions\\List\\Div\\Enabled''no')
           
    setsettings('Settings\\Actions\\List\\Action1\\Enabled''no')
           
    setsettings('Settings\\Actions\\List\\Action2\\Enabled''no')
           
    setsettings('Settings\\Actions\\List\\Action3\\Enabled''yes')
           
    wait(5000,10000)

        elseif (
    msgs[qtd].sender == name1 and msgs[qtd].text:find('stop')) or (msgs[qtd].sender == name2 and msgs[qtd].text:find('stop')) or (msgs[qtd].sender == name3 and msgs[qtd].text:find('stop')) then
           
           settargeting
    ('on')
           
    setsettings('Settings\\Healer\\Rules\\Exura\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Exura gran san\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Para\\Enabled''no')
           
    setsettings('Settings\\Healer\\Rules\\Smp\\Enabled''yes')
           
    setsettings('Settings\\Healer\\Enabled''yes')
           
    setsettings('Settings\\Actions\\List\\Div\\Enabled''yes')
           
    setsettings('Settings\\Actions\\List\\Action1\\Enabled''yes')
           
    setsettings('Settings\\Actions\\List\\Action2\\Enabled''yes')
           
    setsettings('Settings\\Actions\\List\\Action3\\Enabled''no')
       
    end
    end 
    msg if works
    Last edited by RafiXWPT; 10-07-2013 at 04:29 AM.

  10. #10
    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
    when I say go... it doesn't enable action3.. which is followcreature("name_of_player_who_say_go")
    when I say stop.. it disable action 3 but char still have follow
    Last edited by kralik88; 10-07-2013 at 03:55 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
  •