Results 1 to 16 of 16

Thread: SRL: February 6th, 2013 ~ New Actionbar functions

  1. #1
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default SRL: February 6th, 2013 ~ New Actionbar functions

    @euphemism has added loads of new actionbar functions for us all
    These are:

    • GetAbilityLocation
    • GetAbilityCooldown
    • UseAbility
    • ClickActionBarSlot
    • AbilityInSlot
    • AddAbilityToActionBar
    • AddItemToActionBar
    • TPAFromLine
    • TPAFromLineWrap


    note: for ability constants 1-12 will use the actionbar, and 13..74 will switch to the ability's tab and use it from there. you can find the Ability Constants in globals.simba starting at line 207.

    GetAbilityCooldown - returns the cooldown percentage (1..100) without any hard coding of the cooldowns!
    Simba Code:
    WriteLn('Ability cooldown is ' + IntToStr(GetAbilityCooldown(AB_SURGE)) + '% complete.');  

    if (GetAbilityCooldown(AB_SURGE) = 100) then
       writeln('we can now use the surge ability again!');

    UseAbility - what it says uses the inputted ability if its available.
    Simba Code:
    if (UseAbility(3)) then
          WriteLn('Casted ability in slot three!');

    ClickActionBarSlot - simply clicks the selected actionbar slot
    Simba Code:
    if ClickActionBarSlot(1) then
      writeln('we dropped a ore in slot 1');

    All say thanks to him.
    Last edited by Olly; 02-06-2013 at 05:55 AM.

  2. #2
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

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

    Default

    The 'TPAFromLine' is just what I need for some alternate DTM-like object-finding.

    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
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Nice updates, could someone explain TPAFromLine? and an example if possible.
    Read it in the include, don't understand the usage

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Too late to finish the list tonight, but tpafromline isn't actually a function related to action bar it just creates a line (straight as possible) between 2 points.

    Quote Originally Posted by Flight View Post
    The 'TPAFromLine' is just what I need for some alternate DTM-like object-finding.
    Interesting indeed..


    edit: im not sure if tpafromline is actually in simba yet if its not the function is currently in the include named "tmp_tpafromline"

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

    Default

    Quote Originally Posted by Ollybest View Post
    too late to finish the list, but tpafromline snit actually a function related to actionbar it just creates a line (straight as possible) between 2 points.

    edit: im not sure if tpafromline is actually in simba yet if its not the function is currently in the include named "tmp_tpafromline"
    What's the difference between TPAFromLine and the current 'TPABetweenPoints'?

    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
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    What's the difference between TPAFromLine and the current 'TPABetweenPoints'?

    I would love to know i did ask @euphemism and i think? he said its more accurate but i wouldn't take my word wait for him to respond.

    Simba Code:
    procedure test;
    var
      tpa1, tpa2: TPointArray;
    begin
      tpa1 := tpabetweenpoints(point(100,100), point(200,200), 1, 0);

      tpafromlinewrap(100, 100, 200, 200, tpa2);

      writeln(length(tpa1));
      writeln(length(tpa2));

    //result:
    142
    101

    end;

  8. #8
    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
    What's the difference between TPAFromLine and the current 'TPABetweenPoints'?
    One results in more points, but they are used for exactly the same thing.

  9. #9
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Good Job Euph..

  10. #10
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    @Coh3n: TPABetweenPoints is great for generating a random dispersion of points along a line, but it is not so great at actually making a line. See below:

    On the left are lines generated by TPAFromLine, on the right are lines generated by TPABetweenPoints:
    Last edited by euphemism; 02-06-2013 at 09:52 PM.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

  11. #11
    Join Date
    Sep 2012
    Location
    Here.
    Posts
    2,007
    Mentioned
    88 Post(s)
    Quoted
    1014 Post(s)

  12. #12
    Join Date
    Sep 2007
    Location
    Australia, NSW
    Posts
    934
    Mentioned
    6 Post(s)
    Quoted
    145 Post(s)

    Default

    Fantastic work man!

    INACTIVE
    How-to: Make S.M.A.R.T. less laggy

    Sell me your Maple Shieldbows (u)! Up to 95gp ea!

    My Scripts:
    Ivy Chopper Ultra [RS3] | Fantastic Fletcher [RS3]
    99 x78 | 99 x10 | 99 x2 | 99 x12


    Use the REPORT tags when posting progress reports to make life easier (:
    [REPORT]Put progress report in here![/REPORT]

    Super Savvy Smither V1.06Cool Classy Cooker V1.02 [EoC]

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

    Default

    Wha..? They're almost exactly the same thing. TPABetweenPoints just has more points. They both still make a line from point A to point B.

    I think TPABetweenPoints was originally written for tile walking, so that could be why there's more points.

  14. #14
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Either way, good job guys
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


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

    Default

    Quote Originally Posted by Coh3n View Post
    Wha..? They're almost exactly the same thing. TPABetweenPoints just has more points. They both still make a line from point A to point B.

    I think TPABetweenPoints was originally written for tile walking, so that could be why there's more points.
    That's what I would have guessed, or future use in mouse-movement.

    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..."


  16. #16
    Join Date
    Jun 2008
    Location
    United States
    Posts
    818
    Mentioned
    60 Post(s)
    Quoted
    90 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Wha..? They're almost exactly the same thing. TPABetweenPoints just has more points. They both still make a line from point A to point B.

    I think TPABetweenPoints was originally written for tile walking, so that could be why there's more points.
    Sure, they are similar, but the point of TPAFromLine is to produce a line of pixels as true as possible to the specified line. TPABetweenPoints does not do this, and has random extraneous points along the line. I am just trying to point out that the two functions serve different purposes.
    [10/14/13:19:03] <BenLand100> this is special relatively, just cleverly disguised with yachts

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •