Results 1 to 4 of 4

Thread: Script command help

  1. #1
    Join Date
    Feb 2012
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default Script command help

    Hello guys,



    I'm currently working on a superheat-miner.

    Now for my mining function.

    Currently I just use, if(findrock) => click => wait +- (time it takes to mine)



    But now I want to upgrade that command to:

    if(findrock) => click => if(lastfullinvslot+1 exists) (so if I got an extra item in my inventory) then => continu


    This on it self is easy with P07 functions, BUT if somebody else would mine your ore, then my script would just get stuck, so I want:

    both the 'if( inventoryslot exists" or (10sec passed) )" if one of those 2 is true it should go to the next rock.



    But wait is not a bolean, so I do not know how to combine those 2, any suggestions?


    (sorry for strange explination, I dont really know how to put it into words)

    Greetings

    Rebel
    Last edited by rebeltjeh; 03-15-2013 at 02:04 PM.

  2. #2
    Join Date
    Feb 2012
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    nvm found a solution with repeat

    Repeat
    wait(1000)
    until(slotexists)

    so it waits 1 sec, checks if slot exists, waits another sec etc etc

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    A common time out failsafe
    Simba Code:
    MarkTime(t);
    repeat
      wait();
    until (TimeFromMark(t) > xxx) or {ur other checks};

  4. #4
    Join Date
    Feb 2012
    Posts
    249
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    Thanks for fast response.

    Only just started really writing full scripts right now, been adjusting most of the time.

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
  •