Results 1 to 4 of 4

Thread: Further RuneAmount Support

  1. #1
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Further RuneAmount Support

    This is in amount in the core folder.

    Simba Code:
    function RuneAmount(Area, RuneType: string): Integer;
    var
      RuneBmp, II: Integer;
      RuneNames: TStringArray;
    begin
      RuneNames := ['air', 'mind', 'water', 'fire', 'earth', 'law', 'nature', 'chaos', 'death', 'body', 'cosmic', 'soul', 'blood'];
      if (InStrArrEx(Lowercase(RuneType), RuneNames, II)) then
      begin
        RuneBmp := srl_GetBitmap(18 + II);
        Result := ItemAmount(Area, 'bmp', RuneBmp, [20]);
        FreeBitmap(RuneBmp);
      end else
        srl_Warn('RuneAmount', 'Invalid RuneType: ''' + RuneType + '''', warn_AllVersions);
    end;

    Currently, it doesn't have support for armadyl runes or astral runes. Considering there are no extra bitmaps to be added, it's just a pretty simple change.

    Simba Code:
    function RuneAmount(Area, RuneType: string): Integer;
    var
      RuneBmp, II: Integer;
      RuneNames: TStringArray;
    begin
      RuneNames := ['air', 'mind', 'water', 'fire', 'earth', 'law', 'nature', 'chaos', 'death', 'body', 'cosmic', 'soul', 'blood', 'astral', 'armadyl'];
      if (InStrArrEx(Lowercase(RuneType), RuneNames, II)) then
      begin
        RuneBmp := srl_GetBitmap(18 + II);
        Result := ItemAmount(Area, 'bmp', RuneBmp, [20]);
        FreeBitmap(RuneBmp);
      end else
        srl_Warn('RuneAmount', 'Invalid RuneType: ''' + RuneType + '''', warn_AllVersions);
    end;

    Thanks for your time!s
    Formerly known as Cut em2 it

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    The bitmaps already exist, the function just didn't support them?

  3. #3
    Join Date
    Nov 2007
    Location
    Nowhereville
    Posts
    1,155
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Oh wait they don't. Disregard this until I grab some bitmaps.
    Formerly known as Cut em2 it

  4. #4
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    What happened? I just noticed this was missing astral support myself.

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
  •