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,351
    CoreCoins
    180

    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,351
    CoreCoins
    180

    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,351
    CoreCoins
    180

    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 10:46 AM. Powered by vBulletin® Version 4.2.0
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO Resources saved on this page: MySQL 21.43%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247