Unit Coords... menu

User Tag List

Results 1 to 15 of 15
  1. #1
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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?
    +Rep for all helpers
    Last edited by ashleyww; 10-16-2009 at 06:03 PM. Reason: Added more code. Fixed Case's

    Unit Coords...
  2. #2
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh boy, copy and paste always messes me up too! .. why is everything case sensitive?

    poop should be Poop. right?

  3. #3
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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....

  4. #4
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 05:46 PM.

  5. #5
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  6. #6
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  7. #7
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  8. #8
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  9. #9
    Xeranor's Avatar Member
    Reputation
    71
    Join Date
    Aug 2009
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 05:08 AM.

  10. #10
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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).

  11. #11
    ashleyww's Avatar Banned
    Reputation
    6
    Join Date
    Apr 2009
    Posts
    131
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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!

  12. #12
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1358
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/6
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  13. #13
    Jadd's Avatar 🐸
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ashleyww View Post
    OMG I feel retarded! I forgot mobs are units not objects!
    I lol'd. Fail.

  14. #14
    WannaBeProgrammer's Avatar Member
    Reputation
    2
    Join Date
    Feb 2009
    Posts
    156
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $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

  15. #15
    tymezz's Avatar Member
    Reputation
    9
    Join Date
    Nov 2007
    Posts
    44
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

Similar Threads

  1. Need a mod that hides Standard blizz Unit Frames
    By Sikonosos in forum World of Warcraft General
    Replies: 1
    Last Post: 01-26-2007, 07:27 PM
  2. Zepplin Coord Files!
    By Demonkunga in forum World of Warcraft Model Editing
    Replies: 106
    Last Post: 12-29-2006, 12:52 PM
  3. Coords in 2.0.1?
    By dela in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 12-27-2006, 12:26 AM
  4. Zep coords??
    By ghost111 in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 11-11-2006, 07:38 PM
  5. Teleportation coords?
    By king11 in forum World of Warcraft General
    Replies: 10
    Last Post: 11-03-2006, 08:55 PM
All times are GMT -5. The time now is 12:20 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search