38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
// Returns the PC to a respawn point according to their race.
|
|
// Usage: * place on OnRespawn of the module.
|
|
|
|
#include "nw_i0_plot"
|
|
#include "lod_include"
|
|
|
|
void main()
|
|
{
|
|
// heal and resurrect them
|
|
object oPC = GetLastRespawnButtonPresser ();
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectResurrection(), oPC);
|
|
ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(GetMaxHitPoints(oPC)), oPC);
|
|
RemoveEffects(oPC);
|
|
|
|
string sRespawnPoint = "WP_DEFAULT_SPAWN";
|
|
|
|
ApplyPenalty(oPC);
|
|
AssignCommand(oPC, JumpToLocation(GetLocation(GetObjectByTag(sRespawnPoint))));
|
|
|
|
SetCampaignInt("p_death","is_dead", FALSE, oPC);
|
|
|
|
//This is for balance hide. It is removed when someone leaves server and if he does so as dead and
|
|
//logs back as dead the balance hide can't be equipped so it is only created in invetory...
|
|
//This is here to check that.
|
|
//Ba'al
|
|
int nPale = GetLevelByClass(CLASS_TYPE_PALE_MASTER, oPC);
|
|
int nRDD = GetLevelByClass(CLASS_TYPE_DRAGON_DISCIPLE, oPC);
|
|
object oOldHide = GetItemInSlot(INVENTORY_SLOT_CARMOUR, oPC);
|
|
if(nPale >= 1 || nRDD >= 8)
|
|
{
|
|
if(!GetIsObjectValid(oOldHide))
|
|
{
|
|
ExecuteScript("bb_balancehisc", oPC);
|
|
}
|
|
}
|
|
}
|
|
|