Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Bolodefchoco
- --03/04/2016
- maps={155517,157098,159116,167333,170007,175454,176615,186855,187035,195453,197368,208548,212322,215933,229974,235717,249760,253469,255943,257092,258289,259854,266398,267971,277631,277835,280949,281668,281985,285589,285961,292668,292808,293306,293658,294478,295487,296020,298424,301559,305680,313138,313214,315283,320607,322649,322922,330827,342640,343875,346684,353356,355336,357837,366260,366809,368585,371579,383358,392861,394125,431873,503679,507884,515684,532860,544695,549759,554154,591528,593003,597348,597804,600212,613277,621850,639878,651656,655207,658960,720672,733146,763368,814311,823329,1102513,1110982,1134969,1296299,1526368,1551020,1568331,1584555,1610638,1636814,1642725,1705006,1719709,1737297,1737800,1737914,1802012,1802528,1852910,1853529,1869912,1872179,1914925,1923584,1939604,1949730,1952415,1962695,1972688,2009003,2031184,2033229,2036898,2050389,2080400,2082776,2128560,2202628,2208924,2239788,2297260,2309030,2341982,2346943,2357991,2362046,2378364,2395201,2420714,2427910,2432090,2444812,2448730,2466489,2470461,2474044,2484316,2574960,2601214,2605186,2636207,2643916,2668918,2669415,2673019,2682583,2693344,2693587,2704483,2708585,2718406,2719419,2747525,2750014,2758747,2772507,2777168,2789121,2797076,2803483,2805938,2811229,2817711,2818330,2819876,2828481,2844637,2850177,2854813,2858882,2860211,2860683,2869337,2877042,2884392,2887929,2890123,2901717,2918822,2920826,2925531,2933011,2933390,2941840,2945156,2947140,2961800,2963166,2967631,2974387,2996951,2998268,2999994,3000006,3008319,3008515,3012178,3012311,3016226,3024238,3024606,3041105,3042080,3043779,3075090,3076903,3085218,3099302,3118161,3118286,3137929,3139767,3142783,3146209,3149125,3161324,3163166,3182006,3182487,3185979,3200001,3219400,3242050,3243455,3264848,3281758,3292308,3293485,3295954,3295960,3311534,3330219,3337127,3338283,3343092,3395605,3404894,3428069,3430712,3434941,3459986,3471016,3473704,3483300,3484437,3493456,3493490,3500000,3500755,3513929,3527399,3530999,3535850,3558682,3560999,3561333,3576303,3588395,3603631,3637540,3645415,3659983,3668877,3707630,3734984,3734988,3734989,3734990,3734996,3734997,3734998,3734999,3747520,3750360,3759157,3767893,3779861,3780618,3799357,3804078,3815568,3820501,3826546,3838020,3846632,3849999,3860578,3866660,3866663,3920916,3937567,3938895,3939000,3958217,3963960,3964892,3969628,3976766,3976977,3984871,3985463,3999110,3999455,3999979,3999991,3999992,3999997,4000007,4000008,4000009,4000010,4000662,4027263,4039451,4058168,4093488,4107909,4117513,4121359,4209243,4220381,4234558,4237910,4241333,4249695,4295473,4311255,4313858,4317592,4333895,4334509,4337732,4362335,4365527,4373748,4390388,4398794,4413656,4484685,4506542,4538472,4578236,4593355,4594304,4644584,4660408,4675691,4697673,4720851,4794517,4822672,4834444,4889180,4948551,4948659,5036934,5085011,5092739,5132197,5134116,5263927,5284625,5292798,5340984,5342889,5348692,5356911,5384241,5444444,5460041,5473125,5489869,5505990,5522262,5553707,5598943,5616777,5616978,5706542,5720741,5758150,5761507,5819555,5876254,5914063,5931069,5998000,6041917,6045500,6075471,6079100,6087408,6254869,6284671,6289411,6296348,6462982}
- --[[
- < [Victorruanpk] Teleport único no mapa (Só pode se for num raio de 200px do rato) (2)
- < [Victorruanpk] Speed pros lados (2)
- < [Victorruanpk] Aumento de tamanho de impulso quando sobe,desce,vai pros lados (2)
- < [Victorruanpk] Particulas de efeito sobre o seu voodoo/controlador (2)
- < [Victorruanpk] Fusão (2)
- < [Victorruanpk] (troca quem controla pra quem é controlado se os dois digitarem) (2)
- ]]
- --[[ 0 = Mensagem
- -1,-2,-3 = Perfil
- -4,-5 = Botão help
- -6,-7,-8,-9 = Help
- ]]
- first=0
- timer=-1
- _minusTwo=false
- playersQ=2
- inTribeHouse=(tfm.get.room.name:find("#") and false or true)
- for _,f in next,{"AutoShaman","AfkDeath","AutoScore","AutoNewGame","AutoTimeLeft"} do
- tfm.exec["disable"..f]()
- end
- mice={}
- eventNewPlayer=function(n)
- if not mice[n] then
- mice[n]={
- voodoo="",
- control="",
- timer="",
- vStat={0,0,0},
- cStat={0,0,0,0},
- breakMove={false,0},
- round=0,
- skillPoints=0,
- tCE=0,
- tC=0,
- afk=false,
- profileOn=false,
- helpF={false,1},
- nextControler="",
- }
- end
- for _,k in next,{1,0,3,2,80,72,79} do
- system.bindKeyboard(n,k,true,true)
- end
- ui.addTextArea(-4,"",n,780,380,13,13,0x324650,0x324650,1,true)
- ui.addTextArea(-5,"<B><a href='event:button?'><VP>?</a>",n,781,378,nil,nil,1,1,0,true)
- if _minusTwo then
- tfm.exec.setGameTime(0)
- playersQ=playersQ+1
- end
- end
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
- table.destroy=function(_table,value)
- for _,__ in next,_table do
- if value==__ then table.remove(_table,_);break end
- end
- end
- string.nick=function(player)
- local _=1
- if player:find("^%p") then _=2 end
- return player:sub(1,_):upper()..player:sub(_+1):lower()
- end
- text=function(txt,name)
- ui.addTextArea(0,"<p align='center'>"..txt,name,5,380,790,nil,0x324650,0x141D22,1,true)
- if not inTribeHouse then tfm.exec.chatMessage(txt,name) end
- end
- voodooThem=function()
- local players={}
- table.foreach(tfm.get.room.playerList,function(n) table.insert(players,n) end)
- playersQ=#players
- if #players>1 then
- if #players%2~=0 then tfm.exec.killPlayer(players[#players]);table.remove(players,#players) end
- for q = 1,#players do
- if q%2~=0 then
- mice[players[q]].voodoo=players[q+1]
- mice[players[q+1]].control=players[q]
- mice[players[q]].tCE=mice[players[q]].tCE+1
- mice[players[q+1]].tC=mice[players[q+1]].tC+1
- mice[players[q]].timer=os.time()+10000;mice[players[q+1]].timer=os.time()+10000
- text("<ROSE>"..players[q+1].." agora é a sua cobaia!",players[q])
- text("<CH>"..players[q].." agora é o seu carcereiro espiritual!",players[q+1])
- table.remove(players,q);table.remove(players,q+1)
- end
- end
- else
- text("<R> É necessário 2 ou mais jogadores para o jogo iniciar-se.",nil)
- _minusTwo=true
- end
- end
- profile=function(n,p)
- ui.addTextArea(-1,("\nRounds : <V>%d</V>\n<J>Skills <N>: <PT>%d\n\n<VP>Carcereiro Espiritual : (%d)</VP>\n\tCobaias Salvas : <V>%d</V>\n\tCobaias Mortas : <V>%d</V>\n\tBreaks : <V>%d</V>\n\tAfk : <V>%d</V>\n\n<VP>Cobaia : (%d)</VP>\n\tFirst : <V>%d</V>\n\tSecond : <V>%d</V>\n\tThird : <V>%d</V>\n\tCheese : <V>%d</V>"):format(mice[p].round,mice[p].skillPoints,mice[p].tCE,mice[p].vStat[1],mice[p].vStat[2],mice[p].breakMove[2],mice[p].vStat[3],mice[p].tC,mice[p].cStat[1],mice[p].cStat[2],mice[p].cStat[3],mice[p].cStat[4]),n,310,103,180,208,0x324650,1,1,true)
- ui.addTextArea(-2,"<font size='20' face='Impact'><p align='center'>"..p,n,307,80,186,30,0x324650,1,1,true)
- ui.addTextArea(-3,"<font size='20' face='Impact'><p align='center'><R><a href='event:closeProfile'>Fechar</a>",n,307,310,186,30,0x324650,1,1,true)
- end
- help=function(n,t1,t2)
- local titles={
- [1] = "Voodoo Runner!",
- [2] = "Carcereiro Espiritual",
- [3] = "Cobaia",
- [4] = "Árvore de Habilidades",
- [5] = "Comandos",
- [6] = "Créditos",
- }
- local texts={
- [1] = "<p align='center'><font size='25'>Bem-vindo ao Jogo!</font>\n"..(":"):rep(55).."</p><p align='left'><font size='14'>\n<J>Há duas possibilidades de jogo:</J>\n <CH>Carcereiro Espiritual</CH>;\n <ROSE>Cobaia</ROSE>;\n<J>Seu objetivo aqui é bem simples:\n <PT>Seja o melhor Mestre Voodoo do mundo Transformice!\n\n<p align='center'><CE>Este jogo foi desenvolvido por Bolodefchoco",
- [2] = "<p align='center'>"..(":"):rep(55).."</p><p align='left'><font size='14'>\n<CH>Seus poderes são ilimitados!\n\nSeu dever é garantir que sua alma, cobaia, seja entregue à toca em segurança o mais rápido possível!\n\nNão se esqueça que seus pontos podem diminuir/aumentar dependendo da sua ação em jogo :)",
- [3] = "<p align='center'>"..(":"):rep(55).."</p><p align='left'><font size='14'>\n<S>Oh não! :(\n\nVocê foi capturado pela magia Voodoo do seu controlador!\n\nSirva de cobaia e entre na toca o mais rápido possível. Quanto mais você ajudar seu controlador, <ROSE>mais chances</ROSE> de se vingar você terá :)",
- [4] = "<p align='center'>"..(":"):rep(55).."</p><p align='left'><font size='14'>\n<J>Na Árvore de Habilidades você tem o <CE>direito</CE> de melhorar suas habilidades o máximo possível, usando as famosas <S>$V Koins</s>, a moeda oficial do Voodop, e você pode obtê-las jogando duro e estando entre um dos três primeiros no mapa!\n\n<VI>Abrindo todas as habilidades, uma nova e <PT>secreta</PT> será desbloqueada para você.",
- [5] = "<p align='center'>"..(":"):rep(55).."\n<p align='left'><font size='5'>\n</font><font size='14'> <CE>Ξ</CE> <CH>Carcereiros Espirituais</CH>\n <CE>Ξ</CE> <J>Todos</J></font><p align='left'><font size='14'>\n<CH>!afk - Simboliza que o carcereiro está afk.\n!break - Ativa um break, fazendo com que o carcereiro não possa mais se mover. (Remove 2 pontos cada vez que é ativado)\n<J>!p [Nome] - Mostra o perfil\n<CH>←↑→↓ - Move a cobaia\n<J>P - Abre o seu perfil\n<J>H - Abre a ajuda\n<J>O - Abre a Árvore de Habilidades",
- [6] = "<p align='center'>"..(":"):rep(55).."</p><p align='left'><font size='14'>\n• <J>Jogo desenvolvido por Bolodefchoco\n</J>• <VI>Árvore de Habilidades idealizada parcialmente por Victorruanpk",
- }
- ui.addTextArea(-6,"\n"..texts[mice[n].helpF[2]],n,250,80,300,250,0x324650,1,1,true)
- ui.addTextArea(-7,"<font size='30' face='Impact'><p align='center'>"..titles[mice[n].helpF[2]],n,240,40,330,40,0x324650,1,1,true)
- ui.addTextArea(-8,"",n,235,335,330,40,0x324650,1,1,true)
- ui.addTextArea(-9,"<font size='35'><p align='center'><J>"..(t1 and "<a href='event:help_leftPage'>«</a>" or "").." <R><font size='35' face='impact'><a href='event:help_close'>Fechar</a></font><J> "..(t2 and "<a href='event:help_rightPage'>»</a>" or ""),n,291,332,nil,40,1,1,0,0x324650,1,1,true)
- end
- eventTextAreaCallback=function(i,n,c)
- if c=='closeProfile' then
- for i = -3,-1 do
- ui.removeTextArea(i,n)
- end
- end
- if c=='button?' then
- mice[n].helpF[1]=true
- mice[n].helpF[2]=1
- help(n,false,true)
- end
- if c=='help_rightPage' then
- mice[n].helpF[2]=mice[n].helpF[2]+1
- help(n,true,(mice[n].helpF[2]<6 and true or false))
- end
- if c=='help_leftPage' then
- mice[n].helpF[2]=mice[n].helpF[2]-1
- help(n,(mice[n].helpF[2]>1 and true or false),true)
- end
- if c=='help_close' then
- for i=-9,-6 do
- ui.removeTextArea(i,n)
- end
- end
- end
- newMap=""
- findPattern=function(xml)
- local a1,a2 = 0,0
- for _,p in next,{'DS','T','DC'} do
- a1,a2=xml:match('.<'..p..' X="(%d+)" Y="(%d+)" />.')
- if a1==nil and a2==nil then
- a2,a1=xml:match('.<'..p..' Y="(%d+)" X="(%d+)" />.')
- end
- if a1~=nil and a2~=nil then
- return a1,a2
- end
- end
- return 0,0
- end
- eventNewGame=function()
- table.foreach(tfm.get.room.playerList,function(n,v) if not v.isDead then mice[n].round=mice[n].round+1 end end)
- timer=os.time()+2000
- if type(newMap)=="table" then
- ui.setMapName("<J>"..newMap[1].." <BL>- "..newMap[2])
- else
- table.destroy(maps,tfm.get.room.xmlMapInfo.mapCode)
- table.insert(maps,{tfm.get.room.xmlMapInfo.author,tfm.get.room.currentMap,tfm.get.room.xmlMapInfo.xml})
- end
- first=0
- voodooThem()
- posX,posY=findPattern(tfm.get.room.xmlMapInfo.xml)
- end
- eventLoop=function(ts,tr)
- _G.ts=ts
- if timer~=-1 then
- if os.time()<timer then
- if inTribeHouse then
- table.foreach(tfm.get.room.playerList,function(n)
- tfm.exec.movePlayer(n,posX,posY)
- end)
- end
- else
- timer=-1
- end
- end
- table.foreach(tfm.get.room.playerList,function(n)
- if mice[n].timer~="" then
- if os.time()>mice[n].timer then
- for i=0,1 do
- ui.removeTextArea(i,n)
- end
- mice[n].timer=""
- end
- end
- if mice[n].breakMove[1] then
- tfm.exec.movePlayer(n,posX,posY)
- end
- end)
- local i=0
- for _,v in next,tfm.get.room.playerList do if not v.isDead then i=i+1 end end
- if ((i<=1 or tr<=0) and playersQ>1) or i==0 then
- newMap = maps[math.random(#maps)]
- tfm.exec.newGame((type(newMap)=="table" and newMap[3] or newMap))
- end
- end
- if not inTribeHouse then
- local pS=10
- local pSNL=1000/pS
- for tm = 0,1000-pSNL,pSNL do
- system.newTimer(function()
- system.newTimer(eventFasterLoop,1000,true)
- end,1000+tm,true)
- end
- end
- eventFasterLoop=function()
- if timer~=-1 then
- if os.time()<timer then
- table.foreach(tfm.get.room.playerList,function(n)
- tfm.exec.movePlayer(n,posX,posY)
- end)
- end
- end
- end
- eventKeyboard=function(n,k,d)
- if ts/1000>4 then
- for i,v in next,{1,0,3,2} do
- if v==k and not tfm.get.room.playerList[n].isDead then
- local dir={0,-40,-40,0,0,40,40,0}
- tfm.exec.movePlayer(mice[n].voodoo,0,0,false,dir[i*2-1],dir[i*2],false)
- end
- end
- end
- if k==80 then
- if mice[n].profileOn then
- eventTextAreaCallback(nil,n,"closeProfile")
- else
- profile(n,n)
- end
- mice[n].profileOn=not mice[n].profileOn
- end
- if k==72 then
- if mice[n].helpF[1] then
- mice[n].helpF[1]=false
- eventTextAreaCallback(nil,n,"help_close")
- else
- mice[n].helpF[1]=true
- eventTextAreaCallback(nil,n,"button?")
- end
- end
- end
- eventChatCommand=function(n,c)
- if c:lower()=="afk" and mice[n].voodoo~="" then
- if not mice[n].afk then
- local voodoo=mice[n].voodoo
- tfm.exec.killPlayer(n)
- tfm.exec.killPlayer(voodoo)
- text("<R>Seu carcereiro espiritual, "..n..", está afk!",voodoo)
- mice[voodoo].timer=os.time()+6000
- mice[n].vStat[3]=mice[n].vStat[3]+1
- end
- mice[n].afk=not mice[n].afk
- end
- if c:lower()=="break" and mice[n].voodoo~="" then
- mice[n].breakMove[1]=not mice[n].breakMove[1]
- mice[n].breakMove[2]=mice[n].breakMove[2]+1
- end
- if c:sub(1,1):lower()=="p" then
- if #c>4 and tfm.get.room.playerList[string.nick(c:sub(3))] then
- profile(n,string.nick(c:sub(3)))
- else
- profile(n,n)
- end
- mice[n].profileOn=true
- end
- end
- eventPlayerWon=function(n)
- if playersQ>1 and mice[n].voodoo=="" then
- local control=mice[n].control
- first=first+1
- if first==1 then
- tfm.exec.setPlayerScore(control,10,true)
- tfm.exec.setPlayerScore(n,10,true)
- elseif first==3 or first==5 then
- tfm.exec.setPlayerScore(control,5,true)
- tfm.exec.setPlayerScore(n,5,true)
- else
- tfm.exec.setPlayerScore(control,1,true)
- tfm.exec.setPlayerScore(n,1,true)
- end
- local tableNumber=(first==1 and 1 or first==3 and 2 or first==5 and 3 or 4)
- print('f'..first) print('t'..tableNumber)
- mice[n].cStat[(tableNumber)]=mice[n].cStat[(tableNumber)]+1
- pcall(function() mice[control].vStat[1]=mice[control].vStat[1]+1 end)
- tfm.exec.giveCheese(control)
- tfm.exec.playerVictory(control)
- end
- end
- eventPlayerDied=function(n)
- if mice[n].voodoo=="" then
- pcall(function()
- mice[mice[n].control].vStat[2]=mice[mice[n].control].vStat[2]+1
- mice[mice[n].control].nextControler=n
- end)
- end
- end
- eventPlayerLeft=function(n)
- if mice[n].voodoo ~= "" then
- local voodoo=mice[n].voodoo
- mice[voodoo].control = ""
- mice[n].voodoo = ""
- tfm.exec.killPlayer(voodoo)
- text("<R>Seu carcereiro espiritual deixou a sala! :(",voodoo)
- else
- local control=mice[n].control
- mice[control].voodoo = ""
- mice[n].control = ""
- tfm.exec.killPlayer(control)
- text("<R>Sua cobaia deixou a sala! :(",control)
- end
- end
- tfm.exec.setGameTime(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement