×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Tribus
  • /
  • Lesna Kraina
  • /
  • Dla władzy
  • /
  • Kody lua.
Kody lua.
Mlekowaty
« Consul »
Membre
1512406800000
    • Mlekowaty#4870
    • Profil
    • Derniers messages
    • Tribu
#1
  0

http://i.imgur.com/evaQb2c.png



Podłoga to lawa!

map={
7214563,
7273409,
7274207
}
tfm.exec.setGameTime(6000,true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.newGame(map[math.random(#map)])
tfm.exec.setUIMapName("The floor is lava!")
ilosc = 10
for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.setPlayerScore(name,0)
end
tfm.exec.addPhysicObject(1,800,387,{
type=6,
restitution=0.2,
friction=0.3,
width=1600,
height=37,
groundCollision=true,
miceCollision=true
})
to=0
czas=10
score = 0


function eventLoop(timeRemaining,timeRemaining)
if(to==2) then
czas=czas-1
score = score + 1
if(score==10) then
for name, player in pairs(tfm.get.room.playerList) do
tfm.exec.giveMeep(name)
end
end
if(czas==3) then
usun = tfm.exec.addShamanObject(math.random(1,7),math.random(100,1500),350,0,0,0,false)
usunn = tfm.exec.addShamanObject(math.random(1,7),math.random(100,1500),350,0,0,0,false)

end
if(czas==-3) then
tfm.exec.removeObject(usun)
tfm.exec.removeObject(usunn)

ilosc = ilosc - 1
czas=ilosc
tfm.exec.addPhysicObject(1,800,387,{
type=6,
restitution=0.2,
friction=0.3,
width=1600,
height=37,
groundCollision=true,
miceCollision=true
})
tfm.exec.removePhysicObject(2)
end

if(czas<=0) then

tfm.exec.addPhysicObject(1,800,387,{
type=6,
restitution=0.2,
friction=0.3,
width=1600,
height=37,
groundCollision=true,
miceCollision=false
})
tfm.exec.addPhysicObject(2,800,387,{
type=3,
restitution=0.2,
friction=0.3,
width=1600,
height=37,
groundCollision=true,
miceCollision=false
})

ui.addTextArea(7, "<p align='center'><font size='50' color='#FF0000'>THE FLOOR IS LAVA</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true,true)
else
ui.addTextArea(7, "<p align='center'><font size='90'>"..czas.."</font></p>", nil, 50, 125, 700, 119, 0x324650, 0x000000, 0, true,true)
ui.addTextArea(5,"", nil, 50, 250, 700, 119, 0x324650, 0x000000, 0, true,true)
end
to=0
else
to=to+1
end
if(ilosc==4) then
ilosc=10
end
end
liczba=0
tablica={}
zycie={}
e=0
for name, player in pairs(tfm.get.room.playerList) do
tablica[name]=0
e=e+1

print(name)
end
print(e)
function eventPlayerDied(n)
tfm.exec.setUIShamanName(n.." has died.")
tfm.exec.setPlayerScore(n,-2,true)
tablica[n]=1
zycie[n]=0
e=e-1
print(e)
for name, player in pairs(tfm.get.room.playerList) do
if(tablica[name]==0) then
liczba=liczba+1
wyg=name
end
end
function eventPlayerLeft(n)
tablica[n]=1
zycie[n]=0
e=e-1
print(e)
for name, player in pairs(tfm.get.room.playerList) do
if(tablica[name]==0) then
liczba=liczba+1
wyg=name
end
end
end
if(liczba==1) then
print(wyg.." wygral")
tfm.exec.giveCheese(wyg)
ui.addTextArea(5, "<p align='center'><font size='50' color='#FFFF00'>"..wyg.." has won the game</font></p>", nil, 50, 250, 700, 500, 0x324650, 0x000000, 0, true,true)
tfm.exec.playerVictory(wyg)
tfm.exec.newGame(map[math.random(#map)])
tfm.exec.setUIMapName("The floor is lava!")
tfm.exec.addPhysicObject(1,800,387,{
type=6,
restitution=0.2,
friction=0.3,
width=1600,
height=37,
groundCollision=true,
miceCollision=true
})
to=0
czas=10
score = 0
e=0
tablica={}
ilosc=10
tfm.exec.setPlayerScore(wyg,score,true)
for name, player in pairs(tfm.get.room.playerList) do
tablica[name]=0
zycie[name]=1
e=e+1
end
wyg=""
liczba=0
print(e)
else
liczba=0
end
end
function eventPlayerRespawn(nn)
if(zycie[nn]==0) then
tfm.exec.setVampirePlayer(nn)
end
end

http://i.imgur.com/evaQb2c.png


Urodziny!
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.newGame("@6823051", false)
solenizant = "NICK SOLENIZANTA"
nie = 1
cz = 0

ui.addTextArea(15, "<a href='event:Balon'><B><font color='#000000'>Daj balona! ^.^</B></font></a>", solenizant, 100,29, 110, 20, 0xffffff, 0xdddddd, 1, true)


tfm.exec.addPhysicObject(1, 800, 346, {type="0", width="17", height="84"})
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> Proszę zająć miejsca!</font></font>", nil, 150, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
function eventNewPlayer(nick)
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> Proszę zająć miejsca!</font></font>", nil, 150, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
ui.addTextArea(1, "<a href='event:Lolek'><B><font color='#000000'>Twórcy</B></font></a>", nick, 7,29, 54, 20, 0xffffff, 0xdddddd, 1, true)
tfm.exec.respawnPlayer(nick)
end
function eventPlayerDied(nick)
tfm.exec.respawnPlayer(nick)
end
function eventLoop()
ui.setMapName("<b><font color='#aa00ff'>*Urodzinki*</font></B> <N> | "..os.date("%H:%M:%S").." | <N>Solenizant: <B><BL>" ..solenizant.. "</B> \n" )
print(cz)
tfm.exec.setNameColor(solenizant,0xff0000)
if nie == 1 and nie < 2 then
cz = cz+1
tfm.exec.displayParticle(13, 370, 275, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(13, 382, 273, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(13, 395, 275, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(2, 370, 275, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(2, 382, 273, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(2, 395, 275, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(3, 370, 275, 0, math.random(-2,-1), 0, 0, nil)
tfm.exec.displayParticle(3, 382, 273, 0, math.random(-2,-1), 0, 0, nil)
tfm.exec.displayParticle(3, 395, 275, 0, math.random(-2,-1), 0, 0, nil)
if cz >= 100 and cz <= 110 then
ui.removeTextArea(2, nil)
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> Sto lat! Sto lat!</font></font>", nil, 200, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
else if cz >= 110 and cz <= 120 then
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> Niech żyje, żyje nam!</font></font>", nil, 170, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
else if cz >= 120 and cz <= 130 then
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> Niech żyje, żyje nam!</font></font>", nil, 170, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
else if cz >= 130 and cz <= 140 then
ui.addTextArea(1, "<a href='event:Lol'><B><font color='#000000'>Zdmuchnij świeczki</B></font></a>", solenizant, 7,29, 145, 20, 0xffffff, 0xdddddd, 1, true)
ui.addTextArea(2, "<font size='40'><font color='#ffffff'> A kto?</font></font> <B><font size='40'><font color='#ff0000'>" ..solenizant.. "!</font></font></B>", nil, 200, 50, 500, 100, 0xffffff, 0xffffff, 0, true)
end
end
end
end
end
end
a = 0
ui.addTextArea(1, "<a href='event:Lolek'><B><font color='#000000'>Twórcy</B></font></a>", nil, 7,29, 54, 20, 0xffffff, 0xdddddd, 1, true)
function eventTextAreaCallback(id, nick, odp)
if odp=='Lolek' then
ui.addTextArea(2, "<font size='50'>Kod Lua - Janwojcik \nPomysł - Bartene \nMapa - Beletch</font>", nick, 100, 50, 600, 300, 0xffffff, 0xdddddd, 1, true)
ui.addTextArea(3, "<a href='event:lolki'>Zamknij</a>", nick, 640, 360, 60, 20, 0x010101, 0x222222, 1, true)
ui.removeTextArea(1, nick)
else if odp=='lolki' then
ui.removeTextArea(3, nick)
ui.removeTextArea(2, nick)
ui.addTextArea(1, "<a href='event:Lolek'><B><font color='#000000'>Twórcy</B></font></a>", nick, 7,29, 54, 20, 0xffffff, 0xdddddd, 1, true)
else if odp=="Lol" then
nie = 2
cz = 0
for i=1,80 do
tfm.exec.displayParticle(math.random(21,24), 70, 355, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(math.random(21,24), 730, 355, 0, 0, 0, 0, nil)
tfm.exec.displayParticle(math.random(21,24), 70, 355, math.random(50,60)/10, -5, 0, 0, nil)
tfm.exec.displayParticle(math.random(21,24), 730, 355, math.random(-60,-50)/10, -5, 0, 0, nil)
tfm.exec.displayParticle(math.random(21,24), math.random(0,1600), math.random(0,800), math.random(-25,25)/10, math.random(-25,25)/10, 0, 0, nil)
ui.removeTextArea(1, nil)
ui.removeTextArea(2, nil)
ui.addTextArea(1, "<a href='event:Lolek'><B><font color='#000000'>Twórcy</B></font></a>", nick, 7,29, 54, 20, 0xffffff, 0xdddddd, 1, true)
tfm.exec.removePhysicObject(1)
a=a+1
ui.addTextArea(2, "<font size='40'><font color='#ffffff'>Zapraszamy na imprezę!</font></font>", nil, 170, 50, 800, 800,0xffffff, 0xffffff, 0, false)
end
else if odp=="Balon" then
tfm.exec.addShamanObject(28, math.random(0,1600) , math.random(0,400) )


end
end
end
end
end


http://i.imgur.com/evaQb2c.png


Szymon mówi!
player = {}

Settings = {
XML = [[<C><P F="1" /><Z><S><S X="400" L="800" Y="380" H="40" P="0,0,0.3,0.2,0,0,0,0" T="6" /></S><D><P X="714" P="0,0" T="1" Y="360" /><P X="47" P="0,0" T="5" Y="361" /><P X="196" P="0,0" T="6" Y="360" /><P X="201" P="0,1" T="6" Y="359" /><DS X="401" Y="348" /><P X="545" P="0,0" T="0" Y="361" /><P X="589" P="0,0" T="2" Y="360" /></D><O /></Z></C>]],
mapName = "Szymon Mówi",
speed = 5,
time = 9,
odl = true,
}

Emotes = {
{name = "Tańcz", id = 0},
{name = "Śmiej się", id = 1},
{name = "Płacz", id = 2},
{name = "Wyślij serce", id = 3},
{name = "Złość się", id = 4},
{name = "Bij brawo", id = 5},
{name = "Śpij", id = 6},
{name = "Zrób facepalm", id = 7},
{name = "Usiądź", id = 8},
{name = "Rzuć konfetti", id = 9},
}

function SelectEmote()
local a,e = {},{}
local random = math.random(1,10)
for v, arg in pairs(Emotes) do
a[v] = arg["id"]
e[v] = arg["name"]
end
emote["id"] = a[random]
emote["name"] = e[random]
time = os.time()
end

function eventNewPlayer(nick)
if not player[nick] then
player[nick] = {
done = {},
record = 0,
timeGame = 0,
counting = {},
}
end
end

for nick in pairs(tfm.get.room.playerList) do
eventNewPlayer(nick)
end

function eventEmotePlayed(nick, id)
if emote["id"] ~= nil then
if id == emote["id"] then
player[nick]["done"] = true
else
tfm.exec.killPlayer(nick)
end
end
end

function eventNewGame()
emote = {}
end

function Main()
for _, arg in pairs({"AfkDeath","AutoShaman","AutoNewGame","AutoScore","MortCommand","PhysicalConsumables"}) do
tfm.exec["disable"..arg](true)
end
for nick in pairs(tfm.get.room.playerList) do
player[nick]["done"] = true
player[nick]["timeGame"] = 0
player[nick]["counting"] = true
end
time = os.time()
Settings["speed"] = 5
ui.removeTextArea(0, nil)
end

Main()

function eventPlayerDied(nick)
local i = 0
for n, player in pairs(tfm.get.room.playerList) do
if not player.isDead then
i = i + 1
end
end
if i == 0 then
for nick in pairs(tfm.get.room.playerList) do
tfm.exec.respawnPlayer(nick)
end
eventNewGame()
Settings["odl"] = true
end
if player[nick]["timeGame"] > player[nick]["record"] then
player[nick]["record"] = player[nick]["timeGame"]
ui.addTextArea(4, "Twój rekord: <B><V>"..math.floor(player[nick]["record"]).."</V></B>", nick, 10, 370, nil, nil, 0x121212, 0x121212, 0.7, true)
end
end

function eventLoop()
if Settings["odl"] == true then
Settings["time"] = Settings["time"] - 0.5
ui.removeTextArea(0, nil)
ui.removeTextArea(1, nil)
ui.addTextArea(3, "<font size='80'><V><B>"..math.ceil(Settings["time"]).."</B></V></font>", nil, 370, 130, nil, nil, 0, 0, 0, true)
if Settings["time"] <= 0 then
Settings["odl"] = false
Settings["time"] = 10
ui.removeTextArea(3, nil)
Main()
end
end
if Settings["odl"] == false then
for nick in pairs(tfm.get.room.playerList) do
if player[nick]["counting"] == true then
player[nick]["timeGame"] = player[nick]["timeGame"] + 0.5
end
end
if time < os.time() - 1000 * Settings["speed"] then
if Settings["speed"] > 1.2 then
Settings["speed"] = Settings["speed"] - 0.2
end
for nick in pairs(tfm.get.room.playerList) do
if player[nick]["done"] == false then
tfm.exec.killPlayer(nick)
end
player[nick]["done"] = false
end
SelectEmote()
ui.addTextArea(0, "<p align='center'><font size='50'>"..Settings["mapName"]..":\n<font color='#"..string.format("%x", math.random(0x000000, 0xFFFFFF)).."'>"..emote["name"].."</font></font></p>", nil, 10, 80, 780, nil, 0x121212, 0x121212, 0.5, true)
end
for nick in pairs(tfm.get.room.playerList) do
ui.addTextArea(1, "Czas gry: <B><V>"..math.ceil(player[nick]["timeGame"]).."</V></B> sekund!", nick, 670, 370, nil, nil, 0x121212, 0x121212, 0.7, true)
ui.addTextArea(4, "Twój rekord: <B><V>"..math.floor(player[nick]["record"]).."</V></B>", nick, 10, 370, nil, nil, 0x121212, 0x121212, 0.7, true)
end
end
ui.setMapName("<font color='#"..string.format("%x", math.random(0x000000, 0xFFFFFF)).."'><B>"..Settings["mapName"].."!</B></font> - By Rkubi")
end

tfm.exec.newGame(Settings["XML"])

http://i.imgur.com/evaQb2c.png


Moduł do losowania!
adm = "Admin"
nome = "Sorteio de Teste"
mapa = [[<C><P Ca=""/><Z><S><S H="40" P="0,0,0.3,0.2,0,0,0,0" L="800" X="399" N="" Y="380" T="0" /></S><D /><O /></Z></C>]]

participante = {}
inicio = false
fim = false
qtd = 0
fast = 0

function eventTextAreaCallback(id, p, cmd)
if cmd == "entrada" then
ui.addTextArea(0, "<p align='center'>Participando", p, 200, 370, 400, 20, 1, 0x00ff00, 0.8,false)
entrada(p, #participante + 1)
elseif cmd == "inicio" then
ui.addPopup(0, 2, "<p align='center'>Quantidade de sorteados", p, 300, 200, 200, false)
elseif cmd == "novo" then
novo()
end
end

function eventNewPlayer(p)
if not inicio and not fim then
ui.addTextArea(0, "<p align='center'><a href='event:entrada'>Clique para participar do sorteio!", p, 200, 370, 400, 20, 1, 0xffff00, 0.8, false)
ui.addTextArea(-3, "<p align='center'><font size='30px'>"..nome, p, 5, 40, 795, 40, 1, 1, 0.8, false)
end
end

function eventPopupAnswer(id, p, cmd)
if tonumber(cmd, 10) then
if tonumber(cmd, 10) >= 1 and tonumber(cmd, 10) <= #participante then
ui.removeTextArea(0, nil)
ui.removeTextArea(-1, nil)
qtd = tonumber(cmd, 10)
fast = math.random(5,15)
inicio = true
end
end
end

function participando(p)
for i, v in pairs(participante) do
if v == p then
return true
end
end
return false
end

function entrada(p, num)
if not participando(p) then
participante[num] = p
ui.addTextArea(num, "<p align='center'>" .. p, nil, ((num-1)%8)*100+5, math.floor((num-1)/8)*30+100, 90, 20, 1, 1, 0.8, false)
end
end

function novo()
for i=1, #participante do
ui.removeTextArea(i, nil)
table.remove(participante, 1)
end
ui.addTextArea(0, "<p align='center'><a href='event:entrada'>Clique para participar do sorteio!", nil, 200, 370, 400, 20, 1, 0xffff00, 0.8, false)
ui.addTextArea(-1, "<p align='center'><a href='event:inicio'>Iniciar", adm, 650, 370, 100, 20, 1, 0x0000ff, 0.8,false)
tfm.exec.removePhysicObject(0)
fim = false
end

function sorteio(tipo)
local lista = {}
local sorteado = 0
for i=1, #participante do
lista = i
end
local rand = 0
for i, v in pairs(participante) do
ui.addTextArea(i, "<p align='center'>" .. v, nil, ((i-1)%8)*100+5, math.floor((i-1)/8)*30+100, 90, 20, 1, 1, 0.8, false)
end
for i=1, qtd do
sorteado = math.random(#lista)
rand = lista[sorteado]
table.remove(lista, sorteado)
if tipo == "quase" then
ui.addTextArea(rand, "<p align='center'><font color='#ffff00'>" .. participante[rand], nil, ((rand-1)%8)*100+5, math.floor((rand-1)/8)*30+100, 90, 20, 1, 0xffff00, 0.8, false)
elseif tipo == "final" then
ui.addTextArea(rand, "<p align='center'><font color='#00ff00'><b>" .. participante[rand], nil, ((rand-1)%8)*100+5, math.floor((rand-1)/8)*30+100, 90, 20, 1, 0x00ff00, 0.8, false)
end
end
end

function eventLoop()
if inicio then
if fast > 0 then
sorteio("quase")
fast = fast - 1
else
sorteio("final")
inicio = false
fim = true
ui.addTextArea(-1, "<p align='center'><a href='event:novo'>Novo sorteio", adm, 650, 370, 100, 20, 1, 0x0000ff, 0.8,false)
end
end
if fim then
tfm.exec.addPhysicObject(0, 400, 200, {type=12,color=math.random(0x666666, 0x777777), miceCollision=false, width=800, height=400})
for i=1, 50 do
tfm.exec.displayParticle(math.random(21,24), math.random(1,800), 20, math.random(-20,20)/100, math.random(10,1000)/100, 0, 0, nil)
end
end
end

tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
math.randomseed(os.time())
tfm.exec.newGame(mapa)
ui.addTextArea(0, "<p align='center'><a href='event:entrada'>Clique para participar do sorteio!", nil, 200, 370, 400, 20, 1, 0xffff00, 0.8, false)
ui.addTextArea(-1, "<p align='center'><a href='event:inicio'>Iniciar", adm, 650, 370, 100, 20, 1, 0x0000ff, 0.8,false)
ui.addTextArea(-3, "<p align='center'><font size='30px'>"..nome, nil, 5, 40, 795, 40, 1, 1, 0.8, false)
tfm.exec.setUIMapName("Nagroda")

http://i.imgur.com/evaQb2c.png



Ankieta

x = 0
czas1 = 0
system.disableChatCommandDisplay("ankieta", true)
system.disableChatCommandDisplay("usun", true)

function eventChatCommand(name, cmd)
if cmd:sub(0,7) == "ankieta" then
x = 1
ui.addPopup(0, 1, cmd:sub(9), nil, 50, 50, nil)
czas = os.time()
odp1 = 0
odp2 = 0
end
if cmd == "usun" then
ui.removeTextArea(1, nil)
ui.removeTextArea(2, nil)
ui.removeTextArea(3, nil)
end
end

function eventPopupAnswer(id, name, cb)
if cb == "yes" then
odp1 = odp1+1
else
odp2 = odp2+1
end
end

function eventLoop()
if x == 1 then
if czas < (os.time() - 15000) then
if odp1 > odp2 then
ui.addTextArea(1, "Więcej osób zagłosowało na tak!", nil, 50, 50, 0, 0, nil, nil, 0.5)
elseif odp1 < odp2 then
ui.addTextArea(1, "Więcej osób zagłosowało na nie!", nil, 50, 50, 0, 0, nil, nil, 0.5)
elseif odp1 == odp2 then
ui.addTextArea(1, "Głosy były równe!", nil, 50, 50, 0, 0, nil, nil, 0.5)
end
ui.addTextArea(2, odp1.." osób zagłosowało na tak", nil,50, 75, 0, 0, nil, nil, 0.5)
ui.addTextArea(3, odp2.." osób zagłosowało na nie", nil,50, 100, 0, 0, nil, nil, 0.5)
end
end
end


!ankieta [pytanie]
!usun [usuwa ankiete]


http://i.imgur.com/evaQb2c.png


Zmiana nazwy mapy


local nazwaMapy = "NazwaMapy"; function eventNewPlayer(p) ui.setMapName(nazwaMapy); end ui.setMapName(nazwaMapy);



http://i.imgur.com/evaQb2c.png


Bot

-- Bot Messages v1.2
-- Twórca: Brenower
-- Polskie tłumaczenie: Wiktorrosik
-- Tabele
nameofbot="EDIT"
cmm="PL";
messages={
["witaj"]="Cześć, witaj w Chatce Plemiennej!";
["minigry"]="";
["zasady"]="";
};
msg={
["atv"]=false;
};
-- Włączenie skryptu
print("<VP>Bot Messages<V> włączony!")
ui.addTextArea(0,"<font color='#F0A78E'>> [".. cmm.."] [<font color='#E88F4F'><a href='event:close'>".. nameofbot.."</a></font>] ".. messages.witaj.."</font>",NIL,6,368,478,30,0x1C3C41,0x1C3C41,0.9,true)
-- Nowy gracz
function eventNewPlayer(player)
ui.addTextArea(0,"<font color='#F0A78E'>> [".. cmm.."] [<font color='#E88F4F'><a href='event:close'>".. nameofbot.."</a></font>] ".. messages.witaj.."</font>",NIL,6,368,478,30,0x1C3C41,0x1C3C41,0.9,true)
end
-- Komendy
function eventChatCommand(player,cm)
if messages[cm] then
textarea(player,messages[cm])
end
system.disableChatCommandDisplay(cm, true)
end
-- Text Area
function textarea(player,msg)
ui.addTextArea(0,"<font color='#F0A78E'>> [".. cmm.."] [<font color='#E88F4F'><a href='event:close'>".. nameofbot.."</a></font>] ".. msg.."</font</font>",player,6,368,478,1000,0x1C3C41,0x1C3C41,0.9,true)
end
-- Powiązania Text Comic Sans MS

function eventTextAreaCallback(id,player,link)
if link == "close" then
ui.removeTextArea(0,player)
end
end

http://i.imgur.com/evaQb2c.png


Deszcz z przedmiotów szamana.

players = {}
timer = 0
countdown = 6
player = nil
ending = false
difficulty = 1
highscore = 0

function main()
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAutoScore(true)
tfm.exec.newGame(6159011)
tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>00:00\n")
end

function eventLoop(time)
timer = timer + 0.5
if time>3000 and not ending then
difficulty = math.ceil(timer/15)
spawnArrow(difficulty)
end
if timer%1==0 then
showTime(timer)
end
if ending then
countdown = countdown - 1
tfm.exec.setUIMapName("<ROSE>The next game starts in "..countdown.."\n")
if countdown == 0 then
tfm.exec.newGame(6159011)
end
end
end

function showTime(timer)
local amount = timer / 60
local mins = math.floor(amount)
local seconds = math.floor((amount - mins)*60)
if mins < 10 then
mins = "0"..tostring(mins)
end
if seconds < 10 then
seconds = "0"..tostring(seconds)
end
tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>"..mins..":"..seconds.."\n")
end

function eventNewGame()
ui.removeTextArea(1)
choosePlayer()
difficulty = 1
tfm.exec.setUIMapName("<CH><B>Rain</B> <N>| <CH>Highscore : <VP>"..highscore.." secs <N>Time : <V>00:00\n")
timer=0
countdown=6
ending = false
for k,v in pairs(tfm.get.room.playerList) do
if k~=player then
tfm.exec.killPlayer(k)
end
end
end

function eventPlayerDied(name)
if name == player then
ending = true
ui.addTextArea(1, "<V><p align='center'><font size='12'><B>"..player.."</B><J> survived for <VP>".. math.floor(timer) .. " <J>seconds!", nil, 250, 23, 300, nil, 0x000001, nil, 0.8)
if timer > highscore then
highscore = math.floor(timer)
end
end
end

function spawnArrow(int)
if int==1 then
tfm.exec.addShamanObject(17, math.random()*800, -80)
elseif int==2 then
tfm.exec.addShamanObject(17, math.random()*800, -80, 180)
else
for i=1, int-2 do
tfm.exec.addShamanObject(17, math.random()*800, -80, 180)
end
tfm.exec.addShamanObject(2, math.random()*800, -80)
end
end

function choosePlayer()
player = players[1]
table.remove(players, 1)
table.insert(players, player)
end

function eventNewPlayer(name)
table.insert(players, name)
end

function eventPlayerLeft(name)
table.delete(players, name)
end

function table.delete(tab, val)
for k,v in pairs(tab) do
if val == v then
table.remove(tab, k)
break end
end
end

for k,v in pairs(tfm.get.room.playerList) do
eventNewPlayer(k)
end

main().


http://i.imgur.com/evaQb2c.png


Ślub

groom='Mąż'
bride='Żona'


f=400
e=350
a=0
t=0
p=0
finale=0

groomanswer=0
brideanswer=0
positiongroomlock=1
positionbridelock=0
bridewalking=0
stop=5

tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoTimeLeft(true)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.newGame('@5014080')

function eventNewGame()
tfm.exec.movePlayer(groom,1350, 290,offset,0,0,offset)
tfm.exec.killPlayer(bride)
end

function eventNewPlayer(a)
tfm.exec.respawnPlayer(a)
end

function eventLoop(currentTime,timeRemaining)
t=t+1
if positiongroomlock==1 then
tfm.exec.movePlayer(groom,1350, 290,offset,0,0,offset)
end

if positionbridelock==1 then
tfm.exec.movePlayer(bride,1350, 290,offset,0,0,offset)
end

if t==60 then
ui.addTextArea(1,"Uhm. możemy zacząć?",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==80 then
ui.addTextArea(1,"Proszę, zapraszamy na slub!",nil, 1350, 180,150,40, color,color,Alpha,false)
tfm.exec.respawnPlayer(bride)
tfm.exec.movePlayer(bride,400, 350,offset,0,0,offset)
bridewalking=1
stop=0
end


if stop==0 then

if bridewalking==1 then
tfm.exec.movePlayer(bride,f, 350,offset,0,0,offset)
f=f+10
end

if f > 1145 then
e=e-3.5
tfm.exec.movePlayer(bride,f, e,offset,0,0,offset)
end

if f==1350 then
stop=1
bridewalking=0
positionbridelock=1
ui.addTextArea(1,"Ah there she is!",nil, 1350, 180,150,40, color,color,Alpha,false)
t=1000
end
end

if t==1006 then
ui.addTextArea(1,"Czas zacząć ceremonię",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==1012 then
ui.addTextArea(1,"Zebraliśmy się tu, aby świętować",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==1018 then
ui.addTextArea(1,"oraz żeby zjednoczyć te 2 dusze na zawsze.",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==1024 then
ui.addTextArea(1,"Będą iść razem przez życie w smutku i biedzie,",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==1030 then
ui.addTextArea(1,"w szczęściu i trudzie.",nil, 1350, 180,150,40, color,color,Alpha,false)
end

if t==1036 then
ui.addTextArea(1,'Czy ty '..groom..'. zgadasz się być połączony miłością ze swoją partnerką teraz i na wieki?',nil, 1350, 160,150,70, color,color,Alpha,false)
groomanswer=1
end

if groomanswer==1 then
ui.addTextArea(2,'<a href="event:groomanswer"><p align="center">Tak. Teraz i na wieki.</p></a>',groom ,830,350,100,40,0x3c5064,0x3c5064,alpha)
end

if groomanswer==2 then
ui.addTextArea(3,"Tak. Teraz i na wieki.",nil ,1300,200,100)
t=2000
groomanswer=3
end

if t==2006 then
ui.removeTextArea(3,nil)
ui.addTextArea(1,'A ty '..bride..'. zgadzasz się byc połączona miłością ze swym partnerem teraz i na wieki?',nil, 1350, 160,150,70, color,color,Alpha,false)
ui.addTextArea(2,'<a href="event:brideanswer"><p align="center">I do. Now and forever</p></a>',bride ,830,350,100,40,0x3c5064,0x3c5064,alpha)
end

if brideanswer==1 then
ui.addTextArea(3,"Tak. Teraz i na wieki.",nil ,1300,200,100)
t=3000
brideanswer=2
end

if t==3006 then
ui.removeTextArea(3,nil)
ui.addTextArea(1,'Gratulacje! Oświadczam, że ta para jest teraz małżeństwem! Teraz możecie się pocałować.',nil, 1350, 180,150,50, color,color,Alpha,false)
end

if t==3012 then
ui.removeTextArea(3,nil)
tfm.exec.movePlayer(groom,1380, 290,offset,0,0,offset)
tfm.exec.movePlayer(bride,1320, 290,offset,0,0,offset)
finale=1
positiongroomlock=0
positionbridelock=0
end

if t==3020 then
ui.addTextArea(1,"Teraz czas na zabaaawę!",nil, 1350, 180,150,40, color,color,Alpha,false)
end

end

function eventTextAreaCallback(id, player, callback)
if callback=='groomanswer' then
ui.removeTextArea(2,groom)
ui.removeTextArea(1,nil)
groomanswer=2
end

if callback=='brideanswer' then
ui.removeTextArea(2,bride)
ui.removeTextArea(1,nil)
brideanswer=1
end
end

http://i.imgur.com/evaQb2c.png


Labirynt

NIGHTMODE = true

Maze = {
seed = nil,
width = nil,
height = nil,
cellSize = nil,
cellCount = 0,
cells = {},
winCell = {x=0, y=0},
startCell = {x=0, y=0},
util = {
getCellId = function(x, y)
return x + y * Maze.width
end,
getCell = function(x, y)
return Maze.cells[Maze.util.getCellId(x, y)]
end,
getCellXY = function (id)
return {x = id % Maze.width, y = math.floor(id / Maze.width)}
end,
toGlobal = function(n)
return n * Maze.cellSize + Maze.cellSize / 2
end,
getNeighbors = function(id)
local ra = {}
if (id == nil) then return ra end
if (id + 1 <= Maze.cellCount and not Maze.util.isRightEdge(id) and not Maze.cells[id + 1].visited) then table.insert(ra, id + 1) end
if (id - 1 >= 0 and not Maze.util.isLeftEdge(id) and not Maze.cells[id - 1].visited) then table.insert(ra, id - 1) end
if (id + Maze.width <= Maze.cellCount and not Maze.cells[id + Maze.width].visited) then table.insert(ra, id + Maze.width) end
if (id - Maze.width >= 0 and not Maze.cells[id - Maze.width].visited) then table.insert(ra, id - Maze.width) end
return ra
end,
isRightEdge = function(id)
return Maze.util.isLeftEdge(id + 1)
end,
isLeftEdge = function(id)
return id % Maze.width == 0
end
},
init = function(s, c, w, h)
Maze.seed = s
Maze.cellSize = c
Maze.width = w
Maze.height = h

if (Maze.seed == nil) then Maze.seed = os.time() end
if (Maze.cellSize == nil) then Maze.cellSize = 50 end
if (Maze.width == nil) then Maze.width = math.floor(800 / Maze.cellSize) end
if (Maze.height == nil) then Maze.height = math.floor(400 / Maze.cellSize) end

Maze.cellCount = Maze.width * Maze.height
math.randomseed(Maze.seed)
end,
generate = function()
local visited = {}

Maze.winCell.x = math.floor(math.random() * Maze.width)
Maze.winCell.y = math.floor(math.random() * Maze.height)

for i=0,Maze.cellCount do
Maze.cells = {top = true, bot = true, left = true, right = true, visited = false}
end

local count = Maze.cellCount
local operator = {Maze.util.getCellId(Maze.winCell.x, Maze.winCell.y)}
local overflow = 0
local endOp = 0
while count > 0 do
local neighbors = Maze.util.getNeighbors(operator[#operator])
local id = nil

if (next(neighbors) ~= nil) then
id = neighbors[math.random(#neighbors)]
end


if (id ~= nil and Maze.cells[id].visited) then
id = nil
end

if (id == nil) then
table.remove(operator)
overflow = overflow + 1
if (overflow > Maze.cellCount) then break end
else
overflow = 0
local diff = id - operator[#operator]

if (diff == -1) then
Maze.cells[id].right = false
Maze.cells[operator[#operator]].left = false
elseif (diff == 1) then
Maze.cells[id].left = false
Maze.cells[operator[#operator]].right = false
elseif (diff == 16) then
Maze.cells[id].top = false
Maze.cells[operator[#operator]].bot = false
elseif (diff == -16) then
Maze.cells[id].bot = false
Maze.cells[operator[#operator]].top = false
end

Maze.cells[id].visited = true
table.insert(operator, id)
endOp = id
count = count - 1
end
end
Maze.startCell = Maze.util.getCellXY(endOp)
end,
build = function()
for i=0,Maze.cellCount do
local x = Maze.cellSize * (i % Maze.width)
local y = Maze.cellSize * math.floor(i / Maze.width)
if (Maze.cells.top) then tfm.exec.addPhysicObject(4 * i + 0, x + Maze.cellSize / 2 - 5, y - 5, {type=0, restitution=0.2, friction=1, width=Maze.cellSize + 10, height=10, groundCollision=false}) end
if (Maze.cells.bot) then tfm.exec.addPhysicObject(4 * i + 1, x + Maze.cellSize / 2 - 5, y + Maze.cellSize - 5, {type=0, restitution=0.2, friction=1, width=Maze.cellSize + 10, height=10, groundCollision=false}) end
if (Maze.cells.left) then tfm.exec.addPhysicObject(4 * i + 2, x - 5, y + Maze.cellSize / 2, {type=0, restitution=0.2, friction=1, width=10, height=Maze.cellSize, groundCollision=false}) end
if (Maze.cells.right) then tfm.exec.addPhysicObject(4 * i + 3, x + Maze.cellSize - 5, y + Maze.cellSize / 2, {type=0, restitution=0.2, friction=1, width=10, height=Maze.cellSize, groundCollision=false}) end
end
end
}

function newMap()
Maze.generate()
tfm.exec.newGame('<C><P ' .. NIGHTMODE .. ' /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="6a7495" X="400" c="3" Y="-50" T="12" H="100" /><S H="400" L="100" o="6a7495" X="850" c="3" Y="200" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="400" L="100" o="6a7495" X="-50" c="3" Y="200" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S H="100" L="800" o="6a7495" X="400" c="3" Y="450" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="45" o="6a7495" H="164" X="17" Y="-103" T="12" P="0,0,0,0,0,0,0,0" /><S P="0,0,0,0,0,0,0,0" L="45" o="6a7495" X="778" Y="-106" T="12" H="164" /></S><D><DS Y="-82" X="402" /><T Y="' .. Maze.util.toGlobal(Maze.startCell.y) .. '" X="' .. Maze.util.toGlobal(Maze.startCell.x) .. '" /><F Y="' .. Maze.util.toGlobal(Maze.winCell.y) .. '" X="' .. Maze.util.toGlobal(Maze.winCell.x) .. '" /></D><O /></Z></C>')
Maze.build()
for name,mouse in pairs(tfm.get.room.playerList) do
tfm.exec.movePlayer(name, Maze.util.toGlobal(Maze.startCell.x), Maze.util.toGlobal(Maze.startCell.y), false, 0, 0, false)
end
end

function eventPlayerWon(name, te, ter)
newMap()
end

Maze.init()
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAfkDeath(true)
if (NIGHTMODE) then NIGHTMODE = 'N="19"' else NIGHTMODE = '' end
newMap()

Dernière modification le 1519486320000
Mlekowaty
« Consul »
Membre
1514992920000
    • Mlekowaty#4870
    • Profil
    • Derniers messages
    • Tribu
#2
  0
http://pastebin.com/raw/AqL3WeZq - moduł do losowania
Mlekowaty
« Consul »
Membre
1514993460000
    • Mlekowaty#4870
    • Profil
    • Derniers messages
    • Tribu
#3
  0
https://pastebin.com/nyRGKPB0 - wisielec
  • Tribus
  • /
  • Lesna Kraina
  • /
  • Dla władzy
  • /
  • Kody lua.
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27