×

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
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Pedidos e Exemplos] Mega Galeria LUA
« ‹ 30 / 30
[Pedidos e Exemplos] Mega Galeria LUA
Yaerou
« Citoyen »
1455806460000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#581
  0
ta vendo esse minigame o nome e x1 e x1 de racing tem como colocar de survivor

tfm.exec.disableAfkDeath(true)

--[[
COMO INICIAR?
Copie todo o Script e siga as instruções que vão aparecer no chat #lua

COMANDOS:
!game Jogador1 Jogador2 - INICIA NOVO JOGO
!score Jogador Ponto - MUDA A PONTUAÇAO DO JOGADOR
!pause Jogador - PAUSA O TEMPO, VOCÊ PODE MUDAR O TEMPO MAXIMO EM _MAIN.config.pauseDelay, PARA DESPAUSAR UTILIZE O COMANDO NOVAMENTE
!chola - RSRSRSRSRSRSRSRS

BOM JOGO!
]]--

_MAIN = {
admins = {Eshkation = true},
participants = {},
command = "",
config = {
win = 10,
difference = 2,
lowerTime = 10,
paused = false,
canShowScore = false,
pauseDelay = 120,
mapid = 1,
lastfirst = "",
invertedGame = "",
},
maps = {"@103182", "@107544", "@112790", "@114122", "@116630", "@117548", "@120152", "@122911", "@124359", "@130763", "@136966", "@138036", "@138678", "@144468", "@144677", "@145020", "@146801", "@147436", "@148424", "@150692", "@152299", "@156510", "@156685", "@156847", "@158128", "@161730", "@163682", "@165112", "@165747", "@165843", "@166705", "@168776", "@175205", "@180191", "@180274", "@180619", "@185760", "@186604", "@196433", "@198549", "@198715", "@208058", "@208162", "@208914", "@209708", "@209799", "@212542", "@213697", "@214037", "@214660", "@214775", "@215938", "@216735", "@217900", "@219548", "@220500", "@221767", "@223986", "@224441", "@226883", "@227417", "@227851", "@229827", "@229830", "@229834", "@231905", "@232140", "@232451", "@232791", "@235034", "@235501", "@235651", "@236146", "@237041", "@239826", "@239880", "@241211", "@242708", "@245223", "@246790", "@247815", "@248098", "@250610", "@254291", "@255542", "@258717", "@259833", "@260377", "@260384", "@260678", "@261720", "@263907", "@264348", "@265221", "@265354", "@266930", "@267597", "@269337", "@270668", "@271523", "@273434", "@275514", "@277687", "@277784", "@279256", "@281730", "@286333", "@287268", "@289068", "@292614", "@293065", "@294943", "@299002", "@299971", "@300055", "@301315", "@302936", "@305677", "@306213", "@308280", "@308694", "@308992", "@309029", "@309169", "@309834", "@312713", "@314159", "@315801", "@316289", "@317754", "@319524", "@319841", "@323085", "@323115", "@323366", "@325172", "@326585", "@326904", "@327130", "@327254", "@327266", "@330441", "@330590", "@332210", "@332290", "@333656", "@333837", "@337581", "@339272", "@339418", "@339896", "@340069", "@341116", "@341239", "@343048", "@343971", "@344865", "@345257", "@345290", "@348479", "@348801", "@349140", "@349389", "@349984", "@352381", "@352710", "@352885", "@354616", "@354878", "@355658", "@355769", "@355957", "@356722", "@356982", "@357328", "@357428", "@359055", "@359521", "@359901", "@360271", "@360273", "@361382", "@363411", "@363638", "@364186", "@364998", "@365464", "@365652", "@367520", "@369160", "@369230", "@371076", "@371078", "@373511", "@378826", "@379326", "@379550", "@379745", "@380417", "@381043", "@381287", "@381305", "@381569", "@381669", "@382977", "@384206", "@384869", "@385203", "@385295", "@386029", "@386046", "@386959", "@387180", "@388447", "@389582", "@391625", "@391693", "@391831", "@391990", "@392446", "@392492", "@392913", "@393675", "@393851", "@395459", "@395585", "@395607", "@396223", "@396332", "@396347", "@396645", "@396861", "@397296", "@397501", "@397812", "@397938", "@398011", "@398041", "@398081", "@398942", "@399633", "@399673", "@400429", "@400666", "@400866", "@401778", "@401945", "@401995", "@402214", "@402239", "@402453", "@403698", "@403910", "@404440", "@404590", "@405075", "@405295", "@405339", "@405497", "@405679", "@405833", "@405955", "@406266", "@406486", "@406881", "@406982", "@407165", "@407230", "@407294", "@407455", "@407457", "@407488", "@407495", "@407536", "@407686", "@407746", "@408978", "@409199", "@410230", "@410532", "@410565", "@410608", "@410736", "@410813", "@412211", "@412316", "@412657", "@412752", "@413408", "@414188", "@414460", "@414899", "@416015", "@416142", "@416552", "@418022", "@418196", "@418265", "@418293", "@418323", "@418337", "@418600", "@418606", "@418658", "@419374", "@419735", "@420806", "@420956", "@421302", "@421717", "@422361", "@422509", "@422580", "@422939", "@423062", "@423449", "@423517", "@423672", "@424361", "@424786", "@424795", "@425030", "@425044", "@425215", "@425349", "@425548", "@425600", "@425771", "@425797", "@425806", "@426638", "@427300", "@428517", "@429262", "@429822", "@429897", "@430145", "@430219", "@430736", "@431142", "@431373", "@431887", "@433937", "@434887", "@436041", "@436107", "@436447", "@437860", "@438154", "@440676", "@441047", "@441339", "@441376", "@441598", "@443309", "@444490", "@444830", "@444964", "@445133", "@445167", "@445219", "@447556", "@448281", "@452016", "@455167", "@459349", "@463195", "@463977", "@465205", "@468260", "@470687", "@470727", "@471053", "@472379", "@472665", "@475151", "@475790", "@477370", "@477603", "@480023", "@483924", "@484992", "@494706", "@496091", "@496945", "@499109", "@499682", "@499684", "@499687", "@500074", "@501428", "@501711", "@501916", "@504409", "@504461", "@504704", "@504951", "@505109", "@505963", "@506215", "@507308", "@507325", "@508106", "@508451", "@508796", "@509082", "@510194", "@511187", "@511275", "@512291", "@512927", "@514412", "@514510", "@514982", "@517005", "@517697", "@523046", "@528428", "@529844", "@531569", "@532300", "@536235", "@537776", "@538116", "@545493", "@549470", "@551126", "@556253", "@556426", "@558790", "@563183", "@563303", "@563484", "@564033", "@566347", "@566438", "@571144", "@571512", "@580031", "@583056", "@586622", "@586688", "@587458", "@590641", "@594049", "@594883", "@595447", "@603381", "@606719", "@606723", "@608459", "@610137", "@611320", "@613985", "@616373", "@616433", "@620996", "@624098", "@624721", "@627609", "@634945", "@645288", "@646800", "@646968", "@658464", "@664949", "@667920", "@669031", "@670226", "@694900", "@704015", "@732880", "@734476", "@737841", "@744038", "@749102", "@759128", "@763371", "@763378", "@789058", "@789128", "@792062", "@798953", "@813156", "@824082", "@829657", "@838069", "@846805", "@849224", "@879616", "@905496", "@972616", "@976721", "@976786", "@979179", "@982242", "@996947", "@1015436", "@1015582", "@1017676", "@1019378", "@1033170", "@1034035", "@1051378", "@1051384", "@1058681", "@1085530", "@1102815", "@1130728", "@1132357", "@1132639", "@1142116", "@1143815", "@1144548", "@1162611", "@1167734", "@1172426", "@1174107", "@1195842", "@1208798", "@1208979", "@1210037", "@1214182", "@1216253", "@1221661", "@1222899", "@1229246", "@1231216", "@1234914", "@1242669", "@1249601", "@1250021", "@1252122", "@1253523", "@1255130", "@1255148", "@1256845", "@1281700", "@1281981", "@1286910", "@1307880", "@1310092", "@1311059", "@1321417", "@1321664", "@1330800", "@1341396", "@1346440", "@1351308", "@1352534", "@1358446", "@1359797", "@1364063", "@1368222", "@1368233", "@1371239", "@1371294", "@1372941", "@1373000", "@1373748", "@1375345", "@1378209", "@1393405", "@1394120", "@1398732", "@1405249", "@1405496", "@1416040", "@1425101", "@1428436", "@1445160", "@1448760", "@1449069", "@1450554", "@1453667", "@1471124", "@1483155", "@1487161", "@1490438", "@1491022", "@1492120", "@1495344", "@1503393", "@1504586", "@1506007", "@1509474", "@1512355", "@1513407", "@1525272", "@1531388", "@1538895", "@1539515", "@1539791", "@1542618", "@1542736", "@1555532", "@1555862", "@1556661", "@1564762", "@1567620", "@1573213", "@1573997", "@1580508", "@1583655", "@1586439", "@1587904", "@1588884", "@1589026", "@1591471", "@1592767", "@1595600", "@1597594", "@1600443", "@1601492", "@1601786", "@1601857", "@1602654", "@1603050", "@1605364", "@1608259", "@1608638", "@1609978", "@1611631", "@1612796", "@1613550", "@1613927", "@1614563", "@1618110", "@1619934", "@1621611", "@1622737", "@1623300", "@1628732", "@1629164", "@1632294", "@1632541", "@1632706", "@1632746", "@1634741", "@1637638", "@1639996", "@1643157", "@1644638", "@1646120", "@1648583", "@1651658", "@1654096", "@1654105", "@1654841", "@1654903", "@1657021", "@1657360", "@1658171", "@1659639", "@1659716", "@1661852", "@1663380", "@1663415", "@1665249", "@1665516", "@1665775", "@1669046", "@1673174", "@1674534", "@1675083", "@1687268", "@1689382", "@1692628", "@1693705", "@1694602", "@1702169", "@1703617", "@1705316", "@1716693", "@1716949", "@1718723", "@1724289", "@1728943", "@1749434", "@1751944", "@1759287", "@1768347", "@1778687", "@1787232", "@1787239", "@1794287", "@1802907", "@1813728", "@1841744", "@1845710", "@1848032", "@1851411", "@1851568", "@1851968", "@1856349", "@1857829", "@1862800", "@1862823", "@1873736", "@1923785", "@1924227", "@1926831", "@1927270", "@1932796", "@1951856", "@1952851", "@1954369", "@1954898", "@1956002", "@1956555", "@1964700", "@1964752", "@1964800", "@1965819", "@1973574", "@1975275", "@1975286", "@1975684", "@1975753", "@1976007", "@1976857", "@1979131", "@1982476", "@1983038", "@1985019", "@1987990", "@1999967", "@2005559", "@2007170", "@2007205", "@2012147", "@2018511", "@2023552", "@2030343", "@2047177", "@2048474", "@2068543", "@2070768", "@2076632", "@2079190", "@2089069", "@2098621", "@2101747", "@2106576", "@2113318", "@2118599", "@2134537", "@2138401", "@2141379", "@2144010", "@2149382", "@2150335", "@2166693", "@2174319", "@2176620", "@2180790", "@2185089", "@2214661", "@2219308", "@2221510", "@2223685", "@2228834", "@2245005", "@2252884", "@2262476", "@2286056", "@2287914", "@2331474", "@2347666", "@2369254", "@2372538", "@2378820", "@2393139", "@2417713", "@2423312", "@2453022", "@2464807", "@2509175", "@2522826", "@2536577", "@2538131", "@2546484", "@2557885", "@2564883", "@2571671", "@2577060", "@2580114", "@2582610", "@2586491", "@2588032", "@2592421", "@2645615", "@2682985", "@2683170", "@2700958", "@2725924", "@2726034", "@2776889", "@2796001", "@2813487", "@2816067", "@2840770", "@2854246", "@2868414", "@2883986", "@2894072", "@2953315", "@2989266", "@2991507", "@3008155", "@3029580", "@3036416", "@3065912", "@3120368", "@3123384", "@3142015", "@3156569", "@3175920", "@3209087", "@3211576", "@3213562", "@3267620", "@3272722", "@3347209", "@3397865", "@3408247", "@3444803", "@3447108", "@3453351", "@3468601", "@3469987", "@3504036", "@3517347", "@3518418", "@3530855", "@3535192", "@3537419", "@3544895", "@3548376", "@3548378", "@3548406", "@3549484", "@3549840", "@3556405", "@3556489", "@3556690", "@3572407", "@3574879", "@3574927", "@3575034", "@3575108", "@3575170", "@3575216", "@3575293", "@3575425", "@3575463", "@3579335", "@3579476", "@3582577", "@3584275", "@3584689", "@3592471", "@3595900", "@3603799", "@3603802", "@3603809", "@3604799", "@3607846", "@3611702", "@3611885", "@3613029", "@3617674", "@3620542", "@3630433", "@3631534", "@3631748", "@3636268", "@3637041", "@3638794", "@3639993", "@3644272", "@3652003", "@3652102", "@3654416", "@3662698", "@3667358", "@3668754", "@3669435", "@3670084", "@3676141", "@3676555", "@3679397", "@3679884", "@3680180", "@3680220", "@3680221", "@3680223", "@3682405", "@3683201", "@3683224", "@3683294", "@3683383", "@3683393", "@3683520", "@3683600", "@3684229", "@3684455", "@3684457", "@3684465", "@3684784", "@3685352", "@3685382", "@3685486", "@3688419", "@3690578", "@3691609", "@3691622", "@3693822", "@3696662", "@3699155", "@3700155", "@3700684", "@3702767", "@3705931", "@3706599", "@3712183", "@3716560", "@3721990", "@3727755", "@3728013", "@3730656", "@3737576", "@3738767", "@3746280", "@3778128", "@3778389", "@3799507", "@3799857", "@3799951", "@3799957", "@3801780", "@3816622", "@3816991", "@3818249", "@3821104", "@3834905", "@3845214", "@3847244", "@3854268", "@3857914", "@3889414", "@3901403", "@3909339", "@3912540", "@3921436", "@3946626", "@3948683", "@3953320", "@3953425", "@3967150", "@3967250", "@3970909", "@3984750", "@3985806", "@3992276", "@3992671", "@3994471", "@3999981", "@4000001", "@4003729", "@4035194", "@4038817", "@4049042", "@4088129", "@4091580", "@4102732", "@4118659", "@4148332", "@4174318", "@4174320", "@4220406", "@4234556", "@4238784", "@4273207", "@4323335", "@4344186", "@4412890", "@4468155", "@4469588", "@4469627", "@4477124", "@4488954", "@4489653", "@4508416", "@4551993", "@4581354", "@4612295", "@4645670", "@4666540", "@4681759", "@4685111", "@4707191", "@4734427", "@4747722", "@4758350", "@4778991", "@4813927", "@4815404", "@4834093", "@4836483", "@4853690", "@4870958", "@4895634", "@4902526", "@4911122", "@4914476", "@4915220", "@4945098", "@4946442", "@4953687", "@4993931", "@5000090", "@5024682", "@5028454", "@5029395", "@5030579", "@5032745", "@5044309", "@5045485", "@5045922", "@5053907", "@5054601", "@5067265", "@5087373", "@5096937", "@5172709", "@5175697", "@5242039", "@5246345", "@5249500", "@5258125", "@5272513", "@5303681", "@5309288", "@5339441", "@5346212", "@5349806", "@5379646", "@5382687", "@5382692", "@5405469", "@5408572", "@5422102", "@5434934", "@5436200", "@5452432", "@5472330", "@5488573", "@5495901", "@5515862", "@5517312", "@5545443", "@5552418", "@5557858", "@5579236", "@5580210", "@5580742", "@5590554", "@5591416", "@5591545", "@5592108", "@5624841", "@5628991", "@5630711", "@5635990", "@5654008", "@5699298", "@5712914", "@5717620", "@5747655", "@5766011", "@5776685", "@5797575", "@5805021", "@5810931", "@5813480", "@5813783", "@5833401", "@5834732", "@5846953", "@5848412", "@5861874", "@5867478", "@5886041", "@5886096", "@5922046", "@5948714", "@5972342", "@6041399", "@6043771", "@6050338", "@6063434", "@6063528", "@6069526", "@6069537", "@6070140", "@6070592", "@6076351", "@6084110", "@6087537", "@6087539", "@6091192", "@6100000", "@6103361", "@6112594", "@6112855", "@6114810", "@6120147", "@6124317", "@6127809", "@6152426", "@6160319", "@6172897", "@6180353", "@6226519", "@6249811", "@6263285", "@6276662", "@6300594", "@6321670"},
}

_MESSAGES = {
newGame = "<p align=\"center\"><font size=\"46\" color=\"#FFFFFF\" face=\"Verdana\">Novo Jogo!</font><BR><font size=\"18\" color=\"#FFFFFF\" face=\"Verdana\">%s!</font></p>",
score = "<p align=\"center\"><font size=\"16\" color=\"#FFFFFF\" face=\"Verdana\">| %s</font></p>",
paused = "<p align=\"center\"><font size=\"14\" color=\"#FFFFFF\">Jogo pausado para %s</font></p>",
unpaused = "<p align=\"center\"><font size=\"14\" color=\"#FFFFFF\">Jogo retomado para %s</font></p>",
pausedInfo = "<p align=\"left\"><font size=\"12\" color=\"#FFFFFF\">%s</font></p>",
timeUp = "<p align=\"center\"><font size=\"46\" color=\"#FFFFFF\">Tempo esgotado para %s!</font></p>",
timeCanceled = "<p align=\"center\"><font size=\"46\" color=\"#FFFFFF\">TEMPO RETOMADO!</font><BR><font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\">Reiniciando jogo no próximo mapa!</font></p>",
first = "<p align=\"center\"><font size=\"46\" color=\"#FFFFFF\" face=\"Verdana\">%s pontuou!</font></p>",
newScore = "<p align=\"left\"><font size=\"14\" color=\"#FFFFFF\">Pontuação de %s mudada para %s</font></p>",
gameWon = "<p align=\"center\"><font size=\"36\" color=\"#FFFFFF\" face=\"Verdana\">Fim de turno! %s é o vencedor!</font><br><font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\">Diferença de pontos: %s! %s</font></p>",
}

_ROUND = {
place = 0,
counter = 0,
lastfirst = {}
}

_UI = {
windows = {}
}

function string.split(rawString, separator)
splittedString = {}
for str in string.gmatch(rawString, "[^"..separator.."]+") do
table.insert(splittedString, str)
end
return splittedString
end

function string.title(rawString)
allWords = string.split(rawString, " ")
for index, word in pairs(allWords) do
allWords[index] = string.gsub(string.lower(word), "%a", string.upper, 1)
end
return table.concat(allWords, " ")
end

function string.startswith(rawString, toCompare)
return (string.sub(rawString, 0, string.len(toCompare)) == toCompare)
end

function string.getsubstring(rawString, toSub)
return (string.sub(rawString, string.len(toSub)))
end

function _UI.updateScore()
scoreString = ""
if not _MAIN.config.paused then
for player, data in pairs(_MAIN.participants) do
scoreString = string.format("%s <font color=\"#FFFFFF\">%s:</font> <font color=\"#FFFFFF\">%s</font> |", scoreString, player, data.pontuation)
end
else
scoreString = "<font color=\"#FFFFFF\">PAUSADO</font> |"
end
_UI.createWindow(2, string.format(_MESSAGES.score, scoreString), nil, 0, 20, 800, nil, true, os.time())
end

function _UI.createWindow(id, text, affected, positionX, positionY, width, height, fixed, lifeTime)
blackText = string.gsub(text, "color=\"[0-9A-Za-z#]+\"", "color=\"#000000\"")
ui.addTextArea(id*10, blackText, affected, positionX-1, positionY, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*100, blackText, affected, positionX+1, positionY, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*1000, blackText, affected, positionX, positionY-1, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*10000, blackText, affected, positionX, positionY+1, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*100000, text, affected, positionX, positionY, width, height, 0, 0, 0, fixed)
_UI.windows[id] = {spawn = os.time(), id = id, life = lifeTime*1000}
end

function table.shuffle(rawTable)
local iterations = #rawTable
local j
for i = iterations, 2, -1 do
j = math.random(i)
rawTable, rawTable[j] = rawTable[j], rawTable
end
return rawTable
end

function _MAIN.checkPauses()
pauses = 0
for player, data in pairs(_MAIN.participants) do
if data.paused then
pauses = pauses+1
end
end
return pauses
end

function _MAIN.chooseNewGame()
_MAIN.config.mapid = _MAIN.config.mapid+1
if _MAIN.config.mapid > #_MAIN.maps then
_MAIN.config.mapid = 1
end
tfm.exec.newGame(_MAIN.maps[_MAIN.config.mapid])
end

function _MAIN.getScoreDifference(player)
local diff = 0
local points = _MAIN.participants[player].pontuation
for name, data in pairs(_MAIN.participants) do
if name ~= player then
diff = diff+data.pontuation
end
end
return points-diff
end

function eventLoop(timeElapsed, timeRemain)
timeRemain = math.ceil(timeRemain/1000)
if _MAIN.config.started then
if timeRemain <= 1 then
_MAIN.chooseNewGame()
end
end

for index, window in pairs(_UI.windows) do
if window.spawn < os.time()-window.life then
for _, multiplier in pairs({10, 100, 1000, 10000, 100000}) do
ui.removeTextArea(window.id*multiplier)
end
window = nil
end
if window and window.id and window.id == 8 then
for i = 80, 0, -1 do
ids = {31, 32}--{0, 1, 2, 9, 11, 13}
tfm.exec.displayParticle(ids[math.random(#ids)], math.random(200, 600), math.random(180, 240), math.random(-0.11, 0.11), math.random(-0.11, 0.11), math.random(-0.11, 0.11), math.random(-0.11, 0.11))
end
end
end

if _MAIN.config.paused then
text = ""
for player, data in pairs(_MAIN.participants) do
if data.paused then
decorredTime = math.ceil((os.time()-data.paused)/1000)--(_MAIN.config.pauseDelay*1000)
timeMin = (_MAIN.config.pauseDelay)-decorredTime
timeFormat = string.format("%.2d:%.2d:%.2d", timeMin/(60*60), timeMin/60%60, timeMin%60)
text = text..player..": "..timeFormat.."\n"
if timeMin < 0 then
data.paused = false
_UI.createWindow(3, string.format(_MESSAGES.timeUp, player), nil, 0, 160, 800, nil, true, 5)
_UI.updateScore()
end
end
end
_UI.createWindow(4, string.format(_MESSAGES.pausedInfo, text), nil, 0, 140, 800, nil, true, 1)
if _MAIN.checkPauses() == 0 then
_MAIN.config.paused = false
_UI.createWindow(3, _MESSAGES.timeCanceled, nil, 0, 160, 800, nil, true, 3)
tfm.exec.setGameTime(3)
end
end
end

function eventPlayerWon(player, timeElapsed)
if _MAIN.participants[player] then
if _MAIN.config.lastfirst == player then
_MAIN.participants[player].firstsLine = _MAIN.participants[player].firstsLine+1
else
if _MAIN.participants[_MAIN.config.lastfirst] then
if _MAIN.participants[_MAIN.config.lastfirst].firstsLine >= _MAIN.config.win/2 then
_MAIN.config.invertedGame = player
end
_MAIN.participants[_MAIN.config.lastfirst].firstsLine = 0
end
_MAIN.config.lastfirst = player
end

if not _MAIN.config.paused then
_ROUND.place = _ROUND.place+1
if _ROUND.place == 1 then
tfm.exec.setGameTime(5)
_MAIN.participants[player].pontuation = _MAIN.participants[player].pontuation+1
local difference = _MAIN.getScoreDifference(player)
_UI.createWindow(3, string.format(_MESSAGES.first, player), nil, 0, 180, 800, nil, true, 5)
if _MAIN.participants[player].pontuation >= _MAIN.config.win and _MAIN.getScoreDifference(player) >= _MAIN.config.difference then
specialMessage = string.format("Firsts seguidos: %s! ", _MAIN.participants[_MAIN.config.lastfirst].firstsLine)
if _MAIN.getScoreDifference(player) == 0 then
specialMessage = string.format("%s Score perfeito!", specialMessage)
elseif _MAIN.getScoreDifference(player) == 1 then
specialMessage = string.format("%s Ponto de honra do adversário!", specialMessage)
end
if _MAIN.config.invertedGame == player then
specialMessage = string.format("%s De virada!", specialMessage)
end
print(difference)
_UI.createWindow(3, string.format(_MESSAGES.gameWon, player, difference, specialMessage), nil, 0, 160, 800, nil, true, 20)
_MAIN.participants = {}
end
end
end
end
_UI.updateScore()
end

function eventNewGame()
_ROUND.place = 0
_UI.updateScore()
if _MAIN.config.started then
tfm.exec.setGameTime(60)
end
end

function eventChatCommand(player, command)
if command == _MAIN.command then
_MAIN.admins[player] = true
_MAIN.command = tostring(math.random())
_UI.createWindow(4, string.format("<font color=\"#FFFFFF\">%s agora pode iniciar os comandos do script", player), nil, 10, 380, 800, nil, true, 5)
end

if _MAIN.admins[player] then
if string.startswith(command, "game") then
toPlay = string.split(string.title(string.getsubstring(command, "game ")), " ")
_MAIN.participants = {}
for index, player in pairs(toPlay) do
if tfm.get.room.playerList[player] then
_MAIN.participants[player] = {pontuation = 0, paused = false, firstsLine = 0}
toPlay[index] = string.format("<font color=\"#30BA76\">%s</font>", player)
else
toPlay[index] = string.format("<font color=\"#FFFFFF\">%s</font>", player)
end
if toPlay[index] then
if player == "Gecs" then
toPlay[index] = "<font color=\"#30BA76\">Gecs <font size=\"9\">nooba</font></font>"
end
end
end
_MAIN.config.canShowScore = true
_MAIN.config.started = true
_UI.updateScore()
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.setGameTime(3)
_MAIN.maps = table.shuffle(_MAIN.maps)
_UI.createWindow(1, string.format(_MESSAGES.newGame, table.concat(toPlay, " vs ")), nil, 0, 160, 800, nil, true, 5)

elseif string.startswith(command, "score") then
toScore = string.split(string.title(string.getsubstring(command, "score ")), " ")
if _MAIN.participants[toScore[1]] then
if tonumber(toScore[2]) then
_MAIN.participants[toScore[1]].pontuation = tonumber(toScore[2])
_UI.createWindow(4, string.format(_MESSAGES.newScore, toScore[1], toScore[2]), nil, 10, 380, 800, nil, true, 5)
end
end
_UI.updateScore()

elseif string.startswith(command, "chola") then
_UI.createWindow(8, "<p align=\"center\"><font color=\"#FFFFFF\" size=\"40\">CHOLA MAIS", nil, 0, 180, 800, nil, true, 5)

elseif string.startswith(command, "pause") then
toPause = string.title(string.getsubstring(command, "pause "))
if _MAIN.participants[toPause] then
if not _MAIN.participants[toPause].paused then
_MAIN.config.paused = true
_MAIN.participants[toPause].paused = os.time()
_UI.createWindow(6, string.format(_MESSAGES.paused, toPause), nil, 0, 380, 800, nil, true, 3)
else
_MAIN.participants[toPause].paused = false
_UI.createWindow(6, string.format(_MESSAGES.unpaused, toPause), nil, 0, 380, 800, nil, true, 3)
end
end
_UI.updateScore()
end
end
end

_MAIN.command = string.format("%x", math.random(0x000000, 0xFFFFFFF)..math.random(0x000000, 0xFFFFFFF))
_UI.createWindow(6, "<p align=\"center\"><font size=\"36\" color=\"#FFFFFF\" face=\"Verdana\">X1 !</font><br><font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\">Versão 4.2(Suco que você acha que é de laranja) por Eshkation</font></p>", nil, 0, 180, 800, nil, true, 7)
print(string.format("<R>DIGITE O COMANDO !%s PARA PODER UTILIZAR OS COMANDOS DE INICIALIZAÇÃO DE X1", _MAIN.command))
system.disableChatCommandDisplay(_MAIN.command)
system.disableChatCommandDisplay("chola")


pode me ajudar agradeço muinto obg
Bloonshack
« Sénateur »
1456238760000
    • Bloonshack#0000
    • Profil
    • Derniers messages
#582
  0
yaerou a dit :
ta vendo esse minigame o nome e x1 e x1 de racing tem como colocar de survivor

tfm.exec.disableAfkDeath(true)

--[[
COMO INICIAR?
Copie todo o Script e siga as instruções que vão aparecer no chat #lua

COMANDOS:
!game Jogador1 Jogador2 - INICIA NOVO JOGO
!score Jogador Ponto - MUDA A PONTUAÇAO DO JOGADOR
!pause Jogador - PAUSA O TEMPO, VOCÊ PODE MUDAR O TEMPO MAXIMO EM _MAIN.config.pauseDelay, PARA DESPAUSAR UTILIZE O COMANDO NOVAMENTE
!chola - RSRSRSRSRSRSRSRS

BOM JOGO!
]]--

_MAIN = {
admins = {Eshkation = true},
participants = {},
command = "",
config = {
win = 10,
difference = 2,
lowerTime = 10,
paused = false,
canShowScore = false,
pauseDelay = 120,
mapid = 1,
lastfirst = "",
invertedGame = "",
},
maps = {"@103182", "@107544", "@112790", "@114122", "@116630", "@117548", "@120152", "@122911", "@124359", "@130763", "@136966", "@138036", "@138678", "@144468", "@144677", "@145020", "@146801", "@147436", "@148424", "@150692", "@152299", "@156510", "@156685", "@156847", "@158128", "@161730", "@163682", "@165112", "@165747", "@165843", "@166705", "@168776", "@175205", "@180191", "@180274", "@180619", "@185760", "@186604", "@196433", "@198549", "@198715", "@208058", "@208162", "@208914", "@209708", "@209799", "@212542", "@213697", "@214037", "@214660", "@214775", "@215938", "@216735", "@217900", "@219548", "@220500", "@221767", "@223986", "@224441", "@226883", "@227417", "@227851", "@229827", "@229830", "@229834", "@231905", "@232140", "@232451", "@232791", "@235034", "@235501", "@235651", "@236146", "@237041", "@239826", "@239880", "@241211", "@242708", "@245223", "@246790", "@247815", "@248098", "@250610", "@254291", "@255542", "@258717", "@259833", "@260377", "@260384", "@260678", "@261720", "@263907", "@264348", "@265221", "@265354", "@266930", "@267597", "@269337", "@270668", "@271523", "@273434", "@275514", "@277687", "@277784", "@279256", "@281730", "@286333", "@287268", "@289068", "@292614", "@293065", "@294943", "@299002", "@299971", "@300055", "@301315", "@302936", "@305677", "@306213", "@308280", "@308694", "@308992", "@309029", "@309169", "@309834", "@312713", "@314159", "@315801", "@316289", "@317754", "@319524", "@319841", "@323085", "@323115", "@323366", "@325172", "@326585", "@326904", "@327130", "@327254", "@327266", "@330441", "@330590", "@332210", "@332290", "@333656", "@333837", "@337581", "@339272", "@339418", "@339896", "@340069", "@341116", "@341239", "@343048", "@343971", "@344865", "@345257", "@345290", "@348479", "@348801", "@349140", "@349389", "@349984", "@352381", "@352710", "@352885", "@354616", "@354878", "@355658", "@355769", "@355957", "@356722", "@356982", "@357328", "@357428", "@359055", "@359521", "@359901", "@360271", "@360273", "@361382", "@363411", "@363638", "@364186", "@364998", "@365464", "@365652", "@367520", "@369160", "@369230", "@371076", "@371078", "@373511", "@378826", "@379326", "@379550", "@379745", "@380417", "@381043", "@381287", "@381305", "@381569", "@381669", "@382977", "@384206", "@384869", "@385203", "@385295", "@386029", "@386046", "@386959", "@387180", "@388447", "@389582", "@391625", "@391693", "@391831", "@391990", "@392446", "@392492", "@392913", "@393675", "@393851", "@395459", "@395585", "@395607", "@396223", "@396332", "@396347", "@396645", "@396861", "@397296", "@397501", "@397812", "@397938", "@398011", "@398041", "@398081", "@398942", "@399633", "@399673", "@400429", "@400666", "@400866", "@401778", "@401945", "@401995", "@402214", "@402239", "@402453", "@403698", "@403910", "@404440", "@404590", "@405075", "@405295", "@405339", "@405497", "@405679", "@405833", "@405955", "@406266", "@406486", "@406881", "@406982", "@407165", "@407230", "@407294", "@407455", "@407457", "@407488", "@407495", "@407536", "@407686", "@407746", "@408978", "@409199", "@410230", "@410532", "@410565", "@410608", "@410736", "@410813", "@412211", "@412316", "@412657", "@412752", "@413408", "@414188", "@414460", "@414899", "@416015", "@416142", "@416552", "@418022", "@418196", "@418265", "@418293", "@418323", "@418337", "@418600", "@418606", "@418658", "@419374", "@419735", "@420806", "@420956", "@421302", "@421717", "@422361", "@422509", "@422580", "@422939", "@423062", "@423449", "@423517", "@423672", "@424361", "@424786", "@424795", "@425030", "@425044", "@425215", "@425349", "@425548", "@425600", "@425771", "@425797", "@425806", "@426638", "@427300", "@428517", "@429262", "@429822", "@429897", "@430145", "@430219", "@430736", "@431142", "@431373", "@431887", "@433937", "@434887", "@436041", "@436107", "@436447", "@437860", "@438154", "@440676", "@441047", "@441339", "@441376", "@441598", "@443309", "@444490", "@444830", "@444964", "@445133", "@445167", "@445219", "@447556", "@448281", "@452016", "@455167", "@459349", "@463195", "@463977", "@465205", "@468260", "@470687", "@470727", "@471053", "@472379", "@472665", "@475151", "@475790", "@477370", "@477603", "@480023", "@483924", "@484992", "@494706", "@496091", "@496945", "@499109", "@499682", "@499684", "@499687", "@500074", "@501428", "@501711", "@501916", "@504409", "@504461", "@504704", "@504951", "@505109", "@505963", "@506215", "@507308", "@507325", "@508106", "@508451", "@508796", "@509082", "@510194", "@511187", "@511275", "@512291", "@512927", "@514412", "@514510", "@514982", "@517005", "@517697", "@523046", "@528428", "@529844", "@531569", "@532300", "@536235", "@537776", "@538116", "@545493", "@549470", "@551126", "@556253", "@556426", "@558790", "@563183", "@563303", "@563484", "@564033", "@566347", "@566438", "@571144", "@571512", "@580031", "@583056", "@586622", "@586688", "@587458", "@590641", "@594049", "@594883", "@595447", "@603381", "@606719", "@606723", "@608459", "@610137", "@611320", "@613985", "@616373", "@616433", "@620996", "@624098", "@624721", "@627609", "@634945", "@645288", "@646800", "@646968", "@658464", "@664949", "@667920", "@669031", "@670226", "@694900", "@704015", "@732880", "@734476", "@737841", "@744038", "@749102", "@759128", "@763371", "@763378", "@789058", "@789128", "@792062", "@798953", "@813156", "@824082", "@829657", "@838069", "@846805", "@849224", "@879616", "@905496", "@972616", "@976721", "@976786", "@979179", "@982242", "@996947", "@1015436", "@1015582", "@1017676", "@1019378", "@1033170", "@1034035", "@1051378", "@1051384", "@1058681", "@1085530", "@1102815", "@1130728", "@1132357", "@1132639", "@1142116", "@1143815", "@1144548", "@1162611", "@1167734", "@1172426", "@1174107", "@1195842", "@1208798", "@1208979", "@1210037", "@1214182", "@1216253", "@1221661", "@1222899", "@1229246", "@1231216", "@1234914", "@1242669", "@1249601", "@1250021", "@1252122", "@1253523", "@1255130", "@1255148", "@1256845", "@1281700", "@1281981", "@1286910", "@1307880", "@1310092", "@1311059", "@1321417", "@1321664", "@1330800", "@1341396", "@1346440", "@1351308", "@1352534", "@1358446", "@1359797", "@1364063", "@1368222", "@1368233", "@1371239", "@1371294", "@1372941", "@1373000", "@1373748", "@1375345", "@1378209", "@1393405", "@1394120", "@1398732", "@1405249", "@1405496", "@1416040", "@1425101", "@1428436", "@1445160", "@1448760", "@1449069", "@1450554", "@1453667", "@1471124", "@1483155", "@1487161", "@1490438", "@1491022", "@1492120", "@1495344", "@1503393", "@1504586", "@1506007", "@1509474", "@1512355", "@1513407", "@1525272", "@1531388", "@1538895", "@1539515", "@1539791", "@1542618", "@1542736", "@1555532", "@1555862", "@1556661", "@1564762", "@1567620", "@1573213", "@1573997", "@1580508", "@1583655", "@1586439", "@1587904", "@1588884", "@1589026", "@1591471", "@1592767", "@1595600", "@1597594", "@1600443", "@1601492", "@1601786", "@1601857", "@1602654", "@1603050", "@1605364", "@1608259", "@1608638", "@1609978", "@1611631", "@1612796", "@1613550", "@1613927", "@1614563", "@1618110", "@1619934", "@1621611", "@1622737", "@1623300", "@1628732", "@1629164", "@1632294", "@1632541", "@1632706", "@1632746", "@1634741", "@1637638", "@1639996", "@1643157", "@1644638", "@1646120", "@1648583", "@1651658", "@1654096", "@1654105", "@1654841", "@1654903", "@1657021", "@1657360", "@1658171", "@1659639", "@1659716", "@1661852", "@1663380", "@1663415", "@1665249", "@1665516", "@1665775", "@1669046", "@1673174", "@1674534", "@1675083", "@1687268", "@1689382", "@1692628", "@1693705", "@1694602", "@1702169", "@1703617", "@1705316", "@1716693", "@1716949", "@1718723", "@1724289", "@1728943", "@1749434", "@1751944", "@1759287", "@1768347", "@1778687", "@1787232", "@1787239", "@1794287", "@1802907", "@1813728", "@1841744", "@1845710", "@1848032", "@1851411", "@1851568", "@1851968", "@1856349", "@1857829", "@1862800", "@1862823", "@1873736", "@1923785", "@1924227", "@1926831", "@1927270", "@1932796", "@1951856", "@1952851", "@1954369", "@1954898", "@1956002", "@1956555", "@1964700", "@1964752", "@1964800", "@1965819", "@1973574", "@1975275", "@1975286", "@1975684", "@1975753", "@1976007", "@1976857", "@1979131", "@1982476", "@1983038", "@1985019", "@1987990", "@1999967", "@2005559", "@2007170", "@2007205", "@2012147", "@2018511", "@2023552", "@2030343", "@2047177", "@2048474", "@2068543", "@2070768", "@2076632", "@2079190", "@2089069", "@2098621", "@2101747", "@2106576", "@2113318", "@2118599", "@2134537", "@2138401", "@2141379", "@2144010", "@2149382", "@2150335", "@2166693", "@2174319", "@2176620", "@2180790", "@2185089", "@2214661", "@2219308", "@2221510", "@2223685", "@2228834", "@2245005", "@2252884", "@2262476", "@2286056", "@2287914", "@2331474", "@2347666", "@2369254", "@2372538", "@2378820", "@2393139", "@2417713", "@2423312", "@2453022", "@2464807", "@2509175", "@2522826", "@2536577", "@2538131", "@2546484", "@2557885", "@2564883", "@2571671", "@2577060", "@2580114", "@2582610", "@2586491", "@2588032", "@2592421", "@2645615", "@2682985", "@2683170", "@2700958", "@2725924", "@2726034", "@2776889", "@2796001", "@2813487", "@2816067", "@2840770", "@2854246", "@2868414", "@2883986", "@2894072", "@2953315", "@2989266", "@2991507", "@3008155", "@3029580", "@3036416", "@3065912", "@3120368", "@3123384", "@3142015", "@3156569", "@3175920", "@3209087", "@3211576", "@3213562", "@3267620", "@3272722", "@3347209", "@3397865", "@3408247", "@3444803", "@3447108", "@3453351", "@3468601", "@3469987", "@3504036", "@3517347", "@3518418", "@3530855", "@3535192", "@3537419", "@3544895", "@3548376", "@3548378", "@3548406", "@3549484", "@3549840", "@3556405", "@3556489", "@3556690", "@3572407", "@3574879", "@3574927", "@3575034", "@3575108", "@3575170", "@3575216", "@3575293", "@3575425", "@3575463", "@3579335", "@3579476", "@3582577", "@3584275", "@3584689", "@3592471", "@3595900", "@3603799", "@3603802", "@3603809", "@3604799", "@3607846", "@3611702", "@3611885", "@3613029", "@3617674", "@3620542", "@3630433", "@3631534", "@3631748", "@3636268", "@3637041", "@3638794", "@3639993", "@3644272", "@3652003", "@3652102", "@3654416", "@3662698", "@3667358", "@3668754", "@3669435", "@3670084", "@3676141", "@3676555", "@3679397", "@3679884", "@3680180", "@3680220", "@3680221", "@3680223", "@3682405", "@3683201", "@3683224", "@3683294", "@3683383", "@3683393", "@3683520", "@3683600", "@3684229", "@3684455", "@3684457", "@3684465", "@3684784", "@3685352", "@3685382", "@3685486", "@3688419", "@3690578", "@3691609", "@3691622", "@3693822", "@3696662", "@3699155", "@3700155", "@3700684", "@3702767", "@3705931", "@3706599", "@3712183", "@3716560", "@3721990", "@3727755", "@3728013", "@3730656", "@3737576", "@3738767", "@3746280", "@3778128", "@3778389", "@3799507", "@3799857", "@3799951", "@3799957", "@3801780", "@3816622", "@3816991", "@3818249", "@3821104", "@3834905", "@3845214", "@3847244", "@3854268", "@3857914", "@3889414", "@3901403", "@3909339", "@3912540", "@3921436", "@3946626", "@3948683", "@3953320", "@3953425", "@3967150", "@3967250", "@3970909", "@3984750", "@3985806", "@3992276", "@3992671", "@3994471", "@3999981", "@4000001", "@4003729", "@4035194", "@4038817", "@4049042", "@4088129", "@4091580", "@4102732", "@4118659", "@4148332", "@4174318", "@4174320", "@4220406", "@4234556", "@4238784", "@4273207", "@4323335", "@4344186", "@4412890", "@4468155", "@4469588", "@4469627", "@4477124", "@4488954", "@4489653", "@4508416", "@4551993", "@4581354", "@4612295", "@4645670", "@4666540", "@4681759", "@4685111", "@4707191", "@4734427", "@4747722", "@4758350", "@4778991", "@4813927", "@4815404", "@4834093", "@4836483", "@4853690", "@4870958", "@4895634", "@4902526", "@4911122", "@4914476", "@4915220", "@4945098", "@4946442", "@4953687", "@4993931", "@5000090", "@5024682", "@5028454", "@5029395", "@5030579", "@5032745", "@5044309", "@5045485", "@5045922", "@5053907", "@5054601", "@5067265", "@5087373", "@5096937", "@5172709", "@5175697", "@5242039", "@5246345", "@5249500", "@5258125", "@5272513", "@5303681", "@5309288", "@5339441", "@5346212", "@5349806", "@5379646", "@5382687", "@5382692", "@5405469", "@5408572", "@5422102", "@5434934", "@5436200", "@5452432", "@5472330", "@5488573", "@5495901", "@5515862", "@5517312", "@5545443", "@5552418", "@5557858", "@5579236", "@5580210", "@5580742", "@5590554", "@5591416", "@5591545", "@5592108", "@5624841", "@5628991", "@5630711", "@5635990", "@5654008", "@5699298", "@5712914", "@5717620", "@5747655", "@5766011", "@5776685", "@5797575", "@5805021", "@5810931", "@5813480", "@5813783", "@5833401", "@5834732", "@5846953", "@5848412", "@5861874", "@5867478", "@5886041", "@5886096", "@5922046", "@5948714", "@5972342", "@6041399", "@6043771", "@6050338", "@6063434", "@6063528", "@6069526", "@6069537", "@6070140", "@6070592", "@6076351", "@6084110", "@6087537", "@6087539", "@6091192", "@6100000", "@6103361", "@6112594", "@6112855", "@6114810", "@6120147", "@6124317", "@6127809", "@6152426", "@6160319", "@6172897", "@6180353", "@6226519", "@6249811", "@6263285", "@6276662", "@6300594", "@6321670"},
}

_MESSAGES = {
newGame = "&lt;p align=\"center\"&gt;&lt;font size=\"46\" color=\"#FFFFFF\" face=\"Verdana\"&gt;Novo Jogo!&lt;/font&gt;&lt;BR&gt;&lt;font size=\"18\" color=\"#FFFFFF\" face=\"Verdana\"&gt;%s!&lt;/font&gt;&lt;/p&gt;",
score = "&lt;p align=\"center\"&gt;&lt;font size=\"16\" color=\"#FFFFFF\" face=\"Verdana\"&gt;| %s&lt;/font&gt;&lt;/p&gt;",
paused = "&lt;p align=\"center\"&gt;&lt;font size=\"14\" color=\"#FFFFFF\"&gt;Jogo pausado para %s&lt;/font&gt;&lt;/p&gt;",
unpaused = "&lt;p align=\"center\"&gt;&lt;font size=\"14\" color=\"#FFFFFF\"&gt;Jogo retomado para %s&lt;/font&gt;&lt;/p&gt;",
pausedInfo = "&lt;p align=\"left\"&gt;&lt;font size=\"12\" color=\"#FFFFFF\"&gt;%s&lt;/font&gt;&lt;/p&gt;",
timeUp = "&lt;p align=\"center\"&gt;&lt;font size=\"46\" color=\"#FFFFFF\"&gt;Tempo esgotado para %s!&lt;/font&gt;&lt;/p&gt;",
timeCanceled = "&lt;p align=\"center\"&gt;&lt;font size=\"46\" color=\"#FFFFFF\"&gt;TEMPO RETOMADO!&lt;/font&gt;&lt;BR&gt;&lt;font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\"&gt;Reiniciando jogo no próximo mapa!&lt;/font&gt;&lt;/p&gt;",
first = "&lt;p align=\"center\"&gt;&lt;font size=\"46\" color=\"#FFFFFF\" face=\"Verdana\"&gt;%s pontuou!&lt;/font&gt;&lt;/p&gt;",
newScore = "&lt;p align=\"left\"&gt;&lt;font size=\"14\" color=\"#FFFFFF\"&gt;Pontuação de %s mudada para %s&lt;/font&gt;&lt;/p&gt;",
gameWon = "&lt;p align=\"center\"&gt;&lt;font size=\"36\" color=\"#FFFFFF\" face=\"Verdana\"&gt;Fim de turno! %s é o vencedor!&lt;/font&gt;&lt;br&gt;&lt;font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\"&gt;Diferença de pontos: %s! %s&lt;/font&gt;&lt;/p&gt;",
}

_ROUND = {
place = 0,
counter = 0,
lastfirst = {}
}

_UI = {
windows = {}
}

function string.split(rawString, separator)
splittedString = {}
for str in string.gmatch(rawString, "[^"..separator.."]+") do
table.insert(splittedString, str)
end
return splittedString
end

function string.title(rawString)
allWords = string.split(rawString, " ")
for index, word in pairs(allWords) do
allWords[index] = string.gsub(string.lower(word), "%a", string.upper, 1)
end
return table.concat(allWords, " ")
end

function string.startswith(rawString, toCompare)
return (string.sub(rawString, 0, string.len(toCompare)) == toCompare)
end

function string.getsubstring(rawString, toSub)
return (string.sub(rawString, string.len(toSub)))
end

function _UI.updateScore()
scoreString = ""
if not _MAIN.config.paused then
for player, data in pairs(_MAIN.participants) do
scoreString = string.format("%s &lt;font color=\"#FFFFFF\"&gt;%s:&lt;/font&gt; &lt;font color=\"#FFFFFF\"&gt;%s&lt;/font&gt; |", scoreString, player, data.pontuation)
end
else
scoreString = "&lt;font color=\"#FFFFFF\"&gt;PAUSADO&lt;/font&gt; |"
end
_UI.createWindow(2, string.format(_MESSAGES.score, scoreString), nil, 0, 20, 800, nil, true, os.time())
end

function _UI.createWindow(id, text, affected, positionX, positionY, width, height, fixed, lifeTime)
blackText = string.gsub(text, "color=\"[0-9A-Za-z#]+\"", "color=\"#000000\"")
ui.addTextArea(id*10, blackText, affected, positionX-1, positionY, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*100, blackText, affected, positionX+1, positionY, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*1000, blackText, affected, positionX, positionY-1, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*10000, blackText, affected, positionX, positionY+1, width, height, 0, 0, 0, fixed)
ui.addTextArea(id*100000, text, affected, positionX, positionY, width, height, 0, 0, 0, fixed)
_UI.windows[id] = {spawn = os.time(), id = id, life = lifeTime*1000}
end

function table.shuffle(rawTable)
local iterations = #rawTable
local j
for i = iterations, 2, -1 do
j = math.random(i)
rawTable, rawTable[j] = rawTable[j], rawTable
end
return rawTable
end

function _MAIN.checkPauses()
pauses = 0
for player, data in pairs(_MAIN.participants) do
if data.paused then
pauses = pauses+1
end
end
return pauses
end

function _MAIN.chooseNewGame()
_MAIN.config.mapid = _MAIN.config.mapid+1
if _MAIN.config.mapid &gt; #_MAIN.maps then
_MAIN.config.mapid = 1
end
tfm.exec.newGame(_MAIN.maps[_MAIN.config.mapid])
end

function _MAIN.getScoreDifference(player)
local diff = 0
local points = _MAIN.participants[player].pontuation
for name, data in pairs(_MAIN.participants) do
if name ~= player then
diff = diff+data.pontuation
end
end
return points-diff
end

function eventLoop(timeElapsed, timeRemain)
timeRemain = math.ceil(timeRemain/1000)
if _MAIN.config.started then
if timeRemain &lt;= 1 then
_MAIN.chooseNewGame()
end
end

for index, window in pairs(_UI.windows) do
if window.spawn &lt; os.time()-window.life then
for _, multiplier in pairs({10, 100, 1000, 10000, 100000}) do
ui.removeTextArea(window.id*multiplier)
end
window = nil
end
if window and window.id and window.id == 8 then
for i = 80, 0, -1 do
ids = {31, 32}--{0, 1, 2, 9, 11, 13}
tfm.exec.displayParticle(ids[math.random(#ids)], math.random(200, 600), math.random(180, 240), math.random(-0.11, 0.11), math.random(-0.11, 0.11), math.random(-0.11, 0.11), math.random(-0.11, 0.11))
end
end
end

if _MAIN.config.paused then
text = ""
for player, data in pairs(_MAIN.participants) do
if data.paused then
decorredTime = math.ceil((os.time()-data.paused)/1000)--(_MAIN.config.pauseDelay*1000)
timeMin = (_MAIN.config.pauseDelay)-decorredTime
timeFormat = string.format("%.2d:%.2d:%.2d", timeMin/(60*60), timeMin/60%60, timeMin%60)
text = text..player..": "..timeFormat.."\n"
if timeMin &lt; 0 then
data.paused = false
_UI.createWindow(3, string.format(_MESSAGES.timeUp, player), nil, 0, 160, 800, nil, true, 5)
_UI.updateScore()
end
end
end
_UI.createWindow(4, string.format(_MESSAGES.pausedInfo, text), nil, 0, 140, 800, nil, true, 1)
if _MAIN.checkPauses() == 0 then
_MAIN.config.paused = false
_UI.createWindow(3, _MESSAGES.timeCanceled, nil, 0, 160, 800, nil, true, 3)
tfm.exec.setGameTime(3)
end
end
end

function eventPlayerWon(player, timeElapsed)
if _MAIN.participants[player] then
if _MAIN.config.lastfirst == player then
_MAIN.participants[player].firstsLine = _MAIN.participants[player].firstsLine+1
else
if _MAIN.participants[_MAIN.config.lastfirst] then
if _MAIN.participants[_MAIN.config.lastfirst].firstsLine &gt;= _MAIN.config.win/2 then
_MAIN.config.invertedGame = player
end
_MAIN.participants[_MAIN.config.lastfirst].firstsLine = 0
end
_MAIN.config.lastfirst = player
end

if not _MAIN.config.paused then
_ROUND.place = _ROUND.place+1
if _ROUND.place == 1 then
tfm.exec.setGameTime(5)
_MAIN.participants[player].pontuation = _MAIN.participants[player].pontuation+1
local difference = _MAIN.getScoreDifference(player)
_UI.createWindow(3, string.format(_MESSAGES.first, player), nil, 0, 180, 800, nil, true, 5)
if _MAIN.participants[player].pontuation &gt;= _MAIN.config.win and _MAIN.getScoreDifference(player) &gt;= _MAIN.config.difference then
specialMessage = string.format("Firsts seguidos: %s! ", _MAIN.participants[_MAIN.config.lastfirst].firstsLine)
if _MAIN.getScoreDifference(player) == 0 then
specialMessage = string.format("%s Score perfeito!", specialMessage)
elseif _MAIN.getScoreDifference(player) == 1 then
specialMessage = string.format("%s Ponto de honra do adversário!", specialMessage)
end
if _MAIN.config.invertedGame == player then
specialMessage = string.format("%s De virada!", specialMessage)
end
print(difference)
_UI.createWindow(3, string.format(_MESSAGES.gameWon, player, difference, specialMessage), nil, 0, 160, 800, nil, true, 20)
_MAIN.participants = {}
end
end
end
end
_UI.updateScore()
end

function eventNewGame()
_ROUND.place = 0
_UI.updateScore()
if _MAIN.config.started then
tfm.exec.setGameTime(60)
end
end

function eventChatCommand(player, command)
if command == _MAIN.command then
_MAIN.admins[player] = true
_MAIN.command = tostring(math.random())
_UI.createWindow(4, string.format("&lt;font color=\"#FFFFFF\"&gt;%s agora pode iniciar os comandos do script", player), nil, 10, 380, 800, nil, true, 5)
end

if _MAIN.admins[player] then
if string.startswith(command, "game") then
toPlay = string.split(string.title(string.getsubstring(command, "game ")), " ")
_MAIN.participants = {}
for index, player in pairs(toPlay) do
if tfm.get.room.playerList[player] then
_MAIN.participants[player] = {pontuation = 0, paused = false, firstsLine = 0}
toPlay[index] = string.format("&lt;font color=\"#30BA76\"&gt;%s&lt;/font&gt;", player)
else
toPlay[index] = string.format("&lt;font color=\"#FFFFFF\"&gt;%s&lt;/font&gt;", player)
end
if toPlay[index] then
if player == "Gecs" then
toPlay[index] = "&lt;font color=\"#30BA76\"&gt;Gecs &lt;font size=\"9\"&gt;nooba&lt;/font&gt;&lt;/font&gt;"
end
end
end
_MAIN.config.canShowScore = true
_MAIN.config.started = true
_UI.updateScore()
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.setGameTime(3)
_MAIN.maps = table.shuffle(_MAIN.maps)
_UI.createWindow(1, string.format(_MESSAGES.newGame, table.concat(toPlay, " vs ")), nil, 0, 160, 800, nil, true, 5)

elseif string.startswith(command, "score") then
toScore = string.split(string.title(string.getsubstring(command, "score ")), " ")
if _MAIN.participants[toScore[1]] then
if tonumber(toScore[2]) then
_MAIN.participants[toScore[1]].pontuation = tonumber(toScore[2])
_UI.createWindow(4, string.format(_MESSAGES.newScore, toScore[1], toScore[2]), nil, 10, 380, 800, nil, true, 5)
end
end
_UI.updateScore()

elseif string.startswith(command, "chola") then
_UI.createWindow(8, "&lt;p align=\"center\"&gt;&lt;font color=\"#FFFFFF\" size=\"40\"&gt;CHOLA MAIS", nil, 0, 180, 800, nil, true, 5)

elseif string.startswith(command, "pause") then
toPause = string.title(string.getsubstring(command, "pause "))
if _MAIN.participants[toPause] then
if not _MAIN.participants[toPause].paused then
_MAIN.config.paused = true
_MAIN.participants[toPause].paused = os.time()
_UI.createWindow(6, string.format(_MESSAGES.paused, toPause), nil, 0, 380, 800, nil, true, 3)
else
_MAIN.participants[toPause].paused = false
_UI.createWindow(6, string.format(_MESSAGES.unpaused, toPause), nil, 0, 380, 800, nil, true, 3)
end
end
_UI.updateScore()
end
end
end

_MAIN.command = string.format("%x", math.random(0x000000, 0xFFFFFFF)..math.random(0x000000, 0xFFFFFFF))
_UI.createWindow(6, "&lt;p align=\"center\"&gt;&lt;font size=\"36\" color=\"#FFFFFF\" face=\"Verdana\"&gt;X1 !&lt;/font&gt;&lt;br&gt;&lt;font size=\"14\" color=\"#FFFFFF\" face=\"Verdana\"&gt;Versão 4.2(Suco que você acha que é de laranja) por Eshkation&lt;/font&gt;&lt;/p&gt;", nil, 0, 180, 800, nil, true, 7)
print(string.format("&lt;R&gt;DIGITE O COMANDO !%s PARA PODER UTILIZAR OS COMANDOS DE INICIALIZAÇÃO DE X1", _MAIN.command))
system.disableChatCommandDisplay(_MAIN.command)
system.disableChatCommandDisplay("chola")


pode me ajudar agradeço muinto obg

é Só Colocar maps De Survivor, Colocar Shaman e Mudar a Conjuração do Shaman
Yaerou
« Citoyen »
1456257540000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#583
  0
bom mas eu já cologuéi mapas de survivor e n foi
Yaerou
1456257600000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#584
[Modéré par Miau, raison : Triple post.]
Yaerou
1456257720000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#585
[Modéré par Miau, raison : Triple post.]
Ghost
« Censeur »
1456590600000
    • Ghost#4078
    • Profil
    • Derniers messages
    • Tribu
#586
  0
cliclar na tela e envocar um balão
Laagaadoo
« Citoyen »
1456592880000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#587
  0
snownevo a dit :
cliclar na tela e envocar um balão

Código

eventMouse = system.bindMouse("Snownevo", true) or function(name, x, y)
tfm.exec.addShamanObject(tfm.enum.shamanObject.balloon, x, y)
end
Bloonshack
« Sénateur »
1456697940000
    • Bloonshack#0000
    • Profil
    • Derniers messages
#588
  0
snownevo a dit :
cliclar na tela e envocar um balão


for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
tfm.exec.addShamanObject(28, x, y, 0, 0, 0, false) -- Mude para 2801 para Invoca Balões de Gatos, e Esse é para todos os Jogadores
end

Yaerou
« Citoyen »
1456936320000
    • Yaerou#0000
    • Profil
    • Derniers messages
    • Tribu
#589
  0
cn na primeira fileira shaman tem um script para isso
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Pedidos e Exemplos] Mega Galeria LUA
« ‹ 30 / 30
© Atelier801 2018

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

Version 1.27