//setting NPC stats |
Problem description:Is there a better way to give player exp?
ID:839657
Jun 28 2012, 5:07 am
|
||
Code:
Problem description:Is there a better way to give player exp? | ||
#2 Jun 28 2012, 6:08 am
|
|
or u can create a mob/var/tnl and set it equal to w.e then do if(src.Exp>=tnl)//level up etc
| |
#3 Jun 28 2012, 6:23 am
|
|
i got that done all level up just wanted to know how can i make it so player earns more EXP when player kills higher level npc. in other terms how to calculate ammount of exp that player will earn killing Npc?
| |
#4 Jun 28 2012, 6:44 am
|
|
I would think you know how to do that. When a killer kills src, the killer gains half src's exp. This makes me think you're not using a level system, otherwise you would use src's level in killer.AddExp instead.
To answer your late question, all you want to do is factor in src.level in killer.AddExp instead of src.exp. Do you know what you're doing with the code you have? If not, start over and write code while you do know what you're doing. | |
Kaiochao wrote:
I would think you know how to do that. When a killer kills src, the killer gains half src's exp. This makes me think you're not using a level system, otherwise you would use src's level in killer.AddExp instead. sorry for not giving all the code
AddExp Proc
i want an quation that can help me give equal exp/100 | |||
#6 Jun 28 2012, 8:21 am
|
|||||
"help me give equal exp/100" doesn't make any sense.
Also, a few points.
This is incorrect. The expression "src.Exp/src.MaxExp" is the percentage of src.Exp to src.MaxExp. Instead, it should be the other way around, "src.MaxExp/src.Exp".
This is incorrect. Even assuming LevelsGained was correct, src.MaxExp changes for each level, so you can't simply multiply it. The simplest way with the least math involved is just to loop.
Also just to note, in AddExp:
| |||||
Also, (src.Exp * 100 / 50) = (src.Exp * 2)