ID:158133   Oct 23 2009, 2:29 pm 1. How do I make it to where if the certain level experience is above a certain number it makes the level go up? EX: If mob/var/attackexp is > than 100 mob/var/attacklvl = 1 2. How would I make a variable or somthing to add on to a certain verb that adds a certain amount of experience? EX: when mob/monster/rat/verb/attack is called add 10 to attackexp but if they die do not add anything. 3. How would I do ,"if mob/var/healthlvl = 1 mob/var/health = 10",? Please express the answers to these questions in code because I am very stupid. Sorry if these questions don't make sense to you, I am trying.
 #1 Oct 23 2009, 2:38 pm Kokomo0020 wrote: 1. How do I make it to where if the certain level experience is above a certain number it makes the level go up? EX: If mob/var/attackexp is > than 100 mob/var/attacklvl = 1 Whenever you modify variable X, check the conditions and - if applicable - change variable Y. This would be something you'd put in a proc, IE: mob/proc/addAttackExp(var/N) 2. How would I make a variable or somthing to add on to a certain verb that adds a certain amount of experience? EX: when mob/monster/rat/verb/attack is called add 10 to attackexp but if they die do not add anything. By adding to the variable in the verb. 3. How would I do ,"if mob/var/healthlvl = 1 mob/var/health = 10",? Please express the answers to these questions in code because I am very stupid. Sorry if these questions don't make sense to you, I am trying. See 1.
1.)
 ```if(src.exp>=src.expneeded) src.level++ ```

2.)
 ```mob/verb/Add_Exp(n as number) src.exp+=n ```

And I'm not quite sure what you mean by the last one.
1.
 ```if(attackexp >= 100) attacklvl++ attackexp = 0 ```

2.
 ```mob/verb/attack() Monsters[] for(var/mob/M in view(1, src)) Monsters += M var/target = input("Who do you want to attack?") as null|anything in Monsters if(target) ..() // add in the "attacking" stuff here if(target.HP <= 0) exp += 10 target.Death() ```

3.
 ```if(HPlvl == 1) HP = 10 // or MaxHP ```

OR
 ```if(HPlvl > 0) MaxHP = HPlvl*10 ```

DM Guide