Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Navigation

  1. #1
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21

    Navigation

    Dear friends, i want i little help here with navigation.
    @Raphael

    My situtation is this.

    I have 1 main and 3 followers with me.

    The main have the waypoints in him cavebot.
    The Followers don't have anything in they cavebot only 1 action.

    I'm trying to my followers make follow with my main.

    I'm trying with this code.
    auto(100)
    if $navigation then
    foreach navchar p do
    if $wptsection == 'Hunt' then
    if p.isleader and p.creature.dist ~= 1 and p.creature.dist ~= 0 then
    setsetting('Targeting/Enabled', 'no')
    stopattack()
    --moveto(p.posx,p.posy,$posz)
    --reachlocation(p.posx,p.posy,$posz)
    --reachcreature(p.realname)
    elseif p.isleader and (p.creature.dist == 1 or p.creature.dist == 0) then
    setsetting('Targeting/Enabled', 'yes')
    end
    end
    end
    end


    Sometimes i get null exceptions with this code and my followers break.
    I think is with the functions, when i'm use with navigation i get this.
    --moveto(p.posx,p.posy,$posz)
    --reachlocation(p.posx,p.posy,$posz)
    --reachcreature(p.realname)



    I think navsendping function is broken.

    Edit: I make test with only following and is fine, but when i follow and attack i get null exception or windbot crash.
    Last edited by Sajean; 07-04-2015 at 03:59 AM.

  2. #2
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    What exactly does your error say?

  3. #3
    Free User
    Join Date
    May 2015
    Posts
    2
    Reputation
    10
    Rep Power
    0
    Need some one to finish this one !

  4. #4
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    Quote Originally Posted by Raphael View Post
    What exactly does your error say?
    Sometimes crashed windbot sometimes null reference.
    When i change the method that i made follow i don't get erros.
    Like that:
    if paround(2,mainName)  == 0 then
    Reachcreature(mainname)
    End


    I'm using actually 10 MCs.
    4 of 10 get null reference in the same time and after some minutes others get this.

  5. #5
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Sajean View Post
    Sometimes crashed windbot sometimes null reference.
    When i change the method that i made follow i don't get erros.
    Like that:
    if paround(2,mainName)  == 0 then
    Reachcreature(mainname)
    End


    I'm using actually 10 MCs.
    4 of 10 get null reference in the same time and after some minutes others get this.
    Again, what exactly does the error say? I want you to copy paste the whole error.

  6. #6
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    Quote Originally Posted by Raphael View Post
    Again, what exactly does the error say? I want you to copy paste the whole error.
    error in Persistent script Navigation:
    attempt to call a nil value


    Windbot crashed now.

  7. #7
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    I probably am wrong but .creature.dist is a valid pointer?



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  8. #8
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Sajean View Post
    error in Persistent script Navigation:
    attempt to call a nil value


    Windbot crashed now.
    I need the whole error. Not a summary of it. Just click the error on the console and Ctrl + C it. Or take a picture.

  9. #9
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    Quote Originally Posted by RoxZin xD View Post
    I probably am wrong but .creature.dist is a valid pointer?
    Yes is valid.

    Quote Originally Posted by Raphael View Post
    I need the whole error. Not a summary of it. Just click the error on the console and Ctrl + C it. Or take a picture.
    When i get this message windbot crashed and i can't see the erro log.

    I can send the full code to you in private msg.

  10. #10
    Free User Sajean's Avatar
    Join Date
    Feb 2014
    Posts
    386
    Reputation
    26
    Rep Power
    21
    {isleader = true, id = 0, creature = {walkblock = false, warbanner = 0, aggressortype = 0, dist = -1, addon = 0, legscolor = 0, ismonster = false, lightcolor = 0, skull = 0, headcolor = 0, isnpc = false, hppc = 0, issummon = false, hpcolor = 6291456, id = 0, mount = 0, chestcolor = 0, speed = 0, posx = 0, isreachable = false, posy = 0, outfit = 0, party = 0, posz = 0, iswalking = false, isownsummon = false, isplayer = true, lastattacked = 1000, ignored = false, feetcolor = 0, dir = "", updated = false, lightintensity = 0, name = "", isshootable = true}, isfriend = true, isneutral = false, team = 3, teamname = "leader", isenemy = false, posz = 0, icon = 221, glowcolor = 13520480, voc = 0, maxmp = 0, mp = 66, realname = "", color = 5136590, posy = 0, time = 13591, name = "", posx = 0}


    I'm not online only to see creature.dist is valid.

 

 

Posting Permissions

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