Results 1 to 8 of 8

Thread: Drop ore only

  1. #1
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default Drop ore only

    Ok so this is like my zillionth question so thx for everyone's help. now i just need to know how you make it drop ore only when you get to a dropping procedure and not drop gems,coins etc. i think it's something to do with DTM's or something but i dunno. lil help plz. thx
    Sleeping...

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    http://www.villavu.com/forum/showthread.php?t=564

    Read that. Make a DTM of an ore (not clay) and only click the black outline (which is color 65536). Make it at least 10 points.

    Try this, I haven't tested it
    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
     
    var OreDTM:integer;
    //Oppposite of itemcoords
    function CoordsToInvSpot(gx,gy:integer):integer;
    var col,row:integer;
    begin
    if ((gx>569) and(gx<600)) then col:=1;
    if ((gx>611) and(gx<642)) then col:=2;
    if ((gx>653) and(gx<684)) then col:=3;
    if ((gx>695) and(gx<723)) then col:=4;

    if ((gy>213) and(gy<244)) then row:=1;
    if ((gy>249) and(gy<280)) then row:=2;
    if ((gy>285) and(gy<316)) then row:=3;
    if ((gy>322) and(gy<352)) then row:=4;
    if ((gy>357) and(gy<387)) then row:=5;
    if ((gy>393) and(gy<424)) then row:=6;
    if ((gy>429) and(gy<459)) then row:=7;

    result:=((row-1)*4)+col;
    end;

    begin
      SetupSRL;
     
      OreDTM:= DTMFromString('78DA634C636060706740038C48249006A9F12' +
           '3A0261F487813A12688809A1C201141847BA209A84902123104D4' +
           'C4028944026AA2893007E4DE28026A828930071436A104D484128' +
           'E0B0047CA0967');
      repeat
        if FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2) then
        DropItem(coordstoinvspot(x,y));
        wait(200+random(200));
      until not(FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2));
      freedtm(OreDTM);
    end.

  3. #3
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    sweet boreas ur a legend but.......it wouldn't be me if I didn't need it explained in detail so a baby could understand it so please tell me why i get the error:
    "Line 231: [Hint] (19927:10): Variable 'Result' never used in script C:\DOCUME~1\home\Desktop\SCAR2~1.03\includes\SRL\s cripts\MYSCRI~1\powerminer(4).scar
    [Error] (20023:4): Identifier expected"

    also why does scar tell you what line the identifier expected should be on...here's script:

    SCAR Code:
    //////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////
    //                  THE NOOBIEST                      //
    //                   POWERMINER                      //
    //                  BY RKROXPUNK                    //
    //                                                 //
    ////////////////////////////////////////////////////
    ///////////////////////////////////////////////////
    program PowerMiner;
    {.include SRL/SRL.scar}
    {.include srl\srl\skill\Mining.scar}
    {.include SRL\SRL\Misc\Trade.scar}

    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                  LOGIN AND SETUP                     //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////
    var
      Loads: Integer;
      PickEquip: Boolean;
      OreMined: Integer;
      OreDTM:integer;
    const
      Loadz = 1; //How Many Loads.
      NumberOfUsers = 3; //How Many Players Are You Using.
      VersionNumber = '2';
      OreeColor = 3692410; //Put the colour of the ore you want to mine here
      WaitTime = 7000; //How long before it clicks again
      RunDirec = 'N'; //Direction you want to run in if find smoking rock


    procedure DeclarePlayers;

    begin
      HowManyPlayers := 3; // Set Number of Players here.
      NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
      CurrentPlayer := 0;
      EquipPick := Players[CurrentPlayer].Boolean1;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Loc := 'Loc1';
      Players[0].Skill := 'Mining';
      Players[0].Boolean1 := False; // Is your pick equipped. true = yes, false =  no
      Players[0].Active := True;

      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := '';
      Players[1].Loc := 'Loc1';
      Players[1].Skill := 'Mining';
      Players[1].Boolean1 := False; // Is your pick equipped. true = yes, false =  no
      Players[1].Active := True;

      Players[2].Name := '';
      Players[2].Pass := '';
      Players[2].Nick := '';
      Players[2].Loc := 'Loc1';
      Players[2].Skill := 'Mining';
      Players[2].Boolean1 := False; // Is your pick equipped. true = yes, false =  no
      Players[2].Active := True;

      writeln(inttostr(HowManyPlayers) + ' Players');
    end;

    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //            RANDOMS AND ANTIBAN                       //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    procedure AntiRandoms;
    begin
      FindTalk;
      SRLRandomsReport;
      FindNormalRandoms;
      if (FindFight = true) then
      begin
        RunAwayDirection(RunDirec);
        Wait(10000 + random(2000));
        RunBack;
      end;
    end;

    Function OtherRandoms: Boolean;    // By WT-Fakawi.


    Var
      i: Integer;


    Begin
      For I := 1 To 11 Do
      Begin
        Case I Of
           1:  If FindDead Then
                 Result := True;

           2:  If FindMod Then
                 Result := True;

           3:  If FindMime Then
                 Result := True;

           4:  If FindMaze Then
                 Result := True;

           5:  If FindQuiz Then
                 Result := True;

           6:  If FindDemon Then
                 Result := True;

           7: Begin
                 If NoGameTab Then
                 Begin
                   Result := True;
                   Players[CurrentPlayer].loc := 'No GameTab';
                   Logout;
                   Exit;
                 End;
               End;

           8 : If RC Then
                 Result := True;

           9 : If FindFight Then
                  Begin
                    Result := True;
                    RunTo(RunDirec, True);
                  End;

           10: If FindTalk Then
                 Result := True;

           11: If HandleTrade Then
                 Result := True;
        End;
        Wait(1);
      End;
    End;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                     DTM                              //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                  PROGGY!                             //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////

    procedure Report;
    begin
    Loads := Loadz * 28;
      Writeln('[]----------THE NOOBIEST PROGGY!----------[]');
      Writeln('[]------------------By RK-----------------[]');
      writeln('RRRRRRRRRRRRRRRRR   KKKKKKKKK    KKKKKKK')
        wait(500)
        writeln('R::::::::::::::::R  K:::::::K    K:::::K')
        wait(500)
        writeln('R::::::RRRRRR:::::R K:::::::K    K:::::K')
        wait(500)
        writeln('RR:::::R     R:::::RK:::::::K   K::::::K')
        wait(500)
        writeln('  R::::R     R:::::RKK::::::K  K:::::KKK ')
        wait(500)
        writeln('  R::::R     R:::::R  K:::::K K:::::K')
        wait(500)
        writeln('  R::::RRRRRR:::::R   K::::::K:::::K')
        wait(500)
        writeln('  R:::::::::::::RR    K:::::::::::K')
        wait(500)
        writeln('  R::::RRRRRR:::::R   K:::::::::::K')
        wait(500)
        writeln('  R::::R     R:::::R  K::::::K:::::K')
        wait(500)
        writeln('  R::::R     R:::::R  K:::::K K:::::K')
        wait(500)
        writeln('  R::::R     R:::::RKK::::::K  K:::::KKK')
        wait(500)
        writeln('RR:::::R     R:::::RK:::::::K   K::::::K')
        wait(500)
        writeln('R::::::R     R:::::RK:::::::K    K:::::K')
        wait(500)
        writeln('R::::::R     R:::::RK:::::::K    K:::::K')
        wait(500)
        writeln('RRRRRRRR     RRRRRRRKKKKKKKKK    KKKKKKK')
        Writeln('            Worked For : ' + ScriptTime2(2)) //Displays how long it worked for
        Writeln('             Mined/Dropped ' + IntToStr(Loadz) + ' Loads');
      Writeln('[]------------------By RK-----------------[]');
      Writeln('[]----------THE NOOBIEST PROGGY!----------[]');
    end;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                  MINEING AND DROPPING                //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////


    function FindOre: Boolean;
    begin
      if FindColorSpiral(x, y, OreeColor, 0, 0, 515, 336) then
      begin
        Result := True;
        Status('Found Ore :D');
      end else
        Status('Did not find Ore :(');
      wait(5 + random(5));
    end;

    function MouseAndClick: Boolean;
    begin
      repeat
        if (FindOre) then
        begin
          MMouse(x, y, 0, 0);
          Result := True;
          Wait(20 + random(150));
          Mouse(x, y, 0, 0, true);
          OreMined := OreMined + 1
            wait(3000);
          Exit;
        end;
      until (false)
    end;

    function UntilMined(Time: integer): boolean;
    var timer: integer;
    begin
      status('waiting for pick swing')
        if FindText(x, y, 'You swing your', SmallChars, 20, 415, 152, 431) then
      begin
        marktime(Timer);
        status('waiting for ore')
          repeat
          wait(1000 + random(1000))
        until FindText(x, y, 'anage', SmallChars, 20, 415, 152, 431) or
          (timefrommark(Timer) > Time);
        writeln('Finished mining')
      end;
    end;

    function CoordsToInvSpot(gx,gy:integer):integer;
    var col,row:integer;
    begin
    if ((gx>569) and(gx<600)) then col:=1;
    if ((gx>611) and(gx<642)) then col:=2;
    if ((gx>653) and(gx<684)) then col:=3;
    if ((gx>695) and(gx<723)) then col:=4;

    if ((gy>213) and(gy<244)) then row:=1;
    if ((gy>249) and(gy<280)) then row:=2;
    if ((gy>285) and(gy<316)) then row:=3;
    if ((gy>322) and(gy<352)) then row:=4;
    if ((gy>357) and(gy<387)) then row:=5;
    if ((gy>393) and(gy<424)) then row:=6;
    if ((gy>429) and(gy<459)) then row:=7;

    result:=((row-1)*4)+col;
    end;


    begin
      if (invfull) then
      begin
          GameTab(4);
          OreDTM:= DTMFromString('78DA634C636060706740038C48249006A9F12' +
           '3A0261F487813A12688809A1C201141847BA209A84902123104D4' +
           'C4028944026AA2893007E4DE28026A828930071436A104D484128' +
           'E0B0047CA0967');
          repeat
        if FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2) then
        DropItem(coordstoinvspot(x,y));
        wait(200+random(200));
      until not(FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2));
      freedtm(OreDTM);
    end;
    ////////////////////////////////////////////////////////////
    ///////////////////////////////////////////////////////////
    //                    MAIN LOOP                         //
    /////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////
    begin
      ClearDebug;
      SetupSRL;
      SetupSRLMining;
      DeclarePlayers;
      Activateclient;
      wait(1000);
      LoginPlayer;
      wait(1000);
      MakeCompass('N');
      HighestAngle;
      SetRun(true);
      repeat
        repeat
          Gametab(4);
          FindOre;
          MouseAndClick;
          UntilMined(5000);
          CoordsToInvSpot(x,y);
          AntiRandoms;
          OtherRandoms;
          until(Loads = Loadz);
          if (Loads = Loadz) then
          begin
          Report;
          Loads:=0
            Logout;
          Nextplayer(true);
          end;
          MakeCompass('N');
          HighestAngle;
          SetRun(true);
          Gametab(4);
          FindOre;
          MouseAndClick;
          UntilMined(5000);
          CoordsToInvSpot(x,y);
          AntiRandoms;
          OtherRandoms;
          until (false);
    end.
    Sleeping...

  4. #4
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    You need a name for the dropping thing

    SCAR Code:
    procedure dropstuff;
    begin
      if (invfull) then
      begin
          GameTab(4);
          OreDTM:= DTMFromString('78DA634C636060706740038C48249006A9F12' +
           '3A0261F487813A12688809A1C201141847BA209A84902123104D4' +
           'C4028944026AA2893007E4DE28026A828930071436A104D484128' +
           'E0B0047CA0967');
          repeat
        if FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2) then
        DropItem(coordstoinvspot(x,y));
        wait(200+rand

    Then it will tell you theres a function with result not being used, just take the :boolean off the end and make it a procedure.

    Then you will get another one, the drop proc has 2 begins and 1 end
    If you indent like this it will be easier to spot this error
    SCAR Code:
    procedure dropstuff;
    begin
      if (invfull) then
      begin
        GameTab(4);
        OreDTM:= DTMFromString('78DA634C636060706740038C48249006A9F12' +
           '3A0261F487813A12688809A1C201141847BA209A84902123104D4' +
           'C4028944026AA2893007E4DE28026A828930071436A104D484128' +
           'E0B0047CA0967');
        repeat
          if FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2) then
            DropItem(coordstoinvspot(x,y));
          wait(200+random(200));
        until not(FindDTM(OreDTM,x,y,MIx1,MIY1,MIx2,MIY2));
        freedtm(OreDTM);
      end;
    end;
    2 spaces to the right for begins, repeats, etc, and 2 to the left for ends, untils etc.

    Then you would see
    SCAR Code:
    freedtm(OreDTM);
    end;
    And notice that they are too far apart, so there has to be something between them.

  5. #5
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    What would i do without you! thx so much
    Sleeping...

  6. #6
    Join Date
    Nov 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Quote Originally Posted by jstickit View Post
    lol
    Nice way to bump an old topic.. - 03-23-2007, 11:00 PM Go home, leecher.

    LOL, haha, I love typing LOL on random 7 month old topics.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  8. #8
    Join Date
    Jul 2007
    Posts
    84
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i nominate him for loser of the day.
    If I weren't earning $3 million a year to dunk a basketball, most people on the street would run in the other direction if they saw me coming.

    -Charles Barkley

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. What Do I Use For DROP Now???!!!
    By Ilikepie1995 in forum OSR Help
    Replies: 4
    Last Post: 09-30-2007, 08:15 PM
  2. drop
    By marre in forum OSR Help
    Replies: 6
    Last Post: 09-15-2007, 05:40 PM
  3. drop drop drop????
    By havoc928 in forum OSR Help
    Replies: 4
    Last Post: 08-21-2007, 03:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •