Advertisement
Guest User

Untitled

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