View difference between Paste ID: 6e2Y46Lj and zUuLuYiU
SHOW: | | - or go back to the newest paste.
1
 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);
2
for name in pairs (tfm.get.room.playerList) do
3
    system.bindMouse (name);
4
end
5
 
6
function eventMouse (playerName, x, y)
7
    tfm.exec.addShamanObject (24, x, y);
8
end
9
 
10-
local maps = {"@4580112", "@4580134", "@4580171", "@4580165", "@4580177", "@4580185","@4580197", "@4580640", "@4580645"}
10+
local maps = {"@4580112", "@4580134", "@4580171", "@4580165", "@4580177", "@4580185","@4580197", "@4580640", "@4580645", "@4581538", "@4581571"}
11
 
12
 function main()
13
        tfm.exec.disableAutoNewGame (true)              
14
        tfm.exec.disableAutoTimeLeft (true)            
15
        startNewGame();
16
end
17
 
18
function startNewGame()
19
                tfm.exec.disableAutoShaman(true)
20
        tfm.exec.newGame (maps[math.random(#maps)]);
21
end
22
 
23
function eventLoop (a, timeLeft)
24
        if timeLeft <= 0 then
25
                startNewGame();
26
        end
27
end
28
 
29
function eventPlayerDied (playerName)
30
        local playersAlive = 0;
31
        local winner;
32
       
33
        for player in pairs(tfm.get.room.playerList) do
34
                if not tfm.get.room.playerList[player].isDead then
35
                        playersAlive = playersAlive + 1;
36
                        winner = player;
37
                end
38
        end
39
       
40
        if (playersAlive == 1) then
41
                tfm.exec.setGameTime (10);
42
               
43
        elseif (playersAlive ==0) then
44
                startNewGame();
45
        end
46
end
47
 
48
main();
49
 
50
function eventChatCommand(name,command)
51
    if command == "help" then
52
        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)
53
        elseif command == "rojo" then
54
            tfm.exec.setNameColor(name, 0xFF0000)        
55
        elseif command == "azul" then
56
            tfm.exec.setNameColor(name, 0x000AFF)        
57
    elseif command == "verde" then
58
            tfm.exec.setNameColor(name, 0x32FF00)        
59
    elseif command == "rosa" then
60
            tfm.exec.setNameColor(name, 0xFD55FB)        
61
    elseif command == "naranja" then
62
        tfm.exec.setNameColor(name, 0xFF9500)        
63
    elseif command == "amarillo" then
64
        tfm.exec.setNameColor(name, 0xFFEF00)        
65
        end
66
end
67
68
function eventPlayerDied (name)
69
	tfm.exec.respawnPlayer(name)
70
end