Results 1 to 16 of 16

Thread: New, More Efficent LoggedIn Function?

  1. #1
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default New, More Efficent LoggedIn Function?

    Should we use this, or stick to the old one? The old one gets a color, but this checks for the Compass. If the Compass angle results as -1 (Compass not found) it results as false. If it does find the compass angle, results as true.

    Code:
    function LoggedIn: boolean;
    begin
     if not(DetectRS2MinimapCompassAngle = -1) then
       result:= true;
    end;
    and maybe we could add a LoggedOut function. It's just alot easier than not logged in.

    Code:
    function LoggedOut: boolean;
    begin
     if not(LoggedIn) then
       result:= true;
    end;
    ?

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    Good thought.

    currently we check for only one pixel, from the text "Logout", GameTab(10?) While this is true for most cases, it is certainly not true while banking, since the text "Logout" disappears from the screen while Bank is open (This has cost he some days of severe headaches... )

    I dont know how much DetectRS2CompassAngle weights on the system, but if it is a lag-hog, I would go for yet another pixel, like one or two pixels from the upper left and right chatedge. IFAIK they are always there, but please verify.

    In Short: I agree with Kane, we need another LoggedIn check!
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  3. #3
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, it's quite fast. But, i will ask Kaitnieks now which would be faster and how much of a different the two are in time.

    Edit:
    Since Kait isn't replying, I timed them with GetSystemTime.

    Well, With Getcolor, it's around 1 - 5 ms. And with the Minimap compass angle detector it was around 1 - 10 ms.
    I'm sure that's not much of a big difference and wouldn't effect it at all.

  4. #4
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    heres a function i used in my script.. works just fine for me and doesnt seem to lag or anything.. not sure about the timing tho.. it will check for 2 colors in the bottom right of the chat screen.. 4 pixel check.. they are always there unless logged out..

    Code:
    function LoggedOut:Boolean;
    begin
      Result:=True;
      If(FindColorTolerance(x,y,7707058,495,452,496,453,2))
      or(FindColorTolerance(x,y,6917802,495,452,496,453,2))Then
        begin
          Result:=False;
        end;
    end;
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  5. #5
    Join Date
    Mar 2006
    Posts
    509
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol why dont u just find the : in the chat box next to the username? that way its either there or not the compass finding may fail sometimes when its acctually there (yeah ive tested it) idk why either but it has before so yeah : maybe?

  6. #6
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    mine works flawlessly.. havent had a problem with it yet

    the reason we dont look for the ':' next to the username is because it changes location depending on your username.. so you would have to do a findtext or a findbitmap.. and it would just take too long (what maybe an extra 15-30 ms.. lol) i think..

    try testing out mine.. works quite well
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  7. #7
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    My DTM owns j00r an0r.
    Free File Hosting
    No download timers!

    Rifkwtf.com

  8. #8
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, if it dosn't find the compass, therefore it's not on the rs screen. So it can break any loops.

    It's quicker than 2 Findcolortolerances, and has a better chance of returning successful.

    Pwnd, Good for j00.

  9. #9
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    it may be a bit quicker kane but i tested yours a few times and it returned that i was logged out when i was actually logged in.. mine hasnt had any problems whatsoever and is only a few ms slower than yours.. i'll use mine over yours
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  10. #10
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    If the compass is being covered by scar it won't work.

    The compass needs to be in full view to work. I'll run it a few times and see what i get.

  11. #11
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    well no duh.. i know it needs to be visible.. it just was wrong occasionally
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  12. #12
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I ran a script:

    Code:
    Tested 4271 times until user stopped script.
    Didn't Find: 0 times.
    Took approx: 28691ms / 28.691 seconds.

  13. #13
    Join Date
    Feb 2006
    Posts
    406
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    er.. how about the center dot on the minimap,
    648,83 color 16777215

    it seems like that would use the minimap the same way, but be more efficient

    i win

  14. #14
    Join Date
    Feb 2006
    Location
    Las Vegas, NV
    Posts
    939
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by masquerader
    er.. how about the center dot on the minimap,
    648,83 color 16777215

    it seems like that would use the minimap the same way, but be more efficient

    i win
    not sure that will work.. does the center dot get overlapped by anything? if so i dont think it will work.. otherwise--good plan
    Busy with real life. I'll still be around occasionally.
    Current Mood:


  15. #15
    Join Date
    Feb 2006
    Posts
    582
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by XxKanexX
    Well, if it dosn't find the compass, therefore it's not on the rs screen. So it can break any loops.

    It's quicker than 2 Findcolortolerances, and has a better chance of returning successful.

    Pwnd, Good for j00.
    You don't need to use FindColorTolerance.. The colors don't change at the login screen, nor the welcome screen.

    Thank j00.
    Free File Hosting
    No download timers!

    Rifkwtf.com

  16. #16
    Join Date
    Feb 2006
    Location
    Australia, NSW.
    Posts
    1,461
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Pwnd
    You don't need to use FindColorTolerance.. The colors don't change at the login screen, nor the welcome screen.

    Thank j00.
    We're not talking about them though.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 11-28-2007, 06:07 PM

Posting Permissions

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