Results 1 to 21 of 21

Thread: CountDownSeconds Function

  1. #1
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default CountDownSeconds Function

    SCAR Code:
    Function CountDownSeconds(Time: integer): boolean;
    var
      Ti : integer;
    begin
      Ti:= Time;
      repeat
        wait(1000);
        Ti := Ti -1;
        Writeln(inttostr(Ti));
      until(Ti = 0);
      result :=true;
    end;

    This script Does a countdown in seconds, pretty easy but maybe its usefull for beginners

    Fill it in as:

    SCAR Code:
    CountDownSeconds(5);

    5= time of seconds

    V2 with sound!!! :
    SCAR Code:
    Function CountDownSeconds(Time: integer): boolean;
    var
      Ti : integer;
    begin
      Ti:= Time;
      repeat
        wait(1000);
        Ti := Ti -1;
        playSound('C:\WINDOWS\Media\ding.wav');
        Writeln(inttostr(Ti));
      until(Ti = 0);
      result :=true;
    end;

    V3 added 10 seconds later =P
    SCAR Code:
    Function CountDownSeconds(Time: integer): boolean;
    var
      Ti : integer;
    begin
      Ti:= Time;
      repeat
        wait(1000);
        Ti := Ti -1;
        playSound('C:\WINDOWS\Media\ding.wav');
        Writeln(inttostr(Ti));
      until(Ti = 0)
      result :=true;
      playSound('C:\WINDOWS\Media\tada.wav');
    end;

    plays nice sound after finishing the countdown

    Easy huh? good luck

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  2. #2
    Join Date
    Jun 2007
    Location
    brooklyn ny
    Posts
    683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Uhh Whats The Point Of A Countdown Timer

  3. #3
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actualy i don't know :P you can see it countdown in the debug box... thats it ;P

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  4. #4
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    O.o does anybody know where you could download some robotic/space rocket lounch/etc sounds - "one" "two"...

    Would be damn cool XD

    So then you could like Eight seconds until rock timeout Entertaining scripts

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Why is it a function?

    SCAR Code:
    Function CountDownSeconds(Time: integer): boolean;
    var
      I : integer;
    begin
      for I := Time downto 1 do
      begin
        Wait(1000);
        WriteLn(IntToStr(I));
      end;
    end;
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    w00t this is were i was searching for my whole life!!!(btw i leave tommorow )
    ~Hermen

  7. #7
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    O.o does anybody know where you could download some robotic/space rocket lounch/etc sounds - "one" "two"...

    Would be damn cool XD

    So then you could like Eight seconds until rock timeout Entertaining scripts
    Ill check for that on the internet ;P


    Quote Originally Posted by Santa_Clause View Post
    Why is it a function?

    SCAR Code:
    Function CountDownSeconds(Time: integer): boolean;
    var
      I : integer;
    begin
      for I := Time downto 1 do
      begin
        Wait(1000);
        WriteLn(IntToStr(I));
      end;
    end;
    Yea possible to ;P

    Quote Originally Posted by hermpie View Post
    w00t this is were i was searching for my whole life!!!(btw i leave tommorow )
    Well here it is for your last day ;P

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  8. #8
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Added V2 with Sound ;P thanks n3ss3s for the idea.. note. this is just a sound of Windows XP not sure it works for Vista

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  9. #9
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    very very very very unless

    but fun!

    the shounds rule ROFL

  10. #10
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Nice, but I meant sounds like a robotic voice saying "One" etc xD


    But they're maybe lil hard to get..

  11. #11
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yes I think that to

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  12. #12
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    couldn't find any -,-

  13. #13
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hugolord View Post
    couldn't find any -,-
    how you mean?

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  14. #14
    Join Date
    Mar 2007
    Posts
    3,681
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    sounds i mean

  15. #15
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by hugolord View Post
    sounds i mean
    are you using vista?

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  16. #16
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    i guess he couldn't find count down sounds like

    "5"
    "4"
    "3"

    ect.

  17. #17
    Join Date
    Sep 2006
    Posts
    322
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Wouldn't it be the same as
    SCAR Code:
    if TimeFromMark(MyMark) > (2 * 60 * 100) then
    but without the sound?

    Edit: NVM, I re-read the thread.

  18. #18
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by uncfan1119 View Post
    Wouldn't it be the same as
    SCAR Code:
    if TimeFromMark(MyMark) > (2 * 60 * 100) then
    but without the sound?

    Edit: NVM, I re-read the thread.
    Its more a wait ;P but then it makes cool beep sounds, and it writes in the Debug

    [22:20] <[-jesus-]> freddy, go uninstall yourself

  19. #19
    Join Date
    Jun 2007
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm using vista, and it makes little beep noises during the countdown, then makes a "ta da" sound when it gets to 0.

    Pretty cool function, but kinda pointless for use in scripts...

  20. #20
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    You could give the user "10" seconds to get SCAR hidden so it doesn't block stuff, and give them a verbal warning!
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

  21. #21
    Join Date
    Jun 2007
    Posts
    785
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    could be ;P

    [22:20] <[-jesus-]> freddy, go uninstall yourself

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with a function.
    By Floor66 in forum OSR Help
    Replies: 15
    Last Post: 04-15-2008, 02:03 PM
  2. Replies: 2
    Last Post: 02-27-2008, 05:20 PM
  3. Replies: 2
    Last Post: 02-26-2008, 08:26 PM
  4. [FUNCTION] FindDoorColour: integer; By ZephyrsFury [FUNCTION]
    By ZephyrsFury in forum Research & Development Lounge
    Replies: 10
    Last Post: 07-27-2007, 08:45 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
  •