ID:177679
 
I need a code that makes you Grab and Load and item or object autmatically by ouching or running over it.

And I also need a code to set a max limit on the number of Items allowed in an inventory.

The last thing I need is a code to show how many times you have died.

I don't expect to get all of these but the top item is what I want the most.
mob/var/limiteditems

obj/exampleitem
icon = '??.dmi'
verb
Get(mob/M)
if(M.limiteditems == 10)
M <<"Sorry,You can only have 10 items in your inventory"
else
src.loc = M
M.limiteditems += 1
Drop(mob/M)
src.loc = M.loc
M.limiteditems -= 1
In response to Siientx
Actually, usr.contents.len is the number of objects in your contents. You don't need another var.
In response to Garthor
k