View Single Post
  #6  
Old 10-26-2008, 06:24 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just a thought, but couldn't we just set the rule to the % of a level we want to lose on death instead of predefined options?

common/ruletypes.h
Code:
RULE_REAL ( Character, DeathExpLossLevelPercent, 20) //1 yellow of exp lost on death by default. float for a little more accuracy if needed
zone/attack.cpp
Code:
// figure out if they should lose exp
	float loss = RuleR(Character, DeathExpLossLevelPercent) / 100.0f;
	exploss=(int)((float)GetEXP() * (loss)); //Angelox: loose % of total XP
SQL:
Code:
INSERT INFO rule_values VALUES (0, 'Character:DeathExpLossLevelPercent', 20);
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote