Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Criado por Bloonshack
- --Dai?
- --^^
- adm="Bloonshack"
- vivo={1}
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- players={}
- toDespawn={}
- maps={[[@6782986]], [[@6782986]]}
- function eventNewPlayer(name)
- ui.setMapName("Down!")
- for i,key in ipairs({32,40,83}) do
- tfm.exec.bindKeyboard(name,key,true,true)
- end
- players[name]={
- timestamp=os.time(),
- offsets={x=2, y=10}
- }
- end
- conjurar={85}
- function eventKeyboard(name,key,down,x,y)
- ui.setMapName("Down!")
- if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started then
- if players[name].timestamp < os.time()-600 then
- local id
- if tfm.get.room.playerList[name].isFacingRight then
- id=tfm.exec.addShamanObject(85,x+players[name].offsets.x,y+players[name].offsets.y,0,200,0)
- else
- id=tfm.exec.addShamanObject(85,x+players[name].offsets.x,y+players[name].offsets.y,0,-200,0)
- end
- players[name].timestamp=os.time()
- table.insert(toDespawn,{os.time(),id})
- end
- end
- end
- function eventChatCommand(name,command)
- ui.setMapName("Down!")
- local arg={}
- for argument in command:gmatch("[^%s]+") do
- table.insert(arg,argument)
- end
- if arg[1]=="off" then
- if tonumber(arg[2]) and tonumber(arg[3]) then
- players[name].offsets.x=tonumber(arg[2])
- players[name].offsets.y=tonumber(arg[3])
- else
- players[name].offsets.x=2
- players[name].offsets.y=10
- end
- tfm.exec.chatMessage("Offsets changed to X:"..players[name].offsets.x.." Y:"..players[name].offsets.y,name)
- end
- end
- function eventNewGame()
- started=false
- ui.setMapName("Down!")
- end
- function eventLoop(time,remaining)
- if time >= 3000 and not started then
- started=true
- end
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-3000 then
- tfm.exec.removeObject(conjurar[2])
- table.remove(toDespawn,i)
- ui.setMapName("Down!")
- end
- end
- end
- function eventLoop(int)
- miceColision=true
- for i=1,2,3 do
- tfm.exec.addShamanObject(0,500,0,0,0,0,2)
- tfm.exec.addShamanObject(2,500,0,0,0,10,false)
- tfm.exec.addShamanObject(2,1400,0,0,0,10,false)
- ui.setMapName("Down!")
- end
- end
- function eventPlayerDied(name)
- local i=0
- local n
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- n=pname
- ui.setMapName("Down!")
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- elseif i==1 then
- tfm.exec.giveCheese(n)
- tfm.exec.playerVictory(n)
- tfm.exec.setGameTime(0)
- ui.setMapName("Down!")
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- tfm.exec.newGame(maps[math.random(#maps)])
- ui.addPopup(0, 0, "ISSO É UM JOGO, NÃO SEJA ENTERRADA!",playerName, 300, 175, 200, true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement