g
var/list/classlist = list("Fighter","Dark Mage","Spearman","Samurai")
var/cclass = input(src, "Pick a class","The Chronicles") in classlist
switch(cclass)
if("Dark Mage") switch(alert("Dark Mages use offensive magics but have low defense and go best with a light mage.","","Yes","No"))
if("Yes")src.newchar = new /mob/bright ()
else goto g
if("Fighter") switch(alert("Fighters use physical combat skills and have high health.","","Yes","No"))
if("Yes")src.newchar = new /mob/hero ()
else goto g
if("Spearman") switch(alert("Spearman have more powerful combat skills but have low critical hit rates and low health. It would be best to gather armor for this class for it is a power-house of destruction","","Yes","No"))
if("Yes")src.newchar = new /mob/spearman ()
else goto g
if("Samurai") switch(alert("Samurai penetrate defenses and have high critical hit rates. Samurai are amongst the few classes that can work well alone","","Yes","No"))
if("Yes")src.newchar = new /mob/samurai ()
else goto g
f
var/ccclass = input(src, "Pick a class for your partner","The Chronicles") in classlist
switch(ccclass)
if("Dark Mage") switch(alert("Dark Mages use offensive magics but have low defense and go best with a light mage.","","Yes","No"))
if("Yes")
var/mob/partner/P = new()
P.newchar = new /mob/bright ()
P.name = input(src, "What is your party members name.","")as text
newchar.name = input(src, "What is your party members name.","")as text
P = newchar
src.partyner = P
src.party += src.partyner
src.party.Add(src.partyner)
else goto f
if("Fighter") switch(alert("Fighters use physical combat skills and have high health.","","Yes","No"))
if("Yes")
var/mob/partner/P = new()
P.newchar = new /mob/hero ()
newchar.name = input(src, "What is your party members name.","")as text
P = newchar
src.partyner = P
src.party += src.partyner
src.party.Add(src.partyner)
else goto f
if("Spearman") switch(alert("Spearman have more powerful combat skills but have low critical hit rates and low health. It would be best to gather armor for this class for it is a power-house of destruction","","Yes","No"))
if("Yes")
var/mob/partner/P = new()
P.newchar =new /mob/spearman ()
newchar.name = input(src, "What is your party members name.","")as text
P = newchar
src.partyner = P
src.party += src.partyner
src.party.Add(src.partyner)
else goto f
if("Samurai") switch(alert("Samurai penetrate defenses and have high critical hit rates. Samurai are amongst the few classes that can work well alone","","Yes","No"))
if("Yes")
var/mob/partner/P = new()
P.newchar= new /mob/samurai ()
newchar.name = input(src, "What is your party members name.","")as text
P = newchar
src.partyner = P
src.party += src.partyner
src.party.Add(src.partyner)
else goto f
newchar.name = input(src,"What is your name?","The Chronicles")as text
newchar.logged = 1
new /item/potion (newchar) // start off with those
new /item/ether (newchar)
src.client.mob = newchar
src.party+=src.partyner
del(src)
Problem description:
I added a statpannel that tells me if I have a partymember or not but when i make a new character and add the party member it still stays null
Also, I wouldn't advise you to use "goto"