Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(true)
- ch = {}
- players = {}
- time = 0
- time2 = 0
- time3 = 0
- map='<C><P /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="e0e3e6" X="400" c="4" Y="200" T="12" H="400" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="a5a8aa" X="400" Y="370" T="12" H="80" /><S P="0,0,0.3,0.2,-50,0,0,0" L="350" o="a5a8aa" X="579" Y="274" T="12" H="111" /><S P="0,0,0.3,0.2,0,0,0,0" L="160" o="a5a8aa" X="729" Y="255" T="12" H="300" /><S P="1,-1,0.3,0.2,0,0,0,0" L="104" o="a5a8aa" X="625" Y="300" T="12" H="112" /><S P="0,0,0.3,0.2,0,0,0,0" L="100" o="a5a8aa" X="100" c="3" Y="250" T="12" H="10" /><S H="10" L="100" o="a5a8aa" X="250" c="3" Y="250" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="100" o="a5a8aa" H="10" c="3" Y="250" T="12" X="400" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="e0e3e6" X="680" Y="70" T="12" H="60" /><S P="0,0,0.3,0.2,0,0,0,0" L="10" o="e0e3e6" X="790" Y="70" T="12" H="60" /><S P="0,0,0.3,0.2,0,0,0,0" L="50" o="e0e3e6" X="175" Y="130" T="12" H="200" /><S L="50" o="e0e3e6" X="325" H="200" Y="130" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="30" o="e0e3e6" H="240" Y="130" T="12" X="465" /><S X="25" L="50" o="e0e3e6" H="300" c="1" Y="170" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="10" L="100" o="a5a8aa" X="100" c="3" Y="130" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="100" o="a5a8aa" H="10" c="3" Y="130" T="12" X="250" /><S X="400" L="100" o="a5a8aa" H="10" c="3" Y="130" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="e0e3e6" X="400" c="3" Y="15" T="12" H="30" /><S P="1,1,0.3,0.2,0,1,0,0" L="100" o="b874bc" X="250" c="4" N="" Y="190" T="12" H="110" /><S H="110" L="100" o="b874bc" X="400" c="2" N="" Y="190" T="12" P="1,1,0.3,0.2,0,1,0,0" /><S P="1,1,0.3,0.2,0,1,0,0" L="100" o="b874bc" X="100" c="2" N="" Y="190" T="12" H="110" /><S H="110" L="100" o="b874bc" X="100" c="4" N="" Y="70" T="12" P="1,1,0.3,0.2,0,1,0,0" /><S P="1,1,0.3,0.2,0,1,0,0" L="100" o="b874bc" X="250" c="4" N="" Y="70" T="12" H="110" /><S H="110" L="100" o="b874bc" X="400" c="4" N="" Y="70" T="12" P="1,1,0.3,0.2,0,1,0,0" /><S L="10" H="10" X="0" Y="-100" T="12" P="1,0,0.3,0.2,0,0,1000,0" /><S L="10" H="10" X="30" Y="-100" T="12" P="1,0,0.3,0.2,0,0,1000,0" /><S L="10" H="10" X="-5" Y="-90" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="313" X="80" /></D><O /><L><JP M2="4" AXIS="0,1" MV="0,0" M1="24" /><JP M2="4" AXIS="0,1" MV="0,0" M1="25" /><JP M2="25" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="18" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="19" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="20" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="21" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="22" AXIS="0,1" MV="0,0" M1="24" LIM1="" /><JP M2="23" AXIS="0,1" MV="0,0" M1="24" LIM1="" /></L></Z></C>'
- function eventNewPlayer(name)
- ch[name] = 0
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- table.insert(players,name)
- end
- function start()
- ui.removeTextArea(1, nil)
- tfm.exec.newGame(map)
- ui.addTextArea(0, '<B><B><a href="event:1">1</a> \t\t\t\t\t\t<a href="event:2">2<a/> \t\t\t\t\t\t<a href="event:3">3<a/> \n\n\n<a href="event:4">4<a/> \t\t\t\t\t\t<a href="event:5">5<a/> \t\t\t\t\t\t<a href="event:6">6<a/>' , nil, 100, 100, 0, 0, nil, nil, 0)
- if s==nil then
- s = players[math.random(#players)]
- end
- tfm.exec.movePlayer(s, 700, 70, false, 0, 1, false)
- time2 = os.time()
- stt = 0
- sttt = 0
- ch1 = 0
- ch2 = 0
- ch3 = 0
- ch4 = 0
- ch5 = 0
- ch6 = 0
- sd = 1
- chh = 0
- rd = 0
- tfm.exec.setGameTime(10, true)
- for name in pairs(tfm.get.room.playerList) do
- tfm.exec.setNameColor(name, 0xFFFFFF)
- tfm.exec.setNameColor(s, 0xFF0000)
- ch[name] = 0
- if name ~= s then
- ui.addTextArea(3, "<R><B>Click on the number to get in the dressing room!", nil, 475, 360, 0, 0, nil, nil, 0)
- end
- end
- end
- start()
- function eventPopupAnswer(id, name, anw)
- if id == 1 then
- ui.removeTextArea(3, nil)
- ui.addTextArea(0, "<R><B>The theme is \""..anw.."\"\nYou have got 2 min to dress up your's mice!", nil, 500, 300, 0, 0, nil, nil, 0)
- for name in pairs(tfm.get.room.playerList) do
- if ch[name] == 1 then
- ui.addTextArea(2, '<a href="event:rd"><font size="25">• Done</font><a>', name, 500, 350, 0, 0, nil, nil, 0)
- end
- end
- tfm.exec.setGameTime(120, true)
- time = os.time()
- st = 1
- anw2 = anw
- end
- end
- function cont()
- tfm.exec.newGame(map)
- tfm.exec.movePlayer(ch1, 100, 125, false, 0, 1, false)
- tfm.exec.movePlayer(ch2, 250, 125, false, 0, 1, false)
- tfm.exec.movePlayer(ch3, 400, 125, false, 0, 1, false)
- tfm.exec.movePlayer(ch4, 100, 180, false, 0, 1, false)
- tfm.exec.movePlayer(ch5, 250, 180, false, 0, 1, false)
- tfm.exec.movePlayer(ch6, 400, 180, false, 0, 1, false)
- tfm.exec.addShamanObject(28, 15, -80)
- st = 0
- ui.addTextArea(0, "<R><B>The theme was \""..anw2.."\"", nil, 500, 300, 0, 0, nil, nil, 0)
- ui.removeTextArea(2, nil)
- ui.addTextArea(1, "<R><B>"..s.." is chosing...", nil, 500, 330, 0, 0, nil, nil, 0)
- ui.addTextArea(1, "<R><B>Chose a mice by typing !Nick", s, 500, 330, 0, 0, nil, nil, 0)
- end
- function eventLoop()
- if time < os.time()-1000*120 and st == 1 then
- cont()
- end
- if time2 <os.time()-1000*10 and stt == 0 and chh >= 1 then
- ui.addPopup(1,2,'Enter theme!',s,300,150,200)
- stt = 1
- end
- if time3 <os.time()-1000*10 and sttt == 1 then
- start()
- end
- if rd == chh and rd ~=0 then
- cont()
- rd = 0
- end
- end
- function eventTextAreaCallback(id, name, cb)
- if s~=name then
- if cb == '1' and ch1 == 0 and ch[name] == 0 then
- ch1 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 100, 125, false, 0, 1, false)
- elseif cb == '2' and ch2 == 0 and ch[name] == 0 then
- ch2 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 250, 125, false, 0, 1, false)
- elseif cb == '3' and ch3 == 0 and ch[name] == 0 then
- ch3 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 400, 125, false, 0, 1, false)
- elseif cb == '4' and ch4 == 0 and ch[name] == 0 then
- ch4 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 100, 180, false, 0, 1, false)
- elseif cb == '5' and ch5 == 0 and ch[name] == 0 then
- ch5 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 250, 180, false, 0, 1, false)
- elseif cb == '6' and ch6 == 0 and ch[name] == 0 then
- ch6 = name
- ch[name] = 1
- chh = chh+1
- tfm.exec.movePlayer(name, 400, 180, false, 0, 1, false)
- end
- end
- if cb == "rd" then
- rd = rd+1
- ui.removeTextArea(2, name)
- end
- end
- function eventChatCommand(name,komd)
- if s==name then
- for v,nick in pairs(players) do
- if komd==nick and sd == 1 then
- if komd == ch1 or komd == ch2 or komd == ch3 or komd == ch4 or komd == ch5 or komd == ch6 then
- tfm.exec.setPlayerScore(komd,10,true)
- S=tfm.get.room.playerList[komd]
- for i=1,20 do
- tfm.exec.displayParticle(29,S.x,S.y-50,math.random(-30,30)/10,math.random(-30,30)/10,0,0)
- end
- time3 = os.time()
- sttt = 1
- sd = 0
- s=komd
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment