Results 1 to 7 of 7

Thread: invfull

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

    Default invfull

    is there something wrong with invfull casue my procedure just fropps it after 2 ores ( not as big issue in itself) but that messes with the loads till switch and stuff like that

    Code:
    {So here my first script it runs pretty well
    
    only bugs so far is thta sumtimes it clicks sumwhere else and doesnt drop allt he ore
    (ong thts not to bad)
    
    ty tickyy i looked on to your miner for proggy help and antibans and more
    ____________________setup__________________________
    1. set up declareplayers
    2. set ore type in line 38
    3. setup player by rock you want to mine
    3. save
    4. run
    5. post proggies and any bugs
    
    
    btw it posts proggies all the way though so only post them t the end and takes 5-10 minute breaks every 50 loads
    
    and enjoy   :0
    ______________________________________________________}
    
    
    program SimplePowerMiner;
    {.Include SRL\SRL\Misc\SMART.SCAR}
    {.include SRL\SRL.scar}
    
    {agenda
     0. fix DTMs
     3. anti randoms
     4. multi ores???
     5. release it}
    
    var
      u,l,j,x,y,g,i,y,z,f,switches,oredtm,gemdtm, ores: Integer;
    
    const
      NumOfPlayers = 2;
      StartPlayer = 0;
      useagain = true;// use players again
      world = 149;// world to auto in
      version= '0.1';
      
    procedure DeclarePlayers;//add more if needed
    begin
      HowManyPlayers := 2;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      
      Players[0].Name       := '';
      Players[0].Pass       := '';
      Players[0].Nick       := '';
      Players[0].Active     := True;    // Use this account??
      Players[0].Integers[1]:= 10; // How many Loads??
      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]:= 10; // 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'];
    
     { Players[2].Name       := '';
      Players[2].Pass       := 's';
      Players[2].Nick       := 'nubs';
      Players[2].Active     := True;    // Use this account??
      Players[2].Integers[1]:= 10; // How many Loads??
      Players[2].Booleans[0]:= false//drop gems??
      Players[2].strings[0]:='iron';//what ore??
      Players[2].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal'];//What do u want out of randomns
      //must be perfect EX. capitalazation and spelling }
    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 CheckVer;
    Var
      myVersion : String;
    Begin
      myVersion := GetPage('www.freewebs.com/jpsnoobpowerminer/version.txt');
      If myVersion <> Version Then
        WriteLn('get a new version!')
      else
        WriteLn('good up to date!');
    end;
    
      
    procedure Setup;
    begin
      disguise('TY for using jps powerminer')
      ClearDebug;
      SMARTSetupEx(world, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);
      SetupSRL;
      activateclient;
    end;
    
    
    procedure MineTheOre;
    var
      x, y, H, m, cts, i, maincolor, basecolor, inv, invset: integer;
      TreeUptext: string;
      MainPoints, BasePoints, TPA: TPointArray;
      ATPA: T2DPointArray;
    
    begin
      disguise('mining')
      if not LoggedIn then exit;
      keydown(VK_up);// so it can dfind the roe
      wait(1000 + random (30));
      keyup(VK_up);
      case Lowercase(Players[CurrentPlayer].Strings[0]) of
        'tin':
        begin
          maincolor := 10197927;
          basecolor := 10000805;
        end;
        'copper':
        begin
          maincolor := 3430801;
          basecolor := 3495029;
        end;
        'iron':
        begin
          maincolor := 2503507;
          Basecolor := 2767197;
        end;
        'coal':
        begin
          maincolor := 2768447;
          basecolor := 2241074;
        end;
        'mithril':
        begin
          maincolor := 5913916;
          basecolor := 6505283;
        end;
        'adamentite':
        begin
          maincolor :=  4741960;
          basecolor :=  6454114;
        end;
      end;
      repeat
        if not LoggedIn then exit;
        CTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.2, 0.2);
        FindColorsTolerance(MainPoints, maincolor, MSX1, MSY1, MSX2, MSY2, 5);
        FindColorsTolerance(BasePoints, Basecolor, MSX1, MSY1, MSX2, MSY2, 5);
        TPA := CombineTPA(MainPoints, BasePoints);
        if (Length(TPA) = 0) then Exit;
        ATPA := SplitTPAEx(TPA, 9, 9);
        SortATPAFrom(ATPA, Point(MSCX, MSCY));
        H := High(ATPA) - 1;
        for I := 0 to H do
        begin
          MiddleTPAEx(ATPA[i], x, y);
          MMouse(x, y, 3, 3);
          Wait(100 + Random(200));
          if IsUpText('Mine') then
          begin
            Marktime(m);
            Mouse(x, y, 1, 1, True);
            invset:=invcount;
            repeat
              inv:=invcount;
              wait (100);
              FindNormalRandoms;
            until ((invset < Inv) or (TimeFromMark(m) > 15000) or FindChatBoxText('availa', 8, 0));
            inc(ores)
            AntiBanz;
            FindNormalRandoms;
          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('Drop');
          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)
          Inc(f);
        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(g));
      WriteLn('ores mined ' +inttostr(g *27)) ;
      WriteLn('gems dropped ' + IntToStr(f));
      WriteLn('plsyers used ' +inttostr(switches));
      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
      g:= 0;
      l:=0;
      u:=0;
      j:=0;
      f:=0;
      Setup;
      checkver;
      DeclarePlayers;
      GraphicsSet := true;
      LoginPlayer;
      repeat
        repeat
          FindNormalRandoms;
          GetTimeRunning;
          ClearDebug;
          Proggy;
          if g = 25 + random(25) then
          break;
          findnormalrandoms;
          MineTheore;
          findnormalrandoms;
          OreDropping;
          findnormalrandoms;
          if Players[CurrentPlayer].Booleans[0]=true then
          Gemdroping;
          FindNormalRandoms;
          Inc(g);
        until (g= (Players[CurrentPlayer].Integers[1])) or (not LoggedIn);
        NextPlayer(Useagain);
      until(AllPlayersInactive);
    end.
                            {So here my first script it runs pretty well
    
    only bugs so far is thta sumtimes it clicks sumwhere else and doesnt drop allt he ore
    (ong thts not to bad)
    
    ty tickyy i looked on to your miner for proggy help and antibans and more
    ____________________setup__________________________
    1. set up declareplayers
    2. set ore type in line 38
    3. setup player by rock you want to mine
    3. save
    4. run
    5. post proggies and any bugs
    
    
    btw it posts proggies all the way though so only post them t the end and takes 5-10 minute breaks every 50 loads
    
    and enjoy   :0
    ______________________________________________________}
    
    
    program SimplePowerMiner;
    {.Include SRL\SRL\Misc\SMART.SCAR}
    {.include SRL\SRL.scar}
    
    {agenda
     0. fix DTMs
     3. anti randoms
     4. multi ores???
     5. release it}
    
    var
      u,l,j,x,y,g,i,y,z,f,switches,oredtm,gemdtm: Integer;
    
    const
      NumOfPlayers = 1;
      StartPlayer = 0;
      useagain = true;// use players again
      world = 49;// world to auto in
    
    procedure DeclarePlayers;//add more if needed
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name       := '';
      Players[0].Pass       := '';
      Players[0].Nick       := 'jphm';
      Players[0].Active     := True;    // Use this account??
      Players[0].Integers[1]:= 100; // How many Loads??
      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
      disguise('TY for using jps powerminer')
      ClearDebug;
      SMARTSetupEx(world, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);
      SetupSRL;
      activateclient;
    end;
    
    
    procedure MineTheOre;
    var
      x, y, H, m, cts, i, maincolor, basecolor, inv, invset: integer;
      TreeUptext: string;
      MainPoints, BasePoints, TPA: TPointArray;
      ATPA: T2DPointArray;
    
    begin
      disguise('mining')
      if not LoggedIn then exit;
      case Lowercase(Players[CurrentPlayer].Strings[0]) of
        'tin':
        begin
          maincolor := 10197927;
          basecolor := 10000805;
        end;
        'copper':
        begin
          maincolor := 3430801;
          basecolor := 3495029;
        end;
        'iron':
        begin
          maincolor := 2503507;
          Basecolor := 2767197;
        end;
        'coal':
        begin
          maincolor := 2768447;
          basecolor := 2241074;
        end;
        'mithril':
        begin
          maincolor := 5913916;
          basecolor := 6505283;
        end;
        'adamentite':
        begin
          maincolor :=  4741960;
          basecolor :=  6454114;
        end;
      end;
      repeat
        if not LoggedIn then exit;
        CTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.2, 0.2);
        FindColorsTolerance(MainPoints, maincolor, MSX1, MSY1, MSX2, MSY2, 5);
        FindColorsTolerance(BasePoints, Basecolor, MSX1, MSY1, MSX2, MSY2, 5);
        TPA := CombineTPA(MainPoints, BasePoints);
        if (Length(TPA) = 0) then Exit;
        ATPA := SplitTPAEx(TPA, 9, 9);
        SortATPAFrom(ATPA, Point(MSCX, MSCY));
        H := High(ATPA) - 1;
        for I := 0 to H do
        begin
          MiddleTPAEx(ATPA[i], x, y);
          MMouse(x, y, 3, 3);
          Wait(100 + Random(200));
          if IsUpText('Mine') then
          begin
            Marktime(m);
            Mouse(x, y, 1, 1, True);
            invset:=invcount;
            repeat
              inv:=invcount;
              wait (100);
              FindNormalRandoms;
            until ((invset < Inv) or (TimeFromMark(m) > 15000) or FindChatBoxText('availa', 8, 0));
            AntiBanz;
            FindNormalRandoms;
          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('Drop');
          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)
          Inc(f);
        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(g));
      WriteLn('ores mined ' +inttostr(ores)) ;
      WriteLn('gems dropped ' + IntToStr(f));
      writeLn('plz post the proggie here http://www.villavu.com/forum/showthr...t542565&#39;);
    end;
    
    procedure break;
    begin
      disguise('breaking now')
      logout;
      wait(300000+random(300000));
    end;
    
    
    
    begin
      Setup;
      DeclarePlayers;
      GraphicsSet := true;
      LoginPlayer;
      repeat
        repeat
          FindNormalRandoms;
          GetTimeRunning;
          ClearDebug;
          Proggy;
          if g = 25 + random(25) then
          break;
          findnormalrandoms;
          MineTheore;
          findnormalrandoms;
          OreDropping;
          findnormalrandoms;
          if Players[CurrentPlayer].Booleans[0]=true then
          Gemdroping;
          FindNormalRandoms;
          Inc(g);
        until (g= (Players[CurrentPlayer].Integers[1])) or (not LoggedIn);
        NextPlayer(Useagain);
      until(AllPlayersInactive);
    end.
    Last edited by JPHamlett; 06-09-2009 at 03:44 AM.

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    It may be because you FindColorsTolerance aren't finding a color to return so the Length of your TPA is 0 and therefor Exit's the function.

    also, you dont have a semicolon';' after your until InvFull;

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

    Default

    Quote Originally Posted by NCDS View Post
    It may be because you FindColorsTolerance aren't finding a color to return so the Length of your TPA is 0 and therefor Exit's the function.

    also, you dont have a semicolon';' after your until InvFull;
    to fix it should i jsut take out that line or what

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    put:
    SCAR Code:
    if (Length(TPA) = 0) then
    begin
      if Tx < 5 then
      begin
        Writeln('Problem Mining Ore, trying again...')
        MineTheOre
        Inc(Tx)
      end
      else
      Tx = 0;
    end;
    blah
    blah
    blah
    Something like that should work.

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

    Default

    Would this work in in the dropping procedure i put

    Code:
    if not invfull then
      mineores;
    at the beggingin of hte procedure

  6. #6
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here's what I would do:
    change the TPA part a little
    SCAR Code:
    if (Length(TPA) = 0) then Exit;
    to this:
    SCAR Code:
    if (TimeFromMark(m) > 15000) then Exit;
    if (Length(TPA) = 0) then MineTheOre;
    Then it goes to the beginning of MineTheOre if TPA length is 0 and won't cause an endless loop if you have the if TimeFromMark before it
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  7. #7
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by J_Pizzle View Post
    Would this work in in the dropping procedure i put

    Code:
    if not invfull then
      mineores;
    at the beggingin of hte procedure
    Yes, that should be fine.

    Just remember that you either need a forward or your Drop function must be declared before your Mining function.

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
  •