Results 1 to 3 of 3

Thread: What Have i done wrong?

  1. #1
    Join Date
    Aug 2007
    Location
    Vancouver
    Posts
    394
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default What Have i done wrong?

    SCAR Code:
    program OreEater;
    { Post errors on the thread            }
    { Declare players in lines 14-24       }
    { Set ore colour line 27               }
    { Must Set ore color or will get errors}
     {.include SRL/SRL.scar}
     {.include SRL/SRL/Skill/Mining.scar}

    Const HowManyLoads = 55;// set how many loads to do

    var
    color : integer ;
    x,y,Q, B : integer ;

    Procedure DeclarePlayers;
    Begin

       HowManyPlayers := 2;
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer := 0;

       Players[0].Name :='';   //Rs username
       Players[0].Pass :='';   //Rs password
       Players[0].Nick :='';   //Nickname ex heyidiot nickname would be yid

       Players[1].Name :='';
       Players[1].Pass :='';
       Players[1].Nick :='';
    end;

    procedure Signature;
    begin
      Writeln('OreSmasher');
      Writeln('Created By Dangerous Garden Tools');
      Writeln('Please Post All Errors On My Thread');
      Writeln('So That I Can Improve The Script!');
      Writeln('Enjoy');
    end;

    Procedure OreColors;
    begin
       color := 6564;  //color of the ore goes here
    end;

    procedure CheckFight;
    begin
      if(FindFight)then
      begin
        RunAwayDirection('N');
        wait(13000);
        RunBack;
      end;
    end;

    Procedure FindGass;
    begin
    if FindGas(x,y)then
    begin
        RunAwayDirection('N');
        Wait(10000 + random(2000));
        RunBack;
      end;
    end;

    Procedure MineTheRock;
    begin
    Orecolors;
    if FindColorTolerance(x,y,OreColors,MSX1,MSY1,MSX2,MSY2,15)then
    begin
       FindNormalRandoms;
       mouse(x,y,3,4,true)
       FindGas;
       CheckFight;
    end;
    end;

    Procedure Drop;
    var
      B : integer;
    begin
    FindNormalRandoms;
    CheckFight;
      B := 1;
        repeat
          MMouseItem(B);
          If IsUpText('re')then
            begin
              DropItem(B);
            end;
        B := B + 1;
        until(B > 27);
    end;




    Procedure Mining;
    begin
    repeat
      FindNormalRandoms;
      MineTheRock;
      FindNormalRandoms;
    until((InvFull) or (FindNormalRandoms))
      Drop;
    end;

    begin
    SetupSrl;
    DeclarePlayers;
    Q:= 2
    repeat
    repeat
    SetupSrl;
    FindNormalRandoms;
    Mining;
    CheckFight;
    Q:= Q + 3;
    until(Q = HowManyLoads);
    until(CurrentPlayer = HowManyPlayers - 1);
    end.


    This is my 2nd script, please guys help me out!
    Edit: im going for a while need to take a break, this is making my head hurt lol.

  2. #2
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    program OreEater;
    { Post errors on the thread            }
    { Declare players in lines 14-24       }
    { Set ore colour line 27               }
    { Must Set ore color or will get errors}

    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}

    Const HowManyLoads = 55;// set how many loads to do

    var
      color : integer ;
      x,y,Q, B : integer ;

    Procedure DeclarePlayers;
    Begin

       HowManyPlayers := 2;
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer := 0;

       Players[0].Name :='';   //Rs username
       Players[0].Pass :='';   //Rs password
       Players[0].Nick :='';   //Nickname ex heyidiot nickname would be yid
       Players[0].Active := True;

       Players[1].Name :='';
       Players[1].Pass :='';
       Players[1].Nick :='';
       Players[1].Active := True;
    end;

    procedure Signature;
    begin
      Writeln('OreSmasher');
      Writeln('Created By Dangerous Garden Tools');
      Writeln('Please Post All Errors On My Thread');
      Writeln('So That I Can Improve The Script!');
      Writeln('Enjoy');
    end;

    function OreColors: integer;
    begin
      result := 6564;  //color of the ore goes here
    end;

    procedure CheckFight;
    begin
      If(Not Loggedin)Then Exit;
      if(FindFight)then
      begin
        RunAwayDirection('N');
        wait(13000);
        RunBack;
      end;
    end;

    Function FindGass: Boolean;
    begin
      If(Not Loggedin)Then Exit;
      if FindGas(x,y)then
        begin
          RunAwayDirection('N');
          Wait(10000 + random(2000));
          RunBack;
          result:= true;
        end;
    end;

    Procedure MineTheRock;
    begin
      If(Not Loggedin)Then Exit;
      if FindColorTolerance(x,y,OreColors,MSX1,MSY1,MSX2,MSY2,15)then
      begin
        FindNormalRandoms;
        If(FindGass)Then Exit;
        mouse(x,y,3,4,true)
        CheckFight;
      end;
    end;

    Procedure Drop;
    var
      B : integer;
    begin
      If(Not Loggedin)Then Exit;
      FindNormalRandoms;
      CheckFight;
      B := 1;
        repeat
          MMouseItem(B);
          If IsUpText('re')then
            begin
              DropItem(B);
            end;
          B := B + 1;
        until(B > 27);
    end;

    Procedure Mining;
    begin
      If(Not Loggedin)Then Exit;
      repeat
        If(Not Loggedin)Then Exit;
        MineTheRock;
        Wait(300+Random(200));
      until(InvFull) or (FindNormalRandoms)
      Drop;
    end;

    begin
      ClearDeBug;
      Writeln('Successfully compiled - Powered by JuKKa');
      SetupSrl;
      DeclarePlayers;
      Q:= 2
      repeat
        repeat
          FindNormalRandoms;
          Mining;
          CheckFight;
          Q:= Q + 3;
        until(Q = HowManyLoads)or(Not Loggedin);
        CurrentPlayer:= CurrentPlayer + 1;
        Logout;
        LoginPlayer;
      until(CurrentPlayer >= HowManyPlayers - 1);
    end.

    There now it compiled i also added fail safes (if it loggs out etc it moves on to the next player) also fixed a few things

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  3. #3
    Join Date
    Aug 2007
    Location
    Vancouver
    Posts
    394
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    omg...thanks so much!!! ill put you in credits, your awesome.

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
  •