void main() { int nNth=1; while(GetNearestObject(OBJECT_TYPE_CREATURE, OBJECT_SELF, nNth)!=OBJECT_INVALID) { if(GetIsPC(GetNearestObject(OBJECT_TYPE_CREATURE, OBJECT_SELF, nNth))!=TRUE) { int nGold = GetGold(GetNearestObject(OBJECT_TYPE_CREATURE, OBJECT_SELF, nNth)); TakeGoldFromCreature(nGold, GetNearestObject(OBJECT_TYPE_CREATURE, OBJECT_SELF, nNth), TRUE); } nNth++; } }