Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hello Im Overjoy06 from Transformice, if you want to ask me go ask Overjoy06 in transformice I hope you enjoy this module
- Script :
- stats={}
- Id = {}
- pop = 0
- keys = {71,70}
- function eventNewPlayer(name)
- stats[name]={won=0, played=0, lost=0, shaman=0, streak=0}
- Id[name] = pop
- for k,v in pairs(keys) do
- tfm.exec.bindKeyboard(name, v, true, true)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- pop = pop + 1
- end
- function eventNewGame()
- for k,v in pairs(stats) do
- stats[k].played = stats[k].played + 1
- end
- for k,v in pairs(tfm.get.room.playerList) do
- if v.isShaman then
- stats[k].shaman = stats[k].shaman + 1
- end
- end
- end
- function eventPlayerWon(name)
- stats[name].won=stats[name].won+1
- stats[name].streak=stats[name].streak+1
- end
- function eventPlayerDied(name)
- stats[name].lost=stats[name].lost+1
- stats[name].streak=0
- end
- function eventKeyboard(name, key, down, x, y)
- local form = [[
- Wins : %d
- Rounds played : %d
- Current win streak : %d
- ]]
- if key == 70 then
- form = form:format(stats[name].won, stats[name].lost, stats[name].played, stats[name].shaman, stats[name].streak)
- ui.addTextArea(Id[name], form, name, nil, 100, nil, nil, nil, nil, 0.923, true)
- end
- if key == 71 then
- ui.removeTextArea(Id[name], name)
- end
- end
- maps={4877779, 4867614, 4877960, 4988630}
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAllShamanSkills(true)
- tfm.exec.newGame(maps[math.random(#maps)])
- tfm.exec.disableAutoShaman(true) tfm.exec.setGameTime(600)
- function giveWin(p)
- tfm.exec.giveCheese(p)
- tfm.exec.playerVictory(p)
- end
- function eventPlayerDied(dp)
- local c=0
- local pname
- local p
- local _
- for p,_ in pairs(tfm.get.room.playerList) do
- if not(tfm.get.room.playerList
- .isDead) then
- c=c+1
- pname=p
- end
- end
- if(c==1) then
- giveWin(pname)
- ui.addTextArea(0,pname.." had survived last round!")
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventLoop()
- tfm.exec.addShamanObject(tfm.enum.shamanObject.cannon, math.random()*800, 30)
- end
- function eventNewGame()
- tfm.exec.setShaman(n)
- tfm.exec.setNameColor("Epicsouris", 0xFF00FF)
- tfm.exec.setUIMapName("<CH><B>#AutoSurvive!</CH></B>")
- tfm.exec.setGameTime(86400)
- for name,player in pairs(tfm.get.room.playerList) do
- tfm.exec.giveMeep(name)
- end
- end
- function eventChatCommand(name,command)
- if command=="mort" then
- tfm.exec.killPlayer(name)
- elseif command=="help" then
- ui.addPopup(1, 0, "Welcome to #Autosurvive. Survive the endless Cannons. Press 'F' to see your stats! Press 'G' to close the stats. We currently have 4 maps. Created by Overjoy06!", name, 586, 250, nil)
- end
- end
- ui.addTextArea(1,"<a href='event:help'>Help",nil,760,360,30,nil)
- function eventTextAreaCallback(id,n,cb)
- if cb=="help" then
- ui.addPopup(2,0,"Welcome to #Autosurvive. Survive the endless Cannons. Press 'F' to see your stats! Press 'G' to close the stats. We currently have 4 maps. Created by Overjoy06!",n,586,250,nil,nil)
- end
- end
- function eventSummoningEnd(name,objectType,x,y,angle,xSpeed,ySpeed,other)
- if objectType~=0 then
- tfm.exec.removeObject(other.id)
- end
- end
- n="Epicsouris"
- tfm.exec.setShaman(n)
- n="Epicsouris"
- system.bindMouse(n,true)
- function eventMouse(name, x, y)
- tfm.exec.addConjuration(x/10, y/10, 10000)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement