sclass AI_CurrentTimeBot > AttractorBot { // MAIN FUNCTION void sayTime { say("It is " + localTime_24()); } // FLOW START public void run { say("Do you want to know the current time?"); addAttractor(yes_SayTime); addLowPrioAttractor(sayOK); } // CONFIG *() { standardAttractors(doItAgain, whatsTheTime, talkToMe, whatCanYouDo, thanks, new MatchAttractor("can you do anything else", r { say("no") }), new MatchAttractor("what else can you do", r { say("nothing") })); } // ATTRACTORS MatchAttractor thanks = new("thanks|thank you|thx", r { say("You're welcome") }); MatchAttractor whatCanYouDo = new("what can you do...|what is your skill|who are you", r { say("I can tell you the time"); addAttractor(doIt); }); MatchAttractor doIt = new("do it|ok|i want that", r sayTime); MatchAttractor talkToMe = new("talk to me|hi|talk|say something", r run_public); MatchAttractor doItAgain = new("do it again|again|another time|do your trick again", r sayTime); MatchAttractor whatsTheTime = new("what's the time|tell me the time|time", r sayTime); Attractor yes_SayTime = new(f isYes_1, r sayTime); DefaultAttractor sayOK = new(r { say("OK") }); }