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-16-2009
ashleyww is offline.
Banned
  
 
Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post
Reputation: 6
Points: 593, Level: 1
Points: 593, Level: 1 Points: 593, Level: 1 Points: 593, Level: 1
Level up: 39%, 307 Points needed
Level up: 39% Level up: 39% Level up: 39%
Activity: 2.8%
Activity: 2.8% Activity: 2.8% Activity: 2.8%

Unit Coords...

Okay im using this:

Code:
$tarread =  _BMReadUInt($handle, $aTargetGUID)
	If $tarread = 0 Then
		_log("No GUID")
		Sleep(10)
	Else
		$ObjectBase = _WoWGetObjectByGUID($handle, $tarread)
		$nameread =  _WoWGetName($handle, $ObjectBase)
			If $nameread = "Stonetusk Boar" then
				_Log("Mob Found: " & $nameread)
					_Movemob($handle, _getObjectX($handle, $ObjectBase), _getObjectY($handle, $ObjectBase), $ObjectBase)
			EndIf
	EndIf
To get see if the unit is a Stonetusk Boar - Which works well.

Im using this to get the units X & Y:

Code:
Func _getObjectX($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xE8, "float"))
EndFunc   ;==>_getObjectX

Func _getObjectY($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xEC, "float"))
EndFunc   ;==>_getObjectY
Which I thought should work...

and this to move:

Code:
Func _Movemob($handle, $XCoord, $YCoord, $ObjectBase)
	$desiredcoords = _WoWDistance(_getObjectX($handle, $ObjectBase),_getObjectY($handle, $ObjectBase))
	Do
		_BMWriteFloat($handle, $ClickToMove_Xpos, $XCoord)
		_BMWriteFloat($handle, $ClickToMove_Ypos, $YCoord)
		_BMWriteInt($handle, $ClickToMove_State, "4")
	Until $desiredcoords < 5
		_log("Attacking")
		_Memorywrite($ClickToMove_Target, $handle, $ObjectBase, "byte[8]")
		_BMWriteInt($handle, $ClickToMove + 0x1C, "7") ;interact
EndFunc   ;==>_Movemob

Func _WoWDistance($cordx, $cordy)
$posx = _GetX($handle, $pBase)
$posy = _Gety($handle, $pBase)
$dis = Sqrt(($cordx - $posx) ^ 2 + ($cordy - $posy) ^ 2)
Return $dis
It seems that its grabbing incorrect X & Y locations...

Im using the following memory addresses:

Code:
Const $ClickToMove = 0x01297920 ;Updated
Const $ClickToMove_Xpos = 0x012979ac;Updated
const $ClickToMove_Ypos  =0x012979b0;Updated
Const $ClickToMove_State = 0x0129793c;Updated
Const $aTargetGUID = 0x113d7a8;Updated
I think I am blind... the problem is probably staring me in the face... Any ideas?
for all helpers

Last edited by ashleyww; 10-16-2009 at 08:03 PM. Reason: Added more code. Fixed Case's
Reply With Quote


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

  #2  
Old 10-16-2009
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

oh boy, copy and paste always messes me up too! .. why is everything case sensitive?

poop should be Poop. right?
Reply With Quote
  #3  
Old 10-16-2009
ashleyww is offline.
Banned
  
 
Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post
Reputation: 6
Points: 593, Level: 1
Points: 593, Level: 1 Points: 593, Level: 1 Points: 593, Level: 1
Level up: 39%, 307 Points needed
Level up: 39% Level up: 39% Level up: 39%
Activity: 2.8%
Activity: 2.8% Activity: 2.8% Activity: 2.8%

Quote:
Originally Posted by tymezz View Post
oh boy, copy and paste always messes me up too! .. why is everything case sensitive?

poop should be Poop. right?
What? this isn't Copy & Paste... I did this my self. Autoit isn't Case sensitive....
Reply With Quote
  #4  
Old 10-16-2009
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

So why do you go from handle to Handle randomly? In any case, if you did all this yourself its pretty trivial to figure out whats wrong. Also autoit being case insensitive doesn't really help you maintain good programming practices.

edit: so as to not look like im randomly flaming, try debugging the main cause of the problem, specifically the functions that determine where to move to.

Last edited by tymezz; 10-16-2009 at 07:46 PM.
Reply With Quote
  #5  
Old 10-16-2009
ashleyww is offline.
Banned
  
 
Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post
Reputation: 6
Points: 593, Level: 1
Points: 593, Level: 1 Points: 593, Level: 1 Points: 593, Level: 1
Level up: 39%, 307 Points needed
Level up: 39% Level up: 39% Level up: 39%
Activity: 2.8%
Activity: 2.8% Activity: 2.8% Activity: 2.8%

Quote:
Originally Posted by tymezz View Post
So why do you go from handle to Handle randomly? In any case, if you did all this yourself its pretty trivial to figure out whats wrong. Also autoit being case insensitive doesn't really help you maintain good programming practices.
Ill fix the Case's now then... It doesn't matter though... If you know what's up, while not help and earn some rep.
Reply With Quote
  #6  
Old 10-16-2009
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

Quote:
Originally Posted by ashleyww View Post
Ill fix the Case's now then... It doesn't matter though... If you know what's up, while not help and earn some rep.
I'll give you hints to help you be more efficient but not spoonfeed you completely,

take a look at movetomob, youre passing objectbase and doing nothing with it, why? ive seen a bunch of your posts and I really think you need to pick up a good programming book.
Reply With Quote
  #7  
Old 10-16-2009
ashleyww is offline.
Banned
  
 
Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post
Reputation: 6
Points: 593, Level: 1
Points: 593, Level: 1 Points: 593, Level: 1 Points: 593, Level: 1
Level up: 39%, 307 Points needed
Level up: 39% Level up: 39% Level up: 39%
Activity: 2.8%
Activity: 2.8% Activity: 2.8% Activity: 2.8%

Quote:
Originally Posted by tymezz View Post
I'll give you hints to help you be more efficient but not spoonfeed you completely,

take a look at movetomob, youre passing objectbase and doing nothing with it, why? ive seen a bunch of your posts and I really think you need to pick up a good programming book.

Because when I post all my code I am asking to be spoon fed... Which is not what I want...

Ive added some more code now... Maybe that can help find the problem
Reply With Quote
  #8  
Old 10-17-2009
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

Just following up on my promise, hopefully you're learning better programming practices from a good book or through other sources.

Anyway, your next step is learning how to debug. You're half way there, almost all of your questions and posts you've made can be answered on your own through debugging (Even if you are a beginner). Notice your code has what we call debug output, it's a wonderful thing. What's next? Add more.

You could bash your head against a wall of code, or read debug output and see where things are going wrong.

Don't take this the wrong way, you're very hard headed. It's a good thing in this case though, atleast you keep trying, I'm pretty sure you could eventually do what you want on your own.
Reply With Quote
  #9  
Old 10-17-2009
Xeranor's Avatar
Xeranor is offline.
Corporal
  
 
Join Date: Aug 2009
Posts: 29
Nominated 5 Times in 1 Post
Reputation: 56
Points: 1,477, Level: 3
Points: 1,477, Level: 3 Points: 1,477, Level: 3 Points: 1,477, Level: 3
Level up: 11%, 623 Points needed
Level up: 11% Level up: 11% Level up: 11%
Activity: 3.6%
Activity: 3.6% Activity: 3.6% Activity: 3.6%

Code:
Func _getObjectX($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xE8, "float"))
EndFunc   ;==>_getObjectX

Func _getObjectY($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xEC, "float"))
EndFunc   ;==>_getObjectY
Thats the problem:
0xEC & 0xE8 arnt the unit xyz offsets

Here are the right ones:
const $UnitX = 0x798 ; tested
const $UnitY = 0x79C ; tested
const $UnitZ = 0x7A0 ; tested

But i give you a tip... learn a "real" language... AutoIt is crap...

Last edited by Xeranor; 10-17-2009 at 07:08 AM.
Reply With Quote
  #10  
Old 10-17-2009
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

I agree with the AutoIt is crap statement, same goes for any scripting language.

Thing is with beginners like ashleyww, you either teach him/her to fish or you keep feeding him/her fish.

Ashleyww knew she was getting incorrect coordinates, but didn't know what to do about it. Her blanket "getObject" functions are correct for something other than unit coordinates.

Her real question was about offsets, as such she should have asked how to find them herself. (But first needs to recognize what exactly she needs).
Reply With Quote
  #11  
Old 10-17-2009
ashleyww is offline.
Banned
  
 
Join Date: Apr 2009
Posts: 139
Nominated 2 Times in 1 Post
Reputation: 6
Points: 593, Level: 1
Points: 593, Level: 1 Points: 593, Level: 1 Points: 593, Level: 1
Level up: 39%, 307 Points needed
Level up: 39% Level up: 39% Level up: 39%
Activity: 2.8%
Activity: 2.8% Activity: 2.8% Activity: 2.8%

Quote:
Originally Posted by Xeranor View Post
Code:
Func _getObjectX($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xE8, "float"))
EndFunc   ;==>_getObjectX

Func _getObjectY($handle, $curobject)
	Return Floor(_BMReadMemory($handle, $curobject + 0xEC, "float"))
EndFunc   ;==>_getObjectY
Thats the problem:
0xEC & 0xE8 arnt the unit xyz offsets

Here are the right ones:
const $UnitX = 0x798 ; tested
const $UnitY = 0x79C ; tested
const $UnitZ = 0x7A0 ; tested

But i give you a tip... learn a "real" language... AutoIt is crap...
OMG I feel retarded! I forgot mobs are units not objects!
Reply With Quote
  #12  
Old 10-17-2009
Cypher's Avatar
Cypher is offline.
Kynox's sister's pimp
Legendary User
  
 
Join Date: Apr 2006
Location: ntdll.dll
Posts: 4,180
Nominated 63 Times in 4 Posts
Nominated TOTM/W Award(s): 1
Reputation: 1085
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%

Mobs ARE objects because Units are Objects. The WoW objects are set up in a classic OOP object hierarchy. Unit derives from Object and hence a Unit "is-a" Object.

Whilst the lowest type in the hierarchy when it comes to mobs is obviously Unit, that doesn't mean it's not an Object.
__________________
[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
  #13  
Old 10-17-2009
Jadd's Avatar
Jadd is offline.
Contributor
  
 
Join Date: May 2008
Location: QLD, Australia
Posts: 617
Nominated 13 Times in 3 Posts
Reputation: 299
Points: 11,415, Level: 13
Points: 11,415, Level: 13 Points: 11,415, Level: 13 Points: 11,415, Level: 13
Level up: 32%, 885 Points needed
Level up: 32% Level up: 32% Level up: 32%
Activity: 15.2%
Activity: 15.2% Activity: 15.2% Activity: 15.2%

Quote:
Originally Posted by ashleyww View Post
OMG I feel retarded! I forgot mobs are units not objects!
I lol'd. Fail.
__________________
IMMA FIRIN' MAH FOOBARZ!!
Reply With Quote
  #14  
Old 4 Weeks Ago
WannaBeProgrammer's Avatar
WannaBeProgrammer is offline.
Sergeant
  
 
Join Date: Feb 2009
Posts: 63
Reputation: 5
Points: 540, Level: 1
Points: 540, Level: 1 Points: 540, Level: 1 Points: 540, Level: 1
Level up: 28%, 360 Points needed
Level up: 28% Level up: 28% Level up: 28%
Activity: 1.8%
Activity: 1.8% Activity: 1.8% Activity: 1.8%

$desiredcoords = _WoWDistance(_getObjectX($handle, $ObjectBase),_getObjectY($handle, $ObjectBase))
Do
_BMWriteFloat($handle, $ClickToMove_Xpos, $XCoord)
_BMWriteFloat($handle, $ClickToMove_Ypos, $YCoord)
_BMWriteInt($handle, $ClickToMove_State, "4")
Until $desiredcoords < 5
---
hm? The $distance is declared to the start at the pulling range and $distance will never change from PullRange to less then 5.
Do you understand?:P(abit bad at explaining)


This will work better:P
-----

Do
_BMWriteFloat($handle, $ClickToMove_Xpos, $XCoord)
_BMWriteFloat($handle, $ClickToMove_Ypos, $YCoord)
_BMWriteInt($handle, $ClickToMove_State, "4")
Until $desiredcoords = _WoWDistance(_getObjectX($handle, $ObjectBase),_getObjectY($handle, $ObjectBase)) < 5
Reply With Quote
  #15  
Old 4 Weeks Ago
tymezz is offline.
New User
  
 
Join Date: Nov 2007
Posts: 9
Reputation: 1
Points: 352, Level: 1
Points: 352, Level: 1 Points: 352, Level: 1 Points: 352, Level: 1
Level up: 88%, 48 Points needed
Level up: 88% Level up: 88% Level up: 88%
Activity: 7.5%
Activity: 7.5% Activity: 7.5% Activity: 7.5%

All of the code needs to be rewritten.

[Only registered and activated users can see links. ]
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 09:06 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