Files
HeroesStone_PRC8/_module/nss/mog_onrest.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

39 lines
751 B
Plaintext

void main()
{
object oPlayer = GetLastPCRested();
int hp;
if (GetLastRestEventType()==REST_EVENTTYPE_REST_STARTED)
{
hp = GetCurrentHitPoints(oPlayer);
if (hp<1)
hp = 1;
SetLocalInt(oPlayer,"RestedHPStart",hp);
if (GetLocalInt(GetModule(),"RestAllow") != 1)
{
AssignCommand(oPlayer,ClearAllActions());
AssignCommand(oPlayer,SpeakString("The DM has deemed that there is no resting at this time, due to the current circumstances - find a spot or a situation that is more favorable to resting."));
SendMessageToAllDMs( "Player " + GetName(oPlayer) + " Wants to Rest.");
return;
}
SendMessageToAllDMs( "Player " + GetName(oPlayer) + " is RESTING");
}
}