[Мини игра] Пол - это лава! |
Wikaaaaaazaz « Citoyen » 1544827500000
| 0 | ||
Пол это лава - это игра в которой вам необходимо прыгать на объекты в то время, когда земля под ногами превратится в лаву. В этой версии есть новогодний вариант (gameNG = true), или оставьте обычное оформление (замените: gameNG = false) --------New Years--------- gameNG = true ------------------------------------ typefloor = 6 map={ 7214563, 7273409 } if gameNG then typefloor = 11 map={ 7549305, 7549306, 7549310, 7549304 } -----------snow-------- snowbool = true end tfm.exec.setGameTime(6000,true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) usun = {} tfm.exec.newGame(map[math.random(#map)]) tfm.exec.setUIMapName("Пол - это лава!") if snowbool then tfm.exec.snow(60,10) end ilosc = 10 for name, player in pairs(tfm.get.room.playerList) do tfm.exec.setPlayerScore(name,0) end tfm.exec.addPhysicObject(1,800,387,{ type=typefloor, restitution=0.5, friction=0.1, width=1600, height=37, groundCollision=true, miceCollision=true }) to=0 czas=10 score = 0 function eventLoop(timeRemaining,timeRemaining) if(to==2) then czas=czas-1 score = score + 1 if(score==10) then for name, player in pairs(tfm.get.room.playerList) do tfm.exec.giveMeep(name) end end if(czas==3) then if gameNG then for j = 1, math.random(3,6) do randomobj = math.random(1,3) if randomobj == 1 then usun[#usun + 1] = tfm.exec.addShamanObject(103,math.random(100,1500),200,0,math.random(0,20)-10,0,false) elseif randomobj == 2 then usun[#usun + 1] = tfm.exec.addShamanObject(205,math.random(100,1500),200,0,math.random(0,20)-10,0,false) elseif randomobj == 3 then usun[#usun + 1] = tfm.exec.addShamanObject(215,math.random(100,1500),200,0,math.random(0,20)-10,0,false) end end else usun = tfm.exec.addShamanObject(math.random(1,7),math.random(100,1500),350,0,0,0,false) usunn = tfm.exec.addShamanObject(math.random(1,7),math.random(100,1500),350,0,0,0,false) end end if(czas==-3) then if gameNG then for j = 1, #usun do tfm.exec.removeObject(usun[j]) end else tfm.exec.removeObject(usun) tfm.exec.removeObject(usunn) end ilosc = ilosc - 1 czas=ilosc tfm.exec.addPhysicObject(1,800,387,{ type=typefloor, restitution=0.5, friction=0.1, width=1600, height=37, groundCollision=true, miceCollision=true }) tfm.exec.removePhysicObject(2) end if(czas<=0) then tfm.exec.addPhysicObject(1,800,387,{ type=typefloor, restitution=0.5, friction=0.1, width=1600, height=37, groundCollision=true, miceCollision=false }) tfm.exec.addPhysicObject(2,800,387,{ type=3, restitution=0.5, friction=0.1, width=1600, height=37, groundCollision=true, miceCollision=false }) ui.addTextArea(7, "<p align='center'><font size='50' color='#FF0000'>Осторожно пол - лава!</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true,true) else ui.addTextArea(7, "<p align='center'><font size='90'>"..czas.."</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true,true) ui.addTextArea(5,"", nil, 50, 250, 700, 119, 0x324650, 0x000000, 0, true,true) end to=0 else to=to+1 end if(ilosc==4) then ilosc=10 end end liczba=0 tablica={} zycie={} e=0 for name, player in pairs(tfm.get.room.playerList) do tablica[name]=0 e=e+1 print(name) end print(e) function eventPlayerDied(n) --tfm.exec.setUIShamanName(n.." умер") tfm.exec.setPlayerScore(n,-2,true) tablica[n]=1 zycie[n]=0 e=e-1 print(e) wyg = n for name, player in pairs(tfm.get.room.playerList) do if(tablica[name]==0) then liczba=liczba+1 wyg=name end end print(liczba) if(liczba<=1) then print(wyg.." wygral") tfm.exec.giveCheese(wyg) ui.addTextArea(5, "<p align='center'><font size='50' color='#FFFF00'>"..wyg.." выйграл игру!</font></p>", nil, 50, 250, 700, 500, 0x324650, 0x000000, 0, true,true) tfm.exec.playerVictory(wyg) tfm.exec.newGame(map[math.random(#map)]) tfm.exec.setUIMapName("Пол - это лава!") if snowbool then tfm.exec.snow(60,10) end tfm.exec.addPhysicObject(1,800,387,{ type=typefloor, restitution=0.5, friction=0.1, width=1600, height=37, groundCollision=true, miceCollision=true }) to=0 czas=10 tfm.exec.setPlayerScore(wyg,score,true) score = 0 e=0 tablica={} ilosc=10 for name, player in pairs(tfm.get.room.playerList) do tablica[name]=0 zycie[name]=1 e=e+1 end wyg="" liczba=0 print(e) else liczba=0 end end function eventPlayerLeft(n) tablica[n]=1 zycie[n]=0 e=e-1 print(e) for name, player in pairs(tfm.get.room.playerList) do if(tablica[name]==0) then liczba=liczba+1 wyg=name end end end function eventPlayerRespawn(nn) if(zycie[nn]==0) then tfm.exec.setVampirePlayer(nn) end end |
Xckewovjreobmn « Consul » 1544863980000
| 0 | ||
Wikaaaaaazaz a dit : это с инглиш форума? |
Wikaaaaaazaz « Citoyen » 1544901900000
| 0 | ||
Взято с англ сервера, а новогоднее оформление я сделала, также устранила баг с тем когда одна мышка на поле. |
Xckewovjreobmn « Consul » 1544902020000
| 1 | ||
Wikaaaaaazaz a dit : ну тогда молодец |
Vladwv « Citoyen » 1545919500000
| 0 | ||
Ты Вы ссылку на оригинал оставите? |