I have this script for now:
void main()
{
object oDead = GetLastRespawnButtonPresser();
int nXP = GetXP(oDead);
int nPenalty = 50 * GetHitDice(oDead);
int nHD = GetHitDice(oDead);
int nMin = ((nHD * (nHD - 1)) / 2) * 1000;
int nNewXP = nXP - nPenalty;
if (nNewXP < nMin)
nNewXP = nMin;
SetXP(oDead, nNewXP);
int nGoldToTake = FloatToInt(0.10 * GetGold(oDead));
if (nGoldToTake > 10000)
{
nGoldToTake = 10000;
}
AssignCommand (oDead, TakeGoldFromCreature(nGoldToTake, oDead, TRUE));
DelayCommand (4.0, FloatingTextStrRefOnCreature (58299, oDead, FALSE));
DelayCommand (4.8, FloatingTextStrRefOnCreature (58300, oDead, FALSE));
ApplyEffectToObject (DURATION_TYPE_INSTANT, EffectResurrection() ,oDead);
ApplyEffectToObject (DURATION_TYPE_INSTANT, EffectHeal (GetMaxHitPoints(oDead)) , oDead);
RemoveEffects (oDead);
}
I want add a script on module that player under level 4 lost only 50 px and money on death.
From 5 they lost 50px per level + 10%mo.
Someone could help me?
Thanks!