It's me again, and I want strange things
Sometimes I need to sort out all mobs or all items. I know how I can do it.
I can take ListMobilesInBox or ListObjectsInBox and have gotten very very big array. But it is without items in storages! And I have to do it some times for different realms.
Or I can do it in cycle
for (i:=0;i:=endSerialNumber;i++)
var item:=SystemFindObjectBySerial(i);
endfor
But it's very heavy solutions
I know we have "magic word" in foreach
Code: Select all
foreach val in something
var numberOfIteration:=_val_iter;
endforeach
I mean something like "_world_items" and "_world_mobiles" and "_world_objects"
and the iteration doesn't return me the big array but I can have access to the objects
Code: Select all
foreach object in _world_objects
if (object.isa(POLCLASS_MOBILE))
//do nothing
endif
endforeach