ID:169658
 
How would I do a Class Change system that would be able to change at a certain lvl and have requirments like for mastering Theif and Knght you can be able to pick Dragoon
Don't ask for code, instead, ask how to do it.
mob/proc/ClassChange()
for(var/T in src.ClassMastered)
if(T=="Thief"&&"Knight")
if(src.Level == 50)//Ya need to be level 100 to class change, just change this number to the level you want.
switch(alert("Change into a dragoon?","CC","Yes","No"))
if("Yes")
if(src.Level == 100)//If mastered previous class..
src.ClassMastered += src.Class
src<<"Ye mastered the [src.Class] class"
else
src.Class = "Dragoon"//You didn't master the class.
src<<"You change classes without mastering"
In response to Flame Sage
That's poorly done, FlameSage. Usr absue, improper use of "&&" and, you could've used the in operator.
mob/proc/ClassChange()
if("Thief" in classescomplete&&"Knight" in classescomplete)
if(src.lvl>=50)
switch(alert(src,"Would you like to classchange into Dragoon?",Class Change","Yes","No"))
if("Yes")
if(src.Level >=100)
src.classescomplete+=src.class
src.class="Dragoon"
else
src<<"You must exceed level 100 to class change into a dragoon"
return

Of course, I don't know how you do your level up system, you may have to change client.mob or something, but, that works.