Results 1 to 9 of 9

Thread: help with this case problem

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

    Default help with this case problem

    yes sorry both this bieng long but its pretty much the same procedure can someone tell me why it wont work i get this error

    SCAR Code:
    program New;
    {.include SRL\SRL.scar}

    const
    UserName = '';// only supports one username at the time
    Password = '';


    Procedure RandomClothes;
    var i,x,y,z,zz: integer;
    begin
      i:=0;
      repeat
        i:=i+1;
          if i=1 then
          begin
          z:=random(5);
          x:=167;
          y:=89;
          MMouse(x, y, 1, 1);
    21:  case z of;
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
          end;
         if i=2 then
         begin
          x:=167;
          y:=124;
          MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
        end;
        if i=3 then
          begin
            x:=167;
            y:=161;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
           if i=4 then
          begin
            x:=167;
            y:=195;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
           if i=5 then
          begin
            x:=167;
            y:=232;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
          if i=6 then
          begin
            x:=167;
            y:=268;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
          if i=7 then
          begin
            x:=167;
            y:=301;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
         if i=8 then
          begin
            x:=465;
            y:=96;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
          if i=9 then
          begin
            x:=465;
            y:=130;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
           if i=10 then
          begin
            x:=465;
            y:=165;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
          if i=11 then
          begin
            x:=465;
            y:=203;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
           end;
           if i=12 then
          begin
            x:=465;
            y:=235;
           MMouse(x, y, 1, 1);
          case z of
          1:= Mouse(x,y,1,1,true);

          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;

          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
              until(i+12);
           end;

    Line 21: [Error] (14777:10): Syntax error in script C:\Program Files\SCAR 2.03\Scripts\tutisland.scar

    and i put that 21 there to make it easier to find

  2. #2
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    umm ur case is way to complicated...just do
    SCAR Code:
    case random(5) of
          1:= Mouse(x,y,1,1,true);
     
          2:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
     
          3:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
     
          4:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
     
          5:= begin
              zz:=0;
              repeat
              zz:zz+1;
              Mouse(x,y,1,1,true);
              until(zz=z);
              end;
    that is unless i dont get what ur doing
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  3. #3
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Did you try taking out the semicolon?
    Interested in C# and Electrical Engineering? This might interest you.

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    semecolin where?
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


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

    Default

    yea it told me to put in the semicolon then i did and it gave me that error and i need the z variable in there because i need it to click that many times i mean i could do it another way but this was easy i copied the same thing 12 times and changed x,y,z

    this is a random clothes picker and i want to make my own i like experiencing things myself

  6. #6
    Join Date
    Jul 2006
    Location
    NY
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Instead of :=, you only need :

  7. #7
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    If you want an example of a pretty efficient cloths picker, you could take a look at mine (in nielsie's tutorial island runner)
    Interested in C# and Electrical Engineering? This might interest you.

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

    Default

    thanks!!! it worked out

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

    Default

    yea i did but im pretty much playing around with cases right now so i thought ill combine cases with a new script

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Case help
    By Aser in forum OSR Help
    Replies: 3
    Last Post: 11-22-2008, 05:21 AM
  2. Using Case and Of
    By Fourscape in forum Outdated Tutorials
    Replies: 3
    Last Post: 08-18-2007, 08:40 PM
  3. Case - Else
    By stylen in forum OSR Help
    Replies: 0
    Last Post: 05-30-2007, 11:54 PM
  4. Case OF
    By Jagex_Fagex in forum News and General
    Replies: 3
    Last Post: 10-25-2006, 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
  •