Results 1 to 4 of 4

Thread: log out after

  1. #1
    Join Date
    Jul 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default log out after

    hello i am working on a simple power cutter and i want to know how do i make it so that it logs out after X number of loads. now to do this i would have to make a const and have the user add how many loads but then how would i make a procedure/function to tell how many loads it has done then to logout.

    Note: i have only used const not vars.

    thanks in advanced here is my script.

    SCAR Code:
    {.Script Info:
    # ScriptName  = TREEKILLER V1.4
    # Author      = havoc928
    # Description = Chops trees until full inventory then drops
    # Version     = v1.4
    # Date        =
    # Comments    = Start anywhere where there are trees, with an axe weilded
    # Autocolor   = no

    # Release Comments
    // version 1.0 = very simple woodcutter\\
    // version 1.2 = added log droping\\


    program simplewc;
    {.include SRL/SRL.scar}

    {.include SRL\SRL\skill\WoodCutting.scar}
    // THE SETUP\\
    const tree=472109; // SET THE TREE COLOR\\
    // END SETUP\\

      procedure treekiller;
     begin
    if (findcolortolerance(x,y,tree,3,3,245, 99,5))then //PUT IN LAST 2 CORDINATES FROM THE COLOR PICKER\\
     begin
         writeln('FOUND COLOR');
    end;
    // DO NOT TOUCH BELOW\\
      mouse(x,y,0,0,true)
     wait(5000+random(5000))
    end;

       procedure drop;
      begin
     DropAll;
    end;

    begin
    writeln('CREDIT GOES TO ME HAVOC928 ...FEEL FREE TO DISTRIBUTE')
    repeat
    repeat
     treekiller;
    until(InvCount = 28);
     drop;
     until(false)
    end.

  2. #2
    Join Date
    May 2007
    Location
    baltimore, md
    Posts
    836
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    you would need to make a var and everytime a load is done add one to it then put something that repeats the script until that var = loads.

  3. #3
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Example:

    SCAR Code:
    var
      f : Integer;

    and somewhere in your load do

    SCAR Code:
    f := f + 1;

    then somewhere

    SCAR Code:
    if f>=10 then    // 10=how many loads you want to do
      begin
        Logout;
        TerminateScript;   //if you want the script to end take it out if not
      end;

    idk just an example

  4. #4
    Join Date
    Mar 2007
    Posts
    674
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    It can be in the Until aswell...

    SCAR Code:
    Until(f >= 10)
    Logout;
    TerminateScript;

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
  •