Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame()
- tfm.exec.disableAutoShaman()
- mensagem = ""
- -- Créditos ao Ninguem, por ter ajudado a fazer isso
- function split(str, sep)
- local arg = {}
- for i, v in string.gmatch(str, string.format("[^%s]+", sep or "%s")) do
- table.insert(arg, i)
- end
- return arg
- end
- -- Whats
- function eventPopupAnswer(id, jogador, resposta)
- mensagem = "<br> <V>["..jogador.."]:</V><N> "..resposta..mensagem
- if id == 333333333 then
- ui.addTextArea(1114, mensagem, jogador, 250, 38, 300, 347, 0x242f42, 0x242f62, 0.7, true)
- ui.addPopup(333333333, 2, "Mensagem:", jogador, 255, 280, 290, 284, 0x141414, 0x141414, 0.5, true)
- end
- end
- -- Evento de chat comando
- function eventChatCommand(jogador,comando,p) -- Comando do bate-papo do evento
- local parametro = split(comando)
- -- se o comando foi "np @110182", então parametro recebe {"np", "@110182"}
- if parametro[1] == "np" then -- verifica se o primeiro parâmetro é "np"
- tfm.exec.newGame(parametro[2]) -- inicia um novo mapa usando o segundo parâmetro
- elseif comando == 'opencell' then -- Abre o cellphone
- ui.addTextArea(0, "", p, 553, 45, 1, 40, 0x0c0c0c, 0x0c0c0c, 1, true)
- ui.addTextArea(1111, "<a href='event:open'><font color='#FF0000'>█\n█", p, 558, 42, 30, 45, 0x0c0c0c, 0x0c0c0c, 0, true)
- ui.addTextArea(1112, "", p, 250, 38, 300, 347, 0x0c0c0c, 0x0c0c0c, 1, true)
- ui.addTextArea(1113, "", p, 255, 43, 290, 10, 0x212121, 0x212121, 1, true)
- ui.addTextArea(1114, "", p, 255, 64, 290, 284, 0x141414, 0x141414, 1, true)
- ui.addTextArea(1115, "", p, 255, 360, 290, 20, 0x212121, 0x212121, 1, true)
- ui.addTextArea(1116, "<a href='event:home'><p align='center'>████", p, 350, 362, 100, 16, 0x2b2b2b, 0x2b2b2b, 1, true)
- ui.addTextArea(1117, "<a href='event:next1'> ˃", p, 487, 362, 56, 16, 0x2b2b2b, 0x2b2b2b, 1, true)
- ui.addTextArea(1118, "", p, 350, 47, 100, 1, 0x333333, 0x333333, 1, true)
- elseif comando == 'help' then
- ui.addTextArea(20, "<p align='center'><b>Bem-vindo ao CellPhone!</b></p> <font size='14'><b>Minhas funções ainda estão em andamento, mas existe algumas que você pode usar no momento.\n</b></p>\n[•] - !map name - Init error_404", p, 214, 90, 370, 218, 0x242f42, 0x000000, 0.8, true)
- ui.addTextArea(21, "<p align='center'><a href='event:closehelp'>Fechar</a>", p, 212, 328, 364, 24, 0x242f42, 0x000000, 0.8, true)
- end
- end
- --
- function eventTextAreaCallback(t,p,link) -- Evento textarea chamada de volta
- if link == [[off]] then
- eventChatCommand(name,'opencell')
- elseif link == [[open]] then -- Area de Trabalho
- ui.addTextArea(8, "<font size='15'><a href='event:zapbr'><b>H</a>", p, 267, 122, 48, 27, 0x141414, 0x324650, NaN, true)
- ui.addTextArea(9, "<font size='15'><a href='event:play'><b>P</a>", p, 266, 74, 48, 27, 0x141414, 0x324650, NaN, true)
- ui.addTextArea(10, "<font size='15'><a href='event:idlua'><b>I</a>", p, 410, 74, 48, 27, 0x141414, 0x324650, NaN, true)
- ui.addTextArea(11, "<font size='15'><a href='event:modules'><b>M</a>", p, 339, 74, 48, 27, 0x141414, 0x324650, NaN, true)
- ui.addTextArea(12, "<font size='15'><a href='event:helplua'><b>L</a>", p, 482, 74, 48, 27, 0x141414, 0x324650, NaN, true)
- ui.addTextArea(13, "<a href='event:off'><font color='#00FF00'█\n█", p, 553, 39, 4, 40, 0x0c0c0c, 0x0c0c0c, 0, true)
- ui.addTextArea(14, "<a href='event:inforplaystore'>+</a>", p, 295, 79, 12, 16, 0x141414, 0x242f42, 1, true) -- p
- ui.addTextArea(15, "<a href='event:inforzapbr'>+</a>", p, 296, 127, 12, 16, 0x141414, 0x242f42, 1, true) -- h
- ui.addTextArea(16, "<a href='event:informodules'>+</a>", p, 368, 79, 12, 16, 0x141414, 0x242f42, 1, true) -- m
- ui.addTextArea(17, "<a href='event:inforlua'>+</a>", p, 511, 79, 12, 16, 0x141414, 0x242f42, 1, true) -- l
- ui.addTextArea(18, "<a href='event:inforids'>+</a>", p, 439, 79, 12, 16, 0x141414, 0x242f42, 1, true) -- 1
- elseif link == [[next1]] then -- Proxima página de inicio
- ui.addTextArea(1119, "", p, 255, 64, 290, 284, 0x141414, 0x141414, 1, true)
- elseif link == [[home]] then
- for i = 74,75 do
- ui.removeTextArea(i,p)
- end
- ui.removeTextArea(1119)
- ------------
- -- Área do aplicativo = [[ Zap BR]]
- ------------
- elseif link == [[zapbr]] then -- Aplicativo do Cellphone
- ui.addPopup(333333333, 2, "Mensagem:", p, 255, 250, 290, 284, 0x141414, 0x141414, 0.6, true)
- elseif link == [[returnwhat]] then -- Fecha a Aba What
- for i = 41,42 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[inforzapbr]] then
- ui.addTextArea(45, "<center>Infor Zap BR</center>\nZap Br é um aplicativo de bate papo interativo com outros jogadores da sala.\nNo momento o aplicativo está em manutenção", p, 320, 139, 177, 117, 0x242f32, 0x324650, 0.7, true)
- ui.addTextArea(46, "<a href='event:closeinforzapbr'>Retorne</a>", p, 443, 233, 48, 18, 0x242f32, 0x324650, 0.9, true)
- elseif link == [[closeinforzapbr]] then
- for i = 45,46 do
- ui.removeTextArea(i,p)
- end
- ------------
- -- Área do aplicativo = [[ Aprendizagem Lua]]
- ------------
- elseif link == [[helplua]] then
- ui.addTextArea(81, "", p, 175, 48, 451, 238, 0x242f42, 0x324650, 1, true)
- ui.addTextArea(82, "<font size='15'><a href='event:textarea'>Text Areas</a>", p, 182, 54, 96, 32, 0x242f42, 0x324650, 1, true)
- ui.addTextArea(84, "<font size='15'><a href='event:closehelpmodule'>Fechar</a>", p, 381, 300, 55, 32, 0x242f42, 0x324650, 1, true)
- elseif link == [[textarea]] then
- ui.addTextArea(85, "<center><font size='14'>Text Areas</center>\n\n", p, 175, 48, 451, 238, 0x242f42, 0x324650, 1, true)
- ui.addTextArea(86, "<a href='event:pergunta1'>Como fazer uma textarea que redireciona a outra.</a>", p, 184, 80, 347, 24, 0x242f42, 0x000000, 1, true)
- ui.addTextArea(87, "<a href='event:pergunta2'>Para que serve o eventTextAreaCallback.</a>", p, 184, 122, 346, 23, 0x242f42, 0x000000, 1, true)
- ui.addTextArea(89, "<font size='14'><center><a href='event:closeText'>Fechar</a>", p, 230, 302, 345, 23, 0x242f42, 0x000000, 1, true)
- for i = 81,84 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[inforlua]] then
- ui.addTextArea(90, "<center>Infor Lua</center>\nLua é um aplicativo feito para a aprendizagem de algumas \"configurações\" da linguagem Lua do Transformice. \n\nEstado: EM MANUTENÇÃO", p, 360, 145, 283, 156, 0x242f32, 0x324650, 0.5, true)
- ui.addTextArea(91, "<a href='event:closeinforlua'>Retorne</a>", p, 587, 279, 48, 18, 0x242f32, 0x324650, 0.9, true)
- elseif link == [[closeinforlua]] then -- Fecha a aba de ajuda Module
- for i = 90,91 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[closehelpmodule]] then -- Fecha a aba de ajuda Module
- for i = 81,89 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[pergunta1]] then
- ui.addTextArea(100, "<center><font size='14'>Como fazer uma textarea que redireciona a outra.</center>\n\n<font size='12'>Existem dois tipos de Text Área. As que lhe redirecionam a outra(s), e as que não lhe redirecionam, que podem servir como uma aba de ajuda, um exemplo pode ser um menu. Podemos colocar uma text Área nominada \"Menu\", e dar um evento.\n<font size='11'>Ex.: <.a>href='event: Aqui você coloca o nome do evento'> Menu<./a> \n<font size='12'>E quando o evento for chamado \"eventTextAreaCallback\", que significa liga de volta o evento de Text Área, mais ou menos isso.\n\nou seja quando o evento for chamado ele fará o que for denominado por você.\nfunction eventTextAreaCallback(t,p,link)\n if link == [[menu]] then\n-- Aqui você colcoa a ação que acontecerá quando o evento for chamado.\nend", p, 101, 63, 597, 274, 0x242f42, 0x324650, 1, true)
- ui.addTextArea(101, "<font size='14'><center><a href='event:closepergunta1'>Fechar</a>", p, 233, 357, 345, 23, 0x242f42, 0x000000, 1, true)
- for i = 85,89 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[closepergunta1]] then
- for i = 100,101 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[closeText]] then -- Fecha a aba de perguntas Lua
- for i = 85,89 do
- ui.removeTextArea(i,p)
- end
- ------------
- -- Área do aplicativo = [[ Lista Modules]]
- ------------
- elseif link == [[modules]] then -- Aba Modules
- ui.addTextArea(26, "<font size='15'><p align='center'>Modules</p>\n", p, 231, 31, 334, 336, 0x242f42, 0x242f42, NaN, true)
- ui.addTextArea(27, "#divinity \n#playground \n#football \n#ffarace \n#pewpew \n#elimination \n#campal \n#infected \n#domination\n#traitor \n#prophunt \n#circuit \n#deathmatch \n#powerup \n#basketball ", p, 407, 84, 146, 265, 0x242f42, 0x565757, NaN, true)
- ui.addTextArea(28, "#derby \n#pictionary \n#cheesehunter \n#retro \n#planks \n#sketch \n#crowdsurf \n#hidenseek \n#feather \n#deploy \n#fight \n#transform \n#ratapult \n#spiritual \n#virus \n\n", p, 243, 84, 147, 265, 0x242f42, 0x565757, NaN, true)
- ui.addTextArea(29, "<a href='event:closemodule'><b>X</a>", p, 544, 37, 15, 21, 0x242c42, 0x324650, NaN, true)
- elseif link == [[closemodule]] then -- Podeda loja
- for i = 26,29 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[informodules]] then
- ui.addTextArea(90, "<center>Infor Modules</center>\nModules é um aplicativo simples que penas informa os nomes de alguns modules oficiais entre outras coisas\n\nEstado: EM MANUTENÇÃO", p, 372, 98, 231, 143, 0x242f32, 0x324650, 0.5, true)
- ui.addTextArea(91, "<a href='event:closeinformodules'>Retorne</a>", p, 548, 216, 48, 18, 0x242f32, 0x324650, 0.9, true)
- elseif link == [[closeinformodules]] then
- for i = 90,91 do
- ui.removeTextArea(i,p)
- end
- ------------
- -- Área do aplicativo = [[ Play Store]]
- ------------
- elseif link == [[play]] then -- Loja
- ui.addTextArea(30, "<font size='15'><b><p align='center'>Loja</p>\n", p, 143, 79, 513, 241, 0x242f42, 0x000000, NaN, true)
- ui.addTextArea(31, "<font size='15'><b><p align='center'>Meep!</p>", p, 155, 122, 111, 115, 0x242f42, 0x000000, NaN, true)
- ui.addTextArea(32, "<p align='center'><a href='event:meep'><b><font size='10'>Buy</a>", p, 155, 251, 111, 17, 0x242f42, 0x000000, NaN, true)
- ui.addTextArea(33, "<font size='15'><b><p align='center'>Cheese!</p>", p, 283, 123, 111, 116, 0x242f42, 0x000000, NaN, true)
- ui.addTextArea(34, "<p align='center'><a href='event:cheese'><b><font size='10'>Buy</a>", p, 285, 253, 110, 17, 0x242f42, 0x000000, NaN, true)
- ui.addTextArea(35, "<a href='event:return'><p align='center'><b>Return</p></a>", p, 545, 291, 99, 22, 0x242f42, 0x000000, NaN, true)
- elseif link == [[return]] then -- Fecha loja
- for i = 30,35 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[inforplaystore]] then
- ui.addTextArea(411, "<center>Infor Play Store</center>\nPlay Store é um aplicativo feito para a diversão dos jogadores, feito para que os próprios possam comprar poderes entre muitas outras coisas que estamos adicionando. \n\nEstado: EM MANUTENÇÃO", p, 312, 96, 231, 144, 0x242f32, 0x324650, 0.5, true)
- ui.addTextArea(412, "<a href='event:closeinforplaystore'>Retorne</a>", p, 487, 214, 48, 18, 0x242f32, 0x324650, 0.9, true)
- elseif link == [[closeinforplaystore]] then
- for i = 411,412 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[closeshelp]] then -- Fecha a aba de modules
- for i = 20,21 do
- ui.removeTextArea(i,p)
- end
- ------------
- -- Área do aplicativo = [[ ID´s Lua]]
- ------------
- elseif link == [[returnid]] then
- for i = 36,40 do
- ui.removeTextArea(i,p)
- end
- elseif link == [[particleid]] then -- ID´s Lua
- ui.addTextArea(14, "<font size='15'><p align='center'><b>Particle ID´s</p><br><p align='left'>This section contains a list of particles and their associated IDs, for use in tfm.exec.displayParticle.<br><br><br><br>", name, 146.5, 78, 507, 288, 0x565757)
- ui.addTextArea(15, "0 - White Glitter<br>1 - Purple Glitter<br>2 - Orange Glitter<br>3 - Spawn Dust<br>4 - Soft White Glitter<br>5 - Hearts<br>6 - Bubbles<br>7 - Bubbles<br>8 - Bubbles<br>9 - Teal Glitter<br>10 - Spirit", name, 160.85, 149.65, 120, 205, 0x565757)
- ui.addTextArea(16, "11 - Yellow Glitter<br>12 - Super Spirit<br>13 - Red Glitter<br>14 - Water Bubbles<br>15 - Plus 1<br>16 - Plus 10<br>17 - Plus 12<br>18 - Plus 14<br>19 - Plus 16<br>20 - Meep Sign", name, 297.9, 149.85, 120, 205, 0x565757)
- ui.addTextArea(17, "21 - Red Confetti<br>22 - Green Confetti<br>23 - Blue Confetti<br>24 - Yellow Confetti<br>25 - Rain<br>26 - Wind<br>27 - Wind<br>28 - Lightning<br>29 - Yellow Stars<br>30 - Small Red Hearts<br>31 - Small Pink Hearts<br>32 - Flowers<br>33 - Bell<br>34 - Water Drops", p, 436, 149.55, 120, 205, 0x565757)
- elseif link == [[emoteid]] then -- ID´s Lua
- ui.addTextArea(23, "<font size='15'><p align='center'>Emote ID´s</p></font><br>This is a list of emotes and their corresponding enums. Bare in mind that the tfm.enum.emote table has a list of all emote names and enums.<br>", name, 136.5, 56, 527, 288, 0x565757)
- ui.addTextArea(24, "0 - Dance<br>1 - Laugh<br>2 - Cry<br>3 - Kiss<br>4 - Rage<br>5 - Clap<br>6 - Sleep<br>7 - Facepaw<br>8 - Sit<br>9 - Confetti<br>10 - Flag Waving", name, 144.7, 167.7, 140, 169, 0x565757, 0x565757)
- elseif link == [[shamanid]] then -- ID´s Lua
- ui.addTextArea(18, "<font size='15'><p align='center'><b>Shaman Object IDs</p><br><p align='left'>While tfm.enum.shamanObject is an easy-to-access list of most shaman objects, it doesn't list every object available in Transformice. Here is a list of all shaman objects that can be spawned in with tfm.exec.addShamanObject.<br><br>Note that some of them can't be spawned properly in modules, so are crossed out.", name, 136.5, 56, 527, 288, 0x565757)
- ui.addTextArea(19, "<font size='10'>0 - Arrow<br>1 - Small Box<br>2 - Large Box<br>3 - Small Plank<br>4 - Large Plank<br>5 - Heavy Ball<br>6 - Ball<br>7 - Trampoline<br>8 - Small Rough Plank<br>9 - Large Rough Plank<br>10 - Anvil<br>11 - Red Anchor<br>12 - Red Anchor Rotating Clockwise<br>13 - Red Anchor Rotating Counter-Clockwise", name, 144.7, 167.7, 140, 169, 0x565757, 0x565757)
- ui.addTextArea(20, "<font size='10'><br>14 - Green Anchor<br>15 - Green Anchor Rotating Clockwise<br>16 - Green Anchor Rotating Counter-Clockwise<br>17 - Cannon (Up)<br>18 - Cannon (Down)<br>19 - Cannon (Right)<br>20 - Cannon (Left)<br>21 - Sticky Ball<br>22 - Yellow Anchor<br>23 - Bomb<br>24 - Spirit<br>", name, 498.7, 165.2, 153, 167, 0x565757, 0x565757)
- ui.addTextArea(21, "25 - Fake Cheese<br>26 - Blue Portal<br>27 - Orange Portal<br>28 - Balloon<br>29 - Static Red Balloon<br>30 - Static Green Balloon<br>31 - Static Yellow Balloon<br>32 - Rune<br>33 - Chicken<br>34 - Snowball<br>35 - Valentine's Arrow<br>", p, 300.65, 166, 176, 170, 0x565757, 0x565757)
- ui.addTextArea(22, "»", p, 625.75, 64.05, 22, 22, 0x565757, 0x565757)
- elseif link == [[cheese]] then
- if tfm.get.room.playerList[p].score > 300 then
- tfm.exec.setPlayerScore(p, -300, true)
- tfm.exec.giveCheese(p)
- end
- end
- end
- function eventNewGame()
- for name in pairs(tfm.get.room.playerList) do
- eventChatCommand(name,'opencell')
- end
- end
- -- Neve
- if k == 32 and tfm.get.room.playerList[p].isFacingRight == true and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,100,0,false)
- elseif k == 32 and tfm.get.room.playerList[p].isFacingRight == false and info[p].time < os.time()-1500 then
- info[p].time = os.time()
- tfm.exec.movePlayer(p,0,0,true,-100,0,false)
- end
- local facingLeft = {}
- for name in pairs(tfm.get.room.playerList) do
- for _,key in pairs{0,2,3} do system.bindKeyboard(name, key, true) end
- end
- function eventKeyboard(name, key, down, x, y)
- if key == 0 or key == 2 then
- facingLeft[name] = key == 0
- elseif key == 3 then
- if facingLeft[name] then
- tfm.exec.addShamanObject(34, x - 8, y - 5, 0, -20)
- else
- tfm.exec.addShamanObject(34, x + 8, y - 5, 0, 20)
- end
- end
- end
- tfm.exec.newGame(0)
- tfm.exec.setUIMapName("<VI>Cell<ROSE>Phone")
- -- Obrigado/Crédito ao Contistente que me ajudou com o reparo de alguns bugs.
- -- Obrigado/Crédito ao Ninguem que me ajudou com o script que permite que o jogador rode o mapa de sua escolha.
- -- Obrigado/Crédito ao Vitordiaspas que me ajudou com algumas sugestões.
- -- *Passei e Rabisquei* Design do cell e alinhamento de algumas coisas By: Nettoork
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement