options: #Put your token here token: #The way game text is set #-----------------------# #gameMode: 1 - symbol by symbol every set amount of time #then after finishing full word, will repeat it a set amount of times #(by first set amount of time) #(to make sure that it's set if rate limited) #At the end before searching for a new word will wait a set amount of time #-----------------------# #gameMode: 2 - a word every set amount of time #then after setting the word, will repeat it a set amount of times #(by first set amount of time) #(to make sure that it's set if rate limited) #At the end before searching for a new word will wait a set amount of time #-----------------------# gameMode: 1 #-----------------------# #-----------------------# #------gameMode: 1------# #-----------------------# #-----------------------# #if "gameMode: 1" edit these parts to your liking #Minimum should be 200ticks (1 second is 20 ticks, so 10 secods) #every set amount of ticks will add 1 letter #-----------------------# GM1everyTicks: 300 #-----------------------# #(It's like making it stay, but also making sure that it's set) #will repeat a set amount of times after finished word every GM1everyTicks #Minimum should be at least 2 times, can set to as many as you want #-----------------------# GM1repeatTimes: 3 #-----------------------# #After finishing the word, and the GM1repeatTimes goes by #before searching for a new word will wait a set amount of ticks #Minimum should be 200ticks (1 second is 20 ticks, so 10 seconds) #-----------------------# GM1waitTicks: 500 #-----------------------# #-----------------------# #------gameMode: 1------# #-----------------------# #-----------------------# #------gameMode: 2------# #-----------------------# #-----------------------# #Minimum should be 200ticks (1 second is 20 ticks, so 10 secods) #every set amount of ticks will try to set a word #-----------------------# GM2everyTicks: 300 #-----------------------# #(It's like making it stay, but also making sure that it's set) #will repeat a set amount of times after finished word every GM2everyTicks #Minimum should be at least 2 times, can set to as many as you want #-----------------------# GM2repeatTimes: 2 #-----------------------# #After finishing the word, and the GM2repeatTimes goes by #before searching for a new word will wait a set amount of ticks #Minimum can be 0ticks (1 second is 20 ticks, so 0 seconds) #-----------------------# GM2waitTicks: 500 #-----------------------# #-----------------------# #------gameMode: 2------# #-----------------------# debug: true on load: clear {discordfun::*} bot "Me" is logged in: {@debug} = true: send("Bot ""Me"" is already logged in") else: {@debug} = true: send("Logged Me in") login to user with token "{@token}" with name "Me" on disable: clear {discordfun::*} function send(message: text): loop all players: loop-value has permission "discordfun.debug" send "%{_message}%" to loop-value function setGame(gameMode: integer, everyTicks: integer, repeatTimes: integer, waitTicks: integer): {discordfun::pass} is not set: set {discordfun::pass} to true set {_word} to random element out of file contents of "tags.txt" #maybe not needed "while {_word} is not set"? while {_word} is not set: {@debug} = true: {_amount} is not set: set {_amount} to 0 mod({_amount}, 20) = 0 send("Waiting for {_word} to be set in Gamemode: %{_gameMode}% (%{_amount}/20% seconds)") {discordfun::pass} is not set: set {_word} to "exit" send("Exited waiting for {_word} to be set xd because got of reload in Gamemode: %{_gameMode}%") wait 1 tick add 1 to {_amount} {_amount} >= 300: {@debug} = true: send("{_word} is not getting set (waited 300 ticks), setting to a default ""Help"" in Gamemode: %{_gameMode}%") set {_word} to "Help" clear {_amount} {@debug} = true: send("{_word} was set to ""&b%{_word}%&r"" in Gamemode: %{_gameMode}%") {_gameMode} = 1: set {_wait} to length of {_word} + {_repeatTimes} {_gameMode} = 2: set {_wait} to 1 + {_repeatTimes} while {discordfun::pass} is set: add 1 to {_count} {@debug} = true: send("{_word} in Gamemode: %{_gameMode}%") send("&c%{_word}%") {_gameMode} = 1: set {_repeat} to {_count} - length of {_word} {_repeat} < 0: set {_repeat} to 0 send("Currently at (Repeating: %{_repeat}%) in Gamemode: %{_gameMode}%") send("&a%{_count} first characters of {_word}%") {_gameMode} = 2: send("Currently at (Repeating: %{_count}-1%) in Gamemode: %{_gameMode}%") send("&a%{_word}%") {_gameMode} = 1: set game of bot "Me" to "%{_count} first characters of {_word}%" {_gameMode} = 2: set game of bot "Me" to "%{_word}%" {_count} >= {_wait}: loop {_waitTicks} times: {@debug} = true: mod((loop-value-1 - 1), 20) = 0: send("%(loop-value-1 - 1)%/%{_waitTicks}% ticks passed by GM%{_gameMode}%waitTicks in Gamemode: %{_gameMode}%") wait 1 tick {discordfun::pass} is not set exit loop clear {discordfun::pass} loop {_everyTicks} times: {@debug} = true: mod((loop-value-1 - 1), 20) = 0: send("%loop-value-1 - 1%/%{_everyTicks}% ticks passed by GM%{_gameMode}%everyTicks in Gamemode: %{_gameMode}%") wait 1 tick {discordfun::pass} is not set exit loop {@debug} = true: send("Exited while loop because of script reload or finished word in Gamemode: %{_gameMode}%") on every second: bot "Me" is logged in: {@gameMode} = 1: {@GM1everyTicks} < 200: {@debug} = true: send("Option GM1everyTicks is set too low, set it to 200 or higher") stop {@GM1repeatTimes} < 2: {@debug} = true: send("Option GM1repeatTimes is set too low, set it to 2 or higher") stop {@GM1waitTicks} < 200: {@debug} = true: send("Option GM1waitTicks is set too low, set it to 200 or higher") stop setGame({@gameMode},{@GM1everyTicks},{@GM1repeatTimes},{@GM1waitTicks}) {@gameMode} = 2: {@GM2everyTicks} < 200: {@debug} = true: send("Option GM2everyTicks is set too low, set it to 200 or higher") stop {@GM2repeatTimes} < 2: {@debug} = true: send("Option GM2repeatTimes is set too low, set it to 2 or higher") stop {@GM2waitTicks} < 0: {@debug} = true: send("Option GM2waitTicks is set too low, set it to 0 or higher") stop setGame({@gameMode},{@GM2everyTicks},{@GM2repeatTimes},{@GM2waitTicks}) else: {@debug} = true: send("Bot ""Me"" has still not connected (if it takes >1 minute, Token is at fault)")