Script
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Script Desastre

Ir para baixo

Script Desastre Empty Script Desastre

Mensagem por Admin Ter Fev 14, 2023 10:14 pm

sys={times={},newTimer=function(b,d,f,g,h,j)if f==nil and g==nil and h==nil and j==nil then table.insert(sys.times,{call=b,tempo=d,timer=os.time(),args={}})end;if f~=nil and g==nil then table.insert(sys.times,{call=b,tempo=d,timer=os.time(),args={f}})end;if f~=nil and g~=nil and h==nil then table.insert(sys.times,{call=b,tempo=d,timer=os.time(),args={f,g}})end;if f~=nil and g~=nil and h~=nil and j==nil then table.insert(sys.times,{call=b,tempo=d,timer=os.time(),args={f,g,h}})end;if f~=nil and g~=nil and h~=nil and j~=nil then table.insert(sys.times,{call=b,tempo=d,timer=os.time(),args={f,g,h,j}})end;return#sys.times end,removeTimer=function(id)table.remove(sys.times,id)end,eventLoop=function()for i,v in ipairs(sys.times)do if v.timer<os.time()-v.tempo*1000 then if v.args[1]==nil then v.call()end;if v.args[1]~=nil and v.args[2]==nil then v.call(v.args[1])end;if v.args[1]~=nil and v.args[2]~=nil and v.args[3]==nil then v.call(v.args[1],v.args[2])end;if v.args[1]~=nil and v.args[2]~=nil and v.args[3]~=nil and v.args[4]==nil then v.call(v.args[1],v.args[2],v.args[3])end;if v.args[4]~=nil then v.call(v.args[1],v.args[2],v.args[3],v.args[4])end;table.remove(sys.times,i)end end end}xx1='<C>%s'xx2='<Z><S>%s</S><D>%s</D><O /></Z></C>'pisos=''tbl={}id=0;floors=0;portal=math.random(1,6)code='@0'PP='<P />'spawn='<DS X="400" Y="200" />'s='Nil'click=0;tt=0;tfm.exec.disableAutoTimeLeft()tfm.exec.disableAutoNewGame()tfm.exec.disableAutoShaman()mapas={7210480,72106005,7214310,7218574,7218703}sendNew=false;e=false;partyTime=0;adm='Contistente'function getPlayers()local a=0;for i,v in pairs(tfm.get.room.playerList)do a=a+1 end;return a end;function getAlives()local a=0;for i,v in pairs(tfm.get.room.playerList)do if not v.isDead and not v.isShaman then a=a+1 end end;return a end;function eventLoop(t,k)if getPlayers()>1 then tt=t;sys.eventLoop()if portal==1 or portal==6 or portal==4 then tfm.exec.addShamanObject(27,math.random(-100,900),math.random(5,380))end;if click<os.time()-1000 and(portal==1 or portal==6 or portal==4)then if a then tfm.exec.addShamanObject(26,a.x,a.y)end end;if click<os.time()-3000 and(portal==1 or portal==6 or portal==4)then a={}for i,v in pairs(tfm.get.room.playerList)do if not v.isDead then table.insert(a,{x=v.x,y=v.y})end end;a=a[math.random(#a)]end;if click<os.time()-4000 and t>3000 then local l={}v=tbl[math.random(#tbl)]local a={}for i,c in pairs(tbl)do if c.id~=v.id then table.insert(a,c)end end;tbl=a;if v and v.defs then v.defs.dynamic=true;table.insert(l,i)v.stopped=true;tfm.exec.addPhysicObject(v.id,v.x,v.y,v.defs)floors=floors-1;for i,v in pairs(l)do table.remove(tbl,v)end;l={}click=os.time()end elseif t<3000 then click=os.time()end;if k<10000 then time=tostring(k)time=time:sub(1,1)..'.'..time:sub(2,#time)time=tonumber(time)time=math.floor(time)time='0'..time end;if k>=10000 and k<100000 then time=tostring(k)time=time:sub(1,2)..'.'..time:sub(3,#time)time=tonumber(time)time=math.floor(time)time=time end;if k>=100000 then time=tostring(k)time=time:sub(1,3)..'.'..time:sub(4,#time)time=tonumber(time)time=math.floor(time)time=time end;ui.addTextArea(0,'<B><font size="12" color="#FFCC00"><p align="center">'..time..'s',nil,5,375,60,20,0x324650,0x324650,85,true)if t>3000 and sendNew then tfm.exec.newGame(string.format(xx1,PP)..string.format(xx2,pisos,spawn))tfm.exec.setGameTime(partyTime)sendNew=false end;if t>3000 then if getAlives()==0 or k<1000 then tfm.exec.newGame(mapas[math.random(#mapas)])e=false end end;if getAlives()==1 then for i,v in pairs(tfm.get.room.playerList)do if not v.isDead then tfm.exec.giveCheese(i)tfm.exec.playerVictory(i)break end end;tfm.exec.newGame(mapas[math.random(#mapas)])e=false end;ui.setMapName("Survive <BL>- "..code.."</BL> <BL>|</BL> <N>Pisos :</N> <V>"..floors.."</V> <BL>|</BL> <N>Rato :</N> <V>"..getPlayers().."</V> <")else ui.setMapName("Survive <BL>-</BL> <R>O jogo foi pausado pelo seguinte motivo: É necessário no mínimo 2 jogadores.</R> <")end end;function eventNewPlayer(m)end;for n in pairs(tfm.get.room.playerList)do eventNewPlayer(n)end;function eventNewGame()if not e then s=nil;id=0;floors=0;pisos=''PP='<P />'spawn='<DS X="400" Y="200" />'tbl={}click=0;sendNew=false;partyTime=0;tfm.exec.setGameTime(3)portal=math.random(1,6)else tfm.exec.setGameTime(partyTime)for i,v in pairs(tfm.get.room.playerList)do tfm.exec.giveMeep(i)end end;if tfm.get.room.currentMap:find("@")and not e then if tfm.get.room.currentMap~="@0"then code=tfm.get.room.currentMap end;xml=tfm.get.room.xmlMapInfo.xml;editXML(xml)e=true end end;function toboolean(k)if k==0 or k=="0"then return false end;if k==1 or k=="1"then return true end end;function split(t,s)local a={}for i,v in string.gmatch(t,string.format("[^%s]+",s or"%s"))do table.insert(a,i)end;return a end;function editXML(xml)id=0;for o in string.gmatch(xml,'<P .-/>')do PP=o;break end;for p in string.gmatch(xml,'<D>.-</D>')do for q in string.gmatch(p,'<DS .-/>')do spawn=q end;for r in string.gmatch(p,'<P .-/>')do if r~="<P />"then spawn=spawn..r end end end;for u in string.gmatch(xml,'<S .-/>')do floors=floors+1;partyTime=partyTime+6;id=id+1;c=0;mColl=true;gColl=true;for o in string.gmatch(u,'X=".-"')do px=o:gsub('X="',''):gsub('"','')end;for o in string.gmatch(u,'Y=".-"')do py=o:gsub('Y="',''):gsub('"','')end;for o in string.gmatch(u,'L=".-"')do pwidth=o:gsub('L="',''):gsub('"','')end;for o in string.gmatch(u,'H=".-"')do pheight=o:gsub('H="',''):gsub('"','')end;for o in string.gmatch(u,'T=".-"')do t=o:gsub('T="',''):gsub('"','')end;for o in string.gmatch(u,'c=".-"')do v=o:gsub('c="',''):gsub('"','')if v=="1"then mColl=true;gColl=true end;if v=="2"then mColl=false;gColl=true end;if v=="3"then mColl=true;gColl=false end;if v=="4"then mColl=false;gColl=false end end;fore=false;for o in string.gmatch(u,'N=".-"')do fore=true end;for o in string.gmatch(u,'P=".-"')do o=o:gsub('P="',''):gsub('"','')o=split(o,',')pdyn=toboolean(o[1])pmass=o[2]pfric=o[3]prest=o[4]pang=o[5]pafx=toboolean(o[6])paml=o[7]pama=o[8]end;if t=="12"then for o in string.gmatch(u,'o=".-"')do c=o:gsub('o="',''):gsub('"','')c='0x'..c end end;table.insert(tbl,{id=id,x=px,y=py,stopped=false,tm=math.random(8000,20000),defs={type=t,color=c,width=pwidth,height=pheight,dynamic=pdyn,friction=pfric,restitution=prest,angle=pang,fixedRotation=pafx,linearDamping=paml,angularDamping=pama,miceCollision=mColl,groundCollision=gColl,foreground=fore}})pisos=pisos..u:gsub('T="','lua="'..id..'" T="')end;id=id;sendNew=true end;function eventChatCommand(m,w)w=split(w,' ')if w[1]=='np'and w[2]and m==adm then sendNew=false;e=false;tfm.exec.newGame(w[2])end;if w[1]=='np'and m==adm then sendNew=false;e=false;tfm.exec.newGame(mapas[math.random(#mapas)])end end;tfm.exec.newGame(mapas[math.random(#mapas)])

Admin
Admin

Mensagens : 24
Data de inscrição : 10/07/2017

https://tfmbry.directorioforuns.com

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

 
Permissões neste sub-fórum
Não podes responder a tópicos