how to get coordinate by cursor position menu

User Tag List

Results 1 to 11 of 11
  1. #1
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to get coordinate by cursor position

    I try to control another player's movement by following steps:
    step 1 : controller select a player(robot)
    step 2 : controller click a position on his screen
    step 3 : convert controller's cursor position to wow's world coordinate(x,y,z)
    step 4 : send a message(whisper or addon message) to that player(robot)
    step 5 : robot client receive this message
    step 6 : robot client get the designated coordinate from message
    step 7 : robot move to the coordinate

    I have hooked wow's recv and send function in ws2_32.dll, so sending message and receiving message have no problem.
    The problem is step 3, how can I convert cursor postion to coordinate?
    I have traced into "InputEvent" in ollydbg after clicking on wow window, finding that it just stores the mouse event , cursor postion and time in some addresses, and then , I lost way to trace.
    So, I don't know where wow handle these events and parameters and how to convert to 3D coordinate.

    appreciate for any help!

    how to get coordinate by cursor position
  2. #2
    Nesox's Avatar ★ Elder ★
    Reputation
    1280
    Join Date
    Mar 2007
    Posts
    1,238
    Thanks G/R
    0/3
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's how you convert from wow's coordinates to screen coordinates, it's abit old but atleast the math should be the same.

    http://www.mmowned.com/forums/wow-me...ordinates.html

  3. #3
    Shamun's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    76
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How can I get the camera data?

  4. #4
    Robske's Avatar Contributor
    Reputation
    305
    Join Date
    May 2007
    Posts
    1,062
    Thanks G/R
    3/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Camera - WoW.Dev Wiki

    Updated pointers and offsets are on this board, go search
    "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
    "I cried a little earlier when I had to poop" - Sku

  5. #5
    UnknOwned's Avatar Legendary
    Reputation
    713
    Join Date
    Nov 2006
    Posts
    583
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Nesox View Post
    here's how you convert from wow's coordinates to screen coordinates, it's abit old but atleast the math should be the same.

    http://www.mmowned.com/forums/wow-me...ordinates.html
    Its a good "proof of concept" but just does'nt work well for serious use.


    starfish99...
    There are serval ways to get the XYZ of your cursor.
    Do you just need it when you click on a particular spot on the screen?

  6. #6
    UnknOwned's Avatar Legendary
    Reputation
    713
    Join Date
    Nov 2006
    Posts
    583
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Code:
    Rev 3.0.3 D.O.R.
    ==Cursor Fuctions==
    MCF Index = 0x010A5DB8 
    ...
    2B0    -    -
    2B4    -    -
    2B8    -    -
    2BC    -    -
    2C0     -    -
    2C4    Float    CursorX
    2C8    Float    CursorY
    2CC    Float    CursorZ
    These are generated upon both right and left click.
    So to get the X position of your cursor read: 0x010A5DB8
    And add 0x2C4 to that appointed offset.

  7. #7
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank Nesox, and thank UnknOwned, you are so kind!
    the information that UnknOwned provids is exactly what i need.
    i just want to send the x,y,z generated by mouse click to another player, and order him to move.
    It seems like an operation in warcraft and starcraft to move a unit.
    And it will be an exciting operation in dual-boxing or multi-boxing, I think.

    another question,when wow update, how can I find this:
    Rev 3.0.3 D.O.R.
    ==Cursor Fuctions==
    MCF Index = 0x010A5DB8

    any clue in IDA or Ollydbg?

  8. #8
    apollo0510's Avatar Active Member
    Reputation
    18
    Join Date
    Aug 2008
    Posts
    53
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by starfish99 View Post
    thank Nesox, and thank UnknOwned, you are so kind!
    the information that UnknOwned provids is exactly what i need.
    i just want to send the x,y,z generated by mouse click to another player, and order him to move.
    It seems like an operation in warcraft and starcraft to move a unit.
    And it will be an exciting operation in dual-boxing or multi-boxing, I think.

    another question,when wow update, how can I find this:
    Rev 3.0.3 D.O.R.
    ==Cursor Fuctions==
    MCF Index = 0x010A5DB8

    any clue in IDA or Ollydbg?
    Hi Starfish !

    As I am usually playing 2 chars together, I have a different approach for controlling the position of the "slave" char : It is reacting to whispers, and I have set up some macros on actionbuttons that send these.

    One whisper tells the slave char to actively follow the source of the whisper. That follow is really persistent and is not broken like the normal "stick" function by actions of the slave char. Sending that command again will unstick the slave char, and he stays in position. Thats a good way to position healer or caster chars somewhere. Usually they can stay on a static point during the fight.

    Another whisper command is to actively assist the source of the whisper. The slave char will take the same targets as the controlling char. Sending this command again will leave the current target on the slave char. This feels very much like in the beginning of WoW, when the MT assigned targets to his fellow players ^^.

    There is a third command that I use, to explicitely mount/unmount the slave chars. If I do not use that, they would start mounting only after they detect that the controlling char has mounted.

    Furthermore I have switches that allow slave chars to choose targets automatically for decursing or healing. If they have done that, they will continue to assist the controlling char.

    A "click-to-walk" strategy as you suppose could only be an extension to that, but during combat, I am right-clicking very often to change the position of my main char, that I have position wise always under full manual control. So how should the system know, that this special click was to position the slave char ?

    Greetings

    Apollo

  9. #9
    Cypher's Avatar Kynox's Sister's Pimp
    Reputation
    1356
    Join Date
    Apr 2006
    Posts
    5,368
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by starfish99 View Post
    thank Nesox, and thank UnknOwned, you are so kind!
    the information that UnknOwned provids is exactly what i need.
    i just want to send the x,y,z generated by mouse click to another player, and order him to move.
    It seems like an operation in warcraft and starcraft to move a unit.
    And it will be an exciting operation in dual-boxing or multi-boxing, I think.

    another question,when wow update, how can I find this:
    Rev 3.0.3 D.O.R.
    ==Cursor Fuctions==
    MCF Index = 0x010A5DB8

    any clue in IDA or Ollydbg?

    He's given you the address, why not take a look?

  10. #10
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Cypher View Post

    He's given you the address, why not take a look?
    yes,I have looked at that address.
    I just want to find the way of searching such address, and I have found one:

    step1 : I move curor to my player's foot, and do a click,so mouse-click coordinate almost equals player's coordinate;
    step2: search memory addresses with value of my player's X coordinate,so some addresses are listed(in CE)
    step3 : click another postion,and observe value changing of the addresses above,
    easily find the correct mouse-click x coordinate.

    this method is really simple, but it depends on the information that mouse click will generate a 3d-coordianate stored in static addresses.

  11. #11
    starfish99's Avatar Corporal
    Reputation
    31
    Join Date
    May 2008
    Posts
    24
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by apollo0510 View Post
    Hi Starfish !

    A "click-to-walk" strategy as you suppose could only be an extension to that, but during combat, I am right-clicking very often to change the position of my main char, that I have position wise always under full manual control. So how should the system know, that this special click was to position the slave char ?

    Greetings

    Apollo
    Hi Apollo,
    I am playing 5 characters in instances now, and I plan to control 10.
    For multi-boxing in intances, there are several key issues to resolve :

    1.command-movement
    these commands are : follow, stopfollow,mount,unmount.etc, my way is similar to yours, but I use SendAddonMessage to send command and event CHAT_MSG_ADDON to recieve command, becasue SendAddonMessage not only broadcasts but also whipsers messages.

    2.auto-movement
    automovements include : follow target(maybe enemy,for melee-attack charater),approach target, move a distance away from player/npc(to void some kinds of injuries) , get out of the area of enemy's aoe spells(by searching dynamic objects)

    3.cc-control
    define diffrent raid-icon for each party member to focus by ,and when main char set a raid-icon on an enemy, a party member corrsponding to this raid-icon will focus on the enemy automatically.(by event of RAID_TARGET_UPDATE)

    4.auto-action
    including all standing-still actions, such as target,focus,cast,use. Logically, they are cc actions, heal actions, dps actions ,dispel actions and interact actions(trade,accept invite,accept quest,click door,etc). Combat actions may be very complex and surely need some intelligent algorithms.

    5.action-control
    start/stop auto-action, change dps/heal/dispel logic, order sb to do a designated action(spell,interact)

    By these command controls and auto controls , I was able to go intances. When I have skilled in multi controlling(needing a lot of pratice), I passed almost all five-player intances.

    But these only are basic control methods of multi-boxing , in 10 or 25 player-instances ,there are more complex and more changeable conditions. I tried Zul'Aman once, there I found that my robots moved in wrong way in some special cases, and I must adjust their postion seperately. On the other hand, I am tired to write pathing algorithms for each boss... I need a more flexible control of movement, so it will be 'click-to-move'.

    My main char never use mouse click to move, as mouse is clicked only for controlling. Main char is always a tank, but I rarely press keys for tank actions, which is also performed automatically. I just move it(by key) , deal with emergency situations, and send commands to others by predefined macros. At most time, I am watching each enemy and each party member.

    Click-to-move follows such steps:
    1.select a party member ( or several, by lua addon)
    2.left click a postion (generate destination coordinate)
    3.press a key (this key is binded to a lua fuction calling SendAddonMessage)
    4. Since I have hooked SendAddonMessage, I read destination coordinate from memory and put it as SendAddonMessage's parameter.

    btw:

    I don't think this is a good way, maybe it would be better to register two new lua functions . It shoud be like :
    x,y,z = GetLastClickCoordinate()
    SendDestinationCoordinate(x,y,z,recver_name,'Whisper',sender_name)

    but I failed to register lua function!
    I tried to call Lua_Register('myfunc_name',myfunc_address), it succeeded.But when I called myfunc_name in lua, wow crashed! The crash info is that myfunc_address is not a valid function pointer...Then I tried Lua_PushCClosure, but this function just request myfunc_addres, and I don't know how to input myfunc_name...

    Another problem is about ordering others to cast aoe spells, which I posted in
    http://www.mmowned.com/forums/wow-me...oe-spells.html
    kynox has mentioned a function named "ClickTerrain",but he doesn't know where it is,
    so I still can't do this operation by now.
    Last edited by starfish99; 12-05-2008 at 01:18 AM.

Similar Threads

  1. how to get from memory X and Y positions
    By jetcar in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 09-02-2012, 01:04 PM
  2. How to get a spell Object's target and position?
    By demonguy in forum WoW Memory Editing
    Replies: 24
    Last Post: 05-29-2012, 11:39 PM
  3. How to get a valid Z coordinate
    By starfish99 in forum WoW Memory Editing
    Replies: 19
    Last Post: 01-02-2009, 09:11 PM
  4. How to get to the outlands on a live blizzard server
    By Matt in forum World of Warcraft Exploits
    Replies: 4
    Last Post: 06-16-2006, 05:27 PM
  5. How to get behind Orgrimmar (pics)
    By Matt in forum World of Warcraft Guides
    Replies: 16
    Last Post: 05-03-2006, 01:33 AM
All times are GMT -5. The time now is 07:20 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search