Quote:
Originally Posted by havochavoc2
Does someone know how to target your pet? The only way I can come up with is just scanning the agents for the ModelID, can't seem to get GetAgentName to work with pets.
|
I haven't messed with this directly but a few thoughts on how to go about it or get on the right track. One idea would be to check if you must prepend "Pet - " on to the string of the name. It could also require "Pet # - " + Name.
If you are looping through all of the agents in the array you can at least test a few basic things to narrow your search. If you test for allegiance is 4 that means the agent is a pet, spirit, or minion. Then you could test if this agent is on the same team as your own player.
Code:
DllStructGetData($aAgentArray[$i], "Allegiance") == 4; pets/spirits/minions
DllStructGetData($aAgentArray[$i], "Team") == DllStructGetData(-2, "Team"); match team of yourself to agent array
From here if you can't match by name as I am not home to test it with the permutations previously presented then you could do it dirty by things like HP,level, model among other potential unique identifying marks for an agent.
Then you would set target to this agentid found. If none of these work maybe someone who has messed with pets more could chime in or it is possible that the api you are using doesn't fully support pets on this level.