Results 1 to 6 of 6

Thread: Multiple actions in a case?

  1. #1
    Join Date
    Sep 2008
    Posts
    155
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Multiple actions in a case?

    How do you have a case do multiple actions?

    I want it to do something like this:

    SCAR Code:
    case r of
        1: HoverSkill('Smithing', False);
        2: Gametab(1); wait(RandomRange(500, 1000));          
      end;

    Buuut, that doesn't work... I've tried a couple of other formats as well ><

    -Macros
    Current Project - Superheater :: Mithril Bars - Should be ready for Members application soon

  2. #2
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Fixed:
    SCAR Code:
    case 2 of
        0: HoverSkill('Smithing', False);
        1:
          Begin
            Gametab(1);
            wait(RandomRange(500, 1000));    
          End;        
      end;


  3. #3
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what Cazax means is

    change your 'r' to a 2

    and you don't fit all of that on your line 2, you need to have a begin/end in it.

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

    Default

    Quote Originally Posted by Aser View Post
    what Cazax means is

    change your 'r' to a 2

    and you don't fit all of that on your line 2, you need to have a begin/end in it.
    If he changes it to a "2", neither of the cases will run because neither of them are "2".
    :-)

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

    Default

    Cazax, that won't do anything I believe. Try something like this:

    SCAR Code:
    Begin
      Case 1-random(2) Of
         0 : WriteLn('Hi');
         1 : Begin
                WriteLn('Hi 2');
                WriteLn('Hi 3');
              End;
      End;
    End.

  6. #6
    Join Date
    Oct 2006
    Location
    United States
    Posts
    672
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you haven't figured it out this might help, its taken from my woodcutting script. It either right clicks or left clicks.

    SCAR Code:
    Case random(2) of
     0 : begin
           FindEnt(x,y, True);
           if IsUpText('hop') then
           begin
             Mouse(x, y, 2, 2, False);
             Wait(300 + Random(243));
             ChooseOption('hop');
             Wait(5000 + Random(1854));
             RandomGameTab;
             FindNormalRandoms;
             FindBirdsNest;
             if FindObjTPA(x, y, 6391421, 10, 20, 10, 10, 1,['hop','illow'])then
             Mouse(x, y, 2, 2, True);
            end;
          end;
     1 : begin
           FindEnt(x,y, True);
           if IsUpText('hop') then
           begin
             Mouse(x, y, 2, 2, True);
             Wait(300 + Random(243));
             ChooseOption('hop');
             RandomGameTab;
             FindNormalRandoms;
             FindBirdsNest;
             Wait(5000 + Random(1976));
            end;
         end;
    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Recuring actions
    By British in forum OSR Help
    Replies: 2
    Last Post: 02-21-2009, 07:49 AM
  2. Do i need TPAs in these actions?
    By marpis in forum OSR Help
    Replies: 3
    Last Post: 12-15-2008, 09:22 PM
  3. Case..Of Help
    By Drew_Dawg in forum OSR Help
    Replies: 7
    Last Post: 02-02-2008, 11:47 PM
  4. Using Case and Of
    By Fourscape in forum Outdated Tutorials
    Replies: 3
    Last Post: 08-18-2007, 08:40 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
  •