Advertisement
Guest User

#Fashion Show

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