Function: dun-take-object
dun-take-object is a byte-compiled function defined in dunnet.el.gz.
Signature
(dun-take-object OBJNUM)
Source Code
;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-take-object (objnum)
(if (and (member objnum dun-jar) (member obj-jar dun-inventory))
(let (newjar)
(dun-mprincl "You remove it from the jar.")
(setq newjar nil)
(dolist (x dun-jar)
(if (not (= x objnum))
(setq newjar (append newjar (list x)))))
(setq dun-jar newjar)
(setq dun-inventory (append dun-inventory (list objnum))))
(if (not (member objnum (nth dun-current-room dun-room-objects)))
(if (not (member objnum (nth dun-current-room dun-room-silents)))
(dun-mprinc "I do not see that here.")
(dun-try-take objnum))
(if (>= objnum 0)
(progn
(if (and (car dun-inventory)
(> (+ (dun-inven-weight) (nth objnum dun-object-lbs)) 11))
(dun-mprinc "Your load would be too heavy.")
(setq dun-inventory (append dun-inventory (list objnum)))
(dun-remove-obj-from-room dun-current-room objnum)
(dun-mprinc "Taken. ")
(if (and (= objnum obj-towel) (= dun-current-room red-room))
(dun-mprinc
"Taking the towel reveals a hole in the floor."))))
(dun-try-take objnum)))
(dun-mprinc "\n")))