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)
- god={}
- power=0
- alive={}
- sac=0
- dead={}
- sham={}
- function eventNewPlayer(name)
- table.insert(alive,name)
- alive[name]=false
- end
- for i,v in ipairs(tfm.get.room.playerList) do eventNewPlayer(i) end
- function sacrifice(name)
- if alive[name] then
- tfm.exec.displayParticle(12,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
- tfm.exec.killPlayer(name)
- if tfm.get.room.playerList[name].isShaman then
- power=power+sham[name]
- else power=power+1
- end
- tfm.exec.setScore(name,0)
- sac=sac+1
- if sac==1 then table.insert(god,name)
- end
- end
- end
- function highScore()
- local scorer={name="*Souris",score=0}
- for n,p in pairs(tfm.get.room.playerList) do
- if p.score>=scorer.score then
- scorer={name=n,score=p.score}
- end
- end
- return scorer.name
- end
- function deify()
- tfm.exec.killPlayer(god[1])
- tfm.exec.setPlayerScore(god[1],0)
- tfm.exec.setShaman(highScore())
- end
- function eventNewGame()
- power=0
- alive={}
- for i,v in ipairs(tfm.get.room.playerList) do table.insert(alive,i) end
- table.remove(god,1)
- deify()
- end
- function eventPlayerDied(name)
- if name~=god[1] then
- table.insert(dead,name)
- end
- end
- function eventSummoningEnd(name)
- sham[name]=sham[name]-1
- end
- function eventChatCommand(name,cmd)
- local args={}
- for i in cmd:gmatch('%S+') do table.insert(args,i) end
- if name==god[1] and args[1]=='god' then
- if args[2]=='respawn' and power>=1 and not args[3] then tfm.exec.respawnPlayer(dead[math.random(#dead)]) power=power-1
- elseif args[2]=='respawn' and power>=2 and args[3] then tfm.exec.respawnPlayer(args[3]) power=power-2
- elseif args[2]=='sham' and power>=6 and args[3] then if not tfm.get.room.playerList[args[3]].isShaman then tfm.exec.setShaman(args[3]) table.insert(sham,args[3]) sham[args[3]]=6 power=power-6 end
- end
- elseif tfm.get.room.playerList[name].isShaman and args[1]=='sham' then
- if args[2]=='sacrifice' then sacrifice(alive[math.random(#alive)])
- end
- end
- end
- system.disableChatCommandDisplay('god')
- system.disableChatCommandDisplay('sham')
- table.insert(god,tfm.get.room.playerList[math.random(#tfm.get.room.playerList)])
- tfm.exec.newGame('#0')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement