ID:162657
 
Can Someone please tell me how to, after making the inventory tab, place items that u "Get" into the Tab?

-Thanks
Getting as in? Picking it up, buying it, someone giving it to you? What? Be more specific..
In response to Lundex
Lundex wrote:
Getting as in? Picking it up, buying it, someone giving it to you? What? Be more specific..

Just generally getting something that goes into your inventory, i pick up things and they dont go in o.O;
In response to Yabek
Whats the code?
In response to Lundex
Lundex wrote:
Whats the code?
statpanel("Inventory")
stat(src.contents)

it says that that is all i need o.O;
In response to Yabek
I ment the pick up code.
In response to Lundex
That's all you'll need to show the Inventory statpanel.

If you wish to add something into a players inventory, look up the contents variable.
In response to Lundex
Lundex wrote:
I ment the pick up code.
im srry, i dont understand o.O
In response to Yabek
Like something is on the ground you pick it up and place it in your inventory. Thats what I thought you ment.
In response to Lundex
Lundex wrote:
Like something is on the ground you pick it up and place it in your inventory. Thats what I thought you ment
yes, that is what i meant, along withbuying items and all that
After reading the posts in this topic, apparently you didn't get any help at all.
Look up the contents var of mobs in the reference. When you move a movable atom to an atom's contents or a mob, it goes in its contents.
Also look up stat panels. They can have numbers, letters, and lists containing atoms. In your case you want a stat panel containing a mob's inventory, or contents var.
mob/Stat()
..()
statpanel("Inventory",contents)

That's basically all you need for the inventory tab.

For moving movable atoms, look up the Move() proc. Or you could change the location to the mob.
obj/verb/Get()
set src in view(1) //The mob sees this verb when it is next to the object.
Move(usr)//src.Move(usr) means it moves src to usr.
//or
obj/verb/Get()
set src in view(1)
loc=usr //Setting src.loc manually doesn't call Enter() or Entered() or all that stuff for the usr.
In response to Kaiochao2536
o, thanks