Hey guys, so I currently have a problem where, my script will still attack an NPC that is under attack from someone using Magic that does no damage.
Currently someone is using magic, and they're doing no damage to the cow, so the cow's hp bar isn't showing up, but the cow is attacking back, but my script thinks it's not fighting and tries to attack it?
Here's my filter:
Thanks!
Hey guys, I'm trying to check the distance between an NPC and GroundItem, so that whichever one is closer, I'll either attack it or loot it. How would I go upon doing this?
Also, what's the most efficient and fastest way of attacking an NPC?
Thanks!
EDIT: I think I figured it out:
if (myPlayer().getPosition().distance(npc) < myPlayer()
.getPosition().distance(grounditem))
Thanks anyways!