Results 1 to 9 of 9

Thread: Follow main character

  1. #1
    iBot User
    Join Date
    May 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    12
    Rep Power
    5

    Follow main character

    Do exist a script that follow my main character?
    for example:

    1║ - both chars are running in the cave
    2║ - a behemoth appears
    3║ - the druid stop following the character and start to attack the behemoth
    4║ - the monster is dead, so, it starts to follow the character again.

    Is that possible?

  2. #2
    iBot User
    Join Date
    Aug 2012
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    up

  3. #3
    iBot User
    Join Date
    Aug 2014
    Posts
    42
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    10
    Rep Power
    3
    yah, use maround() and followcreature().

    when maround() > 1 ...stop follow (maybe stopattack() works), setattack on...when maround() < 1...setattack off and followcreature...

    something like that

  4. #4
    iBot User
    Join Date
    Aug 2014
    Posts
    42
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    10 Post(s)
    Reputation
    10
    Rep Power
    3
    something like that

    Lua Code:
     
    local monsterName = 'behemoth'
    local range = 2
    local playerToFollow = 'mainChar'
     
    if(maround(range, false, monsterName) > 1) then
    	stopattack()
    	settargeting('on')
    else if(maround(range, false, monsterName) < 1) then
    	settargeting('off')
    	followcreature(playerToFollow)
    end


    i really don't test it...i do it now for ur post only.

    i hope it help u to find ur way.

    Peace

  5. #5
    iBot User
    Join Date
    Apr 2012
    Posts
    40
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by bolinho1988 View Post
    something like that

    Lua Code:
     
    local monsterName = 'behemoth'
    local range = 2
    local playerToFollow = 'mainChar'
     
    if(maround(range, false, monsterName) > 1) then
    	stopattack()
    	settargeting('on')
    else if(maround(range, false, monsterName) < 1) then
    	settargeting('off')
    	followcreature(playerToFollow)
    end


    i really don't test it...i do it now for ur post only.

    i hope it help u to find ur way.

    Peace
    did not work
    I changed the main site for my char nick no longer follow

    please need this action

    help me ....

  6. #6
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,480
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    @bolinho1988, @willian1987

    Thats a really simple action, you need to improve it, especially set the targeting properly, however to make it works put "elseif":

    Lua Code:
     
    local monsterName = 'behemoth'
    local range = 2
    local playerToFollow = 'mainChar'
     
    if(maround(range, false, monsterName) >= 1) then
    	settargeting('on')
    elseif(maround(range, false, monsterName) < 1) then
    	settargeting('off')
    	followcreature(playerToFollow)
    end

  7. #7
    iBot User
    Join Date
    Apr 2012
    Posts
    40
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    Thank this working

    he would walk a distance of 3 sqm of mainchar?

  8. #8
    Focus Group Gryllz's Avatar
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    3,480
    Mentioned
    89 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    236 Post(s)
    Reputation
    342
    Rep Power
    10
    Quote Originally Posted by willian1987 View Post
    Thank this working

    he would walk a distance of 3 sqm of mainchar?
    No, followcreature() follows by option "follow" in tibia which means you walk as close as possible.

  9. #9
    iBot User
    Join Date
    Apr 2012
    Posts
    40
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    10
    Rep Power
    5
    ok obrigado xD

Posting Permissions

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