ID:146768
 
Code:
obj
Vermillion_Cloak
icon = 'body.dmi'
icon_state = "vermillion_cloak"
name = "Vermillion Cloak"
level = 52
equip_type = "Body"
description = "A rich, popular, red cloak worn primarily by mages."
effects = "Cannot Equip Headgear, MP+10, MP+1%, Evasion-10, Def: 46, Adds \"Refresh\" effect"
jobs = "Bard, Black Mage, Monk, Paladin, Ranger, Red Mage, Summoner, White Mage"
verb
Equip_Vermillion_Cloak()
if(src.level >= usr.level)
return 0
else
usr.max_mp += 10
usr.max_mp += round(usr.mp/100)
usr.MP_Refresh()


Problem description:

This is the bare bones of the code. My problem is that even when the cloak is in the inventory of the user at login, the verb doesn't appear under commands in the statpanel.
Perhaps you need to define 'set src in usr.contents' ?

obj
Vermillion_Cloak
verb
Equip_Vermillion_Cloak()
set src in usr.contents
// the rest
In response to Foomer
I once did that but I got an error of somesort. I will try again and post the results.
In response to Foomer
I see what I did. I tried to use a list to set the src in.

Is there any way to set src in usr.items w/o getting this error?

projectonline.dm:87:error:usr.items:unsupported src setting
Generally it's a really really bad idea to make your verb names hyper-specific like that. There's nothing in the verb that couldn't be in a more generic Equip() verb. Any specific actions that happen when equipped/unequipped can be done in another proc that can be overridden.

Lummox JR
In response to RainZero
You need to use the contents list, not a home-made items list. Contents is special in that object verbs can be accessed through contents.

You should read up on verb/set/src in the DM Reference.