ANSWER TO EXERCISE 52 | |
[ DoubleInvSub i count1 count2; print "You are carrying "; objectloop (i in player) { if (i hasnt worn) { give i workflag; count1++; } else { give i ~workflag; count2++; } } if (count1==0) print "nothing."; else WriteListFrom(child(player), FULLINV_BIT + ENGLISH_BIT + RECURSE_BIT + WORKFLAG_BIT); if (count2==0) "."; print ". In addition, you are wearing "; objectloop (i in player) { if (i hasnt worn) give i ~workflag; else give i workflag; } WriteListFrom(child(player), ENGLISH_BIT + RECURSE_BIT + WORKFLAG_BIT); "."; ]; |