ID:169039
 
in my usr.contents list, nothing shows up. Do i need to put is something different to make the list appear or what?
what exactly are you trying to do, and how are you executing it? it might help if you posted some coding.
In response to Reinhartstar
this is all my statpanel for inventory
mob
Stat()
if(usr.Inventory == 2)
statpanel("Inventory")
stat("Yini:","[usr.gold]")
stat("Encumberance:","[encumb]/[maxencumb]")
stat("Items:",usr.contents)

Tell me if you need anything else
In response to Popisfizzy
bump
In response to Popisfizzy
Use src instead of usr.
Using usr in procs is dangerous!
In response to Roara
still nothing. its really annoying.
In response to Popisfizzy
No put usr in proc. Ungh.
In response to Jp
that sentence made no sense to me whatsoever.
In response to Popisfizzy
Popisfizzy wrote:
this is all my statpanel for inventory
> mob
> Stat()
> if(usr.Inventory == 2)
> statpanel("Inventory")
> stat("Yini:","[usr.gold]")
> stat("Encumberance:","[encumb]/[maxencumb]")
> stat("Items:",usr.contents)
>

Tell me if you need anything else

try using a for() loop:
> mob
> Stat()
> if(Inventory == 2)
> statpanel("Inventory")
> stat("Yini:","[gold]")
> stat("Encumberance:","[encumb]/[maxencumb]")
> stat("Items:")
for(var/A in contents)
stat(A)
>


Tell me if that works
In response to DarkCampainger
IT WORKS!! I LOVE YOU (in a non-gay way)!!! THANK YOU!!

How would you make it so the pick-up() verb doesn't come up when you have the item.
In response to Popisfizzy
By using oview instead of view. Since oview excludes the center (Meaning you, and what you contain) which means stuff in your contents won't be included. So a basic verb like this would work:
obj/Potion/verb/Pick_Up()
set src in oview(1)//Only show the verb if they are within 1 tile of the potion, excluding the players contents
usr<<"You drink the potion!"
sleep(10)
usr<<"You suddenly die a horrible death! Thats what you get for drinking stuff you found on the ground -_-"
del(src)


That should work
In response to DarkCampainger
k, that works. How do i make it so the items are accessed from my inventory, not a different tab. The tabs get cluttered sometimes
In response to Popisfizzy
bump
In response to Popisfizzy
should work like this
but its a guess in what on earth you mean
obj
item
Datapad
icon = 'pad.dmi'
Click()
if(!(src in usr.contents)) return
usr << "You have accessed the datapad."
alert("Logging on...", "Datapad")
switch(alert("What do you do on the datapad?", "Datapad", "Turn it off", "Research by name", "Activate beacon"))
if("Turn off")
usr << "You turn off the datapad."
alert("Logging off...", "Datapad")
if("Activate Beacon")
world << "[usr] activates their distress beacon! they are at ([usr.x], [usr.y], [usr.z])"
usr << "You activate your distress beacn."

// and so on...


--Vito
In response to Vito Stolidus
I want to make it so once you pick-up the item, it is accessed from the inventroy by right-clicking it. I know this is already built in, but i don't want another statpanel coming up saying the verbs you can do with the item.
obj
items
package
icon='usable_items.dmi'
icon_state="package"
name = "Package"
verb
Pick_Up()
set src in view(1)
set category = "Item"
src.loc=usr
usr.encumb += 1
usr<<"<font color = blue>You picked-up the \bold [src]"
Drop()
set src in usr
set category = "Item"
set name = "Drop"
src.loc = usr.loc
usr.encumb -= 1
usr <<"<font color = blue>You dropped the \bold [src]"

There's my coding, if it helps any.
In response to Popisfizzy
you've got to hide the verbs then. look it up.

--Vito
In response to Vito Stolidus
you mean with set hidden?
In response to Popisfizzy
yep

--Vito
In response to Vito Stolidus
didn't know it was that simple, i thought that would hide the right-click proc too. Thanks.
In response to Popisfizzy
I don't think it does. if it does, I don't know how to do what you want to do.

--Vito
Page: 1 2