Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --"Cheese robber!" By Deathmatic & Allounett
- maps = {"108", "109", "110", "111", "112", "113", "@4406148", "@4412311", "@4412333"}
- tfm.exec.newGame(maps[math.random(#maps)])
- coordShamX = 1000
- coordShamY = 1000
- currentSham = nil
- function eventNewGame()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAllShamanSkills(true)
- coordShamX = 1000
- coordShamY = 1000
- currentSham = nil
- end
- function eventLoop(currentTime, timeRemaining)
- if timeRemaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- for name,player in pairs(tfm.get.room.playerList) do
- if timeRemaining<=117000 and player.isShaman then
- coordShamX = tfm.get.room.playerList[name].x
- coordShamY = tfm.get.room.playerList[name].y
- currentSham = name
- if not player.hasCheese then
- tfm.exec.giveCheese(name)
- end
- end
- if not player.hasCheese and not player.isShaman and timeRemaining<=117000 and tfm.get.room.playerList[name].x<(coordShamX+30) and tfm.get.room.playerList[name].x>(coordShamX-30) and tfm.get.room.playerList[name].y<(coordShamY+30) and tfm.get.room.playerList[name].y>(coordShamY-30) then
- tfm.exec.giveCheese(name)
- end
- end
- end
- function eventPlayerGetCheese(playerName)
- local i=0
- i=i+1
- if i==11 then
- tfm.exec.killPlayer(currentSham)
- coordShamX = 1000
- coordShamY = 1000
- end
- end
- function eventPlayerDied(playerName)
- local i=0
- for _,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
- function eventPlayerWon(playerName)
- eventPlayerDied(playerName)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement