Results 1 to 11 of 11
  1. #1
    Master Sergeant
    Reputation
    27
    Join Date
    Mar 2008
    Posts
    94
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)

    [Question] Anti Afk?



    Donate to Remove Ads, Get ShoutBawx - Elite Forum Access
    I was trying to implement Anti AFK and i've just been running into trouble, i'm currently using

    Code:
            public void UpdateLastHardwareAction()
            {
                Random Rand = new Random();
                IntPtr pLastHardwareAction = (IntPtr)0x010A1B64;
                IntPtr pInputEvent = (IntPtr)0x81CEA0;
                Point CursorPos = Cursor.Position;
    
                Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)Rand.Next(800), (IntPtr)Rand.Next(600), IntPtr.Zero;
                Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)CursorPos.X, (IntPtr)CursorPos.Y, IntPtr.Zero);
                //Process.WriteValue(pLastHardwareAction, GetTimestamp());
            }
    and calling it every 15 seconds, it stops the game from saying "You are now AFK: Away from keyboard", but after 7.5 minutes it starts to log me out for inactivity, am i missing something?

    i know that InputEvent is 100% working and i also know that it is already updating pLastHardwareAction
    Last edited by bigtimt; 09-13-2009 at 06:19 PM.

  2. #2
    Knight-Lieutenant ramey's Avatar
    Reputation
    45
    Join Date
    Jan 2008
    Posts
    321
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by bigtimt View Post
    I was trying to implement Anti AFK and i've just been running into trouble, i'm currently using

    Code:
            public void UpdateLastHardwareAction()
            {
                Random Rand = new Random();
                IntPtr pLastHardwareAction = (IntPtr)0x010A1B64;
                IntPtr pInputEvent = (IntPtr)0x81CEA0;
                Point CursorPos = Cursor.Position;
    
                Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)Rand.Next(800), (IntPtr)Rand.Next(600), IntPtr.Zero;
                Process.CallFunction<Int32>(pInputEvent, (IntPtr)10, IntPtr.Zero, (IntPtr)CursorPos.X, (IntPtr)CursorPos.Y, IntPtr.Zero);
                //Process.WriteValue(pLastHardwareAction, GetTimestamp());
            }
    and calling it every 15 seconds, it stops the game from saying "You are now AFK: Away from keyboard", but after 7.5 minutes it starts to log me out for inactivity, am i missing something?

    i know that InputEvent is 100% working and i also know that it is already updating pLastHardwareAction
    You don't need to do both, just update the LastHardwareAction

  3. #3
    Master Sergeant
    Reputation
    27
    Join Date
    Mar 2008
    Posts
    94
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    no matter which one of those i do, It stops me from going AFK, but i still get logged out for inactivity

  4. #4
    Master Sergeant

    Reputation
    31
    Join Date
    Jul 2008
    Posts
    125
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    [edit (because my reading apprehension failed)]

    Unless your GetTimestamp is based off of WoW's timestamp, you are probably sending a timestamp just slightly lower than what you need to stay logged in. You should try calling:
    0x81EE60 - WoW's "GetTimestamp" function. 3.2.0

    And I wouldn't write to pLastHardwareAction anymore if I were you.
    Last edited by vulcanaoc; 09-13-2009 at 10:41 PM.

  5. #5
    Master Sergeant
    Reputation
    27
    Join Date
    Mar 2008
    Posts
    94
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by vulcanaoc View Post
    [edit (because my reading apprehension failed)]

    Unless your GetTimestamp is based off of WoW's timestamp, you are probably sending a timestamp just slightly lower than what you need to stay logged in. You should try calling:
    0x81EE60 - WoW's "GetTimestamp" function. 3.2.0

    And I wouldn't write to pLastHardwareAction anymore if I were you.
    I was calling wow's GetTimestamp, i just have it in a seperate function for my library.

    But i fixed it anyhow, btw why shouldn't we write to pLastHardwareAction

  6. #6
    Kynox's Sister's Pimp Cypher's Avatar
    Reputation
    1352
    Join Date
    Apr 2006
    Location
    ntdll.dll
    Posts
    5,352
    CoreCoins
    186

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by vulcanaoc View Post
    [edit (because my reading apprehension failed)]

    Unless your GetTimestamp is based off of WoW's timestamp, you are probably sending a timestamp just slightly lower than what you need to stay logged in. You should try calling:
    0x81EE60 - WoW's "GetTimestamp" function. 3.2.0

    And I wouldn't write to pLastHardwareAction anymore if I were you.
    Why wouldn't you write to LastHardwareAction? I don't play WoW anymore or keep up with much of the changes but afaik there's nothing in Warden that would lead me to believe writing to that address is a bad idea. On the contrary, you should write to it every time you perform an action that would usually require a hardware event, otherwise Warden would be able to see that you've been fighting mobs for 15 minutes but have not generated a single hardware event (keystroke, mouse movement, etc).

  7. #7
    Master Sergeant

    Reputation
    31
    Join Date
    Jul 2008
    Posts
    125
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by Cypher View Post
    Why wouldn't you write to LastHardwareAction? I don't play WoW anymore or keep up with much of the changes but afaik there's nothing in Warden that would lead me to believe writing to that address is a bad idea. On the contrary, you should write to it every time you perform an action that would usually require a hardware event, otherwise Warden would be able to see that you've been fighting mobs for 15 minutes but have not generated a single hardware event (keystroke, mouse movement, etc).
    It is my understanding that it is changed by WoW's "InputEvent" function (as he calls it.)

  8. #8
    Kynox's Sister's Pimp Cypher's Avatar
    Reputation
    1352
    Join Date
    Apr 2006
    Location
    ntdll.dll
    Posts
    5,352
    CoreCoins
    186

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by vulcanaoc View Post
    It is my understanding that it is changed by WoW's "InputEvent" function (as he calls it.)
    That's not an explanation as to why you shouldn't write to the LastHardwareAction global...

    You said "And I wouldn't write to pLastHardwareAction anymore if I were you.". I'm asking for a justification, because as far as I know there is zero danger in doing so.

  9. #9
    Master Sergeant

    Reputation
    31
    Join Date
    Jul 2008
    Posts
    125
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Of course, you're right- there's no present danger in writing to it. But a few public (and private) bots do write to it, my much-hated auction bot being one of them.

  10. #10
    Master Sergeant
    Reputation
    27
    Join Date
    Mar 2008
    Posts
    94
    CoreCoins
    0

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Incase anyone was wondering i solved my own problem, since none of the above answers solved it i just did this

    Code:
    WriteValue(pLastHardwareAction, int.MaxValue);

  11. #11
    Kynox's Sister's Pimp Cypher's Avatar
    Reputation
    1352
    Join Date
    Apr 2006
    Location
    ntdll.dll
    Posts
    5,352
    CoreCoins
    186

    Trade Feedbacks

    Status
    n/a
    Positive
    0 (0%)
    Negative
    0 (0%)
    Quote Originally Posted by vulcanaoc View Post
    Of course, you're right- there's no present danger in writing to it. But a few public (and private) bots do write to it, my much-hated auction bot being one of them.

    Just because other people are doing it doesn't make it dangerous in this case.

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -4. The time now is 05:16 PM. Powered by vBulletin® Version 4.2.0
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved. Resources saved on this page: MySQL 5.88%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search