Results 1 to 14 of 14

Thread: New wait procedure.

  1. #1
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default New wait procedure.

    I thought this sounded like a pretty good idea.
    It would be the basic wait command, bundled with anti-random checking and anti-idle. I've already made an anti-idle include but it wouldn't run anything other than the include because of the waiting! I thought, if we based it from how long the script actually waits, then the user wouldn't need to worry about auto-logouts.
    The script would also check for randoms at regular intervals (keeping lag in mind) during the waiting, I also happen to think my anti-idle has more potential than benlands just because benland has only used the mouse. My version will change the camera angle, wait a little, and change it back.

    I will definately be putting this together for my next script but does anyone else like the idea? Maybe someone knows how to jockey the regular wait command?

    To give you a sample of what I mean:
    Code:
    procedure wait2 (var timetowait : integer);
    
    var
      totalwaittime : Integer;
      randcounter : Integer;
      idlecounter : Integer;
    
    begin
    repeat
    wait(1);
    totalwaittime:= totalwaittime + 1;
    randcounter:= randcounter + 1;
    idlecounter:= idlecounter + 1;
    if (randcounter = 100) then
    begin
      randcounter:= 0;
      Antirandoms;
    end;
    if (idlecounter = 5000) then
    begin
      idlecounter:= 0;
      RandomMovement;
    end;
    until (totalwaittime = timetowait)
    end;
    It would obviously be a lot more complex than that.

  2. #2
    Join Date
    Feb 2006
    Location
    Berkeley, CA
    Posts
    1,837
    Mentioned
    52 Post(s)
    Quoted
    60 Post(s)

    Default

    Mine was made specificly to move the mouse around pointlessly while doing somthing else .
    (Hint, run it with the timeout so you can do other things while its idleing )

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Why is the parameter, "timetowait", var?

    Why do you need to save it into a variable?
    And i think we have to many waits as such. It would only take a few seconds to write one.

    But thanx for commiting.

  4. #4
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Ok kane I'm still going to use mine but I was just checking if it'd be useful. Btw, what do you mean too many waits? I was only aware of benlands
    I like yours ben, mine just moves the cam too. Not really much for me to brag about lol.

  5. #5
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    People always make things like these, that's what i meant.

  6. #6
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here's a little one I made for my autofighter but it just stops the script, I don't know why. If you need it you can keep it.

    var
    Time : Integer;
    begin
    Time:=0
    repeat
    repeat
    Wait(1)
    Time:=Time+1
    until(Time=Random(1)) // Time to wait before checking for npc's
    FindRandoms;
    until(Time=WaitTime)
    end;

  7. #7
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Random(1) will ONLY output 0
    Random(2) will output 0 and 1
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  8. #8
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, forgot the random was in there. Thanks anyway.

    This should work:

    Code:
    var
    Time : Integer;
    
    begin
      Time:=0
      repeat
        Wait(1)
        Time:=Time+1
        FindRandoms
      until(Time=100)
    end.
    I've tested this:

    var
    Time : Integer;

    begin
    Time:=0
    repeat
    Wait(1)
    Time:=Time+1
    Writeln(InttoStr(Time))
    until(Time=100)
    end.

    Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.

  9. #9
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by BenLand100
    Mine was made specificly to move the mouse around pointlessly while doing somthing else .
    Yeah! I just love IdleTime!



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  10. #10
    Join Date
    Feb 2006
    Location
    Franklin, Ohio, USA
    Posts
    991
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The Un-Named
    Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.
    which is waaaaay to fast for about anyone's computer (besides a useless waste of resources)

  11. #11
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by moparisthebest
    Quote Originally Posted by The Un-Named
    Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.
    which is waaaaay to fast for about anyone's computer (besides a useless waste of resources)
    1 ms a second? -See's computer blow up-

  12. #12
    Join Date
    Feb 2006
    Posts
    381
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SetTimeOut('FindRandoms', 2000); :P

  13. #13
    Join Date
    Feb 2006
    Posts
    1,022
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I haven't really tested it but it dose seem too fast, but I'm having fun with SendInterScarMessage through 1 scripts, 1 timing for an acurate progress report but it's alot of hassle. :P

  14. #14
    Join Date
    Feb 2006
    Location
    Australia
    Posts
    628
    Mentioned
    15 Post(s)
    Quoted
    105 Post(s)

    Default

    Mine is finished. Thanks fawk, I thought random(1) was random between 0 and 1.. *fixes*
    Yeah it all works fine for me, at first it would wait double the wait time but I fixed it. If you change your mind just say so. I'm going to make it more advanced.
    I used ReadFile and WriteFile too keep the idle count cumulative

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. wait() procedure in forms
    By marpis in forum OSR Help
    Replies: 8
    Last Post: 03-05-2009, 09:01 PM
  2. Wait Until Something.....
    By FortAsh in forum OSR Help
    Replies: 5
    Last Post: 01-29-2009, 05:09 PM
  3. I can't wait =D
    By Eugeniu in forum News and General
    Replies: 18
    Last Post: 09-28-2007, 12:59 AM
  4. Wait Until?
    By drnewheart in forum OSR Help
    Replies: 2
    Last Post: 09-23-2007, 02:49 AM
  5. wait()?
    By omgh4x0rz in forum Java Help and Tutorials
    Replies: 3
    Last Post: 04-28-2007, 02:39 AM

Posting Permissions

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