Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoTimeLeft(true)
- system.disableChatCommandDisplay('map1', true)
- system.disableChatCommandDisplay('map2', true)
- system.disableChatCommandDisplay('map3', true)
- system.disableChatCommandDisplay('map4', true)
- system.disableChatCommandDisplay('map5', true)
- system.disableChatCommandDisplay('map6', true)
- system.disableChatCommandDisplay('reset',true)
- system.disableChatCommandDisplay('mort',true)
- easymaps={4627777,3888888,4488666,1646448,549666,3380788,2738370,496610,460961,444589,438333,435812,432501,431749,4237910,3999991,3866663,3866660,3759157,394125,3603631,3561333,3560999,3337127,3330219,3281758,3219400,3185979,3137929,866660,3484437,266398,281985,296020,2747525,4333895,3820501,4313858,322649,3838020,1852910,4948659,3483300,2918822,3500000,401630,783547,3527399,1580835,256899,163506,258192,159116,153996,1972688,834297,431433,458528,412913,292808,113156,3500755,149451,150664,170007,155611,152260,155480,155765,156720,157203,159187,161023,161434,162482,163159,163172,163531,164916,164916,166032,166056,166271,166361,166430,166805,167075,167903,168754,169059,169076,169110,169228,170514,171480,171776,172512,172520,172547,173623,173816,175204,175280,176710,176729,182370,183141,184648,505619,506032,184868,185289,185873,185887,186066,191177,191642,192158,192255,912356,195116,919484,197229,199210,199826,202574,204488,204647,205240,206396,208373,232675,208653,208940,209848,213752,216173,222377,222910,227093,231137,232469,236768,242291,250153,410040,419335,424604,438449,1255359,1162831,1383297,1390405,1398609,1403539,1427980,330841,1523082,2176211,375455,6137767,159691,3734999,591528,554154,593003,1102513,1134969,1296299,1636814,6593495,1802528,1951944,1962695,2484316,2050389,2128560,2208924,2239788,2341982,2432090,2444812,2574960,2636207,2669415,2693344,2693587,2704483,2777168,2828481,2850177,2470461,2933011,2947140,2974387,3000006,3024606,3016226,3043779,3085218,208548,3161324,3295960,3338283,3343092,3395605,2998268,4632975,4000010,3500000,6079100,4117513,5616777,157098,361500,336305,332906,333002,331988,331344,320483,315800,315666,314743,313216,305614,303151,303939,302080,295932,295465,279337,277824,277513,270924,271411,261814,261298,257715,257324,257218,237091,1678634,1733211,1807217,2423300,2794566,3199998,3136410,842167,801683,729863,692650,592189,564198,562897,556575,556841,543010,523270,512887,506032,500690,497965,492222,467137,455271}
- mediummaps={263819,225484,357892,3908151,3668866,3333223,2469365,823329,4337732,4107909,4000008,4000007,3860578,3849999,3826546,3815568,3779861,3767893,3747520,3734989,1737800,6462982,3668877,3659983,3576303,1939604,5292798,2601214,3493456,3473704,3471016,3404894,5085011,3292308,4373748,5348692,3200001,3964892,3920916,3750360,294478,298424,305680,353356,346684,3963960,2718406,2797076,2811229,3042080,2817711,4121359,5132197,1568331,4413656,3999979,3939000,4484685,3530999,2758747,4720851,4506542,315283,4794517,4822672,5008365,5505990,4000662,5356911,5758150,3985463,4660408,330827,366260,4632975,3828508,2659411,6575613,2633917,355336,313214,6609034,3999979,3041105,4578236,4697673,195453,5616978,6546598,1952415,6022675,2080400,4362335,3645415,1737914,3118161,1923584,293306,3434941,2474044,2860211,3311534,4093488,4000000,2961800,2719419,2789121,3038589,2920826,4295473,605255,3456260,320607,3295954,600050,150651,152733,157004,158417,160841,3668888,5134116,4067327,557132,163094,172605,179005,185529,189819,192560,203664,214755,216171,2795201,225744,231921,254785,263819,272689,272518,277427,289865,4617716,301610,304861,590775,316012,318129,327354,330967,365061,372255,397469,374995,3133917,424685,424900,2932238,439092,454049,457726,482791,492399,499986,504485,522719,531084,541729,552986,574183,596239,684566,721319,758595,815336,898934,1111252,970919,976944,1004622,1046877,1066607,1130256,1157281,1164086,1242584,536905,1266330,1303323,1323048,1301649,2772507}
- hardmaps={4209243,1156092,4224188,3895460,2514792,722837,397478,4051345,3418086,4948551,383358}
- yikesmaps={4209243, 4532470, 5085011, 4720851, 3038589, 397478, 4948551, 4794517, 1111252, 3976766}
- easyno=table.getn(easymaps)
- mediumno=table.getn(mediummaps)
- hardno=table.getn(hardmaps)
- yikesno=table.getn(yikesmaps)
- bestplayer="N/A"
- bestplayer2="N/A"
- bestplayer3="N/A"
- playerlist={"Dfoudre","Muffwind","Avebigus"}
- playertrue={Dfoudre=true,Muffwind=true,Avebigus=true}
- scores={}
- x=0
- e=1
- for i,n in pairs(playerlist) do
- scores[n]=0
- tfm.exec.setPlayerScore(n,scores[n],false)
- tfm.exec.bindKeyboard(n,8,true,true)
- end
- tfm.exec.newGame('#13')
- function eventNewPlayer(name)
- if playertrue[name] then
- tfm.exec.bindKeyboard(name,8,true,true)
- tfm.exec.respawnPlayer(name)
- tfm.exec.setPlayerScore(name,scores[name],true)
- tfm.exec.chatMessage(name .. " has joined!")
- end
- if name == "Muffwind" then
- tfm.exec.respawnPlayer(name)
- end
- end
- function eventNewGame()
- print("Start")
- for i,n in pairs(tfm.get.room.playerList) do
- tfm.exec.killPlayer(i)
- end
- if bestplayer ~= "N/A" then
- if playertrue[bestplayer] then
- scores[bestplayer]=scores[bestplayer]+5
- tfm.exec.chatMessage(bestplayer .. " was fastest, completing the map in " .. besttime1/100 .. "s, earning 5 bonus points!")
- end
- end
- if bestplayer2 ~= "N/A" then
- if playertrue[bestplayer2] then
- scores[bestplayer2]=scores[bestplayer2]+3
- tfm.exec.chatMessage(bestplayer2 .. " was second fastest, completing the map in " .. besttime2/100 .. "s, earning 3 bonus points!")
- end
- end
- if bestplayer3 ~= "N/A" then
- if playertrue[bestplayer3] then
- scores[bestplayer3]=scores[bestplayer3]+1
- tfm.exec.chatMessage(bestplayer3 .. " was third fastest, completing the map in " .. besttime3/100 .. "s, earning 1 bonus point")
- end
- end
- for i,n in pairs(playerlist) do
- if playertrue[n] then
- tfm.exec.setPlayerScore(n,scores[n],false)
- tfm.exec.respawnPlayer(n)
- end
- end
- tfm.exec.setGameTime(360)
- x=x+1
- y=x%3
- pointsremaining=5
- besttime1=1000000
- besttime2=1000001
- besttime3=1000002
- bestplayer=""
- bestplayer2=""
- bestplayer3=""
- tfm.exec.setUIShamanName("Fastest: N/A | Time: N/A s")
- tfm.exec.setUIMapName("")
- e=1
- end
- function eventKeyboard(name, key, down, xPlayerPosition, yPlayerPosition)
- if key==8 then
- tfm.exec.killPlayer(name)
- tfm.exec.respawnPlayer(name)
- end
- end
- function eventChatCommand(name, cmd)
- local cmd_args={}
- for arg in cmd:gmatch("[^%s]+") do
- table.insert(cmd_args, arg)
- end
- if cmd=="mort" then
- if playertrue[name] then
- tfm.exec.killPlayer(name)
- tfm.exec.respawnPlayer(name)
- end
- end
- if name=="Muffwind" then
- if cmd_args[1]=="map" then
- tfm.exec.newGame(cmd_args[2])
- end
- if cmd=="end" then
- tfm.exec.newGame(0)
- end
- if cmd=="easymap" then
- tfm.exec.newGame(easymaps[math.random(easyno)])
- end
- if cmd=="mediummap" then
- medrn=math.random(mediumno)
- print(medrn)
- tfm.exec.newGame(mediummaps[medrn])
- end
- if cmd=="hardmap" then
- tfm.exec.newGame(hardmaps[math.random(hardno)])
- end
- if cmd=="vhardmap" then
- tfm.exec.newGame(yikesmaps[math.random(yikesno)])
- end
- if cmd=="reset" then
- tfm.exec.newGame(0)
- x=0
- bestplayer=""
- bestplayer2=""
- bestplayer3=""
- for i,n in pairs(playerlist) do
- scores[n]=0
- tfm.exec.respawnPlayer(i)
- tfm.exec.bindKeyboard(n,8,true,true)
- tfm.exec.setPlayerScore(n,0,false)
- end
- end
- if cmd=="win" then
- tfm.exec.giveCheese(name)
- tfm.exec.playerVictory(name)
- end
- if cmd=="top3" then
- tfm.exec.chatMessage(bestplayer .. " " .. besttime1/100 .. "s | " .. bestplayer2 .. " " .. besttime2/100 .. "s | " .. bestplayer3 .. " " .. besttime3/100 .. "s")
- end
- if cmd=="scores" then
- print(scores[name])
- end
- end
- end
- function eventPlayerWon(name,time,time2)
- if e==1 then
- if playertrue[name] then
- print(time/100 .. " " .. name .. " " .. time2/100)
- tfm.exec.chatMessage(name .. " completed the map in " .. time2/100 .. "s earning ".. pointsremaining .. " points")
- scores[name]=scores[name]+pointsremaining
- tfm.exec.setPlayerScore(name,pointsremaining,true)
- if pointsremaining>1 then
- pointsremaining=pointsremaining-1
- end
- if time2 < besttime1 then
- besttime3=besttime2
- bestplayer3=bestplayer2
- besttime2=besttime1
- bestplayer2=bestplayer
- besttime1=time2
- bestplayer=name
- tfm.exec.setUIShamanName(bestplayer .. " " .. besttime1/100 .. "s | " .. bestplayer2 .. " " .. besttime2/100 .. "s | " .. bestplayer3 .. " " .. besttime3/100 .. "s")
- elseif time2 < besttime2 then
- besttime3=besttime2
- bestplayer3=bestplayer2
- besttime2=time2
- bestplayer2=name
- tfm.exec.setUIShamanName(bestplayer .. " " .. besttime1/100 .. "s | " .. bestplayer2 .. " " .. besttime2/100 .. "s | " .. bestplayer3 .. " " .. besttime3/100 .. "s")
- elseif time2 < besttime3 then
- besttime3=time2
- bestplayer3=name
- tfm.exec.setUIShamanName(bestplayer .. " " .. besttime1/100 .. "s | " .. bestplayer2 .. " " .. besttime2/100 .. "s | " .. bestplayer3 .. " " .. besttime3/100 .. "s")
- end
- end
- end
- tfm.exec.respawnPlayer(name)
- end
- function eventPlayerDied(name)
- if playertrue[name] then
- tfm.exec.respawnPlayer(name)
- end
- if name== "Muffwind" then
- tfm.exec.respawnPlayer(name)
- end
- end
- function eventLoop(a,b)
- if b<=0 then
- if e==1 then
- tfm.exec.chatMessage("Time is up!")
- e=e-1
- end
- end
- end
Add Comment
Please, Sign In to add comment