[Skrypt] #RAIN |
![]() ![]() « Citoyen » 1450636140000
| 0 | ||
#RAIN - jest to gra gdzie spadają różne przedmioty tak z nieba. Co 15 sekund jest coraz trudniejszy poziom gdyż będą coraz szybciej spadać przedmioty. Skrypt z Hiszpańskiego forum SKRYPT players = {} timer = 0 countdown = 6 player = nil ending = false difficulty = 1 highscore = 0 function main() tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoScore(true) tfm.exec.newGame(6159011) tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>00:00\n") end function eventLoop(time) timer = timer + 0.5 if time>3000 and not ending then difficulty = math.ceil(timer/15) spawnArrow(difficulty) end if timer%1==0 then showTime(timer) end if ending then countdown = countdown - 1 tfm.exec.setUIMapName("<ROSE>The next game starts in "..countdown.."\n") if countdown == 0 then tfm.exec.newGame(6159011) end end end function showTime(timer) local amount = timer / 60 local mins = math.floor(amount) local seconds = math.floor((amount - mins)*60) if mins < 10 then mins = "0"..tostring(mins) end if seconds < 10 then seconds = "0"..tostring(seconds) end tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>"..mins..":"..seconds.."\n") end function eventNewGame() ui.removeTextArea(1) choosePlayer() difficulty = 1 tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>00:00\n") timer=0 countdown=6 ending = false for k,v in pairs(tfm.get.room.playerList) do if k~=player then tfm.exec.killPlayer(k) end end end function eventPlayerDied(name) if name == player then ending = true ui.addTextArea(1, "<V><p align='center'><font size='12'><B>"..player.."</B><J> survived for <VP>".. math.floor(timer) .. " <J>seconds!", nil, 250, 23, 300, nil, 0x000001, nil, 0.8) if timer > highscore then highscore = math.floor(timer) end end end function spawnArrow(int) if int==1 then tfm.exec.addShamanObject(17, math.random()*800, -80) elseif int==2 then tfm.exec.addShamanObject(17, math.random()*800, -80, 180) else for i=1, int-2 do tfm.exec.addShamanObject(17, math.random()*800, -80, 180) end tfm.exec.addShamanObject(2, math.random()*800, -80) end end function choosePlayer() player = players[1] table.remove(players, 1) table.insert(players, player) end function eventNewPlayer(name) table.insert(players, name) end function eventPlayerLeft(name) table.delete(players, name) end function table.delete(tab, val) for k,v in pairs(tab) do if val == v then table.remove(tab, k) break end end end for k,v in pairs(tfm.get.room.playerList) do eventNewPlayer(k) end main(). SKRYPT Z PASTEBINA w players wpisujesz swoj nick |
![]() ![]() « Citoyen » 1450638660000
| 0 | ||
Super! Działa 100% Polecam |
![]() ![]() « Citoyen » 1450638720000
| 0 | ||
Wydaje się fajne, będę na kompie to zobaczę. |
![]() ![]() « Citoyen » 1450639920000
| 0 | ||
GDYBY BYŁ PROBLEM TO MA TO TAK WYGLADAC players = {Rodxes} timer = 0 countdown = 6 player = nil ending = false difficulty = 1 highscore = 0 |
![]() ![]() « Consul » 1450731780000
| 0 | ||
Super skrypt! Mój rekord to 50 sekund :D |
![]() ![]() « Citoyen » 1450732140000
| 0 | ||
Ciekawe, zaraz wczytam :) |
![]() ![]() « Consul » 1450734480000
| 0 | ||
59sekund :( Prawie minuta |
![]() ![]() « Consul » 1450735500000
| 0 | ||
Fajne to, rekord za pierwszym razem: 28 sekund xd |
![]() ![]() « Censeur » 1450736280000
| 0 | ||
Moj rekord: 41 ^^ |
![]() ![]() « Censeur » 1450769640000
| 0 | ||
Usuń tą kropke z spoilera z kodem bo nie działa ;p |
![]() ![]() « Consul » 1450786740000
| 0 | ||
rodxes a dit : A nie players={Rodxes=1} ? Dernière modification le 1450787220000 |
![]() ![]() « Consul » 1450787220000
| 0 | ||
/delete |
![]() « Citoyen » 1450871340000
| 0 | ||
sebafrancuz a dit : W sumie tak |
![]() ![]() « Citoyen » 1455461760000
| 0 | ||
Gdzie się wpisuje te kody ? (Tak ja taki nieogar) |
![]() ![]() « Citoyen » 1455464520000
| 0 | ||
madzikax a dit : W konsoli /lua ;P |
![]() ![]() « Citoyen » 1455470880000
| 0 | ||
madzikax a dit : http://atelier801.com/topic?f=6&t=468880&p=1#m1 |
0 | ||
25 30 rekord Dernière modification le 1455550680000 |
![]() ![]() « Citoyen » 1455653640000
| 0 | ||
To jest świetne! |
![]() ![]() « Consul » 1460142300000
| 0 | ||
Działa, mimo, ze nie wpisywałem swojego nicku. Pozwoliłem sobie zrobić wersję, gdzie wszyscy są na raz, żeby nie było nudno. :) Ups mały błędzik jak go znajdę, to poprawię. players = {} timer = 0 countdown = 6 player = nil ending = false difficulty = 1 highscore = 0 function main() tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoScore(true) tfm.exec.newGame(6159011) tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>00:00\n") end function eventLoop(time) timer = timer + 0.5 if time>3000 and not ending then difficulty = math.ceil(timer/15) spawnArrow(difficulty) end if timer%1==0 then showTime(timer) end if ending then countdown = countdown - 1 tfm.exec.setUIMapName("<ROSE>The next game starts in "..countdown.."\n") if countdown == 0 then tfm.exec.newGame(6159011) end end end function showTime(timer) local amount = timer / 60 local mins = math.floor(amount) local seconds = math.floor((amount - mins)*60) if mins < 10 then mins = "0"..tostring(mins) end if seconds < 10 then seconds = "0"..tostring(seconds) end tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>"..mins..":"..seconds.."\n") end function eventPlayerDied(name) if name == player then ending = true ui.addTextArea(1, "<V><p align='center'><font size='12'><B>"..player.."</B><J> survived for <VP>".. math.floor(timer) .. " <J>seconds!", nil, 250, 23, 300, nil, 0x000001, nil, 0.8) if timer > highscore then highscore = math.floor(timer) end end end function spawnArrow(int) if int==1 then tfm.exec.addShamanObject(17, math.random()*800, -80) elseif int==2 then tfm.exec.addShamanObject(17, math.random()*800, -80, 180) else for i=1, int-2 do tfm.exec.addShamanObject(0, math.random()*800, -80, 180) end tfm.exec.addShamanObject(2, math.random()*800, -80) end end function choosePlayer() player = players[1] table.remove(players, 1) table.insert(players, player) end function eventNewPlayer(name) table.insert(players, name) end function eventPlayerLeft(name) table.delete(players, name) end function table.delete(tab, val) for k,v in pairs(tab) do if val == v then table.remove(tab, k) break end end end for k,v in pairs(tfm.get.room.playerList) do eventNewPlayer(k) end main() Dernière modification le 1460221620000 |
![]() ![]() « Censeur » 1460638200000
| 0 | ||
Fajny skrypt *.*, mój rekord: 22 29 33. |