Results 1 to 6 of 6

Thread: Ore counting error

  1. #1
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Ore counting error

    SCAR Code:
    procedure DropBmpOres;
    var
      TheOre : LongInt;
      Num : integer;
    begin
      srl_LoadBitmapRange(0, 9);
      case(LowerCase(Players[CurrentPlayer].Strings[1]))of
        'old clay', 'new clay': TheOre := bmp_Ore_Clay;
        'old tin', 'new tin': TheOre := bmp_Ore_Tin;
        'old copper', 'new copper': TheOre := bmp_Ore_Copper;
        'old iron', 'new iron': TheOre := bmp_Ore_Iron;
        'old coal', 'new coal': TheOre := bmp_Ore_Coal;
        'new gold': TheOre := bmp_Ore_Gold;
        'new silver': TheOre := bmp_Ore_Silver;
        'old mith', 'new mith': TheOre := bmp_Ore_Mithril;
        'old mithril', 'new mithril': TheOre := bmp_Ore_Mithril;
        'old addy', 'new addy': TheOre := bmp_Ore_Adamant;
        'old adamant', 'new adamant': TheOre := bmp_Ore_Adamant;
      end;
      Num := CountItems(TheOre, 'bmp', [10]);
      IncEx(Dropped, Num);
      Wait(20);
      ClickAllItems(TheOre, 'bmp', 'rop', 300+Random(300), [10]);
      Inc(Loads);
      srl_FreeBitmaps;
    end;

    This isnt counting any of the ores, could someone help? I also tried 'bmp mask' instead of 'bmp'.
    Project: Welcome To Rainbow

  2. #2
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I have a feeling that those bitmaps are out of date.

  3. #3
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    "bmp_Ore_Clay" is a constant that just simply reffers to a number;

    what you need is something more like this:

    SCAR Code:
    case(LowerCase(Players[CurrentPlayer].Strings[1]))of
      'old clay', 'new clay': TheOre := bmp_Ore_Clay;
      ...
    end;

    Num := CountItems(SRL_GetBitmap(theOre), 'bmp', [10]);
    // notice SRL_GetBitmap

    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  4. #4
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahhhhhh, thankyou so much rasta
    Project: Welcome To Rainbow

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks Rasta. I guess I lead him the wrong way.

    Sorry.

  6. #6
    Join Date
    Dec 2007
    Location
    Wizzup?'s boat
    Posts
    1,013
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Actually, you're both right

    I was doing it wrong, AND the bitmaps are outdated
    Project: Welcome To Rainbow

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Counting
    By Smarter Child in forum OSR Help
    Replies: 3
    Last Post: 03-04-2009, 11:14 PM
  2. Counting Inv?
    By Prince in forum OSR Help
    Replies: 3
    Last Post: 02-17-2008, 07:46 PM
  3. Counting In Inv
    By [S]paz in forum OSR Help
    Replies: 10
    Last Post: 01-19-2008, 01:12 PM

Posting Permissions

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