Results 1 to 10 of 10

Thread: Herblore.scar

  1. #1
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default Herblore.scar

    Well before I add more.

    SCAR Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--                     Herblore routines                       --//
    //-----------------------------------------------------------------//
    // * procedure SetupHerblore;               // * SRL
    // * procedure VialCheck;                   // * The Man
    {*******************************************************************************
    procedure SetupHerblore;
    By: SRL
    Description: Declares Global Bitmaps.
    *******************************************************************************}

    procedure SetupHerblore;
    begin
    end;
    {*******************************************************************************
    procedure VialCheck;
    By: The Man
    Description: Returns true if there is a vial in the inventory
    *******************************************************************************}

    procedure VialCheck;
    var
    VialDTM : Integer;
    begin
    VialDTM := DTMFromString('78DA6314646060506040038C4824906607125' +
           '204D4F002091E22D4B0135003720F33013562408293801A512021' +
           '40408D349090C6AF0600B0BB0126');
           
    if CountItems(Vialdtm, dtm, []) then
    Result := True
    end;

    Just want to check if this is right.

    T~M

  2. #2
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    CountItems isn't a boolean, you also never free the DTM, and there is no such boolean as "Result", you called it as a procedure:

    SCAR Code:
    Function VialCheck: Boolean;
    var
    VialDTM, x, y : Integer;
    begin
    VialDTM := DTMFromString('78DA6314646060506040038C4824906607125' +
           '204D4F002091E22D4B0135003720F33013562408293801A512021' +
           '40408D349090C6AF0600B0BB0126');
           
    Result := FindDTM(VialDTM, x, y, MIX1, MIY1, MIX2, MIY2);
    FreeDTM(VialDTM);
    end;

  3. #3
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Oh ok, I asked Nava what to use to search the inv and he said use that.
    Oh well.
    Thank you

    T~M

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by The Man View Post
    Oh ok, I asked Nava what to use to search the inv and he said use that.
    Oh well.
    Thank you

    T~M
    If you want to use CountItems, you'd do it something more like this:

    SCAR Code:
    Result :=(CountItems(VialDTM, 'DTM', [0]) > 0)

  5. #5
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    Oh ok.
    Thank you,

    T~M

  6. #6
    Join Date
    Oct 2008
    Location
    behind you!
    Posts
    1,688
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by Richard View Post
    CountItems isn't a boolean, you also never free the DTM, and there is no such boolean as "Result", you called it as a procedure:
    Relax dude, he's trying to contribute, developers can make their changes later, he still isn't such a good scripter, but he's doing fine.

    otherwise, Good job TheMan.
    Hi

  7. #7
    Join Date
    May 2007
    Location
    UK
    Posts
    4,007
    Mentioned
    1 Post(s)
    Quoted
    12 Post(s)

    Default

    haha thank you Tickyy.
    But I like the hard criticism.
    It makes me a better scripter

    T~M

  8. #8
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    Quote Originally Posted by Tickyy View Post
    Relax dude, he's trying to contribute, developers can make their changes later, he still isn't such a good scripter, but he's doing fine.

    otherwise, Good job TheMan.
    I was just making sure it worked, not once did I complain about his function.

  9. #9
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    hmm, i was just thinking about making something like this :P

    i guess i'll make a herb finder or something

    i think it looks decent(the fix'd versions), good job =D
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  10. #10
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by Tickyy View Post
    Relax dude, he's trying to contribute, developers can make their changes later, he still isn't such a good scripter, but he's doing fine. .
    There was nothing wrong with Richard's post.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

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
  •