The Ibot targeting is, AFAIK almost perfect, since it also attacks other players monsters. So I decided to create a script that only attacks monsters but for some reason it also targets NPCs and also monsters that are not attacking me (other way to say I can't make it work).
Does anyone know why it isn't working?
local mgot = getcreatures("ms")
local mqtd = mgot.count
if maround(5) >= 1 then
for i=0,mqtd do
if mgot.isattackme and mgot.hpperc > 0 then