Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------By Nicknamepll
- --------------Minigame name Speedracing
- -------------21.10.13
- ----- Komendy -----
- tfm.exec.setNameColor("Nicknamepll", 0xFF1900)
- tfm.exec.setNameColor("Ouake", 0xFF1900)
- system.disableChatCommandDisplay("off",true)
- system.disableChatCommandDisplay("help",true)
- system.disableChatCommandDisplay("pomoc",true)
- tfm.exec.disableAutoTimeLeft (true)
- tfm.exec.disableAutoShaman(true)
- ----- Bindowanie -----
- function eventNewPlayer(playerName)
- tfm.exec.bindKeyboard(playerName,37,true,true)
- tfm.exec.bindKeyboard(playerName,39,true,true)
- tfm.exec.bindKeyboard(playerName,65,true,true)
- tfm.exec.bindKeyboard(playerName,68,true,true)
- end
- for playerName,player in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(playerName,37,true,true)
- tfm.exec.bindKeyboard(playerName,39,true,true)
- tfm.exec.bindKeyboard(playerName,65,true,true)
- tfm.exec.bindKeyboard(playerName,68,true,true)
- end
- ----- Szybkość -----
- function eventKeyboard(playerName,key,down,x,y)
- if key==37 or key == 65 then
- tfm.exec.movePlayer(playerName, 0, 0, true, -20, 0, true)
- elseif key==39 or key==68 then
- tfm.exec.movePlayer(playerName, 0, 0, true, 20, 0, true)
- end
- end
- ----- Gra -----
- function main()
- tfm.exec.disableAutoNewGame (true);
- tfm.exec.disableAutoShaman(true);
- tfm.exec.disableAutoTimeLeft (true);
- tfm.exec.disableAutoScore (true);
- tfm.exec.disableAfkDeath (true);
- end
- ----- Pasek z Informacjami -----
- function eventNewGame()
- tfm.exec.setUIMapName("<P>Speedracing!</P>")
- tfm.exec.setGameTime(60*1)
- tfm.exec.setUIShamanName ("<L>Miłej zabawy!</L>")
- end
- ----- Rotacja map -----
- tfm.exec.disableAutoNewGame(true)
- maps={"@2134537", "@333714", "@333714", "@445219", "@333714", "@445219", "@2546484", "@333714", "@445219", "@2546484", "@406266", "@333714", "@445219", "@2546484", "@406266", "@669031", "@1378209", "@263163", "@798953", "@333714", "@798953", "@333714", "@445219", "@2546484", "@406266", "@669031", "@1378209", "@263163",}
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventPlayerDied()
- local i=0
- for n,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventPlayerWon(name)
- end
- function eventPlayerDied(name)
- end
- for name,player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name, true)
- end
- function eventNewPlayer(name)
- tfm.exec.bindKeyboard(name,32,true,true)
- tfm.exec.respawnPlayer(name);
- tfm.exec.setUIShamanName("<J>Speed</J>")
- end
- ----- Callbacki -----
- ui.addTextArea(0, "<a href='event:help'>Changelog & Commands</a>", nil, nil, nil, nil, "0x6A7495", "0x6A7495", nil)
- function eventTextAreaCallback(id,name,cb)
- if cb=='help' then
- ui.addTextArea(1, "<br ><ROSE>CHANGELOG</ROSE><br /><br >Add new map <ROSE>- V 0.0.2 -</ROSE><br /><br >Add Callback <ROSE>- V 0.0.3 -</ROSE><br >Fixed some bugs <ROSE>- V 0.0.4 -</ROSE><br /><br ><ROSE>COMMANDS<br /></ROSE> - Lista pomocników.<br ><J>'!pomocnicy'</J> - <br /></ROSE><br /></ROSE>Lista testerów.<br /> <br ><J>'!testerzy'</J> - <br /></ROSE>Automatycznie zabija mysz<br /> - <br ><J>'!mort'</J><br /></ROSE></ROSE>\n<br><br><a href='event:close'><VP>Zamknij</VP></a>", name)
- end
- if cb=='close' then
- ui.removeTextArea(1, name)
- end
- end
- print '<rose>Version 0.0.4</rose> - <J>Fixed some bugs'
- print '<VP> By Nicknamepll'
- ----- Wszystkie Komendy dla graczy -----
- function eventChatCommand(playerName, com)
- if com == 'pomocnicy' then
- ui.addPopup(1,0,"Shamousey, Woterek, Szel, Ouake i Tomiek",playerName,175,200,450)
- else if com == 'testerzy' then
- ui.addPopup(1,0,"Ouake, Szel, Tomiek i Vuouv",playerName,175,200,450)
- else if com == 'mort' then
- tfm.exec.killPlayer(playerName)
- else if com == 'off' then
- system.exit()
- end
- end
- end
- end
- end
- --------------------------- Version 0.0.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement