Author Topic: Help on a death penalty  (Read 304 times)

Legacy_Surek

  • Full Member
  • ***
  • Posts: 169
  • Karma: +0/-0
Help on a death penalty
« on: December 24, 2012, 06:30:03 pm »


                I was looking for some help on a death penalty.  I’m not sure how to go about doing this. What
I would like to have happen is upon death the pc will lose 100 exp then it
would scale up by 50 each level.

So for example at level 1 they would lose 100 then at level
2 they would lose 150 then level 3 lose 200

I hope that makes sense any help on this would be greatly appreciated.
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Help on a death penalty
« Reply #1 on: December 24, 2012, 10:48:19 pm »


               If you are using the standard OnPlayerRespawn script you would just,

replace:

int nPenalty = 50 * GetHitDice(oDead);

with:

int nPenalty = 50 + (50 * GetHitDice(oDead));

But basically the second line is the formula needed for the XP loss that you want.