Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
40
_module/nss/rd_deathspawn.nss
Normal file
40
_module/nss/rd_deathspawn.nss
Normal file
@@ -0,0 +1,40 @@
|
||||
#include "nw_i0_plot"
|
||||
#include "utl_i_sqluuid"
|
||||
|
||||
void main()
|
||||
{
|
||||
int iLevel;
|
||||
int iDeaths;
|
||||
int iDeathAllowed;
|
||||
int iXPPrice;
|
||||
int iGPPrice;
|
||||
string sDestTag;
|
||||
string sMsg;
|
||||
object oPC;
|
||||
object oSpawnPoint;
|
||||
|
||||
oPC = GetPCSpeaker();
|
||||
if (SQLocalsUUID_GetInt(oPC,"ModRank") == 1)
|
||||
SendMessageToPC(oPC,"You are no longer eligible for campaign ranking...");
|
||||
SQLocalsUUID_SetInt(oPC,"ModRank",0);
|
||||
iLevel = GetHitDice(oPC);
|
||||
|
||||
iDeaths = SQLocalsUUID_GetInt(oPC,"PCDeaths");
|
||||
iDeathAllowed = 3 + iLevel - SQLocalsUUID_GetInt(oPC,"PCEnterLevel");
|
||||
|
||||
iXPPrice = iLevel * 200 + (iDeaths-iDeathAllowed) * 200;
|
||||
|
||||
sMsg = "You have paid the price for life.";
|
||||
SendMessageToPC(oPC,sMsg);
|
||||
|
||||
SetXP(oPC,GetXP(oPC) - iXPPrice);
|
||||
|
||||
if (SQLocalsUUID_GetInt(oPC,"Monstrous") == 0 && SQLocalsUUID_GetInt(oPC,"EvilPath") == 0)
|
||||
sDestTag = "EN4_Respawn";
|
||||
else
|
||||
sDestTag="EN4_MERespawn";
|
||||
|
||||
oSpawnPoint = GetObjectByTag(sDestTag);
|
||||
AssignCommand(oPC,JumpToLocation(GetLocation(oSpawnPoint)));
|
||||
|
||||
}
|
Reference in New Issue
Block a user