Results 1 to 3 of 3

Thread: MinimapBuilder

  1. #1
    Join Date
    Apr 2013
    Location
    Las Vegas
    Posts
    111
    Mentioned
    1 Post(s)
    Quoted
    35 Post(s)

    Default MinimapBuilder

    This script is for scripters/developers only. If you are an ordinary botter this script will not do anything for you.

    While mapping out the abyss I quickly coded a script that will grab the minimap when smart is enabled and group them together into a file of several minimaps. The script is easy enough to use, simply load the SMART window and get to where you need it, then enable smart. Enabling smart will then capture the minimap.

    Unfortunately it does not piece them together in a nice, usable map, but does save time if you were previously printscreening and cutting out the minimap that way.

    Before starting I highly recommend you make your compass as north as possible for best results. Basically you look at the lines on the minimap and attempt to have them at a 180 degree angle, or completely straight. This way it is easy to plaster the maps over each other for the final product.

    Simba Code:
    program MinimapBuilder;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}

    const
      FileName = 'minimap1.bmp';
      width = 2;
      height = 2;


    function circle(radius: integer; center: TPoint): integer;
    var
      color, bmp, i, j: integer;
    begin

      bmp := CreateBitmap(radius * 2, radius * 2);

      for i := -radius to radius do
      begin

        for j := -radius  to radius  do
        begin


          if ((pow (i, 2) + pow (j, 2)) < pow (radius, 2)) then
          begin
          color := GetColor (center.x + i, center.y + j);
          RectangleBitmap (bmp, IntToBox (i + radius  ,j + radius ,i + radius  ,j + radius ), color);
          end;

        end;

      end;

      result := bmp;
    end;

    function remainder(x, y:integer): integer;
    var
      i: integer;
    begin
      result := x - (floor(x / y) * y);
    end;

    function dim(i:integer): TPoint;
    begin
      result.x := 132 * remainder(i, width);
      result.y := 132 * floor(i / width);
    end;

    Var
      Minimap: TMufasaBitmap;
      i, x, y, bmp_x, bmp_y, bmp: integer;
      myloc, loc: tpoint;
    Begin
    setupSRL;

      bmp := CreateBitmap((width * 132), (height * 132));

      i := 0;

      repeat

        repeat
        wait(1);
        until (SmartEnabled);

      loc := dim (i);
      i := i + 1;

      FastDrawTransparent(loc.x,loc.y, Circle (66, Point(642, 76)), bmp);
      writeLn('Saved map number #' + inttostr(i) + '.');

      if (i = (width * height)) then
      break;

        repeat
        wait(1);
        until (not (SmartEnabled));

      until (i = (width * height));

      SaveBitmap(bmp, FileName);

      DrawBitmapDebugImg(bmp);
      DisplayDebugImgWindow((width * 132), (height * 132));

    End.
    Last edited by bob_dole; 06-12-2013 at 04:24 PM. Reason: Editted script to do circiles instead of squares, covers more area

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

    Default

    Wow..pretty cool you can use forcecompassnorth from Flight as well.

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

    Default

    I've always used the Snipping Tool that comes with Windows, just press the snip button, select your area, then copy and paste to a paint file. This would save time though, especially useful for making large maps

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
  •