Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- time={}
- maps={0,1,2,3,4,5,6,7,8,9,10}
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventPlayerDied()
- local i=0
- for n,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- main()
- function eventNewPlayer(name)
- time[name]=os.time()
- tfm.exec.bindKeyboard(name,32,true,true)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function eventKeyboard(p,key,down,x,y)
- if key==32 and time[p]<os.time()-1000 then
- tfm.exec.addShamanObject(24,x,y)
- time[p]=os.time();
- end
- end
- function eventNewGame()
- tfm.exec.setUIMapName("Bufpuf!")
- end
- function eventPlayerDied(p)
- tfm.exec.respawnPlayer(p)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement