Results 1 to 14 of 14

Thread: [Base]SRL Summoning branch

  1. #1
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default [Base]SRL Summoning branch

    I noticed in the 'skill' branch of SRL we don't have anything for Summoning, so thinking of a couple functions that people might find useful I made one. It's nothing major or advanced, but it follows the basic SRL format. I also saved it as a Simba file rather than Scar file.

    Code:
    // * Function  UsingFamiliar: Boolean;
    // * Function  GetSummonPoints: Integer;
    // * Function  InteractFamiliar: Boolean;
    // * procedure SetupSummoning;
    Simba Code:
    //-----------------------------------------------------------------//
    //--               Scar Standard Resource Library                --//
    //--                     Summoning routines                      --//
    //-----------------------------------------------------------------//
    // * Function  UsingFamiliar: Boolean;
    // * Function  GetSummonPoints: Integer;
    // * Function  InteractFamiliar: Boolean;
    // * procedure SetupSummoning;

    {*******************************************************************************
    Function UsingFamiliar: Boolean;
    By: Flight
    Description: Returns if we currently have a Summoning familiar.
    *******************************************************************************}

      Function UsingFamiliar: Boolean;
      Var
        X,Y: Integer;
      begin
        Result := FindColorTolerance(X,Y,11521955,695,130,720,150,20);
      end;

    {*******************************************************************************
    Function GetSummonPoints: Integer;
    By: Flight
    Description: Returns our current number of Summoning points remaining.
    *******************************************************************************}

      Function GetSummonPoints: Integer;
      Var
        Color: String;
      begin
        Result := Round(GetMMLevels('summon',Color));
      end;

    {*******************************************************************************
    Function InteractFamiliar: Boolean;
    By: Flight
    Description: Handles all interactions between our familiar,
                 returns true if successful.
    Options:
      -'' (nothing)      : Will left click on interaction tab
      -'Attack','Cast','Interact,'Renew','Take','Dismiss','Call','Details','Select'
    *******************************************************************************}

      Function InteractFamiliar(Option:String): Boolean;
      begin
        if (not LoggedIn) then exit;

        if UsingFamiliar then
        begin
          if (Option = '') then
          begin
            MouseBox(695,140,740,155,1);
            Result := True;
          end else
          begin
            MouseBox(695,140,740,155,2);
            if ChooseOption(Option) then
              Result := True
            else
              srl_Warn('InteractFamiliar', 'Incorrect option', warn_AllVersions);
          end;
        end else
          srl_Warn('InteractFamiliar', 'No familiar present!', warn_AllVersions);

        Wait(100 + Random(50));
      end;

    {*******************************************************************************
    procedure SetupSummoning;
    By: SRL
    Description: Declares Global Bitmaps.
    *******************************************************************************}

    procedure SetupSummoning;
    begin
    end;

    Like I said, it's nothing unique, but it's not like we'd be taking a step back by adding this in. We can only progress from it.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Looking good! I have no time to test it but rep+.

  3. #3
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Heh thanks. SRL is starting to get dusty in the development area, so it'd be nice to see some more progress.

    I plan to capitalize on this and make this as well as Reflection 2 a requirement for my next script release.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #4
    Join Date
    Oct 2007
    Posts
    818
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Summoning seems like it would make a short/easy script. Run from Fally East bank to the guy in taverly, make pouches, use fally tab, bank, repeat.

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    I think he will make a nature runes runner, if I look at his sig. And this isn't useful for pouch making anyway.
    Working on: Tithe Farmer

  6. #6
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by josh81193 View Post
    Summoning seems like it would make a short/easy script. Run from Fally East bank to the guy in taverly, make pouches, use fally tab, bank, repeat.
    Already made an released this script, and it works like a charm. But, it's released in Members+ along with many other premium scripts. Maybe it's incentive for you to shoot for members.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  7. #7
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    Bump! This is good stuff and should be added.

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

    Default

    I can only see InteractFamilair being added. The majority of one-lined functions are removed for SRL 5 as they're one line, the scripter can very easily just add that one line. The majority of skill files have also been removed simply because most of them are terribly outdated and never used. As long as InteractFamiliar can't easily get outdated (or if it's used), I see no reason why it can't be added.

  9. #9
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    In that case, you could just replace "if UsingFamiliar then" (in InteractFamiliar) with "if FindColorTolerance(X,Y,11521955,695,130,720,150,20 ) then".

    Although I think using color to determine if we're using a familiar or not will always be handy, not just for that function. If that's removed and the user wants to add a checker to see if we're using a familiar, they'll have to make their own FindColorTolerance (or whatever) with their own defined color in their own search area.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    Quote Originally Posted by Flight View Post
    In that case, you could just replace "if UsingFamiliar then" (in InteractFamiliar) with "if FindColorTolerance(X,Y,11521955,695,130,720,150,20 ) then".

    Although I think using color to determine if we're using a familiar or not will always be handy, not just for that function. If that's removed and the user wants to add a checker to see if we're using a familiar, they'll have to make their own FindColorTolerance (or whatever) with their own defined color in their own search area.
    Oh yes, you're right. I didn't realize it was used in another function. May want to add a little note in the description about that, so people know it's used in other functions in the include. The GetSummoningPoints isn't really necessary then, in my opinion.

  11. #11
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Using Familiar is definitely good, getSummoningPoints, not so much.

    Coh3n, the removal of one liners was supposed to be to remove 1 lined "almost identical" wrappers not to remove function calls with lots of parameters, haha! Would you want to waste time getting things like that perfect when someone else already did it?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  12. #12
    Join Date
    Feb 2009
    Location
    Irvine, CA
    Posts
    2,873
    Mentioned
    8 Post(s)
    Quoted
    138 Post(s)

    Default

    I think all the functions (except SetupSummoning ) Should be kept! They all have their uses.

    InteractFamiliar should be set to left click if the uptext is found without right clicking.

  13. #13
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by TomTuff View Post
    I think all the functions (except SetupSummoning ) Should be kept! They all have their uses.

    InteractFamiliar should be set to left click if the uptext is found without right clicking.
    I was thinking about that earlier as well, that'd be a good idea.

    Quote Originally Posted by Nava2
    Using Familiar is definitely good, getSummoningPoints, not so much.
    I would agree, I suppose that was added to give more content to the file itself. But I did find use out of it while making and using Naturez, as when the player recharges their Summoning points at an obelisk we make sure our current summoning points are maxed out, if so then we summon a new familiar, if not then something went wrong with the recharging process...

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


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

    Default

    Quote Originally Posted by Nava2 View Post
    Using Familiar is definitely good, getSummoningPoints, not so much.

    Coh3n, the removal of one liners was supposed to be to remove 1 lined "almost identical" wrappers not to remove function calls with lots of parameters, haha! Would you want to waste time getting things like that perfect when someone else already did it?
    Yeah that makes sense.

    Quote Originally Posted by Flight View Post
    I would agree, I suppose that was added to give more content to the file itself. But I did find use out of it while making and using Naturez, as when the player recharges their Summoning points at an obelisk we make sure our current summoning points are maxed out, if so then we summon a new familiar, if not then something went wrong with the recharging process...
    Useful yeah, but you can just as easily call GetMMLevels in your script. The point is that the FindColorTolerance in UsingFamiliar requires some color gathering/coordinates and isn't as simple as calling getMMLevels.

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
  •