Results 1 to 6 of 6

Thread: Making a Mahogany script need Help

  1. #1
    Join Date
    Mar 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Post Making a Mahogany script need Help

    Hey guys decided to make a mahogany script but when i try to compile i get this error !
    [Error] (1:1): Unexpected end of file at line 0
    Compiling failed.
    Simba Code:
    program KensMahogany;
    {$i SRL/srl.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //Username
      Players[0].Pass := ''; //Password
      Players[0].Active := True; //Leave this alone.
      Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
    end;
    procedure AntiBan;
    begin
      FindNormalRandoms;
      case Random(100) of
        0..7:
        begin
          case Random(5) of
            0:
            begin
              HoverSkill('Woodcutting', false);
              wait(1200 + random(100));
            end;
            1: PickUpMouse;
            2: RandomMovement;
            3: ExamineInv;
          end;
        end;
        8..99: Wait(50 + random(50));
      end;
    end;

    function TreeColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.04, 1.25);

      if not (FindColorsTolerance(arP, 5808572, MSX1, MSY1, MSX2, MSY2, 9)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Function ChopDown:BooLean;
    Var
      heX, heY: Integer;
    Begin
      If FindObjTPA(heX, heY, TreeColor, 5, 2, 20, 60, 15, ['hogany', 'Chop', 'hop']) then
      WriteLn('Yo Dawg, we found that Tree');


    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;

    end
    Get 270 Quest points !

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Try adding a period on your final end. Also you forgot an end in your chopdown procedure

  3. #3
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    you forgot a dot at your last end

    Simba Code:
    end.

    Creds to DannyRS for this wonderful sig!

  4. #4
    Join Date
    Mar 2012
    Posts
    121
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Post

    Simba Code:
    program KensMahogany;
    {$i SRL/srl.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; //Username
      Players[0].Pass := ''; //Password
      Players[0].Active := True; //Leave this alone.
      Players[0].Pin := ''; //Put your Bank PIN here. Leave blank if you don't have a Bank PIN.
    end;

    procedure AntiBan;
    begin
      FindNormalRandoms;
      case Random(100) of
        0..7:
        begin
          case Random(5) of
            0:
            begin
              HoverSkill('Woodcutting', false);
              wait(1200 + random(100));
            end;
            1: PickUpMouse;
            2: RandomMovement;
            3: ExamineInv;
          end;
        end;
        8..99: Wait(50 + random(50));
      end;
    end;

    function TreeColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.04, 1.25);

      if not (FindColorsTolerance(arP, 6135736, MSX1, MSY1, MSX2, MSY2, 9)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;

    Function ChopDown:BooLean;
    Var
      heX, heY: Integer;
    Begin
      If FindObjTPA(heX, heY, TreeColor, 5, 2, 20, 60, 10, ['hogany', 'Chop', 'hop']) then
      WriteLn('Yo Dawg, we found that Tree');
      begin
        Mouse(heX, heY, 2, 2, false);
        ChooseOption('hop');
        repeat
          Wait(1200+random(240));
        Until not IsUpText('hogany') or (InvFull);
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      Repeat
        ChopDown;
      Until not IsUpText('hogany')or(InvFull);
    end.
    Oh k same issue [Error] (96:4): Identifier expected at line 95 what did i do wrong now !
    Get 270 Quest points !

  5. #5
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Simba Code:
    Function ChopDown:BooLean;
    Var
      heX, heY: Integer;
    Begin
      If FindObjTPA(heX, heY, TreeColor, 5, 2, 20, 60, 10, ['hogany', 'Chop', 'hop']) then
      WriteLn('Yo Dawg, we found that Tree');
      begin
        Mouse(heX, heY, 2, 2, false);
        ChooseOption('hop');
        repeat
          Wait(1200+random(240));
        Until not IsUpText('hogany') or (InvFull);
    end;
    Missing an end;

  6. #6
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Make sure you always have a end for every begin(:

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
  •