Function to return current player position

11/18/2018 22:46 lasse1993#1
I'm currently working on the Boreal chest farm bot which from time to time get stuck behind the npc next to the gate.

I want to add a check of the current position of the players character.

So i could check the range between the player and a fix point to change the way he is using to run outside.

My problem is i cant find a function to return "Current Player Position"

Hope someone could help me :)

Oh i actually found it lol.

Close pls

Code:
Func UpdatePos()
	GUICtrlSetData($gX, StringFormat("X: %d", DllStructGetData(GetAgentByID(-2), "X")))
	GUICtrlSetData($gY, StringFormat("Y: %d", DllStructGetData(GetAgentByID(-2), "Y")))
	GUICtrlSetData($gRotation, StringFormat("Rotation: %f", DllStructGetData(GetAgentByID(-2), "Rotation")))
EndFunc