[Skrypt] Podłoga to lawa! |
Osicat « Citoyen » 1505057340000
| 10 | ||
Cześć! KOD LUA 10.09.2017 Kod Lua a dit : KOD LUA WERSJA 1.1 22.09.2017 tfm.exec.setGameTime(6000,true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) tfm.exec.setUIMapName("The floor is lava!") tfm.exec.newGame(7214563) ilosc = 10 tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, 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 x = math.random(100,1500) xx = math.random(100,1500) idd = math.random(1,7) id = math.random(1,7) usun = tfm.exec.addShamanObject(id,x,350,0,0,0,false) usunn = tfm.exec.addShamanObject(idd,xx,350,0,0,0,false) end if(czas==-3) then tfm.exec.removeObject(usun) tfm.exec.removeObject(usunn) ilosc = ilosc - 1 czas=ilosc tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=true }) tfm.exec.removePhysicObject(2) end if(czas<=0) then tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=false }) tfm.exec.addPhysicObject(2,800,387,{ type=3, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=false }) ui.addTextArea(7, "<p align='center'><font size='50' color='#FF0000'>THE FLOOR IS LAVA</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 function eventPlayerDied(playerName) tfm.exec.setUIShamanName(playerName.." has died.") tfm.exec.setPlayerScore(playerName,-2,true) end function eventChatCommand(playerName,message) if(message=="reset") then tfm.exec.setPlayerScore(playerName,0) 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) 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 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 if(liczba==1) then print(wyg.." wygral") tfm.exec.giveCheese(wyg) ui.addTextArea(5, "<p align='center'><font size='50' color='#FFFF00'>"..wyg.." has won the game</font></p>", nil, 50, 250, 700, 500, 0x324650, 0x000000, 0, true,true) tfm.exec.playerVictory(wyg) tfm.exec.newGame(7214563) tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=true }) to=0 czas=10 score = 0 e=0 tablica={} ilosc=10 tfm.exec.setPlayerScore(wyg,score,true) 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 eventChatCommand(playerName,message) if(message=="res") then liczba=0 e=0 tablica={} for name, player in pairs(tfm.get.room.playerList) do tablica[name]=0 e=e+1 end wyg="" print(e) end end function eventPlayerRespawn(nn) if(zycie[nn]==0) then tfm.exec.setVampirePlayer(nn) end end Zmiany
KOD LUA WERSJA 1.2 22.09.2017 map={ 7214563, 7273409, 7274207 } tfm.exec.setGameTime(6000,true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoNewGame(true) tfm.exec.newGame(map[math.random(#map)]) tfm.exec.setUIMapName("The floor is lava!") 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=6, restitution=0.2, friction=0.3, 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 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 if(czas==-3) then tfm.exec.removeObject(usun) tfm.exec.removeObject(usunn) ilosc = ilosc - 1 czas=ilosc tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=true }) tfm.exec.removePhysicObject(2) end if(czas<=0) then tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=false }) tfm.exec.addPhysicObject(2,800,387,{ type=3, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=false }) ui.addTextArea(7, "<p align='center'><font size='50' color='#FF0000'>THE FLOOR IS LAVA</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.." has died.") tfm.exec.setPlayerScore(n,-2,true) 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 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 if(liczba==1) then print(wyg.." wygral") tfm.exec.giveCheese(wyg) ui.addTextArea(5, "<p align='center'><font size='50' color='#FFFF00'>"..wyg.." has won the game</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("The floor is lava!") tfm.exec.addPhysicObject(1,800,387,{ type=6, restitution=0.2, friction=0.3, width=1600, height=37, groundCollision=true, miceCollision=true }) to=0 czas=10 score = 0 e=0 tablica={} ilosc=10 tfm.exec.setPlayerScore(wyg,score,true) 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 eventPlayerRespawn(nn) if(zycie[nn]==0) then tfm.exec.setVampirePlayer(nn) end end Zmiany Kod został skróconyRotacja map* Próbowałem dodać jeszcze różną ilość obiektów na mapie, ale na tą chwilę mi się nie udało, więc zostawiam to co zrobiłem :D *Prozpozycje map (kody) proszę przesyłać na moją skrzynkę pocztową lub podawać w komentarzach, dzięki :) Nowe części kodu zaznaczone są tym kolorem. W kodzie moga znalezc sie linijki ktore byly uzyte dla debbugingu. Aby uzyc kodu wpisz w chatce plemiennej "/lua" i wklej kod. Miłej zabawy ;) Dernière modification le 1532958120000 |
Mlekowaty « Consul » 1505057880000
| 5 | ||
Tylko jak wejde na tfm włącze moduł. |
1 | ||
akurat chcialam niedawno sprobowac zrobic cos takiego, ale poddalam sie |
Osicat « Citoyen » 1505067240000
| 1 | ||
Kuib555 a dit : Odpalaj! ;D |
5 | ||
Kocham ten skrypt świetne |
Imyoda « Censeur » 1505407380000
| 0 | ||
Mogłeś po polsku to zrobić "ui.addTextArea(7, "<p align='center'><font size='50' color='#FF0000'>THE FLOOR IS LAVA</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true,true)" |
Osicat « Citoyen » 1505416260000
| 0 | ||
Imyoda a dit : Mogłem, ale jakoś mi się... nie chciało ;D Po prostu to było przygotowane pod angielskie forum |
Rohere « Consul » 1505482380000
| 1 | ||
Przecież wystarczy zmienić wyrazy i tyle... |
Serek535 « Consul » 1505485980000
| 1 | ||
Super skrypt! Dernière modification le 1538245200000 |
Keratyo « Consul » 1505491980000
| 1 | ||
Wypróbuje |
Osicat « Citoyen » 1505497320000
| 0 | ||
Serek535 a dit : Ozywia, ale jak jest wiecej niz 1 osoba. Przynajmniej tak mi się wydaje Dernière modification le 1505545140000 |
Mlekowaty « Consul » 1505821620000
| 1 | ||
Ja dodał bym opcje spychania sb. |
Osicat « Citoyen » 1506085020000
| 0 | ||
Kuib555 a dit : Jak sobie zyczysz ;D |
Mlekowaty « Consul » 1506087960000
| 1 | ||
Osicat a dit : Zrobiłeś to! Jest! |
Keratyo « Consul » 1506105120000
| 3 | ||
Hmm. Testowałam ten kod. Dodałabym i Poprawiłabym to: Poprawiła: Zmiejszyłabym ją na mniejszą. Np. normalną w edytorze map. Lub ją troche powiększyć. Poprawiła: Pod koniec odliczania (3...2...1) pojawiają się obiekty, no wiem. I poprawiłabym to, by pojawiło się odrobine więcej obiektów rozmieszczonych na koniec odliczania. Lub z coraz mniejszą liczbą myszek tych obiektów było coraz mniej. (10 myszek = 5 obiektów i w dół) Dodała: Co rundę mogłaby się zmieniać mapa. I myśle, że gdyby takie coś wdrążyć to gracze mogli by podsyłać mapy. A grunt by troche utrudnić zabawę "rozdzielony" I w sumie to wszystko. Fajnie że istnieje taki kod. Rad nie musisz stosować, bo to troche pracy jest "| |
Niezdecydowanie « Consul » 1506107040000
| 0 | ||
dlugi kod wlonce to |
Osicat « Citoyen » 1506110820000
| 0 | ||
Milqie a dit : Coś z tym zrobiłem ;D |
Keratyo « Consul » 1506514980000
| 0 | ||
Osicat a dit : ups coś ci się to zepsuło, bo na jednej mapie (1 w kodzie) nie ma gruntu |
Osicat « Citoyen » 1506615840000
| 0 | ||
Milqie a dit : Wydaje mi sie ze po prostu grunt laduje sie co drugie odswiezenie kodu lua. Postaram sie cos z tym zrobic |
Olo719 « Citoyen » 1512909120000
| 1 | ||
Jak to właczyć na chatce plemiennej ? |