This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Makinit's flattenFunctionTree | |
do | |
function flattenFunctionTree(tree, path) | |
for name, value in pairs(tree) do | |
if type(value) == "table" then | |
flattenFunctionTree(value, path .. name .. "_") | |
elseif type(value) == "function" then | |
_G[path .. name] = value | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
for name in pairs(tfm.get.room.playerList) do | |
eventNewPlayer(name) | |
end | |
end | |
function eventNewPlayer(name) | |
system.bindMouse(name) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
for name in pairs(tfm.get.room.playerList) do | |
eventNewPlayer(name) | |
end | |
end | |
function eventNewPlayer(name) | |
tfm.exec.setVampirePlayer(name) | |
tfm.exec.respawnPlayer(name) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
for name in pairs(tfm.get.room.playerList) do | |
eventNewPlayer(name) | |
end | |
end | |
function eventNewPlayer(name) | |
tfm.exec.setShaman(name) | |
tfm.exec.respawnPlayer(name) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_space = 32 | |
keyDelay = 200 | |
kts = {} | |
function main() | |
for n in pairs(tfm.get.room.playerList) do | |
eventNewPlayer(n) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local maps = {1810386,1864223,1729924,2372033,1700658,1484328,2706423,1738989,3295997} | |
local currentMap | |
local playersAlive | |
function main() | |
tfm.exec.disableAutoNewGame(true) | |
startGame() | |
end | |
function startGame() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() | |
ui.addTextArea(0, "<p align='center'><a href='event:color'>Color</a></p>", nil, 10, 32, 120, 16, nil, nil, 1, true) | |
end | |
function eventTextAreaCallback(id, name, cb) | |
if id==0 then | |
ui.showColorPicker(0, name, 0xC2C2DA, "Escoge un color para tu nombre") | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- variables modificables | |
--------------------------------- | |
despawnTime = 1500 | |
fireDelay = 200 | |
offsetX = 0 | |
offsetY = 0 | |
--------------------------------- | |
keys = {0,2,32} | |
_left = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ejemplo de tienda | |
keys = {0,2,32} | |
_left = 0 | |
_right = 2 | |
_space = 32 | |
-- {nombre, precio, descripción} | |
shopData = { | |
{"Velocidad", 1500, "Te da un pequeño impulso de velocidad hacia los lados."}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Ejemplo de sistema de vidas | |
-- Lives system example | |
_imgHearts = {"14d787f74b0","14d787f8754","14d787fa0e9"} | |
local playersAlive = 0 | |
local playersInRoom = 0 | |
local mice = {} | |
local isAlive | |
local idLives = {} |