LoD_PRC8/_module/nss/m_onplayerrest.nss
Jaysyn904 94990edc60 Initial Upload
Initial Upload
2023-09-21 21:20:34 -04:00

31 lines
744 B
Plaintext

int IsSavingZone(string sAreaTag)
{
int iTF;
// Area tags in this section show valid locations for saving OnRest
if (sAreaTag == "sf_swrural" ||
sAreaTag == "ForgottenCity" ||
sAreaTag == "Faneadar" ||
sAreaTag == "ClemmensShire" ||
sAreaTag == "WheresTheDamShop"
)
{ return TRUE; }
else return FALSE;
}
void main()
{
object oPC = GetLastPCRested();
string sAreaTag = GetTag(GetArea(oPC));
if (GetIsObjectValid(oPC))
{
if(IsSavingZone(sAreaTag) && GetLastRestEventType() == REST_EVENTTYPE_REST_FINISHED)
{
ExportSingleCharacter(oPC);
SendMessageToPC(oPC, "You have successfully exported your character to the Server Vault!");
}
}
}