There are many many ways to do this.
You could do:
SCAR Code:
{Description: Drops all items}
DropAll;
{Description: Drops all except item(s) specified by inventory number(s).}
DropExcept(I: array of Integer);
{EX} DropExcept([1, 6]); {will keep items 1 and 6}
{Drops Until hits Position.}
DropToPosition(StartPosition, EndPosition: Integer);
{EX} DropToPosition(2, 28) {will drop items 2 to 28}
{Description: Drops item at given position (1-28)}
DropItem(i: Integer);
{EX} DropItem(3) {will drop item in 3rd inv spot}