Advertisement
Ylir

Adevar si provocare

Aug 12th, 2016
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 32.30 KB | None | 0 0
  1. admins={"Ylir", "Luarylaury", "Thismustard", "Beautyadell", "Mousetat"}
  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]="Cine este crush-ul tau în acest joc?"
  38. truth[2]="Care este mâncarea ta preferată?"
  39. truth[3]="Cine este persoana ta favorită din joc?"
  40. truth[4]="Ce altceva mai joci înafara de Transformice?"
  41. truth[5]="Ce ți-ar placea sa fii când o sa crești mare?"
  42. truth[6]="Ți-ai supt degetul mijlociu vreodată?"
  43. truth[7]="Ce marcă de telefon ai în prezent?"
  44. truth[8]="Te-ai bașit vreodată în fața unui prieten/profesor etc. în viața reală?"
  45. truth[9]="Dacă ai putea sa folosești hack pe transformice, care ar fi acesta?"
  46. truth[10]="Care este culoarea sau blănița ta preferata din transformice?"
  47. truth[11]="Ce îți place la transformice? (un raspuns scurt)"
  48. truth[12]="Ce uraști cel mai mult la tine?"
  49. truth[13]="Ce iubești cel mai mult la tine?"
  50. truth[14]="Te iubești sau te uraști mai mult și spune-ne de ce."
  51. truth[15]="Ce îți place cel mai mult de la crush-ul din viața reală, în termeni de personalitate și termeni fizici?"
  52. truth[16]="Tell us why you hate the person you currently hate in real life, in personality terms."
  53. truth[17]="Dacă ai putea sa-ți cumperi un item pe gratis, care ar fi acesta?"
  54. truth[18]="Ai alege sa ai un milion de dolari sau sa traiești cu 30 de ani mai mult?"
  55. truth[19]="Care este jocul tau preferat de pe Androi/iOS?"
  56. truth[20]="Care este cel mai lung timp pe care l-ai petrecut fara sa faci duș?"
  57. truth[21]="Ai mâncat vreodata vreo insecta?"
  58. truth[22]="Dacă ai putea fi un personaj negativ, pe cine ai alege?"
  59. truth[23]="Dacă ai putea fi un super erou, pe cine ai alege?"
  60. truth[24]="Dacă ai putea fi o insectă, care ai fi?"
  61. truth[25]="De cine îți place cel mai mult din staff-ul jocului? (Admin/Moderator/Sentinels/Mapcrew/Funcorp)"
  62. truth[26]="Care este impresia ta despre mine?"
  63. truth[27]="Ai copiat vreodata la un test?"
  64. truth[28]="Câți iubiți, respectiv iubite, ai avut în total?"
  65. truth[29]="Dacă ai fi cel mai bogat om din lume, cum ți-ai petrece majoritatea timpul?"
  66. truth[30]="Dacă ai putea fi șeful unei companii de renume pentru o zi, ce ai face?"
  67. truth[31]="Dupa ce celebritate ești obesat/ă cel mai mult?"
  68. truth[32]="Care este echipa ta favorită? (orice sport)"
  69. truth[32]="Care este melodia ta preferată?"
  70. truth[33]="Ești pe o insulă cu înca o persoana, cine ți-ai dori sa fie? (acea persoana trebuie să fie pe sală)"
  71. truth[34]="Daca ai putea sa saruți pe cineva din aceasta sală, cine ar fi?"
  72. truth[35]="Ai prefera sa fii bogat dar prost sau sarac și deștept?"
  73.  
  74.  
  75. dare={}--you can follow the format 'dare[number]="Dare"'
  76. dare[1]="Te provoc să te duci pe sala 2 și spamezi de 10 ori: CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE CHARLOTTE"
  77. dare[2]="Te provoc să-i șoptești unui moderator un cuvânt urât."
  78. dare[3]="Te provoc să îi spui unei persoane de pe sală că o iubești"
  79. dare[4]="Te provoc să te duci pe sala 2 și spamezi de 10 ori: I'M FLOODING REPORT ME!"
  80. dare[5]="Te provoc să raportezi un moderator pentru hacking"
  81. dare[6]="Te provoc să îți creezi un cont nou cu un nume similar a unui moderator online și să-i șoptești: Hallo buddy!"
  82. dare[7]="Te provoc să îți spui numele real pe chat"
  83. dare[8]="Te provoc să ne dai o poză cu tine din realitate"
  84. dare[9]="Te provoc să te duci pe orice sală de #utility cu cel puțin 3 playeri și să faci flood."
  85. dare[10]="Te provoc să-mi dai 3 iteme din inventar."
  86. dare[11]="Te provoc să te deconectezi și să te reconectezi chiar acum."
  87. dare[12]="I dare you to say who would be your most likely crush among the players in this room we are in."
  88. dare[13]="Te provoc să faci 3 selfie-uri cu mine."
  89. dare[14]="Te provoc să faci această mapă fară să trișezi."
  90. dare[15]="Te provoc să spui 'TE IUBESC (username)' de 5 ori în chatul tribului."
  91. dare[16]="Te provoc să mă săruți de 10 ori <3 "
  92. dare[17]="Te provoc să te căsătorești cu cel mai bun prieten de pe joc, asta dacă nu esți casătorit/ă deja"
  93. dare[18]="Te provoc să-i spui 'LA MULȚI ANI' unui jucator random de pe sala 3."
  94. dare[19]="Te provoc să-i șoptești unui moderator, 'I'm evil!! Ban me!'"
  95. dare[20]="Te provoc să săruți și să săruți pe cineva de același sex"
  96. dare[21]="Te provoc să spui de 5 ori 'Îmi place mămăliga!!!' pe chatul public"
  97. dare[22]="Te provoc să-ți inviți crush-ul la o întâlnire."
  98. dare[23]="Te provoc să îi șoptești unui moderator, 'HEY <numele moderatorului>, I'M YOUR DAD'"
  99.  
  100. function eventNewPlayer(name)
  101.     ui.addTextArea(1,"<b><p align = 'center'><font size='30'>Tastează !join - să te alături jocului.</font></p></b>",name,50,365,700,40,0x324650,0x212F36,0.8,true)
  102.     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)
  103.     p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
  104.     local i=0
  105.     while i<=#admins do
  106.     if name==admins[i] then
  107.         p[name].admin=true
  108.     end
  109.     i=i+1
  110.     end
  111. end
  112.  
  113. function eventNewGame()
  114.     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)
  115.     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. Translated by Ylir</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)
  116.     answerer=""
  117.     questioner=""
  118.     begin=false
  119.     start=true
  120.     numplayers=0
  121.     count=1
  122.     one=false
  123.     local i=0
  124.     for name,player in pairs(tfm.get.room.playerList) do
  125.         p[name]={questioners=false, admin=false, spectator=true, ban=false, randomerino=1, out=false, new=false}
  126.         players[count]=name
  127.         timestamp=os.time()
  128.         numplayers=numplayers+1
  129.         count=count+1
  130.         p[name].spectator=false
  131.         p[name].questioners=false
  132.         local i=0
  133.         while i<=#admins do
  134.         if name==admins[i] then
  135.             p[name].admin=true
  136.         end
  137.         i=i+1
  138.         end
  139.     end
  140.     system.disableChatCommandDisplay("t", hidden)
  141.     system.disableChatCommandDisplay("admin", hidden)
  142.     system.disableChatCommandDisplay("restart", hidden)
  143.     system.disableChatCommandDisplay("ban", hidden)
  144.     system.disableChatCommandDisplay("skip", hidden)
  145.     system.disableChatCommandDisplay("watch", hidden)
  146.     system.disableChatCommandDisplay("unban", hidden)
  147.     system.disableChatCommandDisplay("unadmin", hidden)
  148.     end
  149.  
  150. function eventChatCommand(name,command)
  151.     local IDList = {}
  152.     if command=="clear" then
  153.         for id, object in pairs(tfm.get.room.objectList) do
  154.             table.insert(IDList, id)
  155.         end
  156.         for i, id in pairs(IDList) do
  157.             tfm.exec.removeObject(id)
  158.         end
  159.     end
  160.     if command=="s" and p[name].admin==true then
  161.         tfm.exec.setShaman(name)
  162.     elseif command=="dance" and p[name].admin==true then
  163.         for name,player in pairs(tfm.get.room.playerList) do
  164.             p[name].randomerino=math.random(1,3)
  165.         end
  166.         dance=true
  167.     elseif command=="danceoff" and p[name].admin==true then
  168.         dance=false
  169.     elseif command=="mods" then
  170.         message=""
  171.         for k,v in pairs(tfm.get.room.playerList) do
  172.             if p[k].admin==true then
  173.                 message=message..tostring(k)..", "
  174.             end
  175.         end
  176.     ui.updateTextArea(1, "<p align='center'><b><font size='15'>Moderatorii sunt: "..string.sub(message,1,-3)..".</font></b></p>", name)
  177.     elseif command=="new" and name==questioner then
  178.         if p[name].new==false then
  179.         print("true")
  180.         tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  181.         answererold=answerer
  182.         answerer=""
  183.         choose=true
  184.         p[name].new=true
  185.         else
  186.         ui.updateTextArea(1, "<p align='center'><b><font size='30'>You can only !new ONCE</font></b></p>", nil)
  187.         end
  188.     elseif command=="join" and p[name].spectator==true then
  189.         if p[name].ban==false then
  190.             ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." s-a alăturat jocului! :D</font></b></p>", nil)
  191.             tfm.exec.respawnPlayer(name)
  192.             tfm.exec.movePlayer(name,400,320,false,0,0,false)
  193.             p[name].spectator=false
  194.             table.insert(players,name)
  195.         elseif p[name].ban==true then
  196.             ui.updateTextArea(1, "<p align='center'><b><font size='30'>Ai fost banat, deci nu poți să te alături jocului:(</font></b></p>", name)
  197.         end
  198.     elseif command=="skip" and p[name].admin==true then
  199.         timestamp=os.time()
  200.         skip=true
  201.     elseif string.sub(command,0,1) == "t" and p[name].admin==true then
  202.         message=string.sub(command,3)
  203.         ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.."</font></b></p>", nil)
  204.     elseif command=="restart" and p[name].admin==true then
  205.         tfm.exec.newGame("@6411544")
  206.     elseif string.sub(command,0,5)=="watch"  then
  207.         if string.sub(command,7)=="" then
  208.             p[name].spectator=true
  209.                 ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..name.." este acum spectator :(</font></b></p>", nil)
  210.                 ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join să te alături jocului.</font></p></b>",name)
  211.             if name==questioner or name==answerer then
  212.                 questioner=""
  213.                 answerer=""
  214.                 tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  215.                 tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  216.                 timestamp=os.time()
  217.                 skip=true
  218.             end
  219.             for i=1,#players do
  220.                 if players[i]==name then
  221.                     table.remove(players,i)
  222.                 end
  223.             end
  224.         else
  225.             if p[name].admin==true then
  226.                 message=string.sub(command,7)
  227.                 message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  228.                 for k,v in pairs(tfm.get.room.playerList) do
  229.                     if k==message and p[k].spectator==false then
  230.                         if k==questioner or k==answerer then
  231.                             skip=true
  232.                             timestamp=os.time()
  233.                         end
  234.                         p[k].spectator=true
  235.                         ui.updateTextArea(1, "<p align='center'><b><font size='30'>"..k.." este acum spectator :(</font></b></p>", nil)
  236.                         ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join să te alături jocului.</font></p></b>",k)
  237.                         for i=1,#players do
  238.                             if players[i]==k then
  239.                                 table.remove(players,i)
  240.                             end
  241.                         end
  242.                     end
  243.                 end
  244.             end
  245.         end
  246.     elseif command=="help" then
  247.         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)
  248.     elseif command=="commands" then
  249.     if p[name].admin==true then
  250.     ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMENZI</font>\n!join să te alături jocului dacă ești spectator sau ai venit de pe altă sală.\n!watch devi spectator.\n!mods să vezi toți moderatorii curenți pe această sală.\n!clear să înlături toate obiectele invocate de șaman.\n!new să pui pe altcineva să îți raspundă la întrebare(doar o altă persoană)(asker only).\n!help să vezi informațiile despre joc.\n<font size='20' color='#EB1D51'>COMENZILE ADMINULUI</font>\n!watch (nume) să faci pe cineva spectator.\n!s (nume) să devină șaman.\n!admin (nume) să faci pe cineva admin\n!dance/!danceoff faci pe toți să/să nu danseze.\n!t (message) să scrii un mesaj tuturor de pe sală.\n!restart să dai restart la joc (dacă e buguit).\n!skip să sari peste rândul cuiva.\n!ban (nume) (motiv) să banezi pe cinveva (nu este atenționat.)</b>",name,100,50,600,true)
  251.     elseif p[name].admin==false then
  252.     ui.addPopup(999,0,"<b><font size='20' color='#FFFF00'>COMMANDS</font>\n!join să te alături jocului dacă ești spectator sau ai venit de pe altă sală.\n!watch devi spectator.\n!mods să vezi toți moderatorii curenți pe această sală.\n!clear să înlături toate obiectele invocate de șaman.\n!new să pui pe altcineva să îți raspundă la întrebare(doar o altă persoană)(asker only).\n!help să vezi informațiile despre joc.",name,100,50,600,true)
  253.     end
  254.     elseif string.sub(command,0,3)=="ban" and p[name].admin==true then
  255.         local c=0
  256.         local reason=""
  257.         if string.find(command," ",5)==nil then
  258.             message=string.sub(command,5)
  259.         else
  260.             c=string.find(command," ",5)
  261.             print(c)
  262.             message=string.sub(command,5,c-1)
  263.             reason=string.sub(command,c+1)
  264.             print(reason)
  265.         end
  266.         message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  267.         for k,v in pairs(tfm.get.room.playerList) do
  268.             if message==k then
  269.                 ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." a fost banat pentru 9999 ore. Motiv: "..reason.."</font></b></p>", nil)
  270.                 p[message].ban=true
  271.                 tfm.exec.killPlayer(k)
  272.                 for i=1,#players do
  273.                     if players[i]==k then
  274.                         table.remove(players,i)
  275.                     end
  276.                 end
  277.             end
  278.         end
  279.     elseif string.sub(command,0,5)=="unban" and p[name].admin==true then
  280.         message=string.sub(command,7)
  281.         message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  282.         for k,v in pairs(tfm.get.room.playerList) do
  283.             if message==k then
  284.                 ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." a fost debanat.</font></b></p>", nil)
  285.                 p[message].ban=false
  286.                 tfm.exec.respawnPlayer(k)
  287.                 table.insert(players,k)
  288.             end
  289.         end
  290.     elseif string.sub(command,0,5)=="admin" and p[name].admin==true then
  291.         message=string.sub(command,7)
  292.         message=string.upper(string.sub(message,0,1))..string.sub(message,2)
  293.         for k,v in pairs(tfm.get.room.playerList) do
  294.             if message==k then
  295.                 ui.updateTextArea(1, "<p align='center'><b><font size='15' color='#ED67EA'>[~#T/D Moderation] "..message.." este acum moderator!</font></b></p>", nil)
  296.                 p[message].admin=true
  297.             end
  298.         end
  299.     elseif string.sub(command,0,7)=="unadmin" and p[name].admin==true then
  300.         message=string.sub(command,9)
  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.." nu mai este moderator!</font></b></p>", nil)
  305.                 p[message].admin=false
  306.             end
  307.         end
  308.     end
  309. end
  310.  
  311. function eventLoop(time,remaining)
  312.     if dance==true then
  313.         for name,player in pairs(tfm.get.room.playerList) do
  314.             if p[name].randomerino==1 then
  315.                 tfm.exec.playEmote(name,0,nil)
  316.             elseif p[name].randomerino==2 then
  317.                 tfm.exec.playEmote(name,15,nil)
  318.             elseif p[name].randomerino==3 then
  319.                 tfm.exec.playEmote(name,16,nil)
  320.             end
  321.         end
  322.     end
  323.     numplayers=#players
  324.     for k,v in pairs(tfm.get.room.playerList) do
  325.         if p[k].ban==true then
  326.             ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Ai fost banat. :(</font></p></b>",k)
  327.         elseif p[k].spectator==true then
  328.             ui.updateTextArea(1,"<b><p align = 'center'><font size='30'>Type !join să te alături jocului.</font></p></b>",k)
  329.         end
  330.     end
  331.     local IDList={}
  332.     for id, object in pairs(tfm.get.room.objectList) do
  333.         table.insert(IDList, id)
  334.     end
  335.     for i, id in pairs(IDList) do
  336.         if others[id].summonobject==true and timestamplol[id]<os.time()-3000 then
  337.             tfm.exec.removeObject(id)
  338.             others[id].summonobject=false
  339.         end
  340.     end
  341.     if numplayers<2 then
  342.         one=true
  343.     else
  344.         one=false
  345.     end
  346.     if one==true then
  347.         ui.updateTextArea(1, "<p align='center'><b><font size='15'>Sunt necesari cel puțin 2 jucători ca jocul să continue</font></b></p>", nil)
  348.         timestamp=os.time()-4000
  349.     elseif timestamp < os.time()-10000 and begin==false then
  350.         timestamp=os.time()
  351.         begin=true
  352.         restart=false
  353.         ui.updateTextArea(1, "<p align='center'><b><font size='30'>Să începem jocul! </font></b></p>", nil)
  354.         for name,player in pairs(tfm.get.room.playerList) do
  355.             tfm.exec.movePlayer(name,400,320,false,0,0,false)
  356.         end
  357.     elseif timestamp < os.time()-5000 and begin==false then
  358.         local i=1
  359.         local long=""
  360.         local hname=""
  361.         while i<=numplayers do
  362.             hname=players[i]
  363.             if p[hname].spectator==false and tfm.get.room.playerList[hname].isDead==false and p[hname].out==false then
  364.                 long=long..tostring(players[i])..", "
  365.             end
  366.             i=i+1
  367.         end
  368.         ui.updateTextArea(1, "<p align='center'><b><font size='15'>Participanții sunt: "..string.sub(long,1,-3)..".</font></b></p>", nil)
  369.     elseif timestamp < os.time()-3000 and begin==false and restart==true then
  370.         ui.updateTextArea(1, "<p align='center'><b><font size='20'>Din moment ce a fost rândul fiecăruia, se restartează jocul...", nil)
  371.     end
  372.     if begin==true then
  373.         if timestamp < os.time()-3000 and start==true then
  374.             tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  375.             tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  376.             answerer=""
  377.             questioner=""
  378.             local j=1
  379.             local i=0
  380.             while j<=numplayers do
  381.                 pname=players[j]
  382.                 if p[pname].questioners==false and tfm.get.room.playerList[pname].isDead==false and p[pname].spectator==false and p[pname].out==false then
  383.                     i=i+1
  384.                 end
  385.                 j=j+1
  386.             end
  387.             if i>0 then
  388.                 eventTruthOrDare()
  389.             else
  390.                 local j=1
  391.             while j<=numplayers do
  392.                 local name=players[j]
  393.                 p[name].questioners=false
  394.                 j=j+1
  395.             end
  396.             restart=true
  397.             timestamp=os.time()
  398.             begin=false
  399.         end
  400.     end
  401.     if choose==true and one==false then
  402.         rand=math.random(1,numplayers)
  403.         answerer=players[rand]
  404.         if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or answerer==answererold or p[answerer].out==true then
  405.             ui.updateTextArea(1, "<p align='center'><b><font size='30'>Ala bala portocala...</font></b></p>", nil)
  406.             tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  407.             answerer=""
  408.         else
  409.             choose=false
  410.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." va trebui să răspundă la întrebare! Așteptăm să aleagă adevăr sau provocare...</font></b>", nil)
  411.             ui.addPopup(3,1,"Ai fost ales să răspunzi la întrebare! Vrei adevăr? Dacă Nu, o să alegi automat provocare!!",answerer,250,50,300,true)
  412.         end
  413.     elseif choosey==true and one==false then
  414.         rand=math.random(1,numplayers)
  415.         questioner=players[rand]
  416.         if p[questioner].questioners==false and tfm.get.room.playerList[questioner].isDead==false and p[questioner].spectator==false or p[questioner].out==false then
  417.             choosey=false
  418.             p[questioner].questioners=true
  419.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." va trebui să pună o întrebare! Așteptăm să aleagă un responsabil ...</font></b>", nil)
  420.             ui.addPopup(1,1,"Vrei o persoană întâmplătoare care să-ți răspundă la întrebare?? Dacă <b>Nu</b>, trebuie să tastezi numele jucătorului",questioner,250,50,300,true)
  421.         else
  422.             ui.updateTextArea(1, "<p align='center'><b><font size='30'>Ala bala portocala...</font></b></p>", nil)
  423.             tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  424.             questioner=""
  425.         end
  426.     end
  427.     if skip==true then
  428.         ui.updateTextArea(1, "<p align='center'><b><font size='30'>Sărim peste rândul său...</font></b></p>", nil)
  429.         tfm.exec.movePlayer(questioner,400,320,false,0,0,false)
  430.         tfm.exec.movePlayer(answerer,400,320,false,0,0,false)
  431.         answerer=""
  432.         questioner=""
  433.         if timestamp < os.time()-3000 then
  434.             start=true
  435.             skip=false
  436.         end
  437.     end
  438.     tfm.exec.movePlayer(questioner,120,120,false,0,0,false)
  439.     tfm.exec.movePlayer(answerer,680,120,false,0,0,false)
  440.     end
  441. end
  442.  
  443. function eventTruthOrDare()
  444.     start=false
  445.     ui.removeTextArea(2)
  446.     ui.removeTextArea(3)
  447.     choosey=true
  448. end
  449.  
  450. function eventPopupAnswer(id, name, answer)
  451.     if id==1 and name==questioner then
  452.         if answer=="yes" then
  453.             answererold=""
  454.             choose=true
  455.         elseif answer=="no" then
  456.             ui.addPopup(2,2,"Cine vrei să-ți răspundă la întrebare?",questioner,250,50,300,true)
  457.         end
  458.     elseif id==2 and name==questioner then
  459.         x=1
  460.         found=false
  461.         answer=string.upper(string.sub(answer,0,1))..string.sub(answer,2)
  462.         answer=string.gsub(answer, "<", "&lt;")
  463.         answer=string.gsub(answer, "http", "")
  464.         while x<=numplayers do
  465.         print(players[x])
  466.             if answer==players[x] then
  467.             answerer=answer
  468.             if questioner==answerer or tfm.get.room.playerList[answerer].isDead or p[answerer].spectator==true or p[answerer].out==true then
  469.             answerer=""
  470.             found=false
  471.             else
  472.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." va trebui să răspundă la întrebare! Așteptăm să aleagă adevăr sau provocare...</font></b>", nil)
  473.             ui.addPopup(3,1,"Ai fost ales să răspunzi la întrebare! Vrei adevăr? Dacă <b>Nu</b>, o să alegi automat provocare!",answerer,250,50,300,true)
  474.             found=true
  475.             end
  476.             end
  477.             x=x+1
  478.         end
  479.         if found==false then
  480.             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)
  481.         end
  482.     elseif id==3 and name==answerer then   
  483.         if answer=="yes" then
  484.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." a ales Adevăr! Așteptăm întrebarea de la "..questioner.."...</font></b>", nil) 
  485.             ui.addPopup(4,1,"Vrei o întrebare la întămplare? Dacă <b>Nu</b>, you will have to submit a question.",questioner,250,50,300,true)
  486.         elseif answer=="no" then
  487.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." a ales Provocare! Așteptăm provocarea de la "..questioner.."...</font></b>", nil)
  488.             ui.addPopup(5,1,"Vrei o provocare la întămplare? Dacă <b>Nu</b>, you will have to submit a Dare.",questioner,250,50,300,true)
  489.                
  490.         end
  491.     elseif id==4 and name==questioner then
  492.         if answer=="yes" then
  493.             question=truth[math.random(1,#truth)]
  494.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." a ales o întrebare random! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil) 
  495.             ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  496.             ui.addPopup(8,2,"<b>Tastează-ți răspunsul mai jos</b>",answerer,250,175,300,true)
  497.            
  498.         elseif answer=="no" then
  499.             ui.addPopup(6,2,"Tastează-ți propria întrebare mai jos, sau scrie #(număr) pentru o întrebare dintr-o listă random.",questioner,250,50,300,true)
  500.         end
  501.     elseif id==5 and name==questioner then
  502.         if answer=="yes" then
  503.             question=dare[math.random(1,#dare)]
  504.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." a ales o provocare la întâmplare! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil) 
  505.             ui.addTextArea(2,"<b><font size='20'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  506.             ui.addPopup(9,1,"<b><font size='15'>Fă ce"..questioner.."te-a provocat să faci! Dacă apeși 'da' promiți că vei face acest lucru!</font><b>",answerer,250,175,300,true)
  507.         elseif answer=="no" then
  508.             ui.addPopup(7,2,"Tastează-ți propria provocare mai jos, sau scrie #(număr) pentru o provocare dintr-o listă random.",questioner,250,50,300,true)
  509.         end
  510.     elseif id==6 and name==questioner then
  511.         answer=string.gsub(answer, "<", "&lt;")
  512.         answer=string.gsub(answer, "http", "")
  513.         if answer=="" then
  514.         ui.addPopup(6,2,"Tastează-ți propria întrebarea mai jos.",questioner,250,50,300,true)
  515.         elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#truth then
  516.         question=truth[tonumber(string.sub(answer,2,3))]
  517.         ui.updateTextArea(1, "<b><font size='15'>"..questioner.." a pus o întrebare! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil) 
  518.         ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  519.         ui.addPopup(8,2,"Tastează răspunsul tău mai jos.",answerer,250,175,300,true)
  520.         elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#truth then
  521.         ui.addPopup(6,2,"Trebuie sa introduci un număr de provocare mai mic sau egal cu  "..tostring(#truth),questioner,250,50,300,true)
  522.         else
  523.         question=answer
  524.         ui.updateTextArea(1, "<b><font size='15'>"..questioner.." a pus o întrebare! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil) 
  525.         ui.addTextArea(2,"<b><font size='20'>Truth: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  526.         ui.addPopup(8,2,"Tastează răspunsul tău mai jos.",answerer,250,175,300,true)
  527.         end
  528.     elseif id==7 and name==questioner then
  529.         answer=string.gsub(answer, "<", "&lt;")
  530.         answer=string.gsub(answer, "http", "")
  531.         if answer=="" then
  532.             ui.addPopup(7,2,"Tastează-ți propria provocare mai jos.",questioner,250,50,300,true)
  533.         elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))<=#dare then
  534.             if tonumber(string.sub(answer,2,3))==14 then
  535.             mapcomplete=true
  536.             end
  537.             question=dare[tonumber(string.sub(answer,2,3))]
  538.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil)  
  539.             ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  540.             ui.addPopup(9,1,"<b><font size='15'>Fă "..questioner.."te-a provocat să faci! Dacă apeși 'da' promiți că vei face acest lucru!</font><b>",answerer,250,175,300,true)
  541.         elseif string.sub(answer,0,1)=="#" and tonumber(string.sub(answer,2,3))>#dare then
  542.         ui.addPopup(7,2,"You have to type a Dare number less than or equal to "..tostring(#dare),questioner,250,50,300,true)
  543.         else
  544.             question=answer
  545.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." has typed a Dare question! Așteptăm ca "..answerer.." să răspundă...</font></b>", nil)  
  546.             ui.addTextArea(2,"<b><font size='15'>Dare: "..question.."</font></b>",nil,165,20,470,120,0x324650,0x212F36,0.8,true)
  547.             ui.addPopup(9,1,"<b><font size='15'>Fă "..questioner.."te-a provocat să faci! Dacă apeși 'da' promiți că vei face acest lucru!</font><b>",answerer,250,175,300,true)
  548.         end
  549.     elseif id==8 and name==answerer then
  550.         answer=string.gsub(answer, "<", "&lt;")
  551.         answer=string.gsub(answer, "http", "")
  552.         ans = answer
  553.         if ans=="" then
  554.         ui.addPopup(8,2,"You have to type something as your Truth Answer",answerer,250,175,300,true)
  555.         else
  556.         ui.addTextArea(3,"<b><font size='20'>Answer: "..ans.."</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  557.         ui.updateTextArea(1, "<b><font size='15'>"..answerer.." has answered the question! Așteptăm ca "..questioner.." să evalueze răspunsul</font></b>", nil)
  558.         ui.addPopup(10,1,"<b><font size='15'>Are you satisfied with the answer?",questioner,250,50,300,true)
  559.         end
  560.     elseif id==9 and name==answerer then
  561.         if answer=="yes" then
  562.             ui.addTextArea(3,"<b><font size='20'>Eu, "..answerer..", accept provocare și promit că voi face acest lucru.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  563.             if mapcomplete==true then
  564.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." este un adevărat luptător! El/Ea va trebui sa compleze mapa înainte de a intra din nou în joc. Începem un joc nou...</font></b>", nil)
  565.             p[answerer].out=true
  566.             mapcomplete=false
  567.             for i=1,#players do
  568.                 if players[i]==answerer then
  569.                     table.remove(players,i)
  570.                 end
  571.             end
  572.             else
  573.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." este un adevărat luptător! Începem un joc nou...</font></b>", nil)  
  574.             end
  575.             timestamp=os.time()
  576.             answerer=""
  577.             questioner=""
  578.             start=true
  579.             for name,player in pairs(tfm.get.room.playerList) do
  580.             tfm.exec.movePlayer(name,400,320,false,0,0,false)
  581.             p[name].new=false
  582.             print("false")
  583.             end        
  584.         elseif answer=="no" then
  585.             mapcomplete=false
  586.             ui.updateTextArea(1, "<b><font size='15'>"..answerer.." este un laș! Începem un joc nou...</font></b>", nil) 
  587.             ui.addTextArea(3,"<b><font size='20'>Eu, "..answerer..", sunt un laș, așa ca nu îndrăznesc să fac ceea ce m-ai provocat să făc.</font></b>",nil,165,140,470,120,0x324650,0x212F36,0.8,true)
  588.             timestamp=os.time()
  589.             answerer=""
  590.             questioner=""
  591.             start=true
  592.             for name,player in pairs(tfm.get.room.playerList) do
  593.             tfm.exec.movePlayer(name,400,320,false,0,0,false)
  594.             p[name].new=false
  595.             print("false")
  596.             end        
  597.         end
  598.     elseif id==10 and name==questioner then
  599.         if answer=="yes" then
  600.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." este mulțumit de acest răspuns! Începem un joc nou...</font></b>", nil)
  601.             timestamp=os.time()
  602.             answerer=""
  603.             questioner=""
  604.             start=true
  605.             for name,player in pairs(tfm.get.room.playerList) do
  606.             tfm.exec.movePlayer(name,400,320,false,0,0,false)
  607.             p[name].new=false
  608.             print("false")
  609.             end
  610.         elseif answer=="no" then
  611.             ui.updateTextArea(1, "<b><font size='15'>"..questioner.." is a not satisfied with the answer...:( Începem un joc nou...</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.         end
  622.     end
  623. end
  624.  
  625. function eventPlayerLeft(name)
  626.     ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..name.." a părăsit sala... Ce laș!</font></b></p>", nil)
  627.     if questioner==name or answerer==name then
  628.         timestamp=os.time()
  629.         skip=true
  630.     end
  631.     for i=1,#players do
  632.         if players[i]==name then
  633.         table.remove(players,i)
  634.         end
  635.     end
  636. end
  637.  
  638. function eventPlayerDied(name)
  639.     if p[name].spectator==false then
  640.         tfm.exec.respawnPlayer(name)
  641.     end
  642.     if p[name].ban==true then
  643.         tfm.exec.killPlayer(name)
  644.         if name==questioner or name==answerer then
  645.             timestamp=os.time()
  646.             skip=true
  647.         end
  648.     end
  649. end
  650.  
  651. function eventPlayerWon(playerName,timeElapsed, timeElapsedSinceRespawn)
  652. tfm.exec.respawnPlayer(playerName)
  653. if p[playerName].out==true then
  654. p[playerName].out=false
  655. table.insert(players,playerName)
  656. print("yes")
  657. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." a completat mapa în "..(timeElapsedSinceRespawn/100).." secunde! El/Ea s-a alăturat din nou jocului!</font></b></p>", nil)
  658. else
  659. ui.updateTextArea(1, "<p align='center'><b><font size='15'>"..playerName.." a completat mapa în "..(timeElapsedSinceRespawn/100).." secunde!</font></b></p>", nil)
  660. end
  661. end
  662.  
  663. function eventSummoningEnd(playerName, objectType, xPosition, yPosition, angle, xSpeed, ySpeed, other)
  664. timestamplol[other.id]=os.time()
  665. others[other.id]={summonobject=true}
  666. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement