void main() { if ( GetTag( GetItemActivated() ) == "SleepActivatorToy") { if (GetLocalInt(GetModule(),"RestAllow") == 1) { SetLocalInt(GetModule(),"RestAllow",0); SpeakString("Resting Disabled",TALKVOLUME_SHOUT); return; } if (GetLocalInt(GetModule(),"RestAllow") == 0) { SetLocalInt(GetModule(),"RestAllow",1); SpeakString("Resting Enabled",TALKVOLUME_SHOUT); return; } } }