Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = 0
- t = 0
- n = 0
- local protect = {}
- local tiraescudo = {}
- local pool = {}
- local p = {}
- for name in pairs(tfm.get.room.playerList) do
- p[name] = 1
- protect[name] = 3
- tiraescudo[name] = false
- end
- meteoro = {
- type = 13;
- width = 30;
- color = 0x000001;
- friction = 9999;
- restitution = 0;
- MouseCollision = true;
- GroundCollision = false;
- foreground = true;
- dynamic = true;
- mass = 9999;
- };
- function eventKeyboard(name, key, p, x, y)
- if key == 32 and protect[name] > 0 then
- table.insert(pool, {tfm.exec.addPhysicObject(p, x, y - 30, {type=12, width=100, miceCollision = false,color=0xfff000, GroundCollision = true, angle = 10}), os.time()})
- tiraescudo[name] = true
- protect[name] = protect[name] - 1
- end
- end
- for name in pairs(tfm.get.room.playerList) do
- system.bindKeyboard(name, 32, true, true)
- end
- function eventLoop()
- n = n +1
- m=m+.5
- if tiraescudo[name] then
- t=t+.5
- elseif tiraescudo[name] and t >= 3 then
- tiraescudo[name] = false
- t = 0
- end
- if m == 1 then
- tfm.exec.addPhysicObject(n, math.random(800.0), -200, meteoro)
- elseif m == 2 then
- tfm.exec.addPhysicObject(n, math.random(800.0), -200, meteoro)
- m = 0
- end
- for i,v in ipairs(pool) do
- if v[2] < os.time() - 3000 then
- tfm.exec.removePhysicObject(p)
- table.remove(pool, i)
- end
- end
- end
- function eventPlayerWon(name)
- tfm.exec.respawnPlayer(name)
- end
- function eventPlayerDied(name)
- tfm.exec.respawnPlayer(name)
- protect[name] = 3
- end
- function initial()
- dia = math.random(8)
- if dia == 1 or dia == 2 or dia == 3 or dia == 5 or dia == 7 or dia == 8 then
- xml = ('<C><P F="' .. dia .. '" aie="" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" X="400" c="3" Y="400" T="6" H="80" /><S P="0,0,0.3,0.2,0,0,0,0" L="720" H="20" c="3" Y="310" T="6" X="360" /><S P="0,0,0.3,0.2,0,0,0,0" L="720" X="440" c="3" Y="245" T="6" H="20" /><S P="0,0,0.3,0.2,0,0,0,0" L="720" H="20" c="3" Y="182" T="6" X="362" /><S P="0,0,0.3,0.2,0,0,0,0" L="720" X="441" c="3" Y="118" T="6" H="20" /><S P="0,0,0.3,0.2,0,0,0,0" L="720" H="20" c="3" Y="61" T="6" X="360" /><S P="0,0,0.3,0.2,180,0,0,0" L="800" H="80" c="3" Y="-40" T="6" X="400" /><S P="0,0,0,0,0,0,0,0" L="19" H="382" c="3" Y="184" T="14" X="-10" /><S P="0,0,0,0,0,0,0,0" L="19" X="809" c="3" Y="185" T="14" H="382" /></S><D><T Y="358" X="32" /><F Y="47" X="28" /></D><O /></Z></C>')
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.newGame(xml)
- tfm.exec.setGameTime(99999)
- ui.setMapName("Meteor")
- elseif dia == 4 or dia == 6 then
- initial()
- end
- end
- initial()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement