ID:175692
 
For example, I might want the ability "Cook Pizza" only to appear if you are of class "cook".
Gynax wrote:
For example, I might want the ability "Cook Pizza" only to appear if you are of class "cook".

I probably do it a different way than everyone else, but this works.

mob/cook/verb/cookpizza()

then in your login code, put
  usr.verbs += new/mob/cook/verb/cookpizza() //for the users that get that verb. :-P

--Demon
In response to Demonskata630
I beleive

Login()
if(src.race == "cook")
src.verbs+= blah blah blah would be a better thing to tell me.
In response to Jotdaniel
Jotdaniel wrote:
I beleive

Login()
if(src.race == "cook")
src.verbs+= blah blah blah would be a better thing to tell me.


blah blah blah isnt my idea of "a better thing". you need to let the man who posted the question know what you have to do..
  src.verbs += new/mob/cook/verb/cookpizza()

You would also need
mob/Login()


In response to Demonskata630
Demonskata630 wrote:
>   src.verbs += new/mob/cook/verb/cookpizza()
>



Well, you didn't do it right, either.
src.verbs += /mob/cook/verb/cookpizza


If you're gonna get on someone about something, make sure it's at least close to valid.
In response to Nadrew
I would like to know what gets rid of the "new" i put in that piece. I've always done that, and it's worked fine.
In response to Demonskata630
It's just not needed; you also added () at the end, which makes it invalid. You can't add an actual proc to the verbs list, only typepaths.