Hey it's me again. I am having some troubles with my inventory items showing up in the stat pannel as well as the inventory pannel. Here is the code I am using.
Sabre
icon = 'swords.dmi'
icon_state = "Sabre"
verb
Pick_up()
set src in oview(1)
usr << "You pick up the [src]."
Move(usr)
Drop()
src.loc = usr.loc
usr << "You drop the [src]."
Thanks for your time.
*Some Guy Named Steve*
ID:175706
![]() Mar 18 2003, 1:03 pm
|
|
![]() Mar 18 2003, 2:07 pm
|
|
If your inventory is showing up in two panels, then why don't you show us your Stat() proc instead?
|
Instead of Move(usr) use:
src.loc = usr That will put it in you contents which, more than likely, is where your statpanel is looking to see what you have. *edit sorry I mis-read your post. |
Uhh, Move(usr) is not only valid, but it is indeed more useful. That way, you can simply edit mob/Enter() to allow or disallow the picking up of items. Use Move(usr), not src.loc = usr.
|
Cool. Sorry, I assumed(yes that was wrong all by itself :)), when I misread that his current code was wrong, that if something wasn't working it must be the only thing that is different from my code.
|
Okay. Here is the Stat() proc you requested.
Stat() statpanel("Info") stat("Name: ",name) stat("Gender: ",gender) stat("Level: ",level) stat("Exp","[xp]/[max_xp]") statpanel("Inventory",contents) stat(usr.contents) |
Madcrackfiend wrote:
statpanel("Inventory",contents) These two lines are your problem. If you call statpanel() with two arguments, it doesn't actually change the current statpanel. So the first line displayed there is creating a new statpanel called "Inventory", and putting src's contents in it. The second line is then putting the contents into the PREVIOUSLY MENTIONED statpanel ("Info"). Just take out the last line and it should work. |