Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gameAdmin = "NAME"
  2. time = 0
  3.  
  4. function Main()
  5.     tfm.exec.disableAfkDeath(true)
  6.     tfm.exec.disableAutoNewGame(true)
  7.     tfm.exec.disableAutoTimeLeft(true)
  8.     tfm.exec.disableMortCommand(true)
  9.     tfm.exec.disableAutoShaman(true)
  10.     tfm.exec.disableAutoScore(true)
  11.     tfm.exec.newGame(7594965)
  12.     tfm.exec.setGameTime(0)
  13.     ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  14. end
  15.  
  16. function eventLoop()
  17. time = time +0.5
  18.     if (time == 420) then
  19.         for index,name in pairs(tfm.get.room.playerList) do
  20.             tfm.exec.killPlayer(index)
  21.             tfm.exec.setPlayerScore(index,0)
  22.         end
  23.         tfm.exec.chatMessage("Winner is being chosen...")
  24.     end
  25. end
  26.  
  27.  
  28. putBackground = function(playerName)
  29.     tfm.exec.addImage("16a379e41fc.jpg", "?0", 0, 17, playerName)
  30.     tfm.exec.addImage("16a37e3854f.jpg", "!0", 0, 150, playerName)
  31.     tfm.exec.setUIMapName("<b>Fashion Show</b>")
  32.     tfm.exec.chatMessage("<font color='#AD6AD9' size='14'><b>Welcome to the Funcorp Fashion Show!</b></font>\n<font color='#C29ADC'>Dress your best according to the current theme and win cheese! Look out, you only have a few minutes until the show starts.</font>\n<font color='#AD6AD9'>The judge is the organizer of this room. The cheese reward will be distributed by them.</font>\n<font color='#C29ADC'>Ready, set, GO <b>FASHION</b> CRAZY!</font>", playerName)
  33. end
  34.  
  35. eventNewGame = function()
  36.     putBackground()
  37. end
  38.  
  39. function eventNewPlayer(playerName)
  40.     ui.addTextArea(1,theme,nil,145,140,133,23,0xD94A98,0xF27EBE,0.8,true)
  41.     ui.addTextArea(2,"<font color='#FFFFFF' size='17'>THEME:",nil,145,108,88,24,0xD94A98,0xF27EBE,0.8,true)
  42.     tfm.exec.respawnPlayer(playerName)
  43.     putBackground(playerName)
  44. end
  45.  
  46. function eventPlayerDied(playerName)
  47.     tfm.exec.respawnPlayer(playerName)
  48. end
  49.  
  50. function eventPopupAnswer(popupID,playerName,answer)
  51.     theme = ""
  52.     if (popupID == 1) and (answer ~= "") and (#answer <= 15) then
  53.         theme = "<font color='#FFFFFF' size='13'><b>"..answer.."</b>"
  54.         ui.addTextArea(1,theme,nil,145,140,133,23,0xD94A98,0xF27EBE,0.8,true)
  55.         ui.addTextArea(2,"<font color='#FFFFFF' size='17'>THEME:",nil,145,108,88,24,0xD94A98,0xF27EBE,0.8,true)
  56.         time = 0
  57.         tfm.exec.setGameTime(421)
  58.         ui.removeTextArea(0,gameAdmin)
  59.     end
  60.     if (#answer > 15) then
  61.         ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  62.         ui.addTextArea(0,"<p align='center'><font size='20' color='#A01614'><b>!<font size='16'> Too long <font size='20'>!</b></font>\n("..#answer..")",gameAdmin,540,257,250,nil,0xF6CFC9,0xE5A397,0.8,true)
  63.     end
  64.     if (answer == "") then
  65.         ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  66.         ui.addTextArea(0,"<p align='center'><font size='20' color='#A01614'><b>!<font size='16'> Too short <font size='20'>!</b></font>\n("..#answer..")",gameAdmin,540,257,250,nil,0xF6CFC9,0xE5A397,0.8,true)
  67.     end
  68. end
  69.  
  70. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement