Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ui.addPopup (1,0,"Bienvenido a Spiritcheese, minijuego creado por Flingoyo, Drymisty y Quesoyquesos, créditos a Thetroz por su valiosa ayuda. escribe !help para ver una lista de comandos y una pequeña ayuda.", nil, 250, 100, 300);
- for name in pairs (tfm.get.room.playerList) do
- system.bindMouse (name);
- end
- function eventMouse (playerName, x, y)
- tfm.exec.addShamanObject (24, x, y);
- end
- local maps = {"@4580112", "@4580134", "@4580171", "@4580165", "@4580177", "@4580185","@4580197", "@4580640", "@4580645"}
- function main()
- tfm.exec.disableAutoNewGame (true)
- tfm.exec.disableAutoTimeLeft (true)
- startNewGame();
- end
- function startNewGame()
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame (maps[math.random(#maps)]);
- end
- function eventLoop (a, timeLeft)
- if timeLeft <= 0 then
- startNewGame();
- end
- end
- function eventPlayerDied (playerName)
- local playersAlive = 0;
- local winner;
- for player in pairs(tfm.get.room.playerList) do
- if not tfm.get.room.playerList[player].isDead then
- playersAlive = playersAlive + 1;
- winner = player;
- end
- end
- if (playersAlive == 1) then
- tfm.exec.setGameTime (10);
- elseif (playersAlive ==0) then
- startNewGame();
- end
- end
- main();
- function eventChatCommand(name,command)
- if command == "help" then
- ui.addPopup (0,0,"Haz click donde desees invocar una chispa, si quieres ponerle color a tu nombre escribe, !rojo o !azul, !amarillo, !naranja, !rosa, !verde.", name, 200, 100, 400)
- elseif command == "rojo" then
- tfm.exec.setNameColor(name, 0xFF0000)
- elseif command == "azul" then
- tfm.exec.setNameColor(name, 0x000AFF)
- elseif command == "verde" then
- tfm.exec.setNameColor(name, 0x32FF00)
- elseif command == "rosa" then
- tfm.exec.setNameColor(name, 0xFD55FB)
- elseif command == "naranja" then
- tfm.exec.setNameColor(name, 0xFF9500)
- elseif command == "amarillo" then
- tfm.exec.setNameColor(name, 0xFFEF00)
- end
- end
- function eventPlayerDied (name)
- tfm.exec.respawnPlayer(name)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement