! >BB A blackboard which can be written on or wiped clear. ! ---------------------------------------------------------------------------- Object -> -> chalk "stick of chalk" with name "stick" "of" "chalk"; Array boardtext string 64; Object -> blackboard "blackboard" with name "board" "blackboard" "black", describe [; <>; ], before [ i f; Examine: for (i=1:i<=boardtext->0:i++) if (boardtext->i~=' ' or 0) f=1; if (f==0) { print "^The office blackboard is wiped clean.^"; if (self hasnt general) { give self general; "^[To write on it, try > write ~message...~]"; } rtrue; } print "^The office blackboard bears the message:^ "; for (i=1:i<=boardtext->0:i++) { f=boardtext->i; if (f~=0) print (char) f; } new_line; rtrue; Rub: for (i=1:i<=boardtext->0:i++) boardtext->i = ' '; "You wipe the blackboard clean."; ], has static; Global from_char; Global to_char; [ QuotedText i j f; i = WordAddress(wn++); i=i-buffer; if (buffer->i=='"') { for (j=i+1:j<=(buffer->1)+1:j++) if (buffer->j=='"') f=j; if (f==0) return -1; from_char = i+1; to_char=f-1; if (from_char>to_char) return -1; while (buffer+f > WordAddress(wn)) wn++; wn++; return 1; } return -1; ]; [ WriteSub i j; if (chalk notin player) "You're holding nothing to write with."; if (blackboard notin location) "The blackboard is elsewhere."; for (i=from_char,j=1:i<=to_char && j0:i++,j++) boardtext->j = buffer->i; for (:j0:j++) boardtext->j=0; Achieved(5); <>; ]; ! ---------------------------------------------------------------------------- ! End of object definitions. ! ---------------------------------------------------------------------------- !