Skip to content

I want a copy of the code #2702

Answered by milutinke
Sage4483 asked this question in Q&A
Mar 9, 2024 · 1 comments · 13 replies
Discussion options

You must be logged in to vote

I need a script for chat bot to automatically sleep at a certain time so that it can be executed in MCC.thank you

You can use the Script Scheduler chat bot to run the bed command

For an example:

[[ChatBot.ScriptScheduler.TaskList]]
Task_Name = "Sleep"
Trigger_On_First_Login = false
Trigger_On_Login = false
Trigger_On_Times = { Enable = true, Times = [ 19:00:00, ] }
Trigger_On_Interval = { Enable = false, MinTime = 3.6, MaxTime = 4.8 }
Action = "bed sleep 50"

PS: This is for real world time.

For in-game time you could use something like this:

//MCCScript 1.0

MCC.LoadBot(new CheckForSleep());

//MCCScript Extensions

public class CheckForSleep : ChatBot
{
    private DateTime nextTaskRun =

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@Sage4483
Comment options

@Sage4483
Comment options

@Sage4483
Comment options

@Sage4483
Comment options

@Sage4483
Comment options

Answer selected by Sage4483
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants