Sorry, I have one last question.
Can the script you made check to see if the player recieving the reward
is 5 levels or higher than the loser and if so reward nothing?
I haven't play tested this yet, but here's what i have in the onplayerdeath event.
#include "x2_inc_toollib"
#include "sd_score_inc"
// Baragg Script
void XPGReward(object oPlayer)
{
object oPlayer = GetLastHostileActor();
int nHD = GetHitDice(oPlayer);
int nBase = 100;
switch(nHD)
{
case 1: case 2: case 3: case 4: case 5:
SetXP(oPlayer, GetXP(oPlayer)+nBase); GiveGoldToCreature(oPlayer, nBase); break;
case 6: case 7: case 8: case 9: case 10:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*2)); GiveGoldToCreature(oPlayer, nBase*2); break;
case 11: case 12: case 13: case 14: case 15:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*3)); GiveGoldToCreature(oPlayer, nBase*3); break;
case 16: case 17: case 18: case 19: case 20:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*4)); GiveGoldToCreature(oPlayer, nBase*4); break;
case 21: case 22: case 23: case 24: case 25:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*5)); GiveGoldToCreature(oPlayer, nBase*5); break;
case 26: case 27: case 28: case 29: case 30:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*6)); GiveGoldToCreature(oPlayer, nBase*6); break;
case 31: case 32: case 33: case 34: case 35:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*7)); GiveGoldToCreature(oPlayer, nBase*7); break;
case 36: case 37: case 38: case 39: case 40:
SetXP(oPlayer, GetXP(oPlayer)+(nBase*
); GiveGoldToCreature(oPlayer, nBase*
; break;
}
}
void main()
{
object oPlayer = GetLastPlayerDied();
object oVictor = GetLastHostileActor(oPlayer);
object oArea = GetArea(oPlayer);
location lPillar = GetLocation(oPlayer);
string sArea = GetTag(oArea);
// Standard death code to all areas.
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect (VFX_COM_CHUNK_RED_LARGE), oPlayer, 3.0);
DelayCommand(5.0f, ForceRest(oPlayer));
if (sArea == "Arena")
{
XPGReward(oPlayer);
//FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(3.0f, respawnArena(oPlayer, oVictor));
}
else if (sArea == "TeamArena")
{
//FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(1.5f, respawnTeamArena(oPlayer, oVictor));
//respawnTeam(oPlayer, oVictor);
}
else if (sArea == "TeamArenaFFA")
{
XPGReward(oPlayer);
//FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(1.5f, respawnTeamArenaFFA(oPlayer, oVictor));
//respawnTeam(oPlayer, oVictor);
}
else if (sArea == "TrainingArena")
{
//FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(3.0f, respawnTraining(oPlayer, oVictor));
}
else if (sArea == "SummoningChamber")
{
TLVFXPillar(VFX_COM_CHUNK_RED_LARGE, lPillar, 10, 0.1, 0.5, 0.75);
FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(5.0f, respawnPVM(oPlayer));
}
else if (sArea == "FCPDPrison")
{
FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(5.0f, respawnJail(oPlayer));
}
else
{
FloatingTextStringOnCreature("** Respawn in 5 seconds **", oPlayer, FALSE);
DelayCommand(5.0f, respawnDefault(oPlayer));
}
}