Network: WoW Gold | WoW Accounts | MPS Games | FPSowned
MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides
Homepage »      Register »      Hall of Fame »      Ranks And Awards »      Advertise »      Marketplace »
 
Sign up



Do you like this excellent information? Then Donate HERE to remove ads and support the MMOwned community.


Go Back   MMOwned - World of Warcraft Exploits, Hacks, Bots and Guides > World of Warcraft > Bots and Programs > WoW Memory Editing

WoW Memory Editing WoW Memory Editing for learning purposes only.
This section is more advanced than others on MMOwned Read the section specific rules, infractions will be given out if u break them!That is including the expectations! - If you don't meet them then don't post

Reply
 
LinkBack Thread Tools
  #1  
Old 10-07-2009
Ohsnap is offline.
New User
  
 
Join Date: Feb 2008
Posts: 6
Reputation: 1
Points: 349, Level: 1
Points: 349, Level: 1 Points: 349, Level: 1 Points: 349, Level: 1
Level up: 88%, 51 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

[AutoIt] Getting target name?

I've been reading these forums for a few weeks gaining knowledge about various things. I've come to the conclusion that beginning with AutoIt as a programming language is a wise idea before I move onto anything more advanced and my end game goal was to release something before I moved onto another language. I've hit a problem when trying to get a target name which I've searched several times but the search engine would only search for the world "Target" or "Get" which made my search worthless

Func Target()
$Target = _BMReadMemory($Handle, $STATIC_TARGET, "ptr")
GUICtrlSetData($Label6, $Target)
EndFunc

Is my code which seems to return several numbers and not an actual name. I've mixed things up a few times and it began giving me acsii characters instead. What am I doing wrong? Yes I'm useing 3.2.2 offsets. If anyone could point me in the right direction would be much appreciated. Thank you.
Reply With Quote


Donate to remove ads, get your "DONATOR title, and get access to the MMOwned community's elite Shoutbawx.

  #2  
Old 10-07-2009
MaiN is online.
Contributor
  
 
Join Date: Sep 2006
Location: Jaedenar O.o
Posts: 568
Reputation: 162
Points: 3,264, Level: 5
Points: 3,264, Level: 5 Points: 3,264, Level: 5 Points: 3,264, Level: 5
Level up: 58%, 336 Points needed
Level up: 58% Level up: 58% Level up: 58%
Activity: 8.6%
Activity: 8.6% Activity: 8.6% Activity: 8.6%

My guess is that the STATIC_TARGET offset gives you the baseaddress or GUID of the local player target.
__________________
http://www.main-dev.com/

I was here. ~Dragon[Sky]
I was here too. ~Kuiren
Reply With Quote
  #3  
Old 10-07-2009
Ohsnap is offline.
New User
  
 
Join Date: Feb 2008
Posts: 6
Reputation: 1
Points: 349, Level: 1
Points: 349, Level: 1 Points: 349, Level: 1 Points: 349, Level: 1
Level up: 88%, 51 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

$STATIC_TARGET = (0x113d7a8)

This is the offset that I'm useing. What is it I'm missing? All I want it for is to display my target as my bot roams in-game and possibly down the road log it with other information if I want to read what my character got up to while I was gone.
Reply With Quote
  #4  
Old 10-07-2009
spudstar99 is offline.
Sergeant
  
 
Join Date: Aug 2008
Posts: 68
Reputation: 10
Points: 468, Level: 1
Points: 468, Level: 1 Points: 468, Level: 1 Points: 468, Level: 1
Level up: 14%, 432 Points needed
Level up: 14% Level up: 14% Level up: 14%
Activity: 2.6%
Activity: 2.6% Activity: 2.6% Activity: 2.6%

A Function from Ninjaskid ... not nice coded .. but it should work ...

thank the "developer" of Ninjaskid ... don't know the names ...

Quote:
Func _WoWGetName($Handle, $ObjectBase)
Local $l_Type = _WoWGetObjectType($Handle, $ObjectBase)

Switch ($l_Type)
Case $OT_Unit
Return _BMReadASCIIString($Handle, _BMReadUint($Handle, (_BMReadUInt($Handle, ($ObjectBase + $UNIT_NAMEOFFSET_1)) + $UNIT_NAMEOFFSET_2)), 30)

Case $OT_GameObject
Return _BMReadASCIIString($Handle, _BMReadUint($Handle, (_BMReadUInt($Handle, ($ObjectBase + $GAMEOBJECT_NAMEOFFSET_1)) + $GAMEOBJECT_NAMEOFFSET_2)), 30)
Case $OT_Player ;;;;;Not Working!!!!!!!
;$ObjectBase = _WoWPlayerBase($handle)
;return ""
Return _BMReadASCIIString($Handle, _BMReadUint($Handle, (_BMReadUInt($Handle, ($ObjectBase + $UNIT_NAMEOFFSET_1)) + $UNIT_NAMEOFFSET_2)), 30)
Case Else

Return StringFormat("Unknown %s", _WoWGetTypeString($l_Type))


EndSwitch
EndFunc
Reply With Quote
  #5  
Old 10-07-2009
Ohsnap is offline.
New User
  
 
Join Date: Feb 2008
Posts: 6
Reputation: 1
Points: 349, Level: 1
Points: 349, Level: 1 Points: 349, Level: 1 Points: 349, Level: 1
Level up: 88%, 51 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%

Thank you mate, I'm going to go play with this then post the working product.
Reply With Quote
  #6  
Old 1 Week Ago
The-Guardian's Avatar
The-Guardian is offline.
Sergeant
  
 
Join Date: Feb 2009
Location: AZ
Posts: 43
Reputation: 12
Points: 407, Level: 1
Points: 407, Level: 1 Points: 407, Level: 1 Points: 407, Level: 1
Level up: 2%, 493 Points needed
Level up: 2% Level up: 2% Level up: 2%
Activity: 2.9%
Activity: 2.9% Activity: 2.9% Activity: 2.9%

Sorry to bump an old post but $objectbase would be the $STATIC_TARGET = (0x113d7a8) correct? cause if it is then theres something going wrong cause i just get 0
Reply With Quote
  #7  
Old 1 Week Ago
Nesox's Avatar
Nesox is online.
MaiN's Biatch
Legendary User
  
 
Join Date: Mar 2007
Location: VirtualAllocEx
Posts: 1,115
Nominated 26 Times in 3 Posts
Nominated TOTM/W Award(s): 1
Reputation: 727
Points: 36,171, Level: 28
Points: 36,171, Level: 28 Points: 36,171, Level: 28 Points: 36,171, Level: 28
Level up: 95%, 129 Points needed
Level up: 95% Level up: 95% Level up: 95%
Activity: 14.1%
Activity: 14.1% Activity: 14.1% Activity: 14.1%

Code:
char *__thiscall CGObject_C__GetObjectName(int this, int a2, int a3)
{
  int v3; // ebx@1
  int v4; // esi@1
  unsigned int v5; // eax@4
  int v6; // edi@8
  unsigned int v7; // ecx@12
  int v8; // eax@18
  char *result; // eax@19
  int v10; // eax@23
  int v11; // ecx@26
  int v12; // esi@34
  int v13; // edi@16
  int v14; // esi@19
  char *v15; // esi@24
  char *v16; // esi@25
  int v17; // eax@29
  int v18; // ecx@29
  char v19; // [sp+Ch] [bp-2C4h]@11
  _DWORD v20[74]; // [sp+1A0h] [bp-130h]@13
  int v21; // [sp+2C8h] [bp-8h]@19
  int v22; // [sp+2CCh] [bp-4h]@19

  v3 = 0;
  v4 = this;
  if ( a3 && *(_BYTE *)(this + 3914) & 0x80 )
  {
    sub_92BFE0();
    a3 = 0;
    if ( sub_4990C0() )
    {
      while ( 1 )
      {
        v5 = *(_DWORD *)(v4 + 3544);
        if ( v5 == -1 )
          v5 = *(_DWORD *)(v4 + 3164);
        if ( a3 >= v5 )
        {
          v6 = 0;
        }
        else
        {
          if ( *(_DWORD *)(v4 + 3544) != -1 )
            v6 = v3 + v4 + 3160;
          else
            v6 = v3 + *(_DWORD *)(v4 + 3168);
        }
        if ( ClientDb_GetLocalizedRow(*(_DWORD *)(v6 + 8), &v19) )
          break;
LABEL_16:
        v13 = a3++ + 1;
        v3 += 24;
        if ( (unsigned int)v13 >= sub_4990C0() )
          goto LABEL_17;
      }
      v7 = 0;
      while ( v20[v7] != 279 || !((unsigned __int8)(1 << (char)v7) & *(_BYTE *)(v6 + 12)) )
      {
        ++v7;
        if ( v7 >= 3 )
          goto LABEL_16;
      }
      v10 = GetObjectByGuid(*(_DWORD *)v6, *(_DWORD *)(v6 + 4), 8);
      if ( v10 )
      {
        v15 = CGObject_C__GetObjectName(v10, a2, 0);
        nullsub_6();
        result = v15;
      }
      else
      {
        v16 = (char *)sub_6C4510(v6);
        nullsub_6();
        result = v16;
      }
      return result;
    }
LABEL_17:
    nullsub_6();
  }
  v8 = *(_DWORD *)(v4 + 8);
  if ( (*(_DWORD *)(v8 + 8) >> 4) & 1 )
  {
    v14 = *(_DWORD *)(v4 + 8);
    v21 = *(_DWORD *)v8;
    v22 = *(_DWORD *)(v8 + 4);
    result = (char *)DbNameCache_GetInfoBlockById(*(_DWORD *)v8, *(_DWORD *)(v14 + 4), &v21, sub_6A0970, 0, 1);
    if ( result )
    {
      if ( a2 )
      {
        if ( *(result + 52) )
          *(_DWORD *)a2 = result + 52;
      }
      return result;
    }
  }
  else
  {
    v11 = *(_DWORD *)(v4 + 208);
    if ( *(_DWORD *)(v11 + 272) )
    {
      v21 = *(_DWORD *)v8;
      v22 = *(_DWORD *)(v8 + 4);
      result = (char *)DbPetNameCache_GetInfoBlockById(*(_DWORD *)(v11 + 272), &v21, sub_6A0970, 0, 1);
      if ( result )
      {
        if ( *((_DWORD *)result + 22) == *(_DWORD *)(*(_DWORD *)(v4 + 208) + 276) )
          return result;
        sub_6C6160(result);
        sub_5FB920(*(_DWORD *)(*(_DWORD *)(v4 + 208) + 272));
        v17 = *(_DWORD *)(v4 + 8);
        v21 = *(_DWORD *)v17;
        v18 = *(_DWORD *)(v4 + 208);
        v22 = *(_DWORD *)(v17 + 4);
        DbPetNameCache_GetInfoBlockById(*(_DWORD *)(v18 + 272), &v21, sub_6A0970, 0, 1);
      }
    }
    else
    {
      v12 = *(_DWORD *)(v4 + 2408);
      if ( v12 )
        return *(char **)(v12 + 92);
    }
  }
  result = (char *)FrameScript_GetText("UNKNOWNOBJECT", -1, 0);
  if ( !result || !*result )
    result = "Unknown Being";
  return result;
}
__________________
omg ive started a blog nao! what's wrong with MEH!? -> [Only registered and activated users can see links. ]
Reply With Quote
  #8  
Old 1 Week Ago
flo8464's Avatar
flo8464 is online.
Knight
  
 
Join Date: Apr 2009
Posts: 219
Reputation: 11
Points: 946, Level: 2
Points: 946, Level: 2 Points: 946, Level: 2 Points: 946, Level: 2
Level up: 10%, 454 Points needed
Level up: 10% Level up: 10% Level up: 10%
Activity: 16.0%
Activity: 16.0% Activity: 16.0% Activity: 16.0%

Uhm, as you reversed UnitName, maybe you can help me with a bit of it

Here is what I don't understand:

Code:
 getGuidByKeyword(unitName_c, &guid, 0);
  guid_c = guid;
  if ( guid && ((_DWORD)guid != -2 || *((_DWORD *)&guid + 1) != -1) )
  {
    object = getObjectByGuidFiltered(guid, 1);
    object_c = object;
    if ( object )
    {
      objDescriptorTable = *(_DWORD *)(object + 8);
      objType = *(_DWORD *)(objDescriptorTable + 8);
      if ( (objType >> 3) & 1 )
      {
        unitName_c2 = WoWUnit_getNameInfo(object_c, (char *)&serverName_c, 1);
        goto LABEL_28;
      }
      if ( (objType >> 5) & 1 )
      {
        unitName_c2 = (char *)sub_68B480();
        goto LABEL_28;
      }
Maybe i completly misunderstood something, but as far as I remember there is a pointer to the descriptor-structure at base+0x8. But what the heck is it doing in those if-clauses here? Whats the point in shifting + checking the last byte here? (its checking dl, HeyRays just interpreted it as an AND)
__________________
Hey, it compiles! Ship it!
Reply With Quote
  #9  
Old 1 Week Ago
MaiN is online.
Contributor
  
 
Join Date: Sep 2006
Location: Jaedenar O.o
Posts: 568
Reputation: 162
Points: 3,264, Level: 5
Points: 3,264, Level: 5 Points: 3,264, Level: 5 Points: 3,264, Level: 5
Level up: 58%, 336 Points needed
Level up: 58% Level up: 58% Level up: 58%
Activity: 8.6%
Activity: 8.6% Activity: 8.6% Activity: 8.6%

Quote:
Originally Posted by flo8464 View Post
Uhm, as you reversed UnitName, maybe you can help me with a bit of it

Here is what I don't understand:

Code:
 getGuidByKeyword(unitName_c, &guid, 0);
  guid_c = guid;
  if ( guid && ((_DWORD)guid != -2 || *((_DWORD *)&guid + 1) != -1) )
  {
    object = getObjectByGuidFiltered(guid, 1);
    object_c = object;
    if ( object )
    {
      objDescriptorTable = *(_DWORD *)(object + 8);
      objType = *(_DWORD *)(objDescriptorTable + 8);
      if ( (objType >> 3) & 1 )
      {
        unitName_c2 = WoWUnit_getNameInfo(object_c, (char *)&serverName_c, 1);
        goto LABEL_28;
      }
      if ( (objType >> 5) & 1 )
      {
        unitName_c2 = (char *)sub_68B480();
        goto LABEL_28;
      }
Maybe i completly misunderstood something, but as far as I remember there is a pointer to the descriptor-structure at base+0x8. But what the heck is it doing in those if-clauses here? Whats the point in shifting + checking the last byte here? (its checking dl, HeyRays just interpreted it as an AND)
It's checking the obj type.
Code:
if ( (objType >> 3) & 1 )
Is just checking the obj type flag.
It's the same as
Code:
if (objType & 8)
While
Code:
if ( (objType >> 5) & 1 )
Is the same as
Code:
if (objType & 32)
__________________
http://www.main-dev.com/

I was here. ~Dragon[Sky]
I was here too. ~Kuiren
Reply With Quote
  #10  
Old 1 Week Ago
flo8464's Avatar
flo8464 is online.
Knight
  
 
Join Date: Apr 2009
Posts: 219
Reputation: 11
Points: 946, Level: 2
Points: 946, Level: 2 Points: 946, Level: 2 Points: 946, Level: 2
Level up: 10%, 454 Points needed
Level up: 10% Level up: 10% Level up: 10%
Activity: 16.0%
Activity: 16.0% Activity: 16.0% Activity: 16.0%

Thanks
But I don't get why that is done.
Does it really make any difference in codesize/speed ?
__________________
Hey, it compiles! Ship it!
Reply With Quote
  #11  
Old 1 Week Ago
MaiN is online.
Contributor
  
 
Join Date: Sep 2006
Location: Jaedenar O.o
Posts: 568
Reputation: 162
Points: 3,264, Level: 5
Points: 3,264, Level: 5 Points: 3,264, Level: 5 Points: 3,264, Level: 5
Level up: 58%, 336 Points needed
Level up: 58% Level up: 58% Level up: 58%
Activity: 8.6%
Activity: 8.6% Activity: 8.6% Activity: 8.6%

Quote:
Originally Posted by flo8464 View Post
Thanks
But I don't get why that is done.
Does it really make any difference in codesize/speed ?
Well, I don't think it does. But personally I think it's a nicer format. Eg., I don't know which bit 0x40 is - if it's written like that it's a little easier to understand when you don't have the full flag enum.
(flag >> 7) & 1 - I know that bit 8 in the bitmask is being checked as opposed to (flag & 0x40). If I have the full enum, it's easier to use that format though.
__________________
http://www.main-dev.com/

I was here. ~Dragon[Sky]
I was here too. ~Kuiren

Last edited by MaiN; 6 Days Ago at 03:24 PM.
Reply With Quote
  #12  
Old 1 Week Ago
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,178
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1074
Points: 55,512, Level: 35
Points: 55,512, Level: 35 Points: 55,512, Level: 35 Points: 55,512, Level: 35
Level up: 14%, 3,188 Points needed
Level up: 14% Level up: 14% Level up: 14%
Activity: 43.9%
Activity: 43.9% Activity: 43.9% Activity: 43.9%

Quote:
Originally Posted by MaiN View Post
Well, I don't think it does. But personally I think it's a nicer format. Eg., I don't know which bit 0x40 is - if it's written like that it's a little easier to understand when you don't have the full flag enum.
(flag >> 7) & 1 - I know that bit 7 in the bitmask is being checked as opposed to (flag & 0x40). If I have the full enum, it's easier to use that format though.
It makes no difference in terms of code size or speed.

I agree however. Bit shift notation is much better than a direct bitwise AND.
__________________
[Only registered and activated users can see links. ] Back online!

"Science is interesting, and if you don't agree you can **** off."
[Only registered and activated users can see links. ]

"I can write very coherent things when I try that sound very good" -- Styles
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT -4. The time now is 12:02 PM.




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.1

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 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493