Results 1 to 23 of 23

Thread: Charges left on Dueling Ring

  1. #1
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Charges left on Dueling Ring

    Is there any easy way to determine the number of charges left on a dueling ring?

    Thanks in advance!

    JIM

  2. #2
    Join Date
    Feb 2006
    Location
    Pennsylvania
    Posts
    1,524
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Uptext function should work.. Doesn't it say the charges left in the top left corner when you hover over the ring?

  3. #3
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    function ChargesRemaining : integer;
    begin
      result := StrToIntDef(between('Ring of dueling (', ')', GetUpText), -1);
    end;
    Should work when mouse is hovering over the item.
    I don't know if that's how it looks as I haven't logged onto RuneScape in a while.
    Last edited by Sex; 01-17-2010 at 10:58 AM.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  4. #4
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Worked perfectly! Thanks a mil!

  5. #5
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by jimthesoundman View Post
    Worked perfectly! Thanks a mil!
    No problem. Happy to help .
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Sex, that's pretty neat. I love it! <3

  7. #7
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would be a lot better to use something like

    SCAR Code:
    S := GetUpText;
    if (Pos('uel', s) > 0) then
      Charge := StrToIntDef(GetNumbers(S), 0);

  8. #8
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Would be a lot better to use something like

    SCAR Code:
    S := GetUpText;
    if (Pos('uel', s) > 0) then
      Charge := StrToIntDef(GetNumbers(S), 0);
    Wouldn't that also return things like "walk here / 3 more options"
    Ce ne sont que des gueux


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

    Default

    Sex's is a better option. Albiet, the Pos check probably removes the need for the Default.
    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

  10. #10
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Floor66 View Post
    Wouldn't that also return things like "walk here / 3 more options"
    No, because it checks to see if the string contains 'uel' before it does that.

    Quote Originally Posted by Nava2 View Post
    Sex's is a better option. Albiet, the Pos check probably removes the need for the Default.
    What's wrong with that? It has a better chance of working IMO, his depends on a larger portion of a string to work... how often does UpText detect an entire phrase correctly?

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

    Default

    Quote Originally Posted by IceFire908 View Post
    No, because it checks to see if the string contains 'uel' before it does that.



    What's wrong with that? It has a better chance of working IMO, his depends on a larger portion of a string to work... how often does UpText detect an entire phrase correctly?
    It'd be better to have:
    SCAR Code:
    upText := rs_GetUpText;
    if (pos(upText, 'ing(') > 0) then
      upText := Between(upText, '(', ')');

    Params are *probably* wrong.
    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
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    No, because it checks to see if the string contains 'uel' before it does that.
    What he's saying is that there are more than one thing in the thing.. Haha like.. it says "Ring of duelinng (6) / 6 more options".. You know? :P

    Quote Originally Posted by IceFire908 View Post
    What's wrong with that? It has a better chance of working IMO, his depends on a larger portion of a string to work... how often does UpText detect an entire phrase correctly?
    I thought it always worked?

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

    Default

    Quote Originally Posted by i luffs yeww View Post
    What he's saying is that there are more than one thing in the thing.. Haha like.. it says "Ring of duelinng (6) / 6 more options".. You know? :P



    I thought it always worked?
    Its about 99%. Meaning that one in one hundred times, SCAR will mess up the uptext.

    That being said, its not uncommon to have issues with UpText.
    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

  14. #14
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Its about 99%. Meaning that one in one hundred times, SCAR will mess up the uptext.

    That being said, its not uncommon to have issues with UpText.
    Well if it's 99%, why not just look twice, since then it'll be 100% chance that it'll get it right. Right? :P

  15. #15
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Well if it's 99%, why not just look twice, since then it'll be 100% chance that it'll get it right. Right? :P
    Probability doesn't work that way at all, if you do two tries and randomly pick one it's the same as before.

  16. #16
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    Probability doesn't work that way at all, if you do two tries and randomly pick one it's the same as before.
    I wasn't being completely serious. Haha and I know he wasn't being exact with the chance. But even if the chances are better with your way with less letters (you'd still need to do what Nava2 said, since it'll also add the "3 more options" and add the 3 to the thing. :P), wouldn't you want to repeat it a few times, since apparently it doesn't work every time?

  17. #17
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    I wasn't being completely serious. Haha and I know he wasn't being exact with the chance. But even if the chances are better with your way with less letters (you'd still need to do what Nava2 said, since it'll also add the "3 more options" and add the 3 to the thing. :P), wouldn't you want to repeat it a few times, since apparently it doesn't work every time?
    The odds of it not catching an entire phrase are around 98% (probably lower) opposed to 3 letters which is around 99.99% and 'repeating' isn't going to help.

  18. #18
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    The odds of it not catching an entire phrase are around 98% (probably lower) opposed to 3 letters which is around 99.99% and 'repeating' isn't going to help.
    Why wouldn't it help? (I meant like, moving the mouse and then moving it back to check and checking the text again)

  19. #19
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by i luffs yeww View Post
    Why wouldn't it help? (I meant like, moving the mouse and then moving it back to check and checking the text again)
    mmhm, and how exactly are you going to code that? is SCAR going to know the difference between either trail? and quite frankly if it didn't work the first time it will probably fail again the second time.

  20. #20
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by IceFire908 View Post
    mmhm, and how exactly are you going to code that? is SCAR going to know the difference between either trail? and quite frankly if it didn't work the first time it will probably fail again the second time.
    Tries = Tries + 1 or something like that? It works in Vb.NET..

  21. #21
    Join Date
    Dec 2009
    Posts
    146
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Now, now, girls....you're BOTH pretty!

  22. #22
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    You guys are seriously making a big deal out of this.
    Mine works. IceFire's works.
    It doesn't really matter which one is faster, it is a small loss/gain of speed.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  23. #23
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sex View Post
    You guys are seriously making a big deal out of this.
    Mine works. IceFire's works.
    It doesn't really matter which one is faster, it is a small loss/gain of speed.

    Speed is irrelevant, it's a matter of reliability, but yes this topic needs to die now.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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