Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAllShamanSkills (true)
- tfm.exec.disableAutoShaman (true)
- tfm.exec.disableAutoNewGame(true)
- countdown = 10
- maps = {7154043, 7154390, 7154714, 7167039, 7167039, 7167061, 7167891, 7167068, 7167926, 7167940, 7167934, 7167952, 7167956, 7167960 ,7167964, 7167971 ,7167973}
- players = {}
- data={}
- function PlayerMaxScore(ttype)
- if ttype=="NamePlayerMaxScore" or "ScorePlayerMaxScore" then
- maxScore=0
- score={}
- name=""
- local x=0
- for n,p in pairs(tfm.get.room.playerList) do table.insert(score,p.score); end
- for n,p in pairs(score) do x=x+1
- if score[x] >= maxScore then maxScore = score[x] end
- end
- for n,p in pairs(tfm.get.room.playerList) do if p.score == maxScore then name = n
- end
- end
- if ttype=="NamePlayerMaxScore" then
- return name
- elseif ttype=="ScorePlayerMaxScore" then
- return maxScore
- end -- end ttype
- end -- end ttype
- end -- end function
- function eventNewPlayer(n)
- data[n]={Stime=os.time(),name=n}
- tfm.exec.chatMessage("<vp>DropBox <j>أهلاً بكم في نمط<br><br><rose>!!! حاول الهرب من الشامان الذي يضع الصناديق",n)
- end
- for n,p in pairs(tfm.get.room.playerList) do
- eventNewPlayer(n)
- end
- function eventNewGame()
- shaman = PlayerMaxScore("NamePlayerMaxScore")
- countdown = 10
- started = false
- tfm.exec.setUIMapName("<J>"..countdown.."...\n")
- tfm.exec.setUIShamanName(shaman)
- tfm.exec.killPlayer (shaman)
- tfm.exec.setNameColor(shaman, 0x00FFDB)
- system.bindMouse(shaman, true)
- end
- function eventMouse(name, x, y)
- local ia=math.random(1,14)
- local ib=math.random(21,44)
- local ii=math.random(ia,ib)
- if data[name].Stime < os.time()-3000 and name == shaman then
- tfm.exec.addShamanObject(tfm.enum.shamanObject.littleBox, x, y, 0, 0, 0, false)
- local r = 30
- for i = 1, 360 do
- local angle = i * math.pi / 180
- local ptx, pty = x + r * math.cos( angle ), y + r * math.sin( angle )
- tfm.exec.displayParticle (ii, ptx, pty, 0, 0, 0, 0, nil )
- end
- data[name].Stime=os.time()
- end
- end
- function eventLoop()
- started = true
- countdown = countdown - 1
- tfm.exec.setUIMapName("<J>"..countdown.."...\n")
- if countdown <= 0 then
- tfm.exec.setUIMapName("انطلاق")
- tfm.exec.chatMessage("<rose>!! انت الشامان الان<br>حاول منع الفأران من الدخول بأستخدام الفأرة",shaman)
- end
- end
- function eventPlayerDied(name)
- local i=0
- local n
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- n=pname
- end
- end
- if i==0 then
- nextRound()
- end
- end
- function eventPlayerWon(name,tE,tER)
- local i=0
- local n
- for pname,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- n=pname
- end
- end
- if i==0 then
- nextRound()
- end
- end
- function nextRound()
- tfm.exec.setPlayerScore (shaman,0)
- tfm.exec.newGame(maps[math.random(#maps)]);
- end
- for n in pairs(tfm.get.room.playerList)do
- if n ~= shaman then
- tfm.exec.setNameColor(n,0x00FFDB)
- end
- end
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.setNameColor("Turkitutu",0x00ff00)
- tfm.exec.setNameColor("wassimevicw",0x00ff00)
- tfm.exec.setNameColor("unlocker001",0x00ff00)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement