Advertisement
slayyyter

[Black Lodge] Truth or Dare

Sep 3rd, 2020 (edited)
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.25 KB | None | 0 0
  1. admins={"Lanadelrey#1407", "Alicecat#7555", "Averie#9845", "Billierose#8536", "Drawingkl#0000", "Fluffy#3087", "Ninetailsdes#0000", "Trivia#3603", "Vanillarilli#0000", "Cookie_plz#0000", "Chubbiicheeks#3112", "Nonny#2103", "Vale#1941"}
  2. -- remember to put "," between each name!
  3.  
  4.  
  5. tfm.exec.disableAutoNewGame(true)
  6. tfm.exec.disableAfkDeath(true)
  7. tfm.exec.disableAutoShaman(true)
  8. tfm.exec.disableAutoScore(true)
  9. tfm.exec.newGame("@6411544")
  10.  
  11. players={}--respawn place is 400,320
  12. p={}
  13. timestamp=os.time()
  14. numplayers=0
  15.  
  16. begin=false
  17. answerer="lol"
  18. questioner="lol"
  19. question="lol"
  20. ans="lol"
  21. new=false
  22. restart=false
  23. choose=false
  24. start=true
  25. choosey=false
  26. skip=false
  27. message=""
  28. others={}
  29. summonobject=false
  30. timestamplol={}
  31. answererold=""
  32. one=false
  33. dance=false
  34. mapcomplete=false
  35.  
  36. truth={}--you can follow the format 'truth[number]="question"'
  37. truth[1]="Who is your crush in this game?"
  38. truth[2]="What is your favorite food?"
  39. truth[3]="Who is your role model/favorite person in game?"
  40. truth[4]="What games do you play besides Transformice?"
  41. truth[5]="What is your dream job?"
  42. truth[6]="What is your favorite Transformice memory?"
  43. truth[7]="What kind of phone do you have currently?"
  44. truth[8]="Do you prefer vanilla or racing? Why?"
  45. truth[9]="If you could hack Transformice once without punishment, what would you do?"
  46. truth[10]="What is your favorite fur in Transformice if you have to choose?"
  47. truth[11]="Why do you like Transformice?"
  48. truth[12]="When and why did you join Black Lodge?"
  49. truth[13]="What do you love most about yourself?"
  50. truth[14]="What is your biggest regret?"
  51. truth[15]="Do you have a crush?"
  52. truth[16]="If you could pick one person in this room to meet in real life, who would it be?"
  53. truth[17]="If you had unlimited cheese and fraises, what items would you buy from the shop?"
  54. truth[18]="Would you rather live forever or win 1 billion dollars?"
  55. truth[19]="What is your favorite board game?"
  56. truth[20]="What is the longest that you have ever been without taking a shower?"
  57. truth[21]="Have you ever eaten an insect before?"
  58. truth[22]="What is your favorite animal?"
  59. truth[23]="If you had a superpower, what would it be?"
  60. truth[24]="If you could be any animal, what would you be?"
  61. truth[25]="Who is your favorite BL moderator?"
  62. truth[26]="What is your impression of me?"
  63. truth[27]="Have you ever cheated on any test?"
  64. truth[28]="Have you ever been in a relationship?"
  65. truth[29]="If you were a billionaire, what would you spend your time doing?"
  66. truth[30]="What was your first impression of the tribe? Has it changed since then? If so, how?"
  67. truth[31]="What celebrity are you obsessed with?"
  68. truth[32]="What is your favorite sport?"
  69. truth[33]="What is your favorite song right now?"
  70. truth[34]="If you were stuck on an island with someone in this room, who would you choose?"
  71. truth[35]="If you had to marry, kiss, and punch someone in this room, who would they be?"
  72. truth[36]="Would rather be rich but dumb, or poor but clever?"
  73. truth[37]="How much cheese do you currently have?"
  74. truth[38]="If you could bring back one Transformice event from the past, which one would it be?"
  75. truth[39]="Who or what motivates and inspires you?"
  76. truth[40]="How much money have you spent on fraises?"
  77. truth[41]="In this room, who’s outfit is your favorite?"
  78. truth[42]="What inspired your username?"
  79.  
  80. dare={}--you can follow the format 'dare[number]="Dare"'
  81. dare[1]="I dare you to give me all of the cc you have in your inventory, if you have any."
  82. dare[2]="I dare you whisper a tribe moderator a swear word."
  83. dare[3]="I dare you tell your crush, or anybody in this room that you love them right now."
  84. dare[4]="I dare you to give 10 cc to your favorite person/people in the room."
  85. dare[5]="I dare you to add everyone in the room to your friends list."
  86. dare[6]="I dare you use all the fireworks that you have in your inventory right now in this room."
  87. dare[7]="Without context, I dare you to whisper an online friend that is not in the room the last thing you searched."
  88. dare[8]="Take 10 sips of water. After each sip, write one thing in the chat that makes you smile/laugh. Stay hydrated!"
  89. dare[9]="I dare you go into a public room and ask a random person to gift you a fur."
  90. dare[10]="I dare you give me every ball you have in your inventory, if you have any."
  91. dare[11]="I dare you to disconnect and reconnect right now."
  92. dare[12]="I dare you to do either 10 push ups or 25 squats right now."
  93. dare[13]="I dare you to give me all of the selfie sticks you have in your inventory, if you have any."
  94. dare[14]="I dare you complete this map without cheating!"
  95. dare[15]="I dare you to whisper 'I love you' to an online friend that is not currently in the room."
  96. dare[16]="I dare you kiss me 20 times!"
  97. dare[17]="I dare you to divorce your soulmate and marry me instead. If you don't have one, marry me anyways!"
  98. dare[18]="I dare you give me every snowball you have in your inventory, if you have any."
  99. dare[19]="I dare you whisper a tribe moderator, 'Ban me!'"
  100. dare[20]="I dare you kiss and hug someone in the room of the same gender"
  101. dare[21]="I dare you to whisper 'I AM A DUMB COWARD' to an online friend that is not currently in the room."
  102. dare[22]="I dare you ask your crush for a date."
  103. dare[23]="I dare you to go to a public room and say 'I WANT WAFFLES!'"
  104. dare[24]="I dare you go to a public room and ask everyone there to add you to their friends list."
  105. dare[25]="I dare you go to cafe and create a topic: 'GIFT ME A FUR!'"
  106. dare[26]="I dare you to go invite random people to the tribe until someone accepts."
  107. dare[27]="I dare you to do 20 jumping jacks right now."
  108.  
  109. function eventNewPlayer(name)
  110. ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name,50,365,700,40,0x324650,0x212F36,0.8,true)
  111. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
  112. p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
  113. local i=0
  114. while i<=#admins do
  115. if name==admins[i] then
  116. p[name].admin=true
  117. end
  118. i=i+1
  119. end
  120. end
  121.  
  122. function eventNewGame()
  123. ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Welcome to Truth or Dare Game!</font></p></b>",nil,50,365,700,40,0x324650,0x212F36,0.8,true)
  124. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",nil,100,50,600,true)
  125. answerer=""
  126. questioner=""
  127. begin=false
  128. start=true
  129. numplayers=0
  130. count=1
  131. one=false
  132. local i=0
  133. for name,player in pairs(tfm.get.room.playerList) do
  134. p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
  135. players[count]=name
  136. timestamp=os.time()
  137. numplayers=numplayers+1
  138. count=count+1
  139. p[name].spectator=false
  140. p[name].questioners=false
  141. local i=0
  142. while i<=#admins do
  143. if name==admins[i] then
  144. p[name].admin=true
  145. end
  146. i=i+1
  147. end
  148. end
  149. system.disableChatCommandDisplay("t", hidden)
  150. system.disableChatCommandDisplay("admin", hidden)
  151. system.disableChatCommandDisplay("restart", hidden)
  152. system.disableChatCommandDisplay("ban", hidden)
  153. system.disableChatCommandDisplay("skip", hidden)
  154. system.disableChatCommandDisplay("watch", hidden)
  155. system.disableChatCommandDisplay("unban", hidden)
  156. system.disableChatCommandDisplay("unadmin", hidden)
  157. end
  158.  
  159. function eventChatCommand(name,command)
  160. local IDList = {}
  161. if command=="clear" then
  162. for id, object in pairs(tfm.get.room.objectList) do
  163. table.insert(IDList, id)
  164. end
  165. for i, id in pairs(IDList) do
  166. tfm.exec.removeObject(id)
  167. end
  168. end
  169. if command=="s" and p[name].admin==true then
  170. tfm.exec.setShaman(name)
  171. elseif command=="dance" and p[name].admin==true then
  172. for name,player in pairs(tfm.get.room.playerList) do
  173. p[name].randomerino=math.random(1,3)
  174. end
  175. dance=true
  176. elseif command=="danceoff" and p[name].admin==true then
  177. dance=false
  178. elseif command=="mods" then
  179. message=""
  180. for k,v in pairs(tfm.get.room.playerList) do
  181. if p[k].admin==true then
  182. message=message..tostring(k)..", "
  183. end
  184. end
  185. ui.updateTextArea(1, "<p align='center'><b><font size='15'>The moderators are: "..string.sub(message,1,-3)..".</font></b></p>", name)
  186. elseif command=="new" and name==questioner then
  187. if p[name].new==false then
  188. print("true")
  189. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  190. answererold=answerer
  191. answerer=""
  192. choose=true
  193. p[name].new=true
  194. else
  195. ui.updateTextArea(1, "<p align='center'><b><font size='30'>You can only !new ONCE</font></b></p>", nil)
  196. end
  197. elseif command=="join" and p[name].spectator==true then
  198. if p[name].ban==false then
  199. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." joined the game! :D</font></b></p>", nil)
  200. tfm.exec.respawnPlayer(name)
  201. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  202. p[name].spectator=false
  203. table.insert(players,name)
  204. elseif p[name].ban==true then
  205. ui.updateTextArea(1, "<p align='center'><b><font size='30'>You have been banned, so u cannot join the game :(</font></b></p>", name)
  206. end
  207. elseif command=="skip" and p[name].admin==true then
  208. timestamp=os.time()
  209. skip=true
  210. elseif string.sub(command,0,1) == "t" and p[name].admin==true then
  211. message=string.sub(command,3)
  212. ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.."</font></b></p>", nil)
  213. elseif command=="restart" and p[name].admin==true then
  214. tfm.exec.newGame("@6411544")
  215. elseif string.sub(command,0,5)=="watch" then
  216. if string.sub(command,7)=="" then
  217. p[name].spectator=true
  218. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." is now a spectator :(</font></b></p>", nil)
  219. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",name)
  220. if name==questioner or name==answerer then
  221. questioner=""
  222. answerer=""
  223. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  224. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  225. timestamp=os.time()
  226. skip=true
  227. end
  228. for i=1,#players do
  229. if players[i]==name then
  230. table.remove(players,i)
  231. end
  232. end
  233. else
  234. if p[name].admin==true then
  235. message=string.sub(command,7)
  236. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  237. for k,v in pairs(tfm.get.room.playerList) do
  238. if k==message and p[k].spectator==false then
  239. if k==questioner or k==answerer then
  240. skip=true
  241. timestamp=os.time()
  242. end
  243. p[k].spectator=true
  244. ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..k.." is now a spectator :(</font></b></p>", nil)
  245. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",k)
  246. for i=1,#players do
  247. if players[i]==k then
  248. table.remove(players,i)
  249. end
  250. end
  251. end
  252. end
  253. end
  254. end
  255. elseif command=="help" then
  256. ui.addPopup(999,0,"<p align = 'center'><font size='40' face='impact'>Truth or Dare</font></p><font size='20' color='#FF0000'><b>About the game</b></font><font size='15'>\nEvery game, everyone will have the chance to be the Asker. On the first popup as an asker, u can click 'Yes' to randomize a answerer, or 'No' to type a particular person in room. This is similar for almost all other popups, where 'Yes' is for random and 'No' is for typing out yourself. If you are the asker, you can also type '#(number)' to give the question number of the truth/dare in the random list. There are currently <b>"..#truth.."</b> random truths and <b>"..#dare.."</b> random dares, so if you have any feedback feel free to tell me.\n<font color='#00FF00'>Created by Mousetat</font> \nForum Thread: atelier801.com//topic?f=6&t=814350&p=1 \n</font><font face='impact' size='30'>Type !commands to see the list of commands</font>",name,100,50,600,true)
  257. elseif command=="commands" then
  258. if p[name].admin==true then
  259. ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game\n<font size='20' color='#EB1D51'>ADMIN COMMANDS</font>\n!watch (username) to make the username a spectator.\n!s to become shaman\n!admin (username) to admin a person\n!dance/!danceoff to toggle dancing\n!t (message) to speak to all\n!restart to restart game if bugged\n!skip to skip a person's turn\n!ban (username) (reason) to ban a person(highly not advised)</b>",name,100,50,600,true)
  260. elseif p[name].admin==false then
  261. ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join to join the game if you are spectating or you just came into the room.\n!watch to be a spectator and get ignored in the game.\n!mods to see the current moderators in the room.\n!clear to clear all shaman objects.\n!new to get a new answerer(only new ONCE)(asker only)\n!help to see the information about game",name,100,50,600,true)
  262. end
  263. elseif string.sub(command,0,3)=="ban" and p[name].admin==true then
  264. local c=0
  265. local reason=""
  266. if string.find(command," ",5)==nil then
  267. message=string.sub(command,5)
  268. else
  269. c=string.find(command," ",5)
  270. print(c)
  271. message=string.sub(command,5,c-1)
  272. reason=string.sub(command,c+1)
  273. print(reason)
  274. end
  275. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  276. for k,v in pairs(tfm.get.room.playerList) do
  277. if message==k then
  278. ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." has been banned for 9999 hours. Reason: "..reason.."</font></b></p>", nil)
  279. p[message].ban=true
  280. tfm.exec.killPlayer(k)
  281. for i=1,#players do
  282. if players[i]==k then
  283. table.remove(players,i)
  284. end
  285. end
  286. end
  287. end
  288. elseif string.sub(command,0,5)=="unban" and p[name].admin==true then
  289. message=string.sub(command,7)
  290. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  291. for k,v in pairs(tfm.get.room.playerList) do
  292. if message==k then
  293. ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." has been unbanned.</font></b></p>", nil)
  294. p[message].ban=false
  295. tfm.exec.respawnPlayer(k)
  296. table.insert(players,k)
  297. end
  298. end
  299. elseif string.sub(command,0,5)=="admin" and p[name].admin==true then
  300. message=string.sub(command,7)
  301. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  302. for k,v in pairs(tfm.get.room.playerList) do
  303. if message==k then
  304. ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." is now a moderator. Congrats!</font></b></p>", nil)
  305. p[message].admin=true
  306. end
  307. end
  308. elseif string.sub(command,0,7)=="unadmin" and p[name].admin==true then
  309. message=string.sub(command,9)
  310. message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  311. for k,v in pairs(tfm.get.room.playerList) do
  312. if message==k then
  313. ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." is demoded. What a waste!</font></b></p>", nil)
  314. p[message].admin=false
  315. end
  316. end
  317. end
  318. end
  319.  
  320. function eventLoop(time,remaining)
  321. if time>1000 then
  322. if dance==true then
  323. for name,player in pairs(tfm.get.room.playerList) do
  324. if p[name].randomerino==1 then
  325. tfm.exec.playEmote(name,0,nil)
  326. elseif p[name].randomerino==2 then
  327. tfm.exec.playEmote(name,15,nil)
  328. elseif p[name].randomerino==3 then
  329. tfm.exec.playEmote(name,16,nil)
  330. end
  331. end
  332. end
  333. numplayers=#players
  334. for k,v in pairs(tfm.get.room.playerList) do
  335. if p[k].ban==true then
  336. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>You have been banned. :(</font></p></b>",k)
  337. elseif p[k].spectator==true then
  338. ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join to join the game.</font></p></b>",k)
  339. end
  340. end
  341. local IDList={}
  342. for id, object in pairs(tfm.get.room.objectList) do
  343. table.insert(IDList, id)
  344. end
  345. for i, id in pairs(IDList) do
  346. if others[id].summonobject==true and timestamplol[id]<os.time()-3000 then
  347. tfm.exec.removeObject(id)
  348. others[id].summonobject=false
  349. end
  350. end
  351. if numplayers<2 then
  352. one=true
  353. else
  354. one=false
  355. end
  356. if one==true then
  357. ui.updateTextArea(1, "<p align='center'><b><font size='15'>Minimum of 2 players are needed for this game to proceed.</font></b></p>", nil)
  358. timestamp=os.time()-4000
  359. elseif timestamp < os.time()-10000 and begin==false then
  360. timestamp=os.time()
  361. begin=true
  362. restart=false
  363. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Let's Begin the Game! </font></b></p>", nil)
  364. for name,player in pairs(tfm.get.room.playerList) do
  365. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  366. end
  367. elseif timestamp < os.time()-5000 and begin==false then
  368. local i=1
  369. local long=""
  370. local hname=""
  371. while i<=numplayers do
  372. hname=players[i]
  373. if p[hname].spectator==false and tfm.get.room.playerList[hname].isDead==false and p[hname].out==false then
  374. long=long..tostring(players[i])..", "
  375. end
  376. i=i+1
  377. end
  378. ui.updateTextArea(1, "<p align='center'><b><font size='15'>The participating players are: "..string.sub(long,1,-3)..".</font></b></p>", nil)
  379. elseif timestamp < os.time()-3000 and begin==false and restart==true then
  380. ui.updateTextArea(1, "<p align='center'><b><font size='20'>Since everyone had their turn, I'll restart the game...", nil)
  381. end
  382. if begin==true then
  383. if timestamp < os.time()-3000 and start==true then
  384. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  385. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  386. answerer=""
  387. questioner=""
  388. local j=1
  389. local i=0
  390. while j<=numplayers do
  391. pname=players[j]
  392. if p[pname].questioners==false and tfm.get.room.playerList[pname].isDead==false and p[pname].spectator==false and p[pname].out==false then
  393. i=i+1
  394. end
  395. j=j+1
  396. end
  397. if i>0 then
  398. eventTruthOrDare()
  399. else
  400. local j=1
  401. while j<=numplayers do
  402. local name=players[j]
  403. p[name].questioners=false
  404. j=j+1
  405. end
  406. restart=true
  407. timestamp=os.time()
  408. begin=false
  409. end
  410. end
  411. if choose==true and one==false then
  412. rand=math.random(1,numplayers)
  413. answerer=players[rand]
  414. if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or answerer==answererold or p[answerer].out==true then
  415. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
  416. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  417. answerer=""
  418. else
  419. choose=false
  420. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick truth or dare...</font></b>", nil)
  421. ui.addPopup(3,1,"You are the answerer! Do you want Truth? If No, you will choose Dare!",answerer,250,50,300,true)
  422. end
  423. elseif choosey==true and one==false then
  424. rand=math.random(1,numplayers)
  425. questioner=players[rand]
  426. if p[questioner].questioners==false and tfm.get.room.playerList[questioner].isDead==false and p[questioner].spectator==false or p[questioner].out==false then
  427. choosey=false
  428. p[questioner].questioners=true
  429. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is now the asker! Waiting to pick an answerer...</font></b>", nil)
  430. ui.addPopup(1,1,"Do you want a random Answerer? If <b>No</b>, you will have to type in your Answerer's username",questioner,250,50,300,true)
  431. else
  432. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Randomizing...</font></b></p>", nil)
  433. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  434. questioner=""
  435. end
  436. end
  437. if skip==true then
  438. ui.updateTextArea(1, "<p align='center'><b><font size='30'>Skipping turn...</font></b></p>", nil)
  439. tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  440. tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  441. answerer=""
  442. questioner=""
  443. if timestamp < os.time()-3000 then
  444. start=true
  445. skip=false
  446. end
  447. end
  448. tfm.exec.movePlayer(questioner,120,120,false,0,0,false)
  449. tfm.exec.movePlayer(answerer,680,120,false,0,0,false)
  450. end
  451. end
  452. end
  453.  
  454. function eventTruthOrDare()
  455. start=false
  456. ui.removeTextArea(2)
  457. ui.removeTextArea(3)
  458. choosey=true
  459. end
  460.  
  461. function eventPopupAnswer(id, name, answer)
  462. if id==1 and name==questioner then
  463. if answer=="yes" then
  464. answererold=""
  465. choose=true
  466. elseif answer=="no" then
  467. ui.addPopup(2,2,"Who do you want to be the answerer?",questioner,250,50,300,true)
  468. end
  469. elseif id==2 and name==questioner then
  470. x=1
  471. found=false
  472. answer=string.upper(string.sub(answer,0,1))..string.sub(answer,2)
  473. answer=string.gsub(answer, "<", "&lt;")
  474. answer=string.gsub(answer, "http", "")
  475. while x<=numplayers do
  476. print(players[x])
  477. if answer==players[x] then
  478. answerer=answer
  479. if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or p[answerer].out==true then
  480. answerer=""
  481. found=false
  482. else
  483. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is now the answerer! Waiting to pick Truth or Dare...</font></b>", nil)
  484. ui.addPopup(3,1,"You are the answerer! Do you want Truth? If <b>No</b>, you will choose Dare!",answerer,250,50,300,true)
  485. found=true
  486. end
  487. end
  488. x=x+1
  489. end
  490. if found==false then
  491. ui.addPopup(2,2,"There is no such answerer in the room. Type out the exact username of your answerer.",questioner,250,50,300,true)
  492. end
  493. elseif id==3 and name==answerer then
  494. if answer=="yes" then
  495. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Truth! Waiting for question from "..questioner.."...</font></b>", nil)
  496. ui.addPopup(4,1,"Do you want a random Truth question? If <b>No</b>, you will have to submit a question.",questioner,250,50,300,true)
  497. elseif answer=="no" then
  498. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has picked Dare! Waiting for a dare from "..questioner.."...</font></b>", nil)
  499. ui.addPopup(5,1,"Do you want a random Dare? If <b>No</b>, you will have to submit a Dare.",questioner,250,50,300,true)
  500.  
  501. end
  502. elseif id==4 and name==questioner then
  503. if answer=="yes" then
  504. question=truth[math.random(1,#truth)]
  505. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  506. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  507. ui.addPopup(8,2,"<b>Type your Truth answer below</b>",answerer,250,175,300,true)
  508.  
  509. elseif answer=="no" then
  510. ui.addPopup(6,2,"Type your Truth question below, or type #(number) for the question number from the random list.",questioner,250,50,300,true)
  511. end
  512. elseif id==5 and name==questioner then
  513. if answer=="yes" then
  514. question=dare[math.random(1,#dare)]
  515. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has randomed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  516. ui.addTextArea(2,"<b><font size='20'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  517. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  518. elseif answer=="no" then
  519. ui.addPopup(7,2,"Type your Dare below, or type #(number) for the dare number from the random list.",questioner,250,50,300,true)
  520. end
  521. elseif id==6 and name==questioner then
  522. answer=string.gsub(answer, "<", "&lt;")
  523. answer=string.gsub(answer, "http", "")
  524. if answer=="" then
  525. ui.addPopup(6,2,"You have to type something as your Truth question.",questioner,250,50,300,true)
  526. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#truth then
  527. question=truth[tonumber(string.sub(answer,2,3))]
  528. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  529. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  530. ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
  531. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#truth then
  532. ui.addPopup(6,2,"You have to type a Truth question number less than or equal to "..tostring(#truth),questioner,250,50,300,true)
  533. else
  534. question=answer
  535. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Truth question! Waiting for "..answerer.." to respond...</font></b>", nil)
  536. ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  537. ui.addPopup(8,2,"Type your Truth answer below",answerer,250,175,300,true)
  538. end
  539. elseif id==7 and name==questioner then
  540. answer=string.gsub(answer, "<", "&lt;")
  541. answer=string.gsub(answer, "http", "")
  542. if answer=="" then
  543. ui.addPopup(7,2,"You have to type something as your Dare.",questioner,250,50,300,true)
  544. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#dare then
  545. if tonumber(string.sub(answer,2,3))==14 then
  546. mapcomplete=true
  547. end
  548. question=dare[tonumber(string.sub(answer,2,3))]
  549. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  550. ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  551. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  552. elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#dare then
  553. ui.addPopup(7,2,"You have to type a Dare number less than or equal to "..tostring(#dare),questioner,250,50,300,true)
  554. else
  555. question=answer
  556. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Waiting for "..answerer.." to respond...</font></b>", nil)
  557. ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  558. ui.addPopup(9,1,"<b><font size='15'>Do what "..questioner.."dares you to do! If you click 'yes' you will promise that you will do your dare!</font><b>",answerer,250,175,300,true)
  559. end
  560. elseif id==8 and name==answerer then
  561. answer=string.gsub(answer, "<", "&lt;")
  562. answer=string.gsub(answer, "http", "")
  563. ans = answer
  564. if ans=="" then
  565. ui.addPopup(8,2,"You have to type something as your Truth Answer",answerer,250,175,300,true)
  566. else
  567. ui.addTextArea(3,"<b><font size='20'>Answer: "..ans.."</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  568. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has answered the question! Waiting for "..questioner.." to rate the answer</font></b>", nil)
  569. ui.addPopup(10,1,"<b><font size='15'>Are you satisfied with the answer?",questioner,250,50,300,true)
  570. end
  571. elseif id==9 and name==answerer then
  572. if answer=="yes" then
  573. ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", accepts the challenge and promises to do the dare.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  574. if mapcomplete==true then
  575. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! He/she will have to complete the map before entering the game. Starting new game...</font></b>", nil)
  576. p[answerer].out=true
  577. mapcomplete=false
  578. for i=1,#players do
  579. if players[i]==answerer then
  580. table.remove(players,i)
  581. end
  582. end
  583. else
  584. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a warrior! Starting new game...</font></b>", nil)
  585. end
  586. timestamp=os.time()
  587. answerer=""
  588. questioner=""
  589. start=true
  590. for name,player in pairs(tfm.get.room.playerList) do
  591. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  592. p[name].new=false
  593. print("false")
  594. end
  595. elseif answer=="no" then
  596. mapcomplete=false
  597. ui.updateTextArea(1, "<b><font size='15'>"..answerer.." is a coward! Starting new game...</font></b>", nil)
  598. ui.addTextArea(3,"<b><font size='20'>I, "..answerer..", am a coward so I don't dare to do what you dared me to do.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  599. timestamp=os.time()
  600. answerer=""
  601. questioner=""
  602. start=true
  603. for name,player in pairs(tfm.get.room.playerList) do
  604. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  605. p[name].new=false
  606. print("false")
  607. end
  608. end
  609. elseif id==10 and name==questioner then
  610. if answer=="yes" then
  611. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a satisfied with the answer! Starting new game...</font></b>", nil)
  612. timestamp=os.time()
  613. answerer=""
  614. questioner=""
  615. start=true
  616. for name,player in pairs(tfm.get.room.playerList) do
  617. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  618. p[name].new=false
  619. print("false")
  620. end
  621. elseif answer=="no" then
  622. ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a not satisfied with the answer...:( Starting new game...</font></b>", nil)
  623. timestamp=os.time()
  624. answerer=""
  625. questioner=""
  626. start=true
  627. for name,player in pairs(tfm.get.room.playerList) do
  628. tfm.exec.movePlayer(name,400,320,false,0,0,false)
  629. p[name].new=false
  630. print("false")
  631. end
  632. end
  633. end
  634. end
  635.  
  636. function eventPlayerLeft(name)
  637. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..name.." left the room... What a coward!</font></b></p>", nil)
  638. if questioner==name or answerer==name then
  639. timestamp=os.time()
  640. skip=true
  641. end
  642. for i=1,#players do
  643. if players[i]==name then
  644. table.remove(players,i)
  645. end
  646. end
  647. end
  648.  
  649. function eventPlayerDied(name)
  650. if p[name].spectator==false then
  651. tfm.exec.respawnPlayer(name)
  652. end
  653. if p[name].ban==true then
  654. tfm.exec.killPlayer(name)
  655. if name==questioner or name==answerer then
  656. timestamp=os.time()
  657. skip=true
  658. end
  659. end
  660. end
  661.  
  662. function eventPlayerWon(playerName,timeElapsed, timeElapsedSinceRespawn)
  663. tfm.exec.respawnPlayer(playerName)
  664. if p[playerName].out==true then
  665. p[playerName].out=false
  666. table.insert(players,playerName)
  667. print("yes")
  668. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds! He/she has joined back the game!</font></b></p>", nil)
  669. else
  670. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." completed the map in "..(timeElapsedSinceRespawn/100).." seconds!</font></b></p>", nil)
  671. end
  672. end
  673.  
  674. function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
  675. timestamplol[other.id]=os.time()
  676. others[other.id]={summonobject=true}
  677. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement