(Script would run off conversation)
Relevel Script
Débuté par
Kingdom_Of_Hearts
, déc. 20 2012 04:39
#1
Posté 20 décembre 2012 - 04:39
I need a script to relevel their last level. Also, I need to make sure that they don't relevel to max appraise and relevel to retake their skills.. Help please?
Thanks
(Script would run off conversation)
(Script would run off conversation)
#2
Posté 20 décembre 2012 - 11:37
A little more clarity will help us to help you. You've said when you DON'T want them to be able to relevel - what about when you DO want to allow it? Bear in mind that appraise is only one potential way to abuse such a system.
The mechanic for dropping someone to their last level is simple:
If you want to relevel them, just get their xp, and after you delevel, reset it back to where it was. Like so:
Funky
The mechanic for dropping someone to their last level is simple:
void DelevelPC (object oPC) {
int nLevel = GetHitDice(oPC);
int nNewXP = ((nLevel * (nLevel - 1)) / 2 * 1000) - 1;
SetXP(oPC, nNewXP);
}If you want to relevel them, just get their xp, and after you delevel, reset it back to where it was. Like so:
//this function will drop them to 1 xp below what they need for their present level
void DelevelPC (object oPC) {
int nLevel = GetHitDice(oPC);
int nNewXP = ((nLevel * (nLevel - 1)) / 2 * 1000) - 1;
SetXP(oPC, nNewXP);
}
void main() {
object oPC = GetPCSpeaker();
int nXP = GetXP(oPC);
DelevelPC(oPC);
SetXP(oPC, nXP);
}Funky
Modifié par FunkySwerve, 20 décembre 2012 - 11:38 .





Retour en haut






