If I'm reading the flags correctly, the following should set all nodrop items to be gm-only, and then set all of the gm items to not be nodrop:
UPDATE items SET gmflag=1 WHERE nodrop=255;
UPDATE items SET nodrop=0 WHERE gmflag=1;
edit: oops, meant sets to be _not_ nodrop
|