generated from Jaysyn/ModuleTemplate
39 lines
751 B
Plaintext
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");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|