ID:717490
 
(See the best response by .screw.)
The verb is at the very end of this coding:

Code:
mob/Login()
if(usr.save==0)
var/tmp/A=input("Who is your character?") in list ("Seiya", "Shiryu", "Hyoga", "Shun", "Ikki")
if(A=="Seiya") //fastest level up
src.level=1 //level of the character
src.cloth=1000 //hit points of the character(cloth)
src.maxcloth=1000
src.cosmo=100 //the power of the character(attack)
src.arm=150 //cloth resistance of the user(defense)
src.speed=20 //speed of the character
src.maxspeed=20 //maximum speed of the character
src.stamina=100 //the total energy of the character
src.exp=0 //experience of the character
src.maxexp=1 //maximum experience of the character
src.stats=0 //points you can spend on these stats
src.luck=15 //luck(chance of dodging or a critical hit)
src.icon='seiya.dmi'
src.loc= locate(1,1,1)
src.repair(usr)
src.level_up(usr)
src.death(usr)
src.verbs+=/mob/proc/PMP


Problem description:
I made that verb first a proc but am trying to add it as a verb when I choose a certain character. It works when I make it a verb that adds this verb called "add_tech()" but not under this login. I tried all sorts of ways to do this but nothing worked so I'm asking here.
src.verbs+=/mob/proc/PMP

Well, I'm not sure if it's possible to add verbs via a proc like that. . . But you could do it like this:
src.PMP()

And then have a PMP proc like:
mob/proc
PMP()
src.verbs += /mob/verb/something

But normally I would just do this:
src.verbs += /mob/verb/something // Instead of src.verbs+=/mob/proc/PMP


Just replace the "something" with the name of the verb.
I agree with spectras way, i havent ever tried adding a proc to give verbs like that, other ways yes but never like that just add the verb itself, or call a proc after the creation that gives the verbs.
    if(src.key=="Shellfisch")
world<<"Test"
src.verbs += typesof(/mob/lightning/Zeuskillsyaall)
return


example for you...
it's for the key... now just change it to your needs and it will work
I'm still not helped. How am I supposed to add that verb when I login?
In response to TheDarkChakra
TheDarkChakra wrote:
I'm still not helped. How am I supposed to add that verb when I login?

If PMP is a verb, you can do the following:
mob/Login()
..()
verbs += /mob/verb/PMP
In response to .screw
.screw wrote:
TheDarkChakra wrote:
I'm still not helped. How am I supposed to add that verb when I login?

If PMP is a verb, you can do the following:
> mob/Login()
> ..()
> verbs += /mob/verb/PMP
>


I changed the proc to a verb and it didn't work
Try making a new mob in the Login() & change the src to the new mob
mob/create_character
var/mob/P
Login()
if(usr.save==0)
var/tmp/A=input("Who is your character?") in list ("Seiya", "Shiryu", "Hyoga", "Shun", "Ikki")
if(A=="Seiya") //fastest level up
P = new/mob/Seiya()
//from here
P.level=1 //level of the character
P.cloth=1000 //hit points of the character(cloth)
P.maxcloth=1000
P.cosmo=100 //the power of the character(attack)
P.arm=150 //cloth resistance of the user(defense)
P.speed=20 //speed of the character
P.maxspeed=20 //maximum speed of the character
P.stamina=100 //the total energy of the character
P.exp=0 //experience of the character
P.maxexp=1 //maximum experience of the character
P.stats=0 //points you can spend on these stats
P.luck=15 //luck(chance of dodging or a critical hit)
//to here is not needed, because you can set stats for each mob
P.loc= locate(1,1,1)
P.repair(usr)
P.level_up(usr)
P.death(usr)
P.verbs+=/mob/proc/PMP
// if(A=="so on & so on")repeat
src.client.mob=P
del(src)
..()

In response to TheDarkChakra
Best response
TheDarkChakra wrote:
I changed the proc to a verb and it didn't work

There is something within your code that is preventing the mob from receiving this verb. Try doing some debugging: add world << "debug 1" right after verbs += /mob/verb/PMP. Does the text show?

If not, I recall you having a post earlier which showed src.repair(usr) as a while loop. Please show the repair verb/proc, it may be holding everything up.