Results 1 to 19 of 19

Thread: Script help + ideas

  1. #1
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Script help + ideas

    COMPILES NOW UPDATED MORE HELP NEEDED

    SCAR Code:
    {===============================================================
    |                     Gwallunits Powerminer                     |
    |    Use on Low Detail and 32 Bit Color Also Highest Brightness |
    |                     My First Script v1.0                      |
    |                                                               |
    |                                                               |
    |===============================================================}



    program PowerMiner;

      {.include SRL/SRL.Scar}
      {.include SRL/SRL/skill/Mining.scar}


    Const
       RockColor=1654857; // Set The Rock Color here

    var
       oree: Integer;
       OreBitmap:Integer;

    var
      ErrorColor : String;

    //////////////////////////////////////////////////////////////////////////////

    ///////////////////////////////////////////////////////////////////

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many Active PLayers
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0; //Starting Character


      Players[0].Name := 'Gwallunit';
      Players[0].Pass := 'Youwish';
      Players[0].Nick := 'allu';
      Players[0].Active := True;
      Players[0].String1:='Iron'; // Ore color


      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
    end;
    ///////////////////////////////////////////////////////////////

    procedure SetOreBitmaps;
    begin

    if(Players[CurrentPlayer].String1='Copper')then
      begin
        OreBitmap := BitmapFromString(3,3,'z78DAB3B034333631B08'+
                  '090E66646C6AE16C82238480037250B40')
        ErrorColor := 'Copper';
      end;

    if(Players[CurrentPlayer].String1='Tin')then
      begin
        OreBitmap := BitmapFromString(3,2,'8A81808A81808A81808C838'+
               '28C83828C8382')
        ErrorColor := 'Tin'
      end;

    if(Players[CurrentPlayer].String1='Iron')then
      begin
        OreBitmap := BitmapFromString(1,3,'513125513125513125')
        ErrorColor := 'Iron'
      end;
    end;


    Function AutoColorOre:Integer;
      var Toller,MX,MY: Integer;
      begin
      repeat;
     if(FindBitmapToleranceIn(OreBitmap,MX,MY,MSX1,MSY1,MSX2,MSY2,Toller))then
      begin
      Result:=GetColor(MX,MY);
      Exit;
    end;
      Toller:=Toller+5;
    until (Toller>=10);
    WriteLn('Did Not Find '+ErrorColor+' Color!');
    end;

    //////////////////////////////////////////////////////////////////////////////

    procedure RockMine;
    begin
      if findObj(x, y, 'Mine', RockColor, 20)then   //Change this with some better FindObj :p
      begin
        if not FindGas(x, y) then
        Mouse(X,y,4,4,true)
      end;
    end;

    ////////////////////////////////////////////////////////////////////

    Procedure DropDTM;
    begin
      Oree := DTMFromString('78DA6314626060106040018C0A12101AC607C' +
           '9CB30A0014654354C404218554598AF13AA1A4E20C181AA26C4CB' +
           '1A550DC86A365435467262A86A9480043701F7C802095154155E3' +
           'A0A286A00DB7703F5');
      repeat
        if(FindDTM(Oree,x,y,MIX2,MIY2,MIX2,MIY2))then
        begin
          Mouse(x,y,4,4,False)
          ChooseOption(x,y,'drop')
        end;
      until( not (FindDTM(Oree,x,y,MIX2,MIY2,MIX2,MIY2)))
    end;


    ////////////////////////////////////////////////////////////////

    procedure ProgressReport;
    begin
    ClearDebug;
       Writeln('[]=============================[]');
        Writeln('---->Gwallunit Powerminer Progress<----');
        Writeln('  did ' + IntToStr(oree) + ' Loads' + '    ');
        Writeln('---------------------------------------------');
    end;

        //////////////////////////////////////////////////////////

    procedure ReleaseBitmaps;
    begin
      FreeBitMap(OreBitMap);
    end;


     {---------------------------------------------------------------
                              Main Loop
    ----------------------------------------------------------------}


    begin
      SetUpSRL;
      SetupSRLMining;
      repeat
      DeclarePlayers;
      Setorebitmaps;
      LoginPlayer;
      Highestangle;
      wait(1000+50)
      RockMine;
    If(not(LoggedIn))then
     exit;
      DropDTM;
      ProgressReport;
      ReleaseBitmaps;
      until(false)
    end.

  2. #2
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    If it's a powerminer, you should make it miner any ore and drop the ore, and have a progress report. Also it could be multiplayer, with a max level for each account. :]


    EDIT:: You posted your password/username!

  3. #3
    Join Date
    Apr 2007
    Posts
    186
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, and make it drop only ores with Bitmap Mask! And Auto color the ore!

    Example:
    SCAR Code:
    Function AutoColorCopper:Integer;
    var LOLTol,CopperColor,MX,MY: Integer;
    begin
    CopperColor:=BitmapFromString(3,3,'z78DAB3B034333631B08'+
                '090E66646C6AE16C82238480037250B40');
    repeat;
    if(FindBitmapToleranceIn(CopperColor,MX,MY,MSX1,MSY1,MSX2,MSY2,LOLTol))then
    begin
    Result:=GetColor(MX,MY);
    Exit;
    end;
    LOLTol:=LOLTol+5;
    until (LOLTol>=10);
    WriteLn('Did Not Find Copper Color!');
    end;

    And for .Nick use:
    SCAR Code:
    Players[0].Nick := 'allu';
    instead of:

    SCAR Code:
    Players[0].Nick := 'Gwall';

    EDIT: lol ShawnjohnSJ we posted the same time

  4. #4
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its not my username or pass made them up

  5. #5
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Gwallunit View Post
    its not my username or pass made them up
    also it drops and has proggy

    scroll down


    but its really basic atm

    ----

    sorry for double post didnt mean 2

  6. #6
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    Lol, fake username/password.
    You think outside the box. :]


    Thats good. Add all the randoms you can, and Anti-Ban. Maybe one day it will be like Wizzups Ess Miner. :]]

  7. #7
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default thx

    Quote Originally Posted by inSane View Post
    Yeah, and make it drop only ores with Bitmap Mask! And Auto color the ore!

    Example:
    SCAR Code:
    Function AutoColorCopper:Integer;
    var LOLTol,CopperColor,MX,MY: Integer;
    begin
    CopperColor:=BitmapFromString(3,3,'z78DAB3B034333631B08'+
                '090E66646C6AE16C82238480037250B40');
    repeat;
    if(FindBitmapToleranceIn(CopperColor,MX,MY,MSX1,MSY1,MSX2,MSY2,LOLTol))then
    begin
    Result:=GetColor(MX,MY);
    Exit;
    end;
    LOLTol:=LOLTol+5;
    until (LOLTol>=10);
    WriteLn('Did Not Find Copper Color!');
    end;

    EDIT: lol ShawnjohnSJ we posted the same time


    will do that thanks mate

  8. #8
    Join Date
    Apr 2007
    Posts
    186
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That is for copper only! U will need to make 1 bmp for all ores!

    And i meant Auto color the rock not ore

    Heres few:
    SCAR Code:
    IronColor:=BitmapFromString(1,3,'513125513125513125');

    TinColor:=BitmapFromString(3,2,'8A81808A81808A81808C838'+
             '28C83828C8382');

    CopperColor:=BitmapFromString(3,3,'z78DAB3B034333631B08'+
                '090E66646C6AE16C82238480037250B40');

  9. #9
    Join Date
    Jan 2007
    Location
    Skaville, Jamaica
    Posts
    1,117
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is this a dropping bitmap? Are you joking?

    Just use one DTM, at the place where the ores look the same

  10. #10
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thats What i did i used DTM to drop the ore

    Any more ideas on what i should do ?

    Could someone also help me get it to compile

  11. #11
    Join Date
    Apr 2007
    Posts
    220
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You can add some fail-safes. Like
    SCAR Code:
    If(not(LoggedIn))then
    exit;
    And if it doesnt finds a ore that is should exit. Or after like 20 tries.
    And yeah a better progress report.

  12. #12
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Check the declare players it does the nickname mask there, but we call it only once so that wouldn't work, right?

    SCAR Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //How many Active PLayers
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0; //Starting Character
     
     
      Players[0].Name := 'Gwallunit';
      Players[0].Pass := 'Youwish';
      Players[0].Nick := 'Gwall';
      Players[0].Active := True;
     
     
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); ///Why's this already here?
    end;

  13. #13
    Join Date
    Apr 2007
    Posts
    186
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    That works!

    and for gwall, heres what i made:

    And remember to add this to DeclarePlayers :

    SCAR Code:
    Players[0].String1:='';

    and this to Main Variables:
    SCAR Code:
    var OreBitmap:Integer;

    SCAR Code:
    procedure SetOreBitmaps;
    begin

    if(Players[CurrentPlayer].String1:='Copper')then
    OreBitmap := BitmapFromString(3,3,'z78DAB3B034333631B08'+
                '090E66646C6AE16C82238480037250B40');
    ErrorColor := 'Copper';
    else

    if(Players[CurrentPlayer].String1:='Tin')then
    OreBitmap := BitmapFromString(3,2,'8A81808A81808A81808C838'+
             '28C83828C8382');
    ErrorColor := 'Tin';
    else

    if(Players[CurrentPlayer].String1:='Iron')then
    OreBitmap := BitmapFromString(1,3,'513125513125513125');
    ErrorColor := 'Iron';
    else

    if(Players[CurrentPlayer].String1:='Coal')then
    OreBitmap := BitmapFromString(3,3,'your bitmap here');
    ErrorColor := 'Coal';
    else

    if(Players[CurrentPlayer].String1:='Mithtil')then
    OreBitmap := BitmapFromString(3,3,'your bitmap here');
    ErrorColor := 'Mithtil';
    else

    if(Players[CurrentPlayer].String1:='Adamantite')then
    OreBitmap := BitmapFromString(3,3,'your bitmap here');
    ErrorColor := 'Adamantite';
    end;


    Function AutoColorOre:Integer;
    var LOLTol,MX,MY: Integer;
    begin
    repeat;
    if(FindBitmapToleranceIn(OreBitmap,MX,MY,MSX1,MSY1,MSX2,MSY2,LOLTol))then
    begin
    Result:=GetColor(MX,MY);
    Exit;
    end;
    LOLTol:=LOLTol+5;
    until (LOLTol>=10);
    WriteLn('Did Not Find '+ErrorColor+' Color!');
    end;

    //And this to main loop after SetupSRL;

    begin
    SetupSRL;
    SetOreBitmaps;
    //and the others
    end.

  14. #14
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  15. #15
    Join Date
    Apr 2007
    Posts
    186
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Gwallunit View Post
    wow thanks mate
    np, and just remember to set those Bitmaps for coal, mithril and for adamantite!

  16. #16
    Join Date
    Apr 2007
    Location
    Finland
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  17. #17
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey Re-updated

    I need more ideas now that it compiles what to change etc

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

    Default

    If(not(LoggedIn))then
    exit;

    That shouldn't be in your main loop, that should be in procedures and functions.

    In your main loop you want if not loggedin then nextplayerfalse, and if you are logged in and (loadsdone mod LoadsToDoBetweenSwitchingPlayers)=0 then nextplayertrue, and the third outcome will just continue with that player around the loop.

  19. #19
    Join Date
    Feb 2007
    Location
    Yorkshire, England
    Posts
    180
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. looking for script ideas
    By mormonman in forum RS3 Outdated / Broken Scripts
    Replies: 13
    Last Post: 12-16-2008, 01:54 AM
  2. Need New Script IDEAS!
    By The_Shermanator in forum RS3 Outdated / Broken Scripts
    Replies: 25
    Last Post: 11-03-2008, 05:03 AM
  3. Out Of Script Ideas, Once Again... :p
    By Timer in forum RS3 Outdated / Broken Scripts
    Replies: 20
    Last Post: 08-25-2008, 07:35 AM
  4. Script Ideas
    By hardman in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 08-17-2007, 01:15 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
  •