Files
Anphillia_PRC8/_module/nss/anph_go_field.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

39 lines
886 B
Plaintext

#include "hc_inc"
#include "anph_inc"
#include "sql_inc"
#include "chr_inc"
#include "faction_inc"
void main()
{
object oPC = GetLastUsedBy();
if (GetMaster(oPC) != OBJECT_INVALID || !GetIsPC(oPC))
return;
location lJump;
fctn_UpdateReputation(oPC);
int nPCID = chr_GetPCID(oPC);
int nFaction = fctn_GetFaction(oPC);
if (sql_GetPCDead(nPCID))
{
lJump = fctn_GetFactionFugueLocation(nFaction);
WriteTimestampedLogEntry ("Creating corpse for " + GetName (oPC) + ", dead on enter.");
AnphSendCorpseHome(oPC);
}
else if (GetName(OBJECT_SELF) == "Wake up in the field!")
{
lJump = sql_GetPCLocation(chr_GetPCID(oPC));
}
else
{
lJump = fctn_GetFactionStartingLocation(nFaction);
}
AssignCommand (oPC, ClearAllActions ());
AssignCommand (oPC, JumpToLocation (lJump));
}