Results 1 to 7 of 7

Thread: Sleep

  1. #1
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Sleep

    How do you make a sleep procedure in your script to log out every (x) ms or (x) loads?

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

    Default

    Timefrommark and MarkTime.

    If timefrommark(x) > 30000 then
    logout;
    Marktime(x);
    while timefrommark(x) < 30000 do
    wait(100);
    Loginplayer;

    or

    if players[currentplayer].integers[1] = 5 then
    logout;
    //+ 1 to the integers[1] everytime you get one more load



    Get the general gist of my meaning?
    [QUOTE]<GoF`> oh no its Raymooond
    <Raymooond> Heya
    <GoF`> is it ray or some other ray?
    <LeeLokHin> No idea
    <LeeLokHin> Raymond, what's the game you like the most?
    <Raymooond> Runescape
    <-- LeeLokHin has kicked Raymooond from #srl (Faker.)[/QUOTE]

  3. #3
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah i think so... Ill try it out its pretty late ill try to put it in/test it but ill post what happens tomorrow

    Edit: how do you do marktime?

  4. #4
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    you need to include srl for marktime

    MarkTime(AnIntegerHere);
    TimeFromMark(AnIntegerHere);

    marktime will make it start counting, and TimeFromMark will tell you how long it's been since you started counting.

    if you call MarkTime(AnIntegerHere); again, it'll restart the count for that integer.

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  5. #5
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm a bit thick lol

    SCAR Code:
    If TimeFromMark>=(TimeToRun) then

    Says invalid parameters =/

  6. #6
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    TimeFromMark ( MarkNameHere:integer)

    time := TimeFromMark(MyMark);

    you forgot to say which mark

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  7. #7
    Join Date
    Jul 2007
    Posts
    1,431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by leelokhin View Post
    Timefrommark and MarkTime.

    SCAR Code:
    Marktime(x);
    while timefrommark(x) < 30000 do
      wait(100);
    Loginplayer;

    SCAR Code:
    Wait(30000);
    Loginplayer;

    Why everyone try to be ultimate coders
    [CENTER][SIZE="4"]Inactive[/SIZE]I forgot my password[/CENTER]

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Sleep Every..?
    By D1zl3 in forum OSR Help
    Replies: 15
    Last Post: 12-17-2008, 05:56 PM
  2. Procedure for sleep?
    By Richard in forum OSR Help
    Replies: 4
    Last Post: 02-11-2008, 06:00 PM
  3. Sleep not working
    By Maiki in forum OSR Help
    Replies: 12
    Last Post: 09-30-2007, 08:02 PM

Posting Permissions

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