map7='

' players={} --maps={map1,map2,map3,map4,map5,7704767} maps={map7} --test edilecek map (başındaki "--" işaretini kaldır) function eventPlayerDied(name) tfm.exec.setPlayerScore(name, players[name].win, false) tfm.exec.respawnPlayer(name) players[name].timestamp=os.time() tfm.exec.movePlayer(name,players[name].x,players[name].y) end function eventNewPlayer(name) players[name]={x, y, win=1,timestamp=os.time()} tfm.exec.respawnPlayer(name) tfm.exec.bindKeyboard(name,32, true, true) tfm.exec.bindKeyboard(name,77, true, true) tfm.exec.bindKeyboard(name,38, true, true) tfm.exec.bindKeyboard(name,87, true, true) tfm.exec.setPlayerScore(name, players[name].win, false) end function returnMouseCount() count=0 for player in pairs(tfm.get.room.playerList) do if(tfm.get.room.playerList[player].isDead==false) then count=count+1 elseif(players[player].id) then count=count+1 end end return count end function eventLoop(time,remaining) returnMouseCount() if(remaining<=0 or count==0) then newRound() end playerList=tfm.get.room.playerList end function newRound() tfm.exec.setGameTime(77777) tfm.exec.newGame(maps[math.random(#maps)]) end function main() tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAutoShaman(true) tfm.exec.newGame(maps[math.random(#maps)]) tfm.exec.setGameTime(777777) for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end end function eventPlayerWon(playerName) tfm.exec.respawnPlayer(playerName) end main() function eventKeyboard(name, key, down, x, y) tfm.exec.setPlayerScore(name, players[name].win, false) if key==77 then if players[name].timestamp < os.time()-2000 then tfm.exec.killPlayer(name) end end if key==38 or 87 then tfm.exec.killPlayer(name) end if tfm.get.room.xmlMapInfo.xml == map7 then --yatay uzun if players[name].win>=1 then if x>=5590 then if x<=5640 then if y>=5327 then if y<=5382 then players[name].win=players[name].win+0 tfm.exec.movePlayer(name,5741,4163) end end end end end if players[name].win>=1 then if x>=7245 then if x<=7295 then if y>=5322 then if y<=5385 then players[name].win=players[name].win+0 tfm.exec.movePlayer(name,7137,4163) end end end end end if players[name].win==1 then if x>=10 then if x<=295 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,359,54) players[name].x=359 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==2 then if x>=310 then if x<=595 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,659,54) players[name].x=659 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==3 then if x>=610 then if x<=895 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,959,54) players[name].x=959 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==4 then if x>=910 then if x<=1195 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,1259,54) players[name].x=1259 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==5 then if x>=1210 then if x<=1495 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,1559,54) players[name].x=1559 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==6 then if x>=1510 then if x<=1795 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,1859,54) players[name].x=1859 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==7 then if x>=1810 then if x<=2095 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,2159,54) players[name].x=2159 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==8 then if x>=2110 then if x<=2395 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,2459,54) players[name].x=2459 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==9 then if x>=2410 then if x<=2695 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.movePlayer(name,2759,54) players[name].x=2759 players[name].y=54 tfm.exec.killPlayer(name) end end end end end if players[name].win==10 then if x>=2710 then if x<=2995 then if y>=5735 then if y<=5935 then players[name].win=players[name].win+1 tfm.exec.setNameColor(name, 0xFADE55) tfm.exec.movePlayer(name,5512,5371) players[name].x=5512 players[name].y=5371 tfm.exec.killPlayer(name) end end end end end end end function eventPlayerGetCheese(name) tfm.exec.playerVictory(name) end function eventPlayerWon(name) players[name].x=nil players[name].y=nil players[name].id=nil players[name].win=1 end