ID:261336
 
I need help in adding a verb when a certain level is reached. I have tried a proc so that that one person gets the verb but it is always there and i want the verb to appear only when that level is reached.

Thanks in advance for any help.
mob/proc/Blah()
src<<"blah"

mob
proc
addverb()
if(src.level == 10)
src.verbs+=/mob/proc/Blah


Call that proc where you add levels.
In response to Nadrew
But then how do i amke it open to that one class of people? Rather than everyone?
In response to Super saiyan3
Throw in an istype() proc.
In response to WizDragon
or use the unique herticy system that byond totally operates off of.

mob/chars/human/barbarian

and if you dont do that things, but you use a variable, just check the variable!

FIREking
In response to FIREking
I was unable to add it beacause i had so much errors. Here are all the snipets of code, can any one leave an example?


if(choice == "Barbarian")
new_mob = new/mob/b()
new_mob.loc = locate(1,1,1)
usr.loc = locate(1,1,1)// From login code

mob/Babrain
icon='Barbarian.dmi'
icon_state=""

heres the proc for the attack(i used Nadrews spell system.

mob/verb/SpearThrust(mob/M as mob in oview(40))
if(usr.Li<=20)
usr<< "You need more Life force"
else
world<< "[usr] You Shout Attack!"
flick("B",usr)
sleep(50)
missile(/obj/bang,usr,M.loc)
var/damage=2*usr.Li
M.overlays+=/obj/overlays/End
sleep(30)
M.overlays-=/obj/overlays/End
M.HP-=damage
usr.Ki-=80
if(M.HP<=0)
src:die()

In response to Super saiyan3
What im saying is, there are many ways to have multiple mobs with races and classes. you have this way

mob
var
race = ""
class = ""

then, by setting race and class, you check those variablews throughout the entire game code to do different things with different races and classes, OR there is this way

Format:
mob/race/class

mob/human/theif

mob/human/barbarian

mob/human/blah blah

you get the point, with that method, you can easily seperate verbs and do all other types of things, but throughtout the game code you will have to check types

if(src.type == /mob/blah/blah)

so you get the point, decide which is best for you.

FIREking