Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _, nickname = pcall(nil)
- admin = string.match(nickname, "(.-)%.")
- for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables','AfkDeath','AutoScore'} do
- tfm.exec['disable' .. v]()
- end
- system.disableChatCommandDisplay()
- local image = {'x_transformice/x_aventure/x_recoltables/x_30.png',30,16,'Sementes'} -- Alguma imagem hospedada por adm/dev, largura da imagem, altura da imagem, nome/identificação
- -- Só colocar sua xml dentro das [[ ]]
- local map = [[<C><P Ca="" D="x_transformice/x_evt/x_evt_21/gsvnkdsop/fond.jpg" /><Z><S><S H="10" L="803" X="401" c="3" Y="402" T="6" m="" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="815" X="396" v="5000" Y="432" T="0" H="10" /><S L="10" H="58" X="298" v="5000" Y="369" T="0" m="" P="0,0,0.3,0.2,0,0,0,0" /><S L="94" H="10" X="341" v="5000" Y="343" T="0" m="" P="0,0,0.3,0.2,0,0,0,0" /><S L="10" H="62" X="390" v="5000" Y="368" T="0" m="" P="0,0,0.3,0.2,0,0,0,0" /><S L="815" X="398" H="10" v="10000" Y="4" T="0" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="13" o="3f3250" H="410" Y="203" T="12" X="5" /><S L="13" o="3f3250" H="410" X="798" Y="205" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="381" X="341" /></D><O><O C="28" Y="454" X="32" P="0" /><O C="28" Y="456" X="115" P="0" /><O C="28" Y="457" X="74" P="0" /><O C="28" Y="460" X="320" P="0" /><O C="28" Y="458" X="420" P="0" /><O C="28" Y="453" X="566" P="0" /><O C="28" Y="499" X="609" P="0" /><O C="28" Y="456" X="726" P="0" /><O C="28" Y="451" X="769" P="0" /><O C="28" Y="465" X="280" P="0" /><O C="28" Y="461" X="212" P="0" /><O C="28" Y="467" X="504" P="0" /><O C="28" Y="504" X="376" P="0" /><O C="28" Y="471" X="689" P="0" /><O C="6" Y="-18" X="62" P="0" /><O C="6" Y="-14" X="267" P="0" /><O C="6" Y="-11" X="760" P="0" /><O C="6" Y="-14" X="713" P="0" /><O C="6" Y="-13" X="587" P="0" /><O C="6" Y="-18" X="116" P="0" /><O C="6" Y="-16" X="12" P="0" /><O C="6" Y="-20" X="438" P="0" /><O C="10" Y="-17" X="37" P="0" /><O C="10" Y="-12" X="758" P="0" /></O></Z></C>]]
- -- Para colocar mais doces é só seguir o ritmo, ex: [6] = {500,100},
- local collect = {
- [1] = {382,131},
- [2] = {93,148},
- [3] = {1100,340},
- [4] = {113,309},
- [5] = {167,376},
- [6] = {679,366},
- [7] = {727,264},
- [8] = {529,244},
- [9] = {352,234},
- [10] = {414,84},
- [11] = {59,87},
- [12] = {216,47},
- [13] = {189,232},
- [14] = {189,232},
- [15] = {706,106},
- [16] = {485,65},
- [17] = {707,256},
- }
- -- Não editável!
- local player = {}
- local hub = true
- math.pythag = function(xPos1, yPos1, xPos2, yPos2, range)
- return ((xPos1 - xPos2)^2 + (yPos1 - yPos2)^2 < range^2)
- end
- eventNewPlayer = function(name)
- player[name] = {0}
- for i = 0,255 do system.bindKeyboard (name,i,true,true) end
- end
- eventNewGame = function()
- for i=1,50 do ui.removeTextArea(i) end
- if hub then
- xml = mapEditor(map)
- elseif not hub then
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- end
- end
- mapEditor = function(x)
- local collectible = {}
- for k,v in next, collect do collectible[#collectible + 1] = '/><S L="10" H="10" X="'..v[1]..'" Y="'..v[2]..'" T="0" P="0,0,0.3,0.2,0,0,0,0" lua="'..k..'" i="-'..(image[2]/2)..',-'..(image[3]/2)..','..image[1]..'" c="4" ' end
- return x:gsub('/></S',''..table.concat(collectible,'')..'/></S')
- end
- eventChatCommand = function(name,c)
- if c:lower() == 'rank' and not hub then
- local rank = {}
- for i = #collect,0,-1 do for k,v in next, player do if v[1] == i then rank[#rank + 1] = k..' - '..v[1] end end end
- ui.addTextArea(20,'<b><p align="center"><font size="20" color="#FFEB6C">Rank</font></p>\n'..table.concat(rank,'\n')..'</b>',name,300,60,200,280,'0x000000','0x010101',0.8,true)
- elseif c:lower() == 'close' then ui.removeTextArea(20,name) end
- end
- eventLoop = function(cT,tL)
- if hub then
- ui.addTextArea (1,'<p align="center"><font size="80" color="#009D9D"><b>'..math.abs(-10 + math.floor(cT/1000))..'</b></font></p>',nil,0,175,800,100,0,0,0)
- if cT > 10000 then tfm.exec.newGame(xml) hub = nil end
- else
- for n,v in next, tfm.get.room.playerList do for k,c in next, collect do if math.pythag(v.x,v.y,c[1],c[2],30) then ui.addTextArea (10,'<p align="center"><font size="10" color="#010101"><b>?</b></font></p>',n,c[1] - 10,c[2] + 30,20,20,'0xffffff','0xe6e6e6',1) player[n][2] = k elseif player[n][2] then if not math.pythag(v.x,v.y,collect[player[n][2]][1],collect[player[n][2]][2],30) then ui.removeTextArea(10,n) end end end ui.addTextArea(11,'<p align="center"><font size="13" color="#ffffff"><b>Você coletou <R>'..player[n][1]..'</R> '..image[4]..'(s).</b></font></p>',n,610,35,180,20,'0x000000','0x010101',0.5,true) end
- end
- end
- eventKeyboard = function(name,cmd,p,x,y)
- if cmd == 3 then for k,c in next, collect do if math.pythag(x,y,c[1],c[2],30) then player[name][1] = (player[name][1] + 1) tfm.exec.removePhysicObject(k) collect[k] = {-200,-200} end end end
- end
- tfm.exec.newGame('<C><P Ca="" DS="y;345" /><Z><S><S P="0,0,0.3,0.2,0,0,0,0" L="800" o="c83535" H="40" Y="380" T="12" X="400" /><S P="1,0,10,0.2,0,1,0,0" L="40" X="-20" c="2" Y="-200" T="12" H="40" /><S H="200" L="10" X="-45" c="2" Y="-200" T="12" P="0,0,10,0.2,0,0,0,0" /><S H="10" L="10" X="200" c="2" Y="-300" T="12" P="1,999999,0,9999,-45,1,0,0" /><S P="1,999999999,10,0,0,0,0,0" L="10" H="10" c="4" Y="-600" T="12" X="200" /><S P="1,-1,10,0.2,0,0,0,0" L="10" H="10" c="4" Y="0" T="12" X="0" /><S P="0,0,0,9999,0,0,0,0" L="10" H="200" c="2" Y="-200" T="12" X="200" /><S L="800" o="c83535" H="60" X="400" Y="30" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="40" o="c83535" X="20" Y="200" T="12" H="400" /><S L="40" o="c83535" X="780" H="400" Y="200" T="12" P="0,0,0.3,0.2,0,0,0,0" /></S><D /><O /><L><JD P2="800,100" c="ffffff,200" P1="0,100" /><JD P2="800,300" c="ffffff,200" P1="0,300" /><JD P2="-200,500" c="cc2929,100" M1="1" P1="-400,-100" M2="1" /><JD P2="0,500" c="cc2929,100" M1="1" P1="-200,-100" M2="1" /><JD P2="200,500" c="cc2929,100" M1="1" P1="0,-100" M2="1" /><JD P2="400,500" c="cc2929,100" M1="1" P1="200,-100" M2="1" /><JD P2="600,500" c="cc2929,100" M1="1" P1="400,-100" M2="1" /><JD P2="800,500" c="cc2929,100" M1="1" P1="600,-100" M2="1" /><JD P2="1000,500" c="cc2929,100" M1="1" P1="800,-100" M2="1" /><JD P2="250,500" c="ff3333,4" M1="1" P1="50,-100" M2="1" /><JD P2="450,500" c="ff3333,4" M1="1" P1="250,-100" M2="1" /><JD P2="650,500" c="ff3333,4" M1="1" P1="450,-100" M2="1" /><JD P2="850,500" c="ff3333,4" M1="1" P1="650,-100" M2="1" /><JD P2="50,500" c="ff3333,4" M1="1" P1="-150,-100" M2="1" /><JD P2="-150,500" c="ff3333,4" M1="1" P1="-350,-100" M2="1" /><JD P2="150,500" c="991f1f,4" M1="1" P1="-50,-100" M2="1" /><JD P2="350,500" c="991f1f,4" M1="1" P1="150,-100" M2="1" /><JD P2="550,500" c="991f1f,4" M1="1" P1="350,-100" M2="1" /><JD P2="750,500" c="991f1f,4" M1="1" P1="550,-100" M2="1" /><JD P2="950,500" c="991f1f,4" M1="1" P1="750,-100" M2="1" /><JD P2="-50,500" c="991f1f,4" M1="1" P1="-250,-100" M2="1" /><JD P2="-250,500" c="991f1f,4" M1="1" P1="-450,-100" M2="1" /><JD P2="-125,500" c="6a7495,250,1,1" P1="-125,-100" /><JD P2="925,500" c="6a7495,250,1,1" P1="925,-100" /><JD P2="900,525" c="6a7495,250,1,1" P1="-100,525" /><JD P2="900,-125" c="6a7495,250,1,1" P1="-100,-125" /><JP M1="1" LIM2="0" MV="9999,-2" M2="5" AXIS="1,0" LIM1="-6.6666" /><JP M1="3" AXIS="0,1" M2="0" /><JR M1="4" P1="200,-500" MV="Infinity,4" /><JD M2="3" M1="4" /><L /></L></Z></C>')
Advertisement
Add Comment
Please, Sign In to add comment