I have mobs that are set to be not aggressive. They are supposed to turn aggressive on any char who is not wearing an object (118235). I am able to get them to behave properly when walking into a room with the mobs, however I would ideally like to have a catch if a player was say invis/hiding/teleported in to make the mob attack or not depending on if they have said object. Below is what I have, but doesn't work as they attack even when wearing the object. I'm assuming it has to do with the if actorhasobjnum not checking against the PC, but I can't find a way to aim it. I added the if ispc($r) hoping, maybe it would guide the check but wasn't surprised when it didn't.
Code: Select all
>rand_prog 50~
if ispc($r)
and position($i) != 8
if actorhasobjnum(118235)
get all.coin
else
kill $r
endif
endif
~