Results 1 to 8 of 8

Thread: How To Make Script To Do Something On Every Second Time?

  1. #1
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default How To Make Script To Do Something On Every Second Time?

    Hey, i forgotted how to make script do something on every second trip... I need to make it run on every second trip, or is there procedure or function to Running energy ?

    Thanks,

    ~Home

  2. #2
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actualy, I just remembered how to do this LOL
    It's the
    SCAR Code:
    mod()
    function (i'll get u an example 1 sec)
    ah nvm, im too lazy. Mod divides the first num by the second, and returns true if the remainder is 0
    EX:
    SCAR Code:
    for i:=0 to 9 do
      If (mod(i,5)) then
        Special;
      Else
        Normal;

    That would be:
    SCAR Code:
    Normal;
    Normal;
    Normal;
    Normal;
    Special;
    Normal;
    Normal;
    Normal;
    Normal;
    Special;
    It might be if the remainder is the second number but IDK its either 0 or the second #

    for every other time it would be Mod(i,2 or 1 idk)
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  3. #3
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    You used mod wrong there. You wouldn't use it as a function, you'd use it as *. It returns the remainder. So 5 mod 3 would be 2.

  4. #4
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol sorry, you're right XD
    I knwe it was
    SCAR Code:
    Mod()
    though didn't I? lol
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  5. #5
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Nope, it's Mod, not Mod()

  6. #6
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    repeat
    i:=i+1;
    if (i mod 2)=0 then writeln(inttostr(i));
    wait(500);
    until isfkeydown(12);

  7. #7
    Join Date
    Jun 2007
    Location
    I'm not sure...
    Posts
    581
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awwww... You guys suck! you're too damn good at this lol
    ---------------------------------------------------------


    Pm me if you need any math functions made. Me = l0ving t3h mathz

    ---------------------------------------------------------

  8. #8
    Join Date
    Dec 2006
    Location
    utah
    Posts
    1,427
    Mentioned
    2 Post(s)
    Quoted
    7 Post(s)

    Default

    i like mod XD

    SCAR Code:
    program New;

    var
       i  : Integer;
       Canvas : TCanvas;

    begin
    Canvas := GetDebugCanvas;
     DisplayDebugImgWindow(100, 100);
     for i:= 0 to 100 do
     begin
         Canvas.Pen.Color := 255 * i;
          if ((i mod 2) = 1) then
          begin
              Canvas.Pen.Width :=  i mod 20 + 1
              Canvas.Pen.Color :=  255 * (i * i);
          end;
         Canvas.MoveTo(0, i);
         Canvas.LineTo(100, i);
     end;
     DisplayDebugImgWindow(100, 100);
    end.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Time to make a script?
    By Adroit707 in forum OSR Help
    Replies: 7
    Last Post: 03-01-2009, 12:07 AM
  2. Replies: 12
    Last Post: 10-13-2008, 02:57 AM
  3. How to make the script show it's running time?
    By PwNZoRNooB in forum OSR Help
    Replies: 4
    Last Post: 05-12-2007, 03:01 PM
  4. requesting good script too make much $$$ in lil time
    By dertykid555 in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 03-10-2007, 09:09 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
  •