idk how useful but this is from the last update.
idk how useful but this is from the last update.
Do you have any offsets from the base address (gw2.exe) for the PLAYER_INTERACT_TARGET (Gw2.exe + 14838C0)
I don't think 14838C0 is a permanent offset to the memory address - try restarting your client and check if the value is still the same or if the address is still the same.
Gw2.exe + 14838C0 should be 0 if you have no interact target, in my client and CE it shows 1279870559.
I think your player interact is wrong, mine is:
Gw2.exe+12838C0
yeah was a typo, meant to be 0x16838C0, which is Gw2.exe+ 12838C0, Address is static so no it doesn't change each time you start client, no offsets needed.
I'll edit previous post with 12838C0
I usually deal with actual addresses as opposed to the process + (address-processstartaddress), so yeah when I posted I had to - 400000 but I did - 200000.
I will probably just post it with the 0xaddress now so it doesn't happen again lol
Last edited by SSlisa; 09-26-2012 at 07:06 PM.
Do you have any static address for the Interact Type? e.g.
Loot/Interact/set: 19114032
Chop: 19113968
Gather: 19113952
Greet: 19113888
Mine: 19113984
Revive: 19113920
Thats what I found in some temporary address.
If you stand next to an ore the pointer will show 19113984 (for mining) and in your static address (0x16838C0) it's 259790832 which is a unique ID for the ore.
Well I currently have
Static
0x1685224
Offsets
0x0, 0xC4, 0x22
It is Unicode String(text) but it isn't 100% reliable, so it is the actual text and language dependant.
So when you can loot it has "Search [F]" when you are next to ore it has "Mine [F]" but like I said it isn't 100% reliable, a friend of mine noticed a "type" indicator like you mentioned I can't recall the offset difference to what I posted off hand though.
--=== Added ===--
Found the post by my friend, if you change last offset to 0x8 you get the type ID, so 0x0,0xC4,0x8. (4byte hex)
examples
13F6A Greet [F]
17CA1 View [F] (Vista)
13E5C Revive [F]
1403F Search [F] (Loot)
Last edited by SSlisa; 09-27-2012 at 09:51 PM.
I'm not sure why you need to use cos and sin but I am guessing you are asking about movement between 2 sets of coords and using the players angle to make sure you face where you need to?
This is in LUA by the way.
Then we do a little function to make sure it doesn't get messed up.Code:Angle = math.atan2(Dir2, Dir1) + math.pi; angle = math.atan2(destination.Y - current.Y, destination.X - current.X) + math.pi;
so angleDif is the angle between where you are facing and where you want to be facing, mainly used in code to turn to face the right direction.Code:angleDif = angleDifference(angle, Angle) function angleDifference(angle1, angle2) if( math.abs(angle2 - angle1) > math.pi ) then return (math.pi * 2) - math.abs(angle2 - angle1); else return math.abs(angle2 - angle1); end end
Just to be on topic I'll post another Address I have =)
This address is for ALL target types, there is another address which is purely for mobs (things you can attack).Code:PLAYER_TARGET -> Gw2.exe + 12838F0 (4 bytes)
Code:PLAYER_TARGET_MOB -> Gw2.exe + 12838D8 (4 bytes)
Last edited by SSlisa; 10-01-2012 at 04:07 AM.
I have been trying to get a simple way point system working so maybe someone can take a look at my code and see where I am going wrong?
Code:void SetPointers() { PosX = (void*)0x0165DD08; PosY = (void*)0x0165DD0C; PosZ = (void*)0x0165DD10; RotCos = (void*)0x165DCF0; RotSin = (void*)0x165DCF4; TurnLeft = (void*)0x016A5558; TurnRight = (void*)0x016A555C; MoveForward = (void*)0x016A5548; MoveBackward = (void*)0x016A554C; } float angleDifference(float angle1, float angle2) { if(abs(angle2 - angle1) > M_PI ) { return ((M_PI * 2) - abs(angle2 - angle1)); } else { return abs(angle2 - angle1); } } void FaceDirection(float x, float z, float angletolerance = 0.1) { float angle(0); float angleDif(0); float selfangle(0); selfangle = atan2(*(float*)RotCos, *(float*)RotSin); angle = atan2(z - *(float*)PosZ, x - *(float*)PosX)+M_PI; angleDif = angleDifference(angle, selfangle); if( angleDif > angletolerance) { //-- Attempt to face it if(angleDif > angleDifference(angle, selfangle+ 0.01)) { //-- Rotate left *(bool*)TurnLeft = 1; } else { //-- Rotate right *(bool*)TurnRight = 1; } } else { //-- no turning after looking in right direction *(bool*)TurnRight = 0; *(bool*)TurnLeft = 0; } } void Move(float x = 0, float z = 0, float disttolerance = 20) { float angle(0); float dist(0); do { dist = sqrt((pow(x - *(float*)PosX,2))+ (pow(z - *(float*)PosZ,2))); if(15 > dist) { angle = 0.5; } else { angle = 0.2; } FaceDirection(x, z, angle); if(dist > disttolerance) { *(bool*)MoveForward = 1; } else { *(bool*)MoveForward = 0; } //Sleep(100); }while(*(bool*)MoveForward != 0); }