Results 1 to 10 of 10

Thread: wtf error

  1. #1
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default wtf error

    Code:
    program SimplePowerMiner;
    //{.Include SRL\SRL\Misc\SMART.SCAR}
    {.include SRL\SRL.scar}
    
    var
      x,y,oredtm,gemdtm, loads: Integer;
    
    const
      NumOfPlayers = 1;
      StartPlayer = 0;
      useagain = true;// use players again
      world = 5;// world to auto in
      version= '0.1';
    
    
    procedure DeclarePlayers;//add more if needed
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name       := '';
      Players[0].Pass       := '';
      Players[0].Nick       := 'nubs';
      Players[0].Active     := True;    // Use this account??
      Players[0].Integers[0]:= 100; // How many Loads??
      players[0].integers[1] := 2;//how many to mine until droping ex if there are 3 rocks put three
      // put 28 if u want a full load
      Players[0].Booleans[0]:= false//drop gems??
      Players[0].strings[0]:='iron';//what ore??
      Players[0].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal'];//What do u want out of randomns
      //must be perfect EX. capitalazation and spelling
    
    {  Players[1].Name       := '';
      Players[1].Pass       := '';
      Players[1].Nick       := '';
      Players[1].Active     := True;    // Use this account??
      Players[1].Integers[1]:= 150; // How many Loads??
      Players[1].Booleans[0]:= false//drop gems??
      Players[1].strings[0]:='iron';//what ore??
      Players[1].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal']; }
    end;
    
    procedure antibanz;
    begin
      If(not LoggedIn)then Exit;
      Case Random(9) of
        1:  PickupMouse;
        2:  SleepAndMoveMouse(500+Random(1500));
        3:  RandomMovement;
        4:  boredhuman;
        5:  hoverskill('Mining', false);
        6..8:  Exit;
        9:
        begin
          keydown(VK_Right);
          wait(100 + random (30));
          keyup(VK_Right);
        end;
      end;
    end;
    
    procedure Setup;
    begin
      writeln('      __       .__               .__                    ');
      writeln('     |__|_____ |__|______________|  |   ____   ______  ');
      writeln('     |  \____ \|  \___   /\___   /  | _/ __ \ /  ___/  ');
      writeln('     |  |  |_> >  |/    /  /    /|  |_\  ___/ \___ \    ');
      writeln(' /\__|  |   __/|__/_____ \/_____ \____/\___  >____  >   ');
      writeln(' \______|__|            \/      \/         \/     \/     ');
    
      writeln('                                            .__                   ');
      writeln('______   ______  _  __ ___________    _____ |__| ____   ___________  ');
      writeln('\____ \ /  _ \ \/ \/ // __ \_  __ \  /     \|  |/    \_/ __ \_  __ \ ');
      writeln('|  |_> >  <_> )     /\  ___/|  | \/ |  Y Y  \  |   |  \  ___/|  | \/ ');
      writeln('|   __/ \____/ \/\_/  \___  >__|    |__|_|  /__|___|  /\___  >__|  ');
      writeln('|__|                      \/              \/        \/     \/    ');
    
      {Smart_Server := 107;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False; }
      ClearDebug;
      SetupSRL;
      activateclient;
    end;
    
    function FindColorsToleranceSkipBox(var Points : TPointArray; Color, xs, ys, xe, ye, Tol : integer; SkipBox : TBox) : boolean;
    var
      i, h : integer;
    begin
      result := FindColorsTolerance(Points, Color, xs, ys, xe, ye, Tol);
      if not Result then
        exit;
      h := high(Points);
      for i := 0 to h do
        if PointInBox(Points[i], SkipBox) then
        begin
          Swap(Points[i], Points[h]);
          SetArrayLength(Points, h);
          h := high(Points);
        end;
      result := h <> -1;
    end;
    
    procedure MineTheOre;
    var
      m, orecolor: integer;
      Points : TPointArray;
    
    begin
      disguise('mining ' + Players[CurrentPlayer].Strings[0] )
      if not LoggedIn then exit;
      repeat
        if not LoggedIn then exit;
        if FindColorsToleranceSkipBox(Points, orecolor, MSX1, MSY1, MSX2, MSY2, 5, [264, 172, 230, 181])) then // error line
        begin
          MMouse(x, y, 5, 5);
          if isuptext('Mine') then
            marktime(m);
            invset:=invcount;
            mouse(x, y, 0, 0, true);
            repeat
              inv:=invcount;
              wait (100);
              FindNormalRandoms;
            until ((invset < Inv) or (TimeFromMark(m) >30000) or FindChatBoxText('availa', 8, 0));
            AntiBanz;
            FindNormalRandoms;
          end;
        end;
      end;
     until invfull
    end;
    
    
    procedure OreDropping;
    var
      OreDTM,drops:integer;
    begin
      If Not LoggedIn then exit;
      OreDTM := DTMFromString('78DA637463626078C28002FC0C54181E02694' +
        '620FE0F048CEE40353718D000231209A403816AEE1350E30D54F3' +
        '86801A7BA09A4F04D49800D53C26C29CEBF8D5000045B70DB0');
      repeat
        Disguise('dropping ores');
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        Begin
          Mouse(x,y,2,2,False);
          wait(random(200));
          ChooseOption('Use');
          wait(500 + random(100))
          FindNormalRandoms;
          Inc(drops);
        end;
      Until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(oreDTM);
    end;
    
    procedure GemDroping;
    var
      GemDrops,GemDTM:integer;
    begin
      If Not LoggedIn then exit;
      GemDTM := DTMFromString('78DA8DD2510E82300C06E06E814C144C500E0' +
        '3461F603199E869B83127C17F3324F3616BFBB026DB97656BAB46' +
        '4D6414C5715E2EB422FBDD0DA15E30EADFFC4EF71579862918F38' +
        '6A904C630E603734A9BC2670BD3A54DE9F324307DFE5FC10C304D' +
        'DA1CF67B8E02A31933E47B11CC4347D54A182B30BE3E1BE58D13B' +
        'C87998D60EE3057C6DC605A410D6BC68CF9BE7782F909E629308E' +
        '375FE5310F20');
      repeat
        Disguise('dropping gems');
        if  findDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        Begin
          Mouse(x,y,2,2,False);
          wait(random(200));
          ChooseOption('Drop');
          wait(500 + random(100))
          FindNormalRandoms;
          inc(gemdrops)
        end;
     Until not FindDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) or (gemdrops = 5);//dont think your gonna get more than 1 a tie but just incase
     FreeDTM(GemDTM);
    end;
    
    procedure Proggy;
    begin
      WriteLn('             _____  ______')
      WriteLn('            |     ||      \')
      WriteLn('            |     ||      |')
      WriteLn('            |     ||   ___/')
      WriteLn('           /_____/ |__|   ')
      writeLn('____________________________________________')
      writeln('Script has been running for ' +TimeRunning);
      WriteLn('Player '+ Players[CurrentPlayer].Nick);
      WriteLn('loads done '+ IntToStr(loads));
      WriteLn('ores mined ' +inttostr(loads *27 )) ;
      writeLn('plz post the proggie here http://www.villavu.com/forum/showthr...565#post542565');
    end;
    
    procedure break;
    begin
      disguise('breaking now')
      logout;
      wait(300000+random(300000));
    end;
    
    begin
      Setup;
      activateclient;
      DeclarePlayers;
      GraphicsSet := true;
      LoginPlayer;
      repeat
        repeat
          FindNormalRandoms;
          GetTimeRunning;
          ClearDebug;
          Proggy;
          if loads = 25 + random(25) then
          break;
          findnormalrandoms;
          MineTheore;
          findnormalrandoms;
          oredropping;
          findnormalrandoms;
          if Players[CurrentPlayer].Booleans[0] then
          Gemdroping;
          FindNormalRandoms;
          Inc(loads);
        until (loads= (Players[CurrentPlayer].Integers[0])) or (not LoggedIn);
        NextPlayer(Useagain);
      until(AllPlayersInactive);
    end.
    ok so its an update to my power miner and i keep getting this error

    Line 116: [Error] (19669:97): 'THEN' expected in script

    but heres the thing then is in the script

    any help??

  2. #2
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program SimplePowerMiner;
    //{.Include SRL\SRL\Misc\SMART.SCAR}
    {.include SRL\SRL.scar}

    var
      x,y,oredtm,gemdtm, loads: Integer;

    const
      NumOfPlayers = 1;
      StartPlayer = 0;
      useagain = true;// use players again
      world = 5;// world to auto in
      version= '0.1';


    procedure DeclarePlayers;//add more if needed
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name       := '';
      Players[0].Pass       := '';
      Players[0].Nick       := 'nubs';
      Players[0].Active     := True;    // Use this account??
      Players[0].Integers[0]:= 100; // How many Loads??
      players[0].integers[1] := 2;//how many to mine until droping ex if there are 3 rocks put three
      // put 28 if u want a full load
      Players[0].Booleans[0]:= false//drop gems??
      Players[0].strings[0]:='iron';//what ore??
      Players[0].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal'];//What do u want out of randomns
      //must be perfect EX. capitalazation and spelling

    {  Players[1].Name       := '';
      Players[1].Pass       := '';
      Players[1].Nick       := '';
      Players[1].Active     := True;    // Use this account??
      Players[1].Integers[1]:= 150; // How many Loads??
      Players[1].Booleans[0]:= false//drop gems??
      Players[1].strings[0]:='iron';//what ore??
      Players[1].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal']; }

    end;

    procedure antibanz;
    begin
      If(not LoggedIn)then Exit;
      Case Random(9) of
        1:  PickupMouse;
        2:  SleepAndMoveMouse(500+Random(1500));
        3:  RandomMovement;
        4:  boredhuman;
        5:  hoverskill('Mining', false);
        6..8:  Exit;
        9:
        begin
          keydown(VK_Right);
          wait(100 + random (30));
          keyup(VK_Right);
        end;
      end;
    end;

    procedure Setup;
    begin
      writeln('      __       .__               .__                    ');
      writeln('     |__|_____ |__|______________|  |   ____   ______  ');
      writeln('     |  \____ \|  \___   /\___   /  | _/ __ \ /  ___/  ');
      writeln('     |  |  |_> >  |/    /  /    /|  |_\  ___/ \___ \    ');
      writeln(' /\__|  |   __/|__/_____ \/_____ \____/\___  >____  >   ');
      writeln(' \______|__|            \/      \/         \/     \/     ');

      writeln('                                            .__                   ');
      writeln('______   ______  _  __ ___________    _____ |__| ____   ___________  ');
      writeln('\____ \ /  _ \ \/ \/ // __ \_  __ \  /     \|  |/    \_/ __ \_  __ \ ');
      writeln('|  |_> >  <_> )     /\  ___/|  | \/ |  Y Y  \  |   |  \  ___/|  | \/ ');
      writeln('|   __/ \____/ \/\_/  \___  >__|    |__|_|  /__|___|  /\___  >__|  ');
      writeln('|__|                      \/              \/        \/     \/    ');

      {Smart_Server := 107;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False; }

      ClearDebug;
      SetupSRL;
      activateclient;
    end;

    function FindColorsToleranceSkipBox(var Points : TPointArray; Color, xs, ys, xe, ye, Tol : integer; SkipBox : TBox) : boolean;
    var
      i, h : integer;
    begin
      result := FindColorsTolerance(Points, Color, xs, ys, xe, ye, Tol);
      if not Result then
        exit;
      h := high(Points);
      for i := 0 to h do
        if PointInBox(Points[i], SkipBox) then
        begin
          Swap(Points[i], Points[h]);
          SetArrayLength(Points, h);
          h := high(Points);
        end;
      result := h <> -1;
    end;

    procedure MineTheOre;
    var
      m, orecolor: integer;
      Points : TPointArray;

    begin
      disguise('mining ' + Players[CurrentPlayer].Strings[0] )
      if not LoggedIn then exit;
      repeat
        if not LoggedIn then exit;
        if FindColorsToleranceSkipBox(Points, orecolor, MSX1, MSY1, MSX2, MSY2, 5, IntToBox(264, 172, 230, 181)) then // error line
        begin
          MMouse(x, y, 5, 5);
          if isuptext('Mine') then
            marktime(m);
            invset:=invcount;
            mouse(x, y, 0, 0, true);
            repeat
              inv:=invcount;
              wait (100);
              FindNormalRandoms;
            until ((invset < Inv) or (TimeFromMark(m) >30000) or FindChatBoxText('availa', 8, 0));
            AntiBanz;
            FindNormalRandoms;
          end;
        end;
      end;
     until invfull
    end;


    procedure OreDropping;
    var
      OreDTM,drops:integer;
    begin
      If Not LoggedIn then exit;
      OreDTM := DTMFromString('78DA637463626078C28002FC0C54181E02694' +
        '620FE0F048CEE40353718D000231209A403816AEE1350E30D54F3' +
        '86801A7BA09A4F04D49800D53C26C29CEBF8D5000045B70DB0');
      repeat
        Disguise('dropping ores');
        If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        Begin
          Mouse(x,y,2,2,False);
          wait(random(200));
          ChooseOption('Use');
          wait(500 + random(100))
          FindNormalRandoms;
          Inc(drops);
        end;
      Until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
      FreeDTM(oreDTM);
    end;

    procedure GemDroping;
    var
      GemDrops,GemDTM:integer;
    begin
      If Not LoggedIn then exit;
      GemDTM := DTMFromString('78DA8DD2510E82300C06E06E814C144C500E0' +
        '3461F603199E869B83127C17F3324F3616BFBB026DB97656BAB46' +
        '4D6414C5715E2EB422FBDD0DA15E30EADFFC4EF71579862918F38' +
        '6A904C630E603734A9BC2670BD3A54DE9F324307DFE5FC10C304D' +
        'DA1CF67B8E02A31933E47B11CC4347D54A182B30BE3E1BE58D13B' +
        'C87998D60EE3057C6DC605A410D6BC68CF9BE7782F909E629308E' +
        '375FE5310F20');
      repeat
        Disguise('dropping gems');
        if  findDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
        Begin
          Mouse(x,y,2,2,False);
          wait(random(200));
          ChooseOption('Drop');
          wait(500 + random(100))
          FindNormalRandoms;
          inc(gemdrops)
        end;
     Until not FindDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) or (gemdrops = 5);//dont think your gonna get more than 1 a tie but just incase
     FreeDTM(GemDTM);
    end;

    procedure Proggy;
    begin
      WriteLn('             _____  ______')
      WriteLn('            |     ||      \')
      WriteLn('            |     ||      |')
      WriteLn('            |     ||   ___/')
      WriteLn('           /_____/ |__|   ')
      writeLn('____________________________________________')
      writeln('Script has been running for ' +TimeRunning);
      WriteLn('Player '+ Players[CurrentPlayer].Nick);
      WriteLn('loads done '+ IntToStr(loads));
      WriteLn('ores mined ' +inttostr(loads *27 )) ;
      writeLn('plz post the proggie here [url]http://www.villavu.com/forum/showthr...565#post542565');[/url]
    end;

    procedure break;
    begin
      disguise('breaking now')
      logout;
      wait(300000+random(300000));
    end;

    begin
      Setup;
      activateclient;
      DeclarePlayers;
      GraphicsSet := true;
      LoginPlayer;
      repeat
        repeat
          FindNormalRandoms;
          GetTimeRunning;
          ClearDebug;
          Proggy;
          if loads = 25 + random(25) then
          break;
          findnormalrandoms;
          MineTheore;
          findnormalrandoms;
          oredropping;
          findnormalrandoms;
          if Players[CurrentPlayer].Booleans[0] then
          Gemdroping;
          FindNormalRandoms;
          Inc(loads);
        until (loads= (Players[CurrentPlayer].Integers[0])) or (not LoggedIn);
        NextPlayer(Useagain);
      until(AllPlayersInactive);
    end.

    Edit: Oh, and you will get this:
    Code:
    Line 121: [Error] (19674:1): Unknown identifier 'invset' in script
    I'm sure you can fix that, just haven't got to it yet . What I put fixes the then error though.

  3. #3
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  4. #4
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No. He had [264, 172, 230, 181] not IntToBox(264, 172, 230, 181).

  5. #5
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  6. #6
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He copied what I told him on MSN. I had IntToBox in my message, but he removed it for some reason and added [ and ].

  7. #7
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    no i copied what ian told me on msn

  8. #8
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Doesn't matter, I created the procedure you wanted anyways...(and no credit).

  9. #9
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    im not even using the function anymore and i was gonna credit u after i figured out how to get tit to work

  10. #10
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It is pretty easy to use...it's like the normal GetColorSkipBoxTolerance function that is built in to SCAR.

    All you do is add in a box as the SkipBox parameter.

    x--------
    ---------
    ---------
    --------x
    The x's are the TPoints that make up the box. The IntToBox procedure (the one that I used) takes four parameters (x1, y1, x2, y2). x1 and y1 are the x and y of the top left side, while x2 and y2 are the x and y of the bottom right side.

    Let's say that the top left coordinates of that box are 5, 5 and the bottom right coordinates are 15, 15.

    To make that box with IntToBox you would use IntToBox(5, 5, 15, 15) and that would result a TBox. Without using IntToBox you could use:
    SCAR Code:
    Box.x1 := 5;
      Box.y1 := 5;
      Box.x2 := 15;
      Box.y2 := 15;
    or
    SCAR Code:
    PointsToBox(Point(5, 5), Point(15, 15));
    I think PointsToBox is in SRL though.

    If you need anymore help, I will gladly help you on MSN.

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
  •