Results 1 to 5 of 5

Thread: FindObj gets stuck sometimes

  1. #1
    Join Date
    Apr 2007
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default FindObj gets stuck sometimes

    Hi,

    Today I was working on my first simba script. (A fire runecrafter with ring of duelling teleports)
    Now, once I'm positioned inside the mysterious ruins in front of the actual altar I use FindObj to find the altar. I works good MOST of the time, but sometimes when there's another player around with similar colors (for example, a pickaxe that has the same color). It gets stuck on the pickaxe. Now, is there a way to make sure that if FindObj finds something with the wrong uptext, that it skips the object with the wrong uptext and continues to find other objects with the given color?

  2. #2
    Join Date
    Sep 2009
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I would say use an if statement after the FindObj that checks that if GetUpText contains alter or whatever then do it, else try again? That might work... But Im sure someone more advanced in their programming skills can verify or suggest something better...
    ~-~ Quit Rs 4 Klit Rs ~-~

  3. #3
    Join Date
    Feb 2006
    Location
    Canada
    Posts
    2,254
    Mentioned
    21 Post(s)
    Quoted
    238 Post(s)

    Default

    Are you using FindObj or FindObjCustom? One thing you could try is to put it in a loop and then try finding it, up to 10 times lets say, before failing and then terminating or whatever.

  4. #4
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    The most effective way of finding objects is usually with making your own custom object finding function using TPAs.. but they might take a while to learn. If you use this method, it will usually be able to flow into your script better.

    Otherwise, you could do as above:
    Quote Originally Posted by cause View Post
    Are you using FindObj or FindObjCustom? One thing you could try is to put it in a loop and then try finding it, up to 10 times lets say, before failing and then terminating or whatever.
    Maybe something like:
    Simba Code:
    for i:=1 to 10 do
    begin
      if FindObj(x, y, 'altar', AltarColor, AltarTol) then
        Break;
      Wait(100+Random(200))
    end;

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

  5. #5
    Join Date
    Apr 2007
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I already had it in a loop before but it still failed.
    I looked into one of yohojo's video tutorials on FindObjTPA and that seems like the stuff I need! Thanks for the help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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