Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- owner = "Sagazgamer" -- Troque pelo seu nome
- local tempo=1;
- interval = 10
- cannonInfo = {}
- difficulty = 8
- maps = {"5498543", "2939549", "3067251" , "2732060" , "1388662" , "1522692" , "5805758" , "4978958" , "4934730" , "290546" , "1754355" , "306382" , "1812056" , "1794907" , "1794873" , "1543937" , "1539148" , "1533374" , "1533333" , "1528388" , "1528388" , "1525486" , "1519483" , "1515058" , "1492805" , "1463332" , "1277941" , "908739" , "866256" , "852617" , "848697" , "811211" , "803074" , "802975" , "802958" , "799141" , "799141" , "797964" , "793117" , "770675" , "697561" , "540495" , "521931" , "500312" , "495880" , "490248" , "479091" , "478116" , "464787" , "459284" , "397066" , "393406" , "392646" , "392616" , "391738" , "391643" , "390649" , "390386" , "390386" , "311496" , "307930" , "306360" , "305753" , "305748" , "304482" , "304198" , "302224" , "300404" , "299123" , "296033" , "295988" , "293487" , "293222" , "292678" , "292592" , "291643" , "291399" , "290974" , "290971" , "290865" , "290725" , "289964" , "289932" , "281649" , "281492" , "281479" , "281431" , "280159" , "280120" , "279689" , "276534" , "5742568" , "4842994" , "307925" , "937383" , "5175883" , "5727516" , "5651376" , "2964900" , "5583170" , "5734549" , "4679748" , "4705798" , "958881" , "391664" , "5239078" , "3584826" , "5514055" , "3579303" , "4543602" , "1661909" , "390657" , "573817" , "333020" , "4329532" , "3540608" , "492283" , "1026249" , "1545834" , "1659906" , "3322939" , "3295213" , "3699989" , "5532572" , "741041" , "489470" , "395246" , "292672" , "306106" , "3584123" , "3107377" , "3685564" , "787131" , "2408376" , "3620709" , "3587860" , "3549404" , "481676" , "3550350" , "3480467" , "3473722" , "4794242" , "290388" , "3419948" , "2931068" , "3349286" , "2842113" , "391057" , "3400319" , "1514928" , "2526952" , "489829" , "3146721" , "3175437" , "5800128" , "5771238" , "5764777" , "5721894" , "5721064" , "5720967" , "5720727"}
- function main()
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- function eventNewGame()
- interval = 10
- end
- function eventNewPlayer(name)
- ui.addTextArea(1, "<a href='event:devagar'><VP><font size='14'>D", name, 728, 21, nil, nil, 0x000001, nil, 0.7)
- ui.addTextArea(2, "<a href='event:médio'><J><font size='14'>M", name, 753, 21, nil, nil, 0x000001, nil, 0.7)
- ui.addTextArea(3, "<a href='event:rápido'><R><font size='14'>R", name, 781, 21, nil, nil, 0x000001, nil, 0.7)
- end
- function eventTextAreaCallback(id, name, cb)
- if (owner==name or owner=="Sagazgamer") and interval > 6 then
- interval = 10
- if cb == "devagar" then
- difficulty = 7
- elseif cb == "médio" then
- difficulty = 8
- elseif cb == "rápido" then
- difficulty = 9
- end
- end
- end
- function eventLoop(currentTime, timeRemaining)
- if currentTime>3000 then
- interval = interval - 1
- if interval == difficulty then
- ui.removeTextArea(4)
- local users = {}
- for name,p in pairs(tfm.get.room.playerList) do
- if not p.isDead then
- users[#users+1] = name
- end
- end
- cannonInfo = spawnCannon(users[math.random(#users)])
- interval = 12
- elseif interval<=5 then
- tfm.exec.setUIMapName("<ROSE>O próximo mapa começará em "..interval)
- if interval == 0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- elseif interval == 10 then
- tfm.exec.addShamanObject(17, cannonInfo[1], cannonInfo[2], cannonInfo[3]-90)
- cannonInfo={}
- end
- end
- tempo = tempo +0.5
- if (tempo%1 == 0) then
- T = string.format("%.2d:%.2d",tempo/60%999999, tempo%60)
- tfm.exec.setUIMapName("<N>Tempo Jogado: <J>"..T.."</J>")
- end
- end
- function eventPlayerDied(name)
- if playerCount() < 1 then
- interval = 6
- end
- end
- function playerCount()
- local n=0
- for name, player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- n=n+1
- end
- end
- return n
- end
- function spawnCannon(name)
- local info = {}
- local px = tfm.get.room.playerList[name].x
- local py = tfm.get.room.playerList[name].y
- local cnnx = math.random()*800
- local cnny = math.random()*400
- if cnny > py then
- cnny = py-math.random(50)-20
- end
- if math.abs(cnnx-px) > 300 then
- cnnx = px + math.random(-50, 50)
- end
- local ang = math.deg(math.atan2(cnny-py, cnnx-px))
- tfm.exec.addShamanObject(0, cnnx, cnny, ang+90)
- info[1] = cnnx
- info[2] = cnny
- info[3] = ang
- return info
- end
- for name in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement