ID:162255
 
Um, could someone help me create more stats and whatnot. Here's a look at my code so far:

mob/var
hit_points = 50 //starting hit points
magic_points = 50 //starting magic points
lvl = 1 // starting lvl
exp = 0 // starting exp
expn = 50 // How much exp needed for next lvl?

mob
Stat()
stat(,name)
stat("HP:",hit_points)
stat("MP:", magic_points)
stat("Level:",lvl)
stat("Exp:",exp)
stat("Exp Needed:",expn)


1. For this code here, if there was some way to add the needed EXP for the next levels. Like, for level 2, you need 100 EXP

2. Um, I need help creating stats like, Strength and Agility(Speed) and then giving it attributes for it. I wanted 6 stats.

I wanted 6 stats:

Vitality- to increase HP
Strength- to increase weapon damage
Power- to increase magic and skill damage
Agility- for dodging and whatnot
Spirit- how well you block magic
???- how well your accuracy is(for Archers and long range attacks)

Can someone help me program this?
mob/var
hit_points = 50 //starting hit points
magic_points = 50 //starting magic points
lvl = 1 // starting lvl
exp = 0 // starting exp
expn = 50 // How much exp needed for next lvl?
vp = ## // The default vitality
stp = ## // Default strength
pp = ## // Default Power
ap = ## // Default agility
spp = ## // Default Spirit
?p = ## // Default Accuracy

Those are your stats, which you just need to add on.

mob
proc
levelup()
if(src.exp >= src.expn)
src << "You leveled up!"
src.expn += 50
src.exp == 0

That's a basic levelup proc. This can be modified to change in any var. To make it work, just call upon the proc whenever the usr gains exp.
In response to Demon_F0rce
You should not be using usr in procs. src is appropriate, usr is not.

Additionally, the == operator is used for comparisons, = is used for assignment.
In response to Garthor
Thanks for the corrections. Half the time I don't know which = operator to use, and half the time find myself having to swap the one in use.
In response to Demon_F0rce
One more question.

What can I put for accuracy? should I name it Dexterity or something? Instead of putting a ?

Also, how do you put breaks in between the lists?

For Example, I want it to look like this:

Name
Lvl
Class
Race

Str
Pwr
Agi
In response to Jamora1124
Name your stats whatever you want them to be. It's your code. If you wanted your accuracy named MonkeyLikeNess then name it that. Whatever will be best for you.

For a break just put in a blank stat line.
stat("")