Advertisement
Guest User

#Fashion Show

a guest
Apr 20th, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Created by: Weth#9837
  2. gameAdmin = "NAME"
  3. time = 0
  4.  
  5. function Main()
  6.     tfm.exec.disableAfkDeath(true)
  7.     tfm.exec.disableAutoNewGame(true)
  8.     tfm.exec.disableAutoTimeLeft(true)
  9.     tfm.exec.disableMortCommand(true)
  10.     tfm.exec.disableAutoShaman(true)
  11.     tfm.exec.disableAutoScore(true)
  12.     tfm.exec.newGame(7594965)
  13.     tfm.exec.setGameTime(0)
  14.     tfm.exec.setUIMapName("<b>Fashion Show</b>")
  15.     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>")
  16.     ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  17. end
  18.  
  19. function eventLoop()
  20. time = time +0.5
  21.     if (time == 420) then
  22.         for index,name in pairs(tfm.get.room.playerList) do
  23.             tfm.exec.killPlayer(index)
  24.             tfm.exec.setPlayerScore(index,0)
  25.         end
  26.     end
  27. end
  28.  
  29. eventNewGame = function()
  30.     tfm.exec.addImage("16a379e41fc.jpg", "?0", 0, 17)
  31.     tfm.exec.addImage("16a37e3854f.jpg", "!0", 0, 150)
  32. end
  33.  
  34. function eventNewPlayer(playerName)
  35.     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>")
  36.     ui.addTextArea(1,theme,nil,145,140,133,23,0xD94A98,0xF27EBE,0.8,true)
  37.     ui.addTextArea(2,"<font color='#FFFFFF' size='17'>THEME:",nil,145,108,88,24,0xD94A98,0xF27EBE,0.8,true)
  38.     tfm.exec.respawnPlayer(playerName)
  39. end
  40.  
  41. function eventPlayerDied(playerName)
  42.     tfm.exec.respawnPlayer(playerName)
  43. end
  44.  
  45. function eventPopupAnswer(popupID,playerName,answer)
  46.     theme = ""
  47.     if (popupID == 1) and (answer ~= "") and (#answer <= 15) then
  48.         theme = "<font color='#FFFFFF' size='13'><b>"..answer.."</b>"
  49.         ui.addTextArea(1,theme,nil,145,140,133,23,0xD94A98,0xF27EBE,0.8,true)
  50.         ui.addTextArea(2,"<font color='#FFFFFF' size='17'>THEME:",nil,145,108,88,24,0xD94A98,0xF27EBE,0.8,true)
  51.         time = 0
  52.         tfm.exec.setGameTime(431)
  53.         ui.removeTextArea(0,gameAdmin)
  54.     end
  55.     if (#answer > 15) then
  56.         ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  57.         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)
  58.     end
  59.     if (answer == "") then
  60.         ui.addPopup(1,2,"<p align='center'>Theme:",gameAdmin,540,315,250,true)
  61.         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)
  62.     end
  63. end
  64.  
  65. Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement