Results 1 to 7 of 7

Thread: What's wrong?

  1. #1
    Join Date
    Aug 2006
    Posts
    408
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default What's wrong?

    I get:
    Code:
    [Error] (18903:1): Identifier expected
    I don't know what the problem is, here's the script:
    SCAR Code:
    program UltimateRuneBuyer;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Misc/Amount.scar}
    {.include SRL/SRL/Misc/Playerform.scar}

    {This script will buy runes from the squire at pest control, from aubry
    in varrock, or from betty in port sarim.  It will then SWITCH WORLDS and
    buy from a full shop.}

    const
    Shop = 'Aubry'; //Betty, Aubry, or Squire
    Members = 'False'; //True if you're using Members, False for non-members
    Chaos = 'True';//Put true for the runes you want to buy
    Death = 'True';
    Mind = 'False';
    Body = 'False';
    Air = 'False';
    Water = 'False';
    Earth = 'False';
    Fire = 'False';


    var xx,yy:integer;

    Procedure FindSquire;
    begin
      If(Shop = 'Squire') then
      begin
      wait(100+random(300));
    if(findobj3(xx,yy,'Sq',1586243,5))then
        begin
       Mouse(xx,yy,2,2,False);
       chooseoption(x,y,'Trade');
       flag;
       wait(2000+random(400));
       if(ShopScreen)then
       end;
      end;
      end;


    Procedure FindBetty;
    begin
      If(Shop = 'Betty') then
       begin
       wait(100+random(300));
       if(findobj3(xx,yy,'Bet',6359394,5))then
        begin
        Mouse(xx,yy,2,2,False);
        chooseoption(x,y,'Trade');
        flag;
        wait(2000+random(400));
        if(ShopScreen)then
        end;
        end;
        end;

    Procedure FindAubry;
    begin
      If(Shop = 'Aubry') then
        begin
        wait(100+random(300));
        if(findobj3(xx,yy,'Aub',1754335,4))then
         begin
         Mouse(xx,yy,3,3,False);
         chooseoption(x,y,'Trade');
         flag;
         wait(2000+random(400));
         if(ShopScreen)then
         end;
       end;
       end;

    Procedure BuyFire;
    begin
    If(Fire = 'True') then
    begin
    If(((RuneAmount('shop','fire')) < 3500))then Exit;
    Repeat
    wait(10);
    mouse(93,84,5,5,False);
    wait(100+random(300));
    mouse(93,158,6,6,True);
    wait(100+random(300));
    Until((RuneAmount('shop','fire')) < 3500);
    end;
    end;

    Procedure BuyAir;
    begin
    If(Air = 'True') then
    begin
    If(((RuneAmount('shop','air')) < 3000))then Exit;
    Repeat
    wait(10);
    mouse(187,87,5,5,False);
    wait(100+random(300));
    mouse(190,158,6,3,True);
    wait(100+random(300));
    Until((RuneAmount('shop','air')) < 3000);
    end;
    end;

    Procedure BuyBody;
    begin
    If(Body = 'True') then
    begin
    If(((RuneAmount('shop','body')) < 3270))then Exit;
    Repeat
    wait(10);
    mouse(330,87,5,5,False);
    wait(100+random(300));
    mouse(325,158,6,3,True);
    wait(120+random(300));
    Until((RuneAmount('shop','body')) < 3270);
    end;
    end;

    Procedure BuyEarth;
    begin
    If(Earth = 'True') then
    begin
    If(((RuneAmount('shop','earth')) < 3270))then Exit;
    Repeat
    wait(10);
    mouse(235,87,5,5,False);
    wait(100+random(300));
    mouse(230,155,6,3,True);
    wait(120+random(300));
    Until((RuneAmount('shop','earth')) < 3270);
    end;
    end;

    Procedure BuyWater;
    begin
    If(Water = 'True') then
    begin
    If(((RuneAmount('shop','water')) < 3270))then Exit;
    Repeat
    wait(10);
    mouse(142,87,5,5,False);
    wait(100+random(300));
    mouse(149,158,6,3,True);
    wait(120+random(300));
    Until((RuneAmount('shop','water')) < 3270);
    end;
    end;

    Procedure BuyMind;
    begin
    If(Mind = 'True') then
    begin
    If(((RuneAmount('shop','mind')) < 10))then Exit;
    Repeat
    wait(10);
    mouse(282,85,10,10,False);
    wait(50+random(150));
    mouse(280,155,40,4,True);
    wait(50+random(150));
    Until((RuneAmount('shop','mind')) < 10);
    end;
    end;

    Procedure BuyChaos;
    begin
    If(Chaos = 'True') then
    begin
    If(((RuneAmount('shop','chaos')) < 10))then Exit;
    Repeat
    wait(20);
    mouse(380,87,10,10,False);
    wait(100+random(300));
    mouse(385,158,30,3,True);
    wait(100+random(300));
    Until((RuneAmount('shop','chaos')) < 10);
    end;
    end;

    Procedure BuyDeath;
    begin
    If(Death = 'True') then
    begin
    If(((RuneAmount('shop','death')) < 10))then Exit;
    Repeat
    wait(10);
    mouse(420,87,5,5,False);
    wait(100+random(300));
    mouse(415,158,6,3,True);
    wait(100+random(300));
    Until((RuneAmount('shop','death')) < 10);
    end;
    end;

    Procedure Done;
    begin
    Mouse(488,44,2,2,True);
    wait(300+random(300));
    Logout;
    End;

    Procedure SwitchWorlds;
    begin
    Mouse(53,484,10,10,True);
    end;

    Procedure SortWorlds;
    begin
    Mouse(412,11,2,2,True);
    wait(300);
    Mouse(632,10,2,2,True);
    end;

    Procedure PickAFreeWorld;
    begin
    If(Members = 'False')then
    begin
    if(findcolortolerance(xx,yy,9013641,65+ random(170),37+random(300),272,419,1))then
    begin
      Mouse(xx,yy,3,3,True);
      Wait(1000);
    end;
    end;
    end;

    Procedure PickAMembersWorld;
    begin
    if(Members = 'True')then
    begin
    if(findcolortolerance(xx,yy,1419709,65+ random(170),37+random(300),272,419,5))then
    begin
      Mouse(xx,yy,0,0,True);
      Wait(2000);
    end;
    end;
    end;

    begin
    SetupSRL;
    SetupPlayers;
    repeat
    LoginPlayer;
    repeat
    wait(10)
    FindSquire;
    FindAubry;
    FindBetty;
    BuyFire;
    BuyAir;
    BuyMind;
    BuyChaos;
    BuyDeath;
    BuyWater;
    BuyBody;
    BuyEarth;
    Done;
    SwitchWorlds;
    SortWorlds;
    PickAFreeWorld;
    PickAMembersWorld;
    Until(False)
    end.

  2. #2
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    repeat
    LoginPlayer;
    repeat
    wait(10)
    FindSquire;
    FindAubry;
    FindBetty;
    BuyFire;
    BuyAir;
    BuyMind;
    BuyChaos;
    BuyDeath;
    BuyWater;
    BuyBody;
    BuyEarth;
    Done;
    SwitchWorlds;
    SortWorlds;
    PickAFreeWorld;
    PickAMembersWorld;
    Until(False)
    end.

    Im pretty sure you forgot a 'Until', there should be 2.
    ^_^ I might be wrong I dont have SCAR on this computer

  3. #3
    Join Date
    Aug 2006
    Posts
    408
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Lol seems obvious now. Thanks a lot.

  4. #4
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Your welcome. :]

  5. #5
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    and you didnt declare your players properly in the setup, ur missing DeclarePlayers;

  6. #6
    Join Date
    Aug 2006
    Posts
    408
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by me_ntal View Post
    and you didnt declare your players properly in the setup, ur missing DeclarePlayers;
    Wait what's the significance of that?

  7. #7
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    You havent got something to log in, i looked through the script and normally there is something similar to
    SCAR Code:
    Procedure DeclarePlayers;
    begin
        HowManyPlayers:=1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;

        Players[0].Name      := '';
         Players[0].Pass      := '';
         Players[0].Nick      := ''; // 2-4 letters of username
         Players[0].Active    := True;

    end;

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. what am i doing wrong ?:P
    By sjlou in forum OSR Help
    Replies: 2
    Last Post: 10-01-2007, 01:52 PM
  2. What am i doing wrong?
    By One Leeter in forum OSR Help
    Replies: 7
    Last Post: 06-15-2007, 10:33 PM
  3. Replies: 8
    Last Post: 03-23-2007, 04:20 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
  •