Advertisement
UniverseTeam

Transformice: Realms (v1.06)

Dec 17th, 2016
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 41.92 KB | None | 0 0
  1. mapa1=[[<C><P F="8" L="1600" H="800" /><Z><S><S L="15" X="9" H="67" Y="717" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="83" H="50" Y="775" T="10" P="0,0,0.3,0,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="40" o="466575" X="1470" c="4" Y="131" T="13" H="10" /><S L="163" H="50" X="303" Y="761" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="520" H="50" Y="746" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="728" Y="731" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="940" H="50" Y="714" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="1159" Y="698" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="1361" H="50" Y="670" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="1516" Y="577" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="1295" H="50" Y="527" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="1082" Y="503" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="867" H="50" Y="478" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="656" Y="454" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="437" H="50" Y="436" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="231" Y="417" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="81" H="50" Y="329" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="305" Y="288" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="521" H="50" Y="266" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="733" Y="242" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" X="950" H="50" Y="226" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="163" H="50" X="1173" Y="212" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="200" X="1419" H="50" Y="199" T="10" P="0,0,0.3,0,0,0,0,0" /></S><D><DS Y="736" X="37" /><F Y="140" X="1455" /><F Y="122" X="1466" /><F Y="138" X="1485" /><F Y="156" X="1471" /><F Y="143" X="1455" /><F Y="143" X="1485" /><F Y="117" X="1463" /></D><O /></Z></C>]]
  2. mapa2=[[<C><P Ca="" D="x_transformice/x_maps/x_peche2014/x_jungle.jpg,0,400;x_deadmeat/x_interfaces/x_login.jpg,600,400;x_transformice/x_salon801/x_ciel.jpg,600,0;x_transformice/x_salon801/x_ciel.jpg,0,0" L="1600" H="800" /><Z><S><S X="1490" L="500" H="820" c="4" Y="393" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S H="10" L="40" o="-1" X="57" c="4" Y="171" T="13" P="0,0,0.3,0.2,0,0,0,0" /><S L="324" H="42" X="162" Y="779" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="280" H="30" X="1363" Y="498" T="6" P="0,0,0.3,0.2,40,0,0,0" /><S L="324" X="577" H="42" Y="779" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="324" H="42" X="986" Y="779" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="29" X="1254" H="217" Y="360" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="360" X="1420" H="42" Y="780" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="740" X="1753" H="293" Y="633" T="6" P="0,0,0.3,0.2,-40,0,0,0" /><S L="129" H="60" X="173" Y="391" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="129" H="60" X="111" Y="319" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="23" H="129" X="388" Y="493" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="151" X="603" c="4" Y="414" T="5" H="30" /><S L="129" X="144" H="60" Y="357" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="129" X="79" H="60" Y="285" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="250" X="1514" H="30" Y="346" T="6" P="0,0,0.3,0.2,-40,0,0,0" /><S L="117" X="56" H="183" Y="315" T="5" P="0,0,0.3,0.2,0,0,0,0" /><S L="230" X="1355" H="42" Y="272" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="270" X="587" H="30" Y="511" T="6" P="0,0,0.3,0.2,49,0,0,0" /><S L="190" H="30" X="208" Y="541" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="200" H="42" X="1523" Y="129" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="250" X="188" H="30" Y="320" T="6" P="0,0,0.3,0.2,50,0,0,0" /><S L="600" H="30" X="234" Y="414" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="130" X="53" H="33" Y="231" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="212" H="30" X="42" Y="476" T="6" P="0,0,0.3,0.2,40,0,0,0" /><S L="600" X="940" H="42" Y="80" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="400" H="42" X="342" Y="81" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="10" o="324650" X="1607" H="800" Y="400" T="12" P="0,0,0.3,0.2,0,0,0,0" /><S L="200" X="966" H="200" Y="399" T="6" P="0,0,0.3,0.2,45,0,0,0" /><S P="0,0,0.3,0.2,0,0,0,0" L="310" X="953" c="4" Y="487" T="5" H="170" /><S L="310" X="953" H="39" Y="555" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="450" X="883" H="30" Y="414" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="276" X="393" H="40" Y="235" T="6" P="0,0,0.3,0.2,0,0,0,0" /><S L="230" H="40" X="761" Y="233" T="6" P="0,0,0.3,0.2,0,0,0,0" /></S><D><DS Y="744" X="37" /><P P="1,0" Y="758" T="5" X="1314" /><P P="0,0" Y="758" T="1" X="178" /><P P="0,0" Y="759" T="5" X="279" /><P P="0,0" Y="758" T="0" X="82" /><P P="0,0" Y="758" T="0" X="583" /><P P="0,0" Y="759" T="5" X="645" /><P P="0,0" Y="758" T="12" X="451" /><F Y="186" X="69" /><F Y="167" X="72" /><F Y="152" X="57" /><F Y="156" X="47" /><F Y="173" X="40" /><F Y="192" X="45" /><F Y="201" X="55" /><F Y="179" X="58" /><P X="327" Y="397" T="2" P="0,0" /><P X="386" Y="399" T="1" P="0,0" /><P X="423" Y="400" T="5" P="0,0" /><P X="451" Y="400" T="5" P="0,0" /></D><O><O C="7" Y="101" P="0" X="1489" /><O C="7" Y="531" X="953" P="0" /></O></Z></C>]]
  3. mapa3=[[<C><P F="5" L="1600" H="800" /><Z><S><S P="0,0,0.3,0,0,0,0,0" L="339" H="600" c="4" Y="463" T="10" X="1430" /><S P="0,0,0.3,0.2,0,0,0,0" L="40" o="545454" X="800" c="4" Y="135" T="13" H="10" /><S H="600" L="339" X="169" c="4" Y="463" T="10" P="0,0,0.3,0,0,0,0,0" /><S P="0,0,0.3,0,0,0,0,0" L="10" X="1595" c="1" Y="463" T="10" H="600" /><S L="250" X="1466" H="32" Y="267" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="135" Y="267" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="408" X="800" H="49" Y="775" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S P="0,0,0.3,0,0,0,0,0" L="10" H="600" c="1" Y="463" T="10" X="5" /><S L="339" X="169" H="49" Y="775" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="339" H="49" X="1430" Y="775" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="229" X="800" H="40" Y="194" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S L="108" X="393" H="49" Y="775" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S L="108" H="49" X="1208" Y="775" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S L="250" X="214" H="32" Y="684" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="135" Y="599" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" X="213" H="32" Y="518" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="134" Y="435" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" X="213" H="32" Y="350" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" X="214" H="32" Y="179" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="1386" Y="684" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="1386" Y="518" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="1386" Y="350" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" X="1465" H="32" Y="599" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" X="1465" H="32" Y="435" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="250" H="32" X="1386" Y="179" T="10" P="0,0,0.3,0,0,0,0,0" /><S L="229" H="40" X="800" Y="439" T="11" P="0,0,0.05,0.1,0,0,0,0" /></S><D><P P="0,0" Y="754" T="51" X="801" /><DS Y="737" X="800" /><F Y="143" X="815" /><F Y="138" X="783" /><F Y="155" X="787" /><F Y="164" X="799" /><F Y="116" X="794" /><F Y="122" X="809" /><F Y="141" X="801" /><F Y="128" X="785" /><F Y="135" X="814" /><F Y="157" X="802" /><P P="0,0" Y="420" T="50" X="742" /><P P="0,0" Y="196" T="58" X="251" /><P P="0,0" Y="214" T="58" X="834" /><P P="0,0" Y="214" T="58" X="687" /><P P="0,0" Y="214" T="58" X="759" /><P P="0,0" Y="459" T="58" X="685" /><P P="0,1" Y="459" T="58" X="843" /><P P="0,0" Y="459" T="58" X="834" /></D><O><O C="1" Y="403" P="0" X="819" /><O C="1" Y="403" P="0" X="875" /></O></Z></C>]]
  4. data={}
  5. s=0
  6. r=0
  7. win=0
  8. lvl1=1
  9. m1=0
  10. xp1=0
  11. ratio1=0
  12. lvl2=1
  13. m2=0
  14. xp2=0
  15. ratio2=0
  16. lvl3=1
  17. m3=0
  18. xp3=0
  19. ratio3=0
  20. tfm.exec.disableAfkDeath(true)
  21. tfm.exec.disableAutoShaman(true)
  22. tfm.exec.disableAutoNewGame(true)
  23. tfm.exec.disableAutoScore(true)
  24. tfm.exec.setGameTime(20, true)
  25.  
  26. T = {
  27.     en = {
  28.     close = 'Close',
  29.     main1 = 'Profile',
  30.     main2 = 'Help',
  31.     main3 = 'Alliances',
  32.     aly1 = 'Maniacs',
  33.     aly2 = 'Lunatics',
  34.     aly3 = 'Savage',
  35.     alyt1 = 'You need at least 5 points to unlock the alliances.',
  36.     alyt2 = 'You don´t have an alliance.',
  37.     alyt3 = 'Choose one to join.',
  38.     room = 'Room',
  39.     rooms = 'Global',
  40.     soon = 'Coming soon',
  41.     points = 'Points',
  42.     px1 = 'Played realms',
  43.     px2 = 'Completed realms',
  44.     play = 'How to play',
  45.     help1t = 'The objective of this minigame is survive various types of maps called Realms and manage to reach the portal. Each map is based on a specific theme and if you get first in a realm you will gain a specific power of that realm. Always you reach the end of a realm you will earn points.',
  46.     help2t = 'The points will be the key to leading the game. If you complete a realm, you will earn 5 points. Every time you die you will gain 1 point. There is also the possibility of earning points through alliances and other things.',
  47.     help3t = 'In the thunderstorm realm you need to be careful with the thunders to not fall, your objective is to cope witch them and reaching the top.',
  48.     help4t = 'When you are on the jungle realm, will be rolling rocks! You have to be very careful and be fast to survive.',
  49.     help5t = 'In the winter realm will be possible to hit snowball! Use the snowballs to disturb other players and help your alliance members. You will need a lot of help if you want to be the first to complete the realm.',
  50.     help6t = 'There are 3 alliances: Lunatics, Maniacs and Savage.',
  51.     list = 'See the complete list of updates',
  52.     welcome = 'Welcome to',
  53.     intro = 'Fight for the realms! Be careful at all realms! If you are new on this game, please click on the help button.',
  54.     new = 'Game is now available in english',
  55.     newt = 'Available languages: english and portuguese',
  56.     };
  57.     br = {
  58.     close = 'Fechar',
  59.     main1 = 'Perfil',
  60.     main2 = 'Ajuda',
  61.     main3 = 'Aliança',
  62.     aly1 = 'Maníacos',
  63.     aly2 = 'Lunáticos',
  64.     aly3 = 'Selvagens',
  65.     alyt1 = 'Você precisa de no minimo 5 pontos para desbloquear as alianças.',
  66.     alyt2 = 'Você ainda não possui uma aliança.',
  67.     alyt3 = 'Escolha uma para se juntar.',
  68.     room = 'Sala',
  69.     rooms = 'Global',
  70.     soon = 'Em breve',
  71.     points = 'Pontos',
  72.     px1 = 'Reinos jogados',
  73.     px2 = 'Reinos completados',
  74.     play = 'Como Jogar',
  75.     help1t = 'O objetivo deste minigame é sobreviver a vários tipos de mapas chamados reinos de jogo e conseguir chegar ao portal. Cada mapa é baseado num tema especifico e se você chegar em primeiro num reino você ganha um poder especifico desse reino. Sempre que você chegar ao final dum reino vai ganhar pontos.',
  76.     help2t = 'Os pontos vão ser a chave para a liderança no jogo. Sempre que você completar um reino, você vai ganhar 5 pontos. Toda a vez que você morrer vai ganhar 1 ponto. Existe a possibilidade de tambem ganhar pontos atravez das alianças e de outras coisas.',
  77.     help3t = 'No reino da tempestade você tem que ter cuidado com os trovões para não cair, seu objetivo é cosneguir ultrapassa-los e chegar ao topo.',
  78.     help4t = 'Quando você estiver no mapa da selva vão estar rolando pedras! Tem que ter muito cuidado, ser rapido e pespicaz para conseguir sobreviver.',
  79.     help5t = 'No reino mais nevado de todos vai ser possível tacar bola de neve. Use as bolas de neve para atrapalhar os outros jogadores e ajudar os jogadores da sua aliança. Você vai precisar de muita ajuda se quer ser o primeiro a completar o reino.',
  80.     help6t = 'Existem 3 alianças: Lunáticos, Maníacos e Selvagens.',
  81.     list = 'Ver lista completa de updates',
  82.     welcome = 'Bem vindo ao',
  83.     intro = 'Luta pelos reinos! Tenha muito cuidado em todos os realms! Se você é novo neste jogo, aconselho a clicar no botão de ajuda.',
  84.     new = 'Jogo está agora em inglês',
  85.     newt = 'Linguagens disponíveis: inglês e português',
  86.     };
  87. }
  88. T.pt = T.br
  89.  
  90. function t(n,t)
  91.     for n in pairs (tfm.get.room.playerList) do
  92.         if T[tfm.get.room.playerList[n].community] then
  93.             return T[tfm.get.room.playerList[n].community][t]
  94.         else
  95.             return T.en[t]
  96.         end
  97.     end
  98. end
  99.  
  100. function eventNewPlayer(p)
  101.  for p in pairs(tfm.get.room.playerList) do
  102.   t(n,t)
  103.   for _,key in pairs{0,2,3} do
  104.    system.bindKeyboard(p, key, true)
  105.   end
  106.  end
  107.  ui.addTextArea(1,"",p,5,378,190,16,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  108.  ui.addTextArea(2,"",p,5,380,190,16,0x11171C,0x11171C,alpha,true) ---SombraBotão
  109.  ui.addTextArea(3,"<p align='center'><font size='10'><a href='event:p'><N>"..t(n,'main1').."</a> <a href='event:nd'>| <a href='event:help'><N>"..t(n,'main2').."</a> <a href='event:nd'>| <a href='event:aly'><N>"..t(n,'main3').."</a> <a href='event:nd'>| <a href='event:rank'><N>Rank</a>",p,5,379,190,16,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  110.  ui.addTextArea(-1,"",p,183,68,454,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  111.  ui.addTextArea(-2,"",p,184,69,452,282,0x986742,0x986742,alpha,true) ---Borda
  112.  ui.addTextArea(-3,"",p,186,71,448,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  113.  ui.addTextArea(-4,"",p,187.5,72.5,446,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  114.  ui.addTextArea(-5,"<p align='center'><font size='20'><j>"..t(n,'welcome').." #Realms</p><p align='left'><font size='11'><v>"..t(n,'intro').."</p><p align='left'><font size='10'></p><p align='left'><font size='18'><j>• News</p><p align='left'><font size='15'><j>"..t(n,'new').."</p><p align='left'><font size='10'><g>Versão 1.06, 18/12/16</p><p align='left'><font size='13'><n>"..t(n,'newt').."</p><p align='left'><font size='13'><n> </p><p align='left'><font size='12'><j><a href='event:iup'>>"..t(n,'list').."</p>",p,188.5,73.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  115.  ui.addTextArea(-6,"<p align='right'><v>v1.06</p>",p,551.5,334,84,54,0x183337,0xFFFF37,0,true) ---Texto
  116.  ui.addTextArea(-7,"",p,191,328,138,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  117.  ui.addTextArea(-8,"",p,191,330,138,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  118.  ui.addTextArea(-9,"<p align='center'><a href='event:closei'><N>"..t(n,'close').."</a>",p,191,329,138,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  119.  newData={
  120.             ["points"]=0;
  121.             ["rounds"]=0;
  122.             ["complet"]=0;
  123.             ["tm"]=0;
  124.             ["c1"]=0;
  125.             ["c2"]=0;
  126.             ["c3"]=0;
  127.             };
  128.  data[p] = newData;
  129. end
  130. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  131.  
  132. function eventLoop(elapsed, remaining)
  133.  local alive = false
  134.  for p,player in pairs(tfm.get.room.playerList) do
  135.   if data[p].tm == 1 then
  136.    tfm.exec.setNameColor(p, 0xFFF000)
  137.   elseif data[p].tm == 2 then
  138.    tfm.exec.setNameColor(p, 0x1E90FF)
  139.   elseif data[p].tm == 3 then
  140.    tfm.exec.setNameColor(p, 0xFF0000)
  141.   end
  142.   if not player.isDead then
  143.    alive = true
  144.    break
  145.   end
  146.  end
  147.  if xp1 == 10 then
  148.   lvl1=2
  149.  elseif xp2 == 10 then
  150.   lvl2=2
  151.  elseif xp3 == 10 then
  152.   lvl3=2
  153.  end
  154.  s=math.random(1,7)
  155.  if remaining <= 0 or not alive then
  156.   win=0
  157.   r=math.random(1,3)
  158.   for p,player in pairs(tfm.get.room.playerList) do
  159.    data[p].rounds=data[p].rounds+1
  160.   end
  161.   if r == 1 then
  162.    tfm.exec.newGame(mapa1,false)
  163.   elseif r == 2 then
  164.    tfm.exec.newGame(mapa2,false)
  165.   elseif r == 3 then
  166.    tfm.exec.newGame(mapa3,false)
  167.   end
  168.   tfm.exec.setGameTime(120, true)
  169.  end
  170.  if r == 1 then
  171.   tfm.exec.setUIMapName(" #Realms   <g>|   <n>Realm :<v> Thunderstorm")
  172.   tfm.exec.addShamanObject(24, math.random(2,1600), math.random(2,800), math.random(0,359), math.random(0,5), math.random(0,5), no)
  173.   tfm.exec.addShamanObject(24, math.random(2,1600), math.random(2,800), math.random(0,359), math.random(0,5), math.random(0,5), no)
  174.   tfm.exec.addShamanObject(24, math.random(2,1600), math.random(2,800), math.random(0,359), math.random(0,5), math.random(0,5), no)
  175.   tfm.exec.displayParticle(9, 1468, 100, 0, 0, 0, 0.04, n)
  176.   tfm.exec.displayParticle(9, 1468, 162, 0, 0, 0, -0.04, n)
  177.   tfm.exec.displayParticle(9, 1435, 130, 0, 0, 0.04, 0, n)
  178.   tfm.exec.displayParticle(9, 1505, 130, 0, 0, -0.04, 0, n)
  179.  elseif r == 2 then
  180.   tfm.exec.setUIMapName(" #Realms   <g>|   <n>Realm :<v> Jungle")
  181.   if s == 1 then
  182.    tfm.exec.addShamanObject(85, 60, 440, math.random(0,10), 3, 2, no)
  183.   elseif s == 2 then
  184.    tfm.exec.addShamanObject(85, 1580, 180, 0, 0, 0, no)
  185.   elseif s == 3 then
  186.    tfm.exec.addShamanObject(85, 580, 80, 0, 0, 0, no)
  187.   elseif s == 4 then
  188.    tfm.exec.addShamanObject(85, 150, 110, 0, -10, -10, no)
  189.   elseif s == 5 then
  190.    tfm.exec.addShamanObject(85, 1180, 110, 0, 0, 0, no)
  191.   elseif s == 6 then
  192.    tfm.exec.addShamanObject(85, 0, 3000, 0, 0, 0, no)
  193.   elseif s == 7 then
  194.    tfm.exec.addShamanObject(85, 0, 3000, 0, 0, 0, no)
  195.   end
  196.   tfm.exec.displayParticle(9, 53, 141, 0, 0, 0, 0.04, n)
  197.   tfm.exec.displayParticle(9, 53, 203, 0, 0, 0, -0.04, n)
  198.   tfm.exec.displayParticle(9, 20, 171, 0, 0, 0.04, 0, n)
  199.   tfm.exec.displayParticle(9, 90, 171, 0, 0, -0.04, 0, n)
  200.  elseif r == 3 then
  201.   tfm.exec.setUIMapName(" #Realms   <g>|   <n>Realm :<v> Winter")
  202.   tfm.exec.displayParticle(9, 795, 104, 0, 0, 0, 0.04, n)
  203.   tfm.exec.displayParticle(9, 795, 166, 0, 0, 0, -0.04, n)
  204.   tfm.exec.displayParticle(9, 762, 134, 0, 0, 0.04, 0, n)
  205.   tfm.exec.displayParticle(9, 832, 134, 0, 0, -0.04, 0, n)
  206.  end
  207. end
  208.  
  209. function eventTextAreaCallback(id, p, cmd)
  210.  if cmd == "p" then
  211.   ui.addTextArea(100,"",p,273,78,254,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  212.   ui.addTextArea(101,"",p,274,79,252,282,0x986742,0x986742,alpha,true) ---Borda
  213.   ui.addTextArea(102,"",p,276,81,248,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  214.   ui.addTextArea(103,"",p,277.5,82.5,246,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  215.   ui.addTextArea(104,"<p align='center'><font size='18'><j>"..t(n,'main1').."</p><p align='left'><font size='12'><n></p><p align='left'><n>"..t(n,'points')..": <v>"..data[p].points.."</p><p align='left'><n>"..t(n,'px1')..": <v>"..data[p].rounds.."</p><p align='left'><n>"..t(n,'px2')..": <v>"..data[p].complet.."</p>",p,278.5,83.5,244,274,0x183337,0x183337,alpha,true) ---Texto
  216.   ui.addTextArea(105,"",p,281,338,238,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  217.   ui.addTextArea(106,"",p,281,340,238,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  218.   ui.addTextArea(107,"<p align='center'><a href='event:closep'><N>"..t(n,'close').."</a>",p,281,339,238,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  219.   ui.addTextArea(108,"<p align='center'><font size='9'><N>[1]           [2]            [3]            [4]           [5]",p,281,259,238,18,0x3C5064,0x3C5064,0,true)
  220.   ui.addTextArea(109,"<p align='center'><font size='9'><N>[6]           [7]            [8]            [9]           [0]",p,281,314,238,18,0x3C5064,0x3C5064,0,true)
  221.   if data[p].c1 == 1 then
  222.    ui.addTextArea(110,"",p,285,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  223.    ui.addTextArea(111,"",p,286.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  224.   else
  225.    ui.addTextArea(110,"",p,285,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  226.    ui.addTextArea(111,"",p,286.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  227.   end
  228.   if data[p].c2 == 1 then
  229.    ui.addTextArea(112,"",p,335,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  230.    ui.addTextArea(113,"",p,336.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  231.   else
  232.    ui.addTextArea(112,"",p,335,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  233.    ui.addTextArea(113,"",p,336.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  234.   end
  235.   if data[p].c3 == 1 then
  236.    ui.addTextArea(114,"",p,385,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  237.    ui.addTextArea(115,"",p,386.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  238.   else
  239.    ui.addTextArea(114,"",p,385,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  240.    ui.addTextArea(115,"",p,386.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  241.   end
  242.   ---4
  243.   ui.addTextArea(116,"",p,435,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  244.   ui.addTextArea(117,"",p,436.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  245.   ---5
  246.   ui.addTextArea(118,"",p,485,226,30,30,0x986742,0x986742,alpha,true) ---Borda
  247.   ui.addTextArea(119,"",p,486.5,227.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  248.   ---6
  249.   ui.addTextArea(120,"",p,285,281,30,30,0x986742,0x986742,alpha,true) ---Borda
  250.   ui.addTextArea(121,"",p,286.5,282.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  251.   ---7
  252.   ui.addTextArea(122,"",p,335,281,30,30,0x986742,0x986742,alpha,true) ---Borda
  253.   ui.addTextArea(123,"",p,336.5,282.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  254.   ---8
  255.   ui.addTextArea(124,"",p,385,281,30,30,0x986742,0x986742,alpha,true) ---Borda
  256.   ui.addTextArea(125,"",p,386.5,282.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  257.   ---9
  258.   ui.addTextArea(126,"",p,435,281,30,30,0x986742,0x986742,alpha,true) ---Borda
  259.   ui.addTextArea(127,"",p,436.5,282.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  260.   ---0
  261.   ui.addTextArea(128,"",p,485,281,30,30,0x986742,0x986742,alpha,true) ---Borda
  262.   ui.addTextArea(129,"",p,486.5,282.5,28,28,0x183337,0x183337,alpha,true) ---Texto
  263.  elseif cmd == "aly" then
  264.   if data[p].tm == 0 then
  265.    if data[p].points > 4 then
  266.     ui.addTextArea(300,"",p,173,68,454,294,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  267.     ui.addTextArea(301,"",p,174,69,452,292,0x986742,0x986742,alpha,true) ---Borda
  268.     ui.addTextArea(302,"",p,176,71,448,288,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  269.     ui.addTextArea(303,"",p,177.5,72.5,446,286,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  270.     ui.addTextArea(304,"<p align='center'><font size='16'><j>"..t(n,'main3').."</p><p align='center'><font size='14'><v>"..t(n,'alyt2').."</p><p align='center'><font size='14'>"..t(n,'alyt3').."</p>",p,178.5,73.5,444,284,0x183337,0x183337,alpha,true) ---Texto
  271.     ui.addTextArea(314,"<p align='center'><font size='14'><j>"..t(n,'aly1').."</p><p align='center'><font size='110'><j>☠</p>",p,183,163.5,134,190,0x0C191C,0x0C191C,alpha,true) ---Texto
  272.     ui.addTextArea(315,"<p align='center'><font size='14'><bv>"..t(n,'aly2').."</p><p align='center'><font size='112'><bv>☪</p>",p,332,163.5,134,190,0x0C191C,0x0C191C,alpha,true) ---Texto
  273.     ui.addTextArea(316,"<p align='center'><font size='14'><r>"..t(n,'aly3').."</p><p align='center'><font size='112'><r>Δ</p>",p,481,163.5,134,190,0x0C191C,0x0C191C,alpha,true) ---Texto
  274.     ui.addTextArea(305,"",p,186,333,128,16,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  275.     ui.addTextArea(306,"",p,186,335,128,16,0x11171C,0x11171C,alpha,true) ---SombraBotão
  276.     ui.addTextArea(307,"<p align='center'><a href='event:join1'><N>Join</a>",p,186,334,128,16,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  277.     ui.addTextArea(308,"",p,335,333,128,16,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  278.     ui.addTextArea(309,"",p,335,335,128,16,0x11171C,0x11171C,alpha,true) ---SombraBotão
  279.     ui.addTextArea(310,"<p align='center'><a href='event:join2'><N>Join</a>",p,335,334,128,16,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  280.     ui.addTextArea(311,"",p,484,333,128,16,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  281.     ui.addTextArea(312,"",p,484,335,128,16,0x11171C,0x11171C,alpha,true) ---SombraBotão
  282.     ui.addTextArea(313,"<p align='center'><a href='event:join3'><N>Join</a>",p,484,334,128,16,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  283.    else
  284.     ui.addTextArea(300,"",p,273,178,254,94,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  285.     ui.addTextArea(301,"",p,274,179,252,92,0x986742,0x986742,alpha,true) ---Borda
  286.     ui.addTextArea(302,"",p,276,181,248,88,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  287.     ui.addTextArea(303,"",p,277.5,182.5,246,86,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  288.     ui.addTextArea(304,"<p align='center'><font size='14'><n>"..t(n,'alyt1').."</p>",p,278.5,183.5,244,84,0x183337,0x183337,alpha,true) ---Texto
  289.     ui.addTextArea(305,"",p,281,248,238,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  290.     ui.addTextArea(306,"",p,281,250,238,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  291.     ui.addTextArea(307,"<p align='center'><a href='event:closealy'><N>"..t(n,'close').."</a>",p,281,249,238,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  292.    end
  293.   end
  294.   if data[p].tm > 0 then
  295.    ui.addTextArea(300,"",p,273,78,254,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  296.    ui.addTextArea(301,"",p,274,79,252,282,0x986742,0x986742,alpha,true) ---Borda
  297.    ui.addTextArea(302,"",p,276,81,248,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  298.    ui.addTextArea(303,"",p,277.5,82.5,246,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  299.    if data[p].tm == 1 then
  300.     ui.addTextArea(304,"<p align='center'><font size='20'><j>"..t(n,'aly1').."</p><p align='left'><font size='10'></p><p align='left'><font size='13'><n>Nivel:<v> "..lvl1.."</p><p align='left'><font size='13'><n>XP:<v> "..xp1.."</p><p align='left'><font size='13'></p><p align='left'><font size='13'><n>Nº de Membros:<v> "..m1.."</p>",p,278.5,83.5,244,274,0x183337,0x183337,alpha,true) ---Texto
  301.    end
  302.    if data[p].tm == 2 then
  303.     ui.addTextArea(304,"<p align='center'><font size='20'><bv>"..t(n,'aly2').."</p><p align='left'><font size='10'></p><p align='left'><font size='13'><n>Nivel:<v> "..lvl2.."</p><p align='left'><font size='13'><n>XP:<v> "..xp2.."</p><p align='left'><font size='13'></p><p align='left'><font size='13'><n>Nº de Membros:<v> "..m2.."</p>",p,278.5,83.5,244,274,0x183337,0x183337,alpha,true) ---Texto
  304.    end
  305.    if data[p].tm == 3 then
  306.     ui.addTextArea(304,"<p align='center'><font size='20'><r>"..t(n,'aly3').."</p><p align='left'><font size='10'></p><p align='left'><font size='13'><n>Nivel:<v> "..lvl3.."</p><p align='left'><font size='13'><n>XP:<v> "..xp3.."</p><p align='left'><font size='13'></p><p align='left'><font size='13'><n>Nº de Membros:<v> "..m3.."</p>",p,278.5,83.5,244,274,0x183337,0x183337,alpha,true) ---Texto
  307.    end
  308.    ui.addTextArea(305,"",p,281,338,238,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  309.    ui.addTextArea(306,"",p,281,340,238,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  310.    ui.addTextArea(307,"<p align='center'><a href='event:closealy'><N>"..t(n,'close').."</a>",p,281,339,238,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  311.   end
  312.  elseif cmd == "rank" then
  313.    ui.addTextArea(400,"",p,223,68,354,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  314.    ui.addTextArea(401,"",p,224,69,352,282,0x986742,0x986742,alpha,true) ---Borda
  315.    ui.addTextArea(402,"",p,226,71,348,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  316.    ui.addTextArea(403,"",p,227.5,72.5,346,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  317.    ui.addTextArea(404,"<p align='center'><font size='24'><j>---------- Rank ----------</p>",p,228.5,73.5,344,274,0x183337,0x183337,alpha,true) ---Texto
  318.    ui.addTextArea(405,"",p,231,328,338,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  319.    ui.addTextArea(406,"",p,231,330,338,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  320.    ui.addTextArea(407,"<p align='center'><a href='event:closerank'><N>"..t(n,'close').."</a>",p,231,329,338,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  321.    ui.addTextArea(408,"",p,234,118,100,20,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  322.    ui.addTextArea(409,"",p,234,120,100,20,0x11171C,0x11171C,alpha,true) ---SombraBotão
  323.    ui.addTextArea(410,"<p align='center'><font size='13'><a href='event:rank1'><N>"..t(n,'rooms').."</a>",p,234,119,100,20,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  324.    ui.addTextArea(411,"",p,350,118,100,20,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  325.    ui.addTextArea(412,"",p,350,120,100,20,0x11171C,0x11171C,alpha,true) ---SombraBotão
  326.    ui.addTextArea(413,"<p align='center'><font size='13'><a href='event:rank2'><N>"..t(n,'room').."</a>",p,350,119,100,20,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  327.    ui.addTextArea(414,"",p,466,118,100,20,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  328.    ui.addTextArea(415,"",p,466,120,100,20,0x11171C,0x11171C,alpha,true) ---SombraBotão
  329.    ui.addTextArea(416,"<p align='center'><font size='13'><a href='event:rank3'><N>"..t(n,'main3').."</a>",p,466,119,100,20,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  330.    eventRanking(p)
  331.  elseif cmd == "help" then
  332.   ui.addTextArea(200,"",p,253,78,454,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  333.   ui.addTextArea(208,"",p,93,78,154,284,0x2E221B,0x2E221B,alpha,true) ---ContornoDaBorda
  334.   ui.addTextArea(201,"",p,254,79,452,282,0x986742,0x986742,alpha,true) ---Borda
  335.   ui.addTextArea(202,"",p,256,81,448,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  336.   ui.addTextArea(203,"",p,257.5,82.5,446,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  337.   ui.addTextArea(204,"<p align='center'><font size='20'><j>"..t(n,'play').."</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help1t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  338.   ui.addTextArea(209,"",p,94,79,152,282,0x986742,0x986742,alpha,true) ---Borda
  339.   ui.addTextArea(210,"",p,96,81,148,278,0x0C191C,0x0C191C,alpha,true) ---Intermediario
  340.   ui.addTextArea(211,"",p,97.5,82.5,146,276,0x24474D,0x24474D,alpha,true) ---RefexoDoTexto
  341.   ui.addTextArea(212,"<p align='center'><font size='16'><j>"..t(n,'main2').."</p><p align='left'><n><font size='12'><a href='event:help1'>"..t(n,'play').."</a></p><p align='left'><n><a href='event:help2'>"..t(n,'points').."</a></p><p align='left'><n><a href='event:help3'>Thunderstorm Realm</a></p><p align='left'><n><a href='event:help4'>Jungle Realm</a></p><p align='left'><n><a href='event:help5'>Winter Realm</a></p><p align='left'><n><a href='event:help6'>"..t(n,'main3').."</a></p>",p,98.5,83.5,144,274,0x183337,0x183337,alpha,true) ---Texto
  342.   ui.addTextArea(205,"",p,101,338,138,15,0x5D7D90,0x5D7D90,alpha,true) ---ReflexoBotão
  343.   ui.addTextArea(206,"",p,101,340,138,15,0x11171C,0x11171C,alpha,true) ---SombraBotão
  344.   ui.addTextArea(207,"<p align='center'><a href='event:closeh'><N>"..t(n,'close').."</a>",p,101,339,138,15,0x3C5064,0x3C5064,alpha,true) ---TextoBotão
  345.  elseif cmd == "help1" then
  346.   ui.addTextArea(204,"<p align='center'><font size='20'><j>"..t(n,'play').."</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help1t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  347.  elseif cmd == "help2" then
  348.   ui.addTextArea(204,"<p align='center'><font size='20'><j>"..t(n,'points').."</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help2t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  349.  elseif cmd == "help3" then
  350.   ui.addTextArea(204,"<p align='center'><font size='20'><j>Thunderstorm Realm</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help3t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  351.  elseif cmd == "help4" then
  352.   ui.addTextArea(204,"<p align='center'><font size='20'><j>Jungle Realm</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help4t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  353.  elseif cmd == "help5" then
  354.   ui.addTextArea(204,"<p align='center'><font size='20'><j>Winter Realm</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help5t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  355.  elseif cmd == "help6" then
  356.   ui.addTextArea(204,"<p align='center'><font size='20'><j>"..t(n,'main3').."</p><p align='center'><font size='10'><j> </p><p align='left'><font size='14'><n>"..t(n,'help6t').."</p>",p,258.5,83.5,444,274,0x183337,0x183337,alpha,true) ---Texto
  357.  elseif cmd == "join1" then
  358.   m1=m1+1
  359.   data[p].tm=1
  360.   alyleft()
  361.  elseif cmd == "join2" then
  362.   m2=m2+1
  363.   data[p].tm=2
  364.   alyleft()
  365.  elseif cmd == "join3" then
  366.   m3=m3+1
  367.   data[p].tm=3
  368.   alyleft()
  369.  elseif cmd == "iup" then
  370.   ui.addTextArea(-10,"<p align='left'><font size='12'><j>• Changelog list</p><p align='left'><font size='10'><g>[v1.06][18/12/16] <n>Game translated to english</p><p align='left'><font size='10'><g>[v1.05][16/12/16] <n>Rank is now available</p><p align='left'><font size='10'><g>[v1.03][13/12/16] <n>The alliances have arrived</p><p align='left'><font size='10'><g>[v1.01][12/12/16] <n>New Realm: Winter</p><p align='left'><font size='10'><g>[10/12/16] <n>Added help window</p><p align='left'><font size='10'><g>[08/12/16] <n>Added second Realm: Jungle</p><p align='left'><font size='10'><g>[03/12/16] <n>Created the first Realm: Thunderstorm</p><p align='left'><g>[01/12/16] <n>Added profile window</p>",p,188.5,73.5,444,244,0x183337,0x183337,alpha,true) ---Texto
  371.  elseif cmd == "closei" then
  372.   ui.removeTextArea(-1, p)
  373.   ui.removeTextArea(-2, p)
  374.   ui.removeTextArea(-3, p)
  375.   ui.removeTextArea(-4, p)
  376.   ui.removeTextArea(-5, p)
  377.   ui.removeTextArea(-6, p)
  378.   ui.removeTextArea(-7, p)
  379.   ui.removeTextArea(-8, p)
  380.   ui.removeTextArea(-9, p)
  381.   ui.removeTextArea(-10, p)
  382.  elseif cmd == "closep" then
  383.   ui.removeTextArea(100, p)
  384.   ui.removeTextArea(101, p)
  385.   ui.removeTextArea(102, p)
  386.   ui.removeTextArea(103, p)
  387.   ui.removeTextArea(104, p)
  388.   ui.removeTextArea(105, p)
  389.   ui.removeTextArea(106, p)
  390.   ui.removeTextArea(107, p)
  391.   ui.removeTextArea(108, p)
  392.   ui.removeTextArea(109, p)
  393.   ui.removeTextArea(110, p)
  394.   ui.removeTextArea(111, p)
  395.   ui.removeTextArea(112, p)
  396.   ui.removeTextArea(113, p)
  397.   ui.removeTextArea(114, p)
  398.   ui.removeTextArea(115, p)
  399.   ui.removeTextArea(116, p)
  400.   ui.removeTextArea(117, p)
  401.   ui.removeTextArea(118, p)
  402.   ui.removeTextArea(119, p)
  403.   ui.removeTextArea(120, p)
  404.   ui.removeTextArea(121, p)
  405.   ui.removeTextArea(122, p)
  406.   ui.removeTextArea(123, p)
  407.   ui.removeTextArea(124, p)
  408.   ui.removeTextArea(125, p)
  409.   ui.removeTextArea(126, p)
  410.   ui.removeTextArea(127, p)
  411.   ui.removeTextArea(128, p)
  412.   ui.removeTextArea(129, p)
  413.  elseif cmd == "closeh" then
  414.   ui.removeTextArea(200, p)
  415.   ui.removeTextArea(201, p)
  416.   ui.removeTextArea(202, p)
  417.   ui.removeTextArea(203, p)
  418.   ui.removeTextArea(204, p)
  419.   ui.removeTextArea(205, p)
  420.   ui.removeTextArea(206, p)
  421.   ui.removeTextArea(207, p)
  422.   ui.removeTextArea(208, p)
  423.   ui.removeTextArea(209, p)
  424.   ui.removeTextArea(210, p)
  425.   ui.removeTextArea(211, p)
  426.   ui.removeTextArea(212, p)
  427.   ui.removeTextArea(213, p)
  428.   ui.removeTextArea(214, p)
  429.   ui.removeTextArea(215, p)
  430.  elseif cmd == "closealy" then
  431.   alyleft()
  432.  elseif cmd == "rank1" then
  433.    ui.addTextArea(417,"<p align='center'><font size='13'><j>"..t(n,'soon').."</p>",p,228.5,173.5,344,144,0x183337,0x183337,alpha,true) ---Texto
  434.    ui.addTextArea(418,"<p align='center'><j>#</p>",p,228.5,153,344,16,0x183337,0x183337,alpha,true) ---Texto
  435.  elseif cmd == "rank2" then
  436.   eventRanking(p)
  437.  elseif cmd == "rank3" then
  438.   ui.addTextArea(418,"<p align='left'><font size='13'><n> # <bl>|<n> Name <bl>|<n> lvl <bl>|<n> XP <bl>|<n> Members</p>",p,228.5,153,344,20,0x183337,0x183337,alpha,true) ---Texto
  439.   if xp1 > xp2 or xp1 > xp3 then
  440.    if xp2 > xp3 then
  441.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  442.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  443.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  444.    elseif xp3 > xp2 or xp3 == xp2 then
  445.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  446.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  447.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  448.    end
  449.   end
  450.   if xp2 > xp1 or xp2 > xp3 then
  451.    if xp1 > xp3 then
  452.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  453.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  454.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  455.    elseif xp3 > xp1 or xp3 == xp1 then
  456.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  457.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  458.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  459.    end
  460.   end
  461.   if xp3 > xp1 or xp3 > xp2 then
  462.    if xp1 > xp2 then
  463.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  464.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  465.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  466.    elseif xp2 > xp1 or xp2 == xp1 then
  467.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  468.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  469.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  470.    end
  471.   end
  472.   if xp3 == xp1 and xp3 == xp2 and xp1 == xp2 then
  473.     ui.addTextArea(417,"<p align='left'><font size='13'><j> 1 <bl>|<r> "..t(n,'aly3').." <bl>|<v> "..lvl3.." <bl>|<v> "..xp3.." <bl>|<v> "..m3.."</p>",p,228.5,178,344,20,0x183337,0x183337,alpha,true) ---Texto
  474.     ui.addTextArea(419,"<p align='left'><font size='13'><g> 2 <bl>|<bv> "..t(n,'aly2').." <bl>|<v> "..lvl2.." <bl>|<v> "..xp2.." <bl>|<v> "..m2.."</p>",p,228.5,203,344,20,0x183337,0x183337,alpha,true) ---Texto
  475.     ui.addTextArea(420,"<p align='left'><font size='13'><g> 3 <bl>|<j> "..t(n,'aly1').." <bl>|<v> "..lvl1.." <bl>|<v> "..xp1.." <bl>|<v> "..m1.."</p>",p,228.5,228,344,20,0x183337,0x183337,alpha,true) ---Texto
  476.   end
  477.  elseif cmd == "closerank" then
  478.   ui.removeTextArea(400, p)
  479.   ui.removeTextArea(401, p)
  480.   ui.removeTextArea(402, p)
  481.   ui.removeTextArea(403, p)
  482.   ui.removeTextArea(404, p)
  483.   ui.removeTextArea(405, p)
  484.   ui.removeTextArea(406, p)
  485.   ui.removeTextArea(407, p)
  486.   ui.removeTextArea(408, p)
  487.   ui.removeTextArea(409, p)
  488.   ui.removeTextArea(410, p)
  489.   ui.removeTextArea(411, p)
  490.   ui.removeTextArea(412, p)
  491.   ui.removeTextArea(413, p)
  492.   ui.removeTextArea(414, p)
  493.   ui.removeTextArea(415, p)
  494.   ui.removeTextArea(416, p)
  495.   ui.removeTextArea(417, p)
  496.   ui.removeTextArea(418, p)
  497.   ui.removeTextArea(419, p)
  498.   ui.removeTextArea(420, p)
  499.  end
  500. end
  501.  
  502. if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
  503.  tfm.exec.movePlayer(p,0,0,true,100,0,false)
  504. elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
  505.  tfm.exec.movePlayer(p,0,0,true,-100,0,false)
  506. end
  507. local facingLeft = {}
  508.  
  509. function eventKeyboard(p, key, down, x, y)
  510.  if r == 3 then
  511.   if key == 0 or key == 2 then
  512.    facingLeft[p] = key == 0
  513.   elseif key == 3 then
  514.    if facingLeft[p] then
  515.     tfm.exec.addShamanObject(34, x - 8, y - 5, 0, -20)
  516.    else
  517.     tfm.exec.addShamanObject(34, x + 8, y - 5, 0, 20)
  518.    end
  519.   end
  520.  end
  521. end
  522.  
  523. function split(t,s)
  524.     local a={}
  525.     for i,v in string.gmatch(t,string.format("[^%s]+",s or "%s")) do
  526.         table.insert(a,i)
  527.     end
  528.     return a
  529. end
  530.  
  531. function eventRanking(p)
  532.     local sc = {}
  533.     for p, player in pairs(tfm.get.room.playerList) do
  534.         sc[#sc+1] = {n=p,s=data[p].points}
  535.     end
  536.     table.sort(sc,function(a,b) return a.s>b.s end)
  537.     str = ''
  538.     for k,v in pairs(sc) do
  539.         if k < 15 then
  540.             if str ~= '' then
  541.                 str=str.."<br><J>"..k.."° <g>| <VP>"..v.n.."<g> | <V>"..v.s..""
  542.             else
  543.                 str="<J>"..k.."° <g>| <VP>"..v.n.."<g> | <V>"..v.s..""
  544.             end
  545.         end
  546.     end
  547.     ui.addTextArea(418,"<p align='left'><font size='12'><n> # <bl>| <n>Name <bl>| <n>Score</p>",p,228.5,153,344,16,0x183337,0x183337,alpha,true) ---Texto
  548.     ui.addTextArea(417,"<B><font size='12'>"..str,p,228.5,173.5,344,144,0x183337,0x183337,alpha,true)
  549.     return str
  550. end
  551.  
  552. function alyleft()
  553.  for p in pairs(tfm.get.room.playerList) do
  554.   ui.removeTextArea(300, p)
  555.   ui.removeTextArea(301, p)
  556.   ui.removeTextArea(302, p)
  557.   ui.removeTextArea(303, p)
  558.   ui.removeTextArea(304, p)
  559.   ui.removeTextArea(305, p)
  560.   ui.removeTextArea(306, p)
  561.   ui.removeTextArea(307, p)
  562.   ui.removeTextArea(308, p)
  563.   ui.removeTextArea(309, p)
  564.   ui.removeTextArea(310, p)
  565.   ui.removeTextArea(311, p)
  566.   ui.removeTextArea(312, p)
  567.   ui.removeTextArea(313, p)
  568.   ui.removeTextArea(314, p)
  569.   ui.removeTextArea(315, p)
  570.   ui.removeTextArea(316, p)
  571.  end
  572. end
  573.  
  574. function eventPlayerDied(p)
  575.  data[p].points=data[p].points+1
  576.  tfm.exec.setPlayerScore(p, 1, true)
  577. end
  578.  
  579. function eventPlayerGetCheese(p)
  580.  data[p].points=data[p].points+5
  581.  data[p].complet=data[p].complet+1
  582.  tfm.exec.setPlayerScore(p, 5, true)
  583.  tfm.exec.playerVictory(p)
  584.  if data[p].tm == 1 then
  585.   xp1=xp1+1
  586.  elseif data[p].tm == 2 then
  587.   xp2=xp2+1
  588.  elseif data[p].tm == 3 then
  589.   xp3=xp3+1
  590.  end
  591.  if win == 0 then
  592.   if r == 1 then
  593.   else
  594.   end
  595.  end
  596.  win=1
  597. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement