ID:142615
 
Code:
world
mob = /mob/create_character

mob/create_character
var/mob/character
Login()
var/charactername = input("Hello, Pick a name for your character, something you wish for people to call you in the game.","Character Name?")
switch(input("Below pick your allegence you wish for your character to be. It determines what skills you get in the game.","Character Allegence?") in list("Imperial","Rebel","Bounty Hunter"))
if ("Imperial")
character = new /mob/You/Imperial()
usr.allegence = "Imperial"
if ("Bounty Hunter")
character = new /mob/You/Bounty_Hunter()
usr.allegence = "Bounty Hunter"
if ("Rebel")
character = new /mob/You/Rebel()
usr.allegence = "Rebel"
character.name = charactername
src.client.mob = character
if(character.gender=="female")
character.icon_state="1"
character.loc=locate (107,9,1)
world<<"<B>[character] has logged in!"
del(src)
..()

mob/NPC/Major
icon = 'Player6.dmi'
icon_state = "Major"
NPC = 1
verb
Talk()
set src in oview(1)
switch(input("You want to learn a skill?")in list("Yes","No"))
if("Yes")
var/s = input("Please select a skill to learn")in list("drain")
if(s=="drain")
if(usr.allegence=="Imperial")
alert("Drain damages the enemy then steals there life to heal yours.","","Ok")
if(usr.sp>=3)
usr << "<b> You learn Drain!"
usr.verbs+=typesof(/mob/Force/verb)
usr.sp -= 3
else
alert("You need more training....","","Ok")
else
alert("You dont seem to have the right training in the force....","","...")
return

mob/NPC/General
icon = 'Player6.dmi'
icon_state = "General"
NPC = 1
verb
Talk()
set src in oview(1)
switch(input("You want to learn a skill?")in list("Yes","No"))
if("Yes")
var/s = input("Please select a skill to learn")in list("drain")
if(s=="drain")
if(usr.allegence=="Rebel")
alert("Drain damages the enemy then steals there life to heal yours.","","Ok")
if(usr.sp>=3)
usr << "<b> You learn Drain!"
usr.verbs+=typesof(/mob/Force/verb)
usr.sp -= 3
else
alert("You need more training....","","Ok")
else
alert("You dont seem to have the right training in the force....","","...")
return

mob/NPC/Hunter
icon = 'Player6.dmi'
icon_state = "Hunter"
NPC = 1
verb
Talk()
set src in oview(1)
switch(input("You want to learn a skill?")in list("Yes","No"))
if("Yes")
var/s = input("Please select a skill to learn")in list("Burst")
if(s=="Burst")
if(usr.allegence=="Bounty Hunter")
alert("Burst shoots the enemy five times.","","Ok")
if(usr.sp>=3)
usr << "<b> You learn Burst!"
usr.verbs+=typesof(/mob/Force/verb)
usr.sp -= 3
else
alert("You need more training....","","Ok")
else
alert("You dont seem to have the right training in the force....","","...")
return

mob/var/level = 1
mob/var/allegence = ""
mob/var/Str = 5
mob/var/HP = 25
mob/var/MHP = 25
mob/var/FP = 25
mob/var/MFP = 25
mob/var/Mexp = 30
mob/var/Exp = 0
mob/var/Expg = 30
mob/var/NPC = 0
mob/var/player = 1
mob/var/credits = 100
mob/var/creditsg = 1
mob/var/sp = 0
mob/var/PK = 1
mob/var/monster = 0

mob/Stat()
stat("Name:",src.name)
stat("Credits:",src.credits)
stat("Level:",src.level)
stat("")
stat("")
stat("Skillpoints:",usr.sp)
stat("Allegence:",usr.allegence)
stat("")
stat("")
stat("Health:","[usr.HP] / [usr.MHP]")
stat("Force/Ammo:","[usr.FP] / [usr.MFP]")
stat("Strength:",usr.Str)
stat("Experience:","[usr.Exp] / [usr.Mexp]") </b>


Problem description: The problem is in the stats bar the players allegence (Imperial, Rebel, Bounty Hunter) doesnt appear. Thats not the only problem when the player attempts to learn a skill from a npc even if it is the one they are meant to go to it doesnt work, it gives them an invalid message and doesnt allow them to learn it.

Thanks for your help.
BurGuDan

Use src.allegence instead of usr.allegence
In response to Subzero1
Didnt work its still not there in the stat area and still cant learn the moves.
Because you're changing usr.allegience (you misspelled that anyway, also, it should be src), and then go ahead and delete the mob whose "allegience" you just changed. You should be changing character.allegiance.
In response to Garthor
Thankyou so much