EVENTOS E FUNÇÕES ÚTEIS
Uma referência rápida para quem está criando scripts Lua.
Eventos comuns
eventNewPlayer
Chamado quando um jogador entra.
Código
function eventNewPlayer(playerName)
end
eventPlayerLeft
Chamado quando um jogador sai.
Código
function eventPlayerLeft(playerName)
end
eventPlayerDied
Chamado quando um jogador morre.
Código
function eventPlayerDied(playerName)
end
eventPlayerWon
Chamado quando um jogador vence.
Código
function eventPlayerWon(playerName)
end
eventNewGame
Executado quando uma nova rodada começa.
Código
function eventNewGame()
end
eventLoop
Executado repetidamente durante a partida.
Código
function eventLoop(currentTime, remainingTime)
end
eventChatCommand
Utilizado para comandos enviados pelo chat.
Código
function eventChatCommand(playerName, command)
end
Funções conhecidas
Mensagem no chat
Código
tfm.exec.chatMessage("Olá!")
Matar jogador
Código
tfm.exec.killPlayer(playerName)
Renascer jogador
Código
tfm.exec.respawnPlayer(playerName)
Alterar nome exibido
Código
tfm.exec.setNameColor(playerName, 0xFFFFFF)
Adicionar objeto
Código
tfm.exec.addShamanObject(...)
Carregar mapa
Código
tfm.exec.newGame(...)
Este tópico poderá receber novas funções e exemplos com o tempo.
MiceWay
Português do Brasil
Inglês
Francês
Espanhol
Turco
Polonês
Húngaro
Romeno
Árabe
Hebraico
Croata
Indonésio
Holandês
Russo
Chinês
Lituano
Japonês
Finlandês
Italiano
Tcheco
Eslovaco
Búlgaro
Estoniano