ID:270586
 
How do i make it so that "Frog man" gets more strength and less defense then "Human male"?
mob/create_character
var/mob/character
Login()
usr<<sound('opening.mid',1)
usr.loc=locate(8,7,2)
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 one of the following backgrounds you wish for your character to be. It determines what skills you get in the game.","Character Background?") in list("Frog-Woman","Frog-Man","Human(Male)","Human(Female)"))
if ("Frog-Man")
character = new /mob/You/Warrior()
if ("Frog-Woman")
character = new /mob/You/Warrior2()
if ("Human(Male)")
character = new /mob/You/Cleric()
if ("Human(Female)")
character = new /mob/You/Magician()
character.name = charactername
src.client.mob = character
if(character.gender=="female")
character.icon_state="2"
character.loc=locate (2,2,1)
world<<"<B>[character] has logged in!"
del(src)
..()

mob
proc
LvlCheck()
if(usr.Exp>=usr.Mexp)
usr<<"<I><B><small>You gained a level!"
usr.level+=1
usr.MHP+=rand(1,5)
usr.HP=usr.MHP
usr.MMP+=rand(1,5)
usr.MP=usr.MMP
usr.Str+=rand(1,5)
usr.Def+=rand(1,7)
usr.Expg*=2
usr.Exp=0
usr.Mexp*=1.15
mob/You/Warrior
icon='Player1.dmi'

mob/You/Warrior2
icon='Player1-1.dmi'

mob/You/Cleric
icon='Player2.dmi'

mob/You/Magician
icon='Player3.dmi'
If you mean they get more strength and less defense per level thennnnnnnn you could create an Adds list that contains the maximum amount they can gain in any different stat per level. Then you could have a Stats list that contained all the player's stats and run a little for loop.

mob
var
list
Adds("Strength"=7,"Defense"=3)
Stats("Strength"=9,"Defense"=4)
proc
Level()
if(src.exp>=src.maxexp)
for(var/o in src.Adds)
src.Stats[o]+=src.Adds[o]

That should work, however I didn't test. I am pretty sure it will though. The for loop runs through each stat add in the Adds list and finds it in src.Stats and then adds the... add. O_o

Hopefully you understand.

-Exophus
client/verb/change_char()
if(alert("which mob be?",,"human","creep")=="human")
mob=new/mob/human //make me a human!
else
mob=new/mob/creep //make me a creep!

mob
creep
str=39
human
str=24