ID:267704
![]() Aug 28 2003, 11:54 am
|
|
Id like to know if it is possible to show all of the users contents in a switch() proc. Such as a person asks wha you have, and then it lists each item, seperately. I know its sort of hard to understand, if you need a better explanation just ask, if it is possible, please post it. Thanks for any help at all, The Conjuror.
|
Copyright © 2025 BYOND Software.
All rights reserved.
mob/verb/Check_Contents()
var/obj/item = input("View what item?","Items") in usr.contents
usr << "[item.name]:[item.desc]"
That will simply show everything you own, in an input box, and when you select an item from the list, it tells you its name, and desc(optional, you can do whatever with it really)
Basically, so you know what to do, for the input statement, its: in usr.contents , because usr.contents is a list, and at the end of an input, you can chose to have the data come from a list. Therefore, you put: in (list name)
[ in our case, its usr.contents ]