Well JAW beat me to part of it
Havn't tried this, but this is the idea. Change
if ($itemcount(1001) == 1 && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1)
to
if ((itemcount(1001) == 1 || itemcount(1002) == 1 || itemcount(1003) == 1 || itemcount(1004) == 1 || itemcount(1005) == 1 || itemcount(1006) == 1 || itemcount(1007) == 1 || itemcount(100
== 1 || itemcount(1009) == 1 || itemcount(1010) == 1 || itemcount(1011) == 1 || itemcount(1012) == 1) && $itemcount(1002) == 1 && $itemcount(1003) == 1 && $itemcount(1004) == 1)
Kinda long, and that may be a problem... give it a try
You could also split it up and make up to 12 seperate quests with the same result...