NWScript:
int nItems = d4();
string sItem = "";
void main()
{
int i= 0;
for (i =1; i <= nItems; i++)
{
int nRandom = Random (5)+1;
switch (nRandom)
{
case 1: sItem = "bladeofcarnage"; break;
case 2: sItem = "armorofcarnage"; break;
case 3: sItem = "bootsofcarnage"; break;
case 4: sItem = "gauntletsofcarnage"; break;
case 5: sItem = "robeofcarnage"; break;
}
CreateItemOnObject(sItem, OBJECT_SELF, 1);
}
}