NTSL Scripts: Difference between revisions
→Quiz Bot
imported>Giacom (→Recursive Implode: Recusion isn't recommended, use the loop implode instead.) |
imported>Giacom |
||
Line 359: | Line 359: | ||
// Quiz Bot - By Giacom | // Quiz Bot - By Giacom | ||
$time = time(); | |||
def GiveScore($name, $points) | def GiveScore($name, $points) | ||
Line 394: | Line 397: | ||
mem("number1", $numberY); | mem("number1", $numberY); | ||
mem("number2", $numberX); | mem("number2", $numberX); | ||
mem("lastAsked", time | mem("lastAsked", $time); | ||
mem("pointQuestion", $looped); | mem("pointQuestion", $looped); | ||
broadcast($question, $common, $quizMaster, $quizMaster); | broadcast($question, $common, $quizMaster, $quizMaster); | ||
} | } | ||
// Main() | |||
$quizMaster = "The Math Master"; | $quizMaster = "The Math Master"; | ||
Line 406: | Line 411: | ||
$pointQuestion = mem("pointQuestion"); | $pointQuestion = mem("pointQuestion"); | ||
$askNextQuestion = 15; // 15 seconds | $askNextQuestion = 15; // 15 seconds | ||
$explode = explode($content, " "); | $explode = explode($content, " "); |