Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --code of campal minigame (TFM) made by Dewlp
- tbl={};
- function eventNewPlayer(player)
- tbl[player]=os.time();
- for str,int in pairs({40,83}) do
- tfm.exec.bindKeyboard(player,int,true,true)
- end
- end
- for players in pairs(tfm.get.room.playerList) do
- eventNewPlayer(players)
- end
- function eventKeyboard(player,key,press,x,y)
- if (key==40 or key==83) and tbl[player] < os.time()-1225 and not tfm.get.room.playerList[player].isDead then
- if tfm.get.room.playerList[player].isFacingRight then
- tfm.exec.addShamanObject(17, x, y-50 , 120, 10)
- tbl[player]=os.time();
- else
- tfm.exec.addShamanObject(17, x, y-50, 240, 10)
- tbl[player]=os.time();
- end
- end
- end
- function eventLoop()
- for str,int in pairs(tfm.get.room.playerList) do
- if tfm.get.room.playerList[str].isDead and not tfm.get.room.playerList[str].isShaman and tbl[str] <= os.time()-5000 then
- tfm.exec.respawnPlayer(str)
- tbl[str]=os.time();
- end
- end
- end
- print('<n>available keys: <r>40 <n>- <r>down <n>/ <r>83 <n>- <r>S')
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame('<C><P L="1600" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="324650" H="10" X="400" Y="135" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="324650" H="10" X="801" Y="260" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="324650" H="10" X="1200" Y="385" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="324650" H="10" X="0" Y="385" T="12" /><S H="65" P="0,0,0,0.2,45,0,0,0" L="65" X="-100" Y="386" T="1" /><S P="0,0,0,0.2,45,0,0,0" L="65" H="65" X="905" Y="260" T="1" /></S><D /><O /></Z></C>')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement