Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.98 KB | None | 0 0
  1. tfm.exec.disableAutoNewGame(true)
  2. tfm.exec.disableAutoShaman(true)
  3. tfm.exec.disableAfkDeath(true)
  4.  
  5. function eventPlayerDied(p)
  6. tfm.exec.respawnPlayer(p)
  7. end
  8.  
  9. function eventNewPlayer(playerName)
  10. tfm.exec.respawnPlayer(p)
  11. end
  12.  
  13. for p in pairs(tfm.get.room.playerList) do
  14. tfm.exec.bindKeyboard(p,40,true,true)
  15. end
  16.  
  17. function eventKeyboard(name,key,down,x,y)
  18. if (key==40) and not
  19. tfm.get.room.playerList[name].isDead then
  20. if tfm.get.room.playerList[name].isFacingRight then
  21. tfm.exec.addShamanObject(34,x+10,y,0,50)
  22. else
  23. tfm.exec.addShamanObject(34,x-10,y,0,-50)
  24. end
  25. end
  26. end
  27.  
  28. tfm.exec.newGame([[<C><P Ca="" F="0" L="8000" defilante="0,0,0,1" /><Z><S><S L="20" X="17" H="10" Y="159" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S X="64" L="399" H="266" c="3" Y="367" T="11" P="0,0,0.05,0.1,40,0,0,0" /><S H="266" L="399" X="380" c="1" Y="483" T="11" P="0,0,0.05,0.1,20,0,0,0" /><S X="1016" L="399" H="266" c="1" Y="416" T="11" P="0,0,0.05,0.1,-30,0,0,0" /><S H="266" L="399" X="1290" c="1" Y="467" T="11" P="0,0,0.05,0.1,20,0,0,0" /><S X="1834" L="399" H="20" c="1" Y="253" T="11" P="0,0,0.05,0.1,-20,0,0,0" /><S X="2288" L="399" H="20" c="1" Y="408" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S X="2619" L="39" H="700" c="1" Y="428" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S X="2811" L="399" H="266" c="1" Y="344" T="11" P="0,0,0.05,0.1,10,0,0,0" /><S H="266" L="399" X="3102" c="1" Y="479" T="11" P="0,0,0.05,0.1,-20,0,0,0" /><S H="20" L="399" X="3648" c="1" Y="249" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S X="4024" L="399" H="20" c="1" Y="283" T="11" P="0,0,0.05,0.1,20,0,0,0" /><S H="700" L="39" X="4361" c="1" Y="676" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S P="0,0,0.05,0.1,0,0,0,0" L="39" X="7906" c="1" Y="350" T="11" H="700" /><S X="4539" L="39" H="700" c="1" Y="456" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S X="4693" L="399" H="266" c="1" Y="468" T="11" P="0,0,0.05,0.1,20,0,0,0" /><S H="266" L="399" X="4878" c="1" Y="548" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S X="5509" L="399" H="20" c="1" Y="353" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S X="7061" L="300" H="900" c="1" Y="536" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S H="20" L="399" X="5894" c="1" Y="431" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S P="0,0,0.05,0.1,0,0,0,0" L="399" X="7994" c="1" Y="366" T="11" H="266" /><S H="266" L="399" X="6427" c="1" Y="483" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S H="266" L="399" X="6885" c="1" Y="324" T="11" P="0,0,0.05,0.1,-50,0,0,0" /><S H="700" L="39" X="684" c="1" Y="525" T="11" P="0,0,0.05,0.1,0,0,0,0" /><S H="20" L="399" X="1497" c="1" Y="205" T="11" P="0,0,0.05,0.1,-10,0,0,0" /><S P="0,0,0.05,0.1,-20,0,0,0" L="399" H="266" c="1" Y="468" T="11" X="7696" /><S X="7894" L="399" H="266" c="1" Y="362" T="11" P="0,0,0.05,0.1,-30,0,0,0" /></S><D><DS Y="140" X="21" /><P P="0,0" Y="329" T="50" X="217" /><F Y="150" X="7971" /><T Y="158" X="7971" /><P X="7532" Y="514" T="51" P="0,0" /><P X="7795" Y="415" T="51" P="0,0" /><P X="6722" Y="496" T="51" P="0,0" /><P X="5327" Y="485" T="51" P="0,0" /><P X="4509" Y="462" T="51" P="0,0" /><P X="4462" Y="512" T="51" P="0,0" /><P X="4417" Y="536" T="51" P="0,0" /><P X="3032" Y="463" T="51" P="0,0" /><P X="2662" Y="288" T="51" P="0,0" /><P X="2743" Y="355" T="51" P="0,0" /><P X="2591" Y="279" T="51" P="0,0" /><P X="2596" Y="377" T="51" P="0,0" /><P X="2587" Y="471" T="51" P="0,0" /><P X="2532" Y="529" T="51" P="0,0" /><P X="1184" Y="400" T="51" P="0,0" /><P X="616" Y="528" T="51" P="0,0" /><P X="684" Y="176" T="62" P="0,0" /><P X="876" Y="48" T="64" P="0,0" /><P X="1649" Y="172" T="62" P="0,0" /><P X="2618" Y="80" T="62" P="0,0" /><P X="2279" Y="405" T="62" P="0,0" /><P X="3897" Y="231" T="62" P="0,0" /><P X="4360" Y="331" T="62" P="0,0" /><P P="0,0" Y="230" T="57" X="2801" /><P X="4567" Y="285" T="62" P="0,0" /><P X="4537" Y="107" T="62" P="0,0" /><P X="6020" Y="408" T="62" P="0,0" /><P X="6935" Y="86" T="62" P="0,0" /><P X="7719" Y="322" T="62" P="0,0" /><P X="7653" Y="346" T="50" P="0,0" /><P X="6440" Y="356" T="50" P="0,0" /><P X="4911" Y="411" T="50" P="0,0" /><P X="2731" Y="197" T="50" P="0,0" /><P X="1816" Y="255" T="50" P="0,0" /><P X="3461" Y="287" T="54" P="0,0" /><P P="0,0" Y="224" T="52" X="1353" /></D><O><O C="16" Y="358" X="1545" P="0" /><O C="32" Y="292" X="3175" P="0" /><O C="32" Y="292" X="3175" P="0" /><O C="32" Y="292" X="3175" P="0" /><O C="32" Y="382" X="4958" P="0" /><O C="32" Y="382" X="4958" P="0" /><O C="32" Y="297" P="0" X="5677" /></O></Z></C>]])
  29. timer=0
  30. function eventLoop()
  31. timer=timer+0.5
  32. if timer==3 then
  33. timer=0
  34. tfm.exec.addShamanObject(17, 250, 0 , 180, 0, 0)
  35. tfm.exec.addShamanObject(17, 1060, 150 , 180, 0, 0)
  36. tfm.exec.addShamanObject(17, 1670, 110 , 180, 0, 0)
  37. tfm.exec.addShamanObject(17, 2000, 170 , 180, 0, 0)
  38. tfm.exec.addShamanObject(17, 3340, 0 , 180, 0, 0)
  39. tfm.exec.addShamanObject(17, 3815, 140 , 180, 0, 0)
  40. tfm.exec.addShamanObject(17, 3860, 140 , 180, 0, 0)
  41. tfm.exec.addShamanObject(17, 4600, 0 , 180, 0, 0)
  42. tfm.exec.addShamanObject(17, 6200, 260 , 180, 0, 0)
  43. tfm.exec.addShamanObject(17, 6660, 250 , 180, 0, 0)
  44. tfm.exec.addShamanObject(17, 6875, 65 , 180, 0, 0)
  45. end
  46. end
  47.  
  48. --Variaveis
  49. inicial = ("Primeira dica: Os ratinhos logo olham para a janela, e veem a neve caindo devagar.<rose> Vamos brincar na neve!</rose>, gritam os ratinhos. Procure por algo relacionado ao citado, para descobrir uma segunda dica. Quando encontrar o objeto digite <rose>!</rose> e o objeto. Exemplo: <rose>!pão</rose>. Ps: As mensagens não sumirão, e você precisa completar o enigma para passar o mapa.")
  50. boneco = ("boneco")
  51. boneco1 = ("Os pequenos ratinhos ficaram o dia todo brincando, fazendo guerras de bolinha de neve e bonecos de neve. Logo voltaram para casa, cansados e mortos de <font color='#C43751'>fome</font>...")
  52. biscoito = ("biscoito")
  53. biscoito1 = ("Ao chegar em casa, pediram para sua mãe alguns biscoitos para comer, enquanto apreciavam os<font color='#C43751'> enfeites em sua sala</font>")
  54. luzes = ("luzes")
  55. luzes1 = ("Uma grande árvore ao meio da sala, cheia de enfeites e luzes, onde estariamos esperando o papaille noel <font color='#C43751'>trazer</font>...")
  56. --Texto da dica
  57. ui.addTextArea(0,"<ch>"..inicial.."",playerName,200,125,380,180, 0x201F1F, 0x000001, 0.9, true)
  58. ui.addTextArea(1,"<p align='center'><font color='#4AAEE9' size='12'><B><a href='event:cose'>Fechar</a>",player,210,280,360,20, 0x4A4844,0x000001,0.3,true)
  59. function eventTextAreaCallback(textAreaId, player, callback)
  60. if(callback == "cose") then
  61. ui.removeTextArea(0,player)
  62. ui.removeTextArea(1,player)
  63. end
  64. end
  65. function eventChatCommand(p, c)
  66. for index,player in pairs(admin) do
  67. if c:sub(0,4) == "p" then
  68. elseif c:sub(0,1) == "p" then
  69. ui.addTextArea(3,"<B><R>[~Adm] ["..p.."]</B><font color='#000000'>"..c:sub(2).."",p,0,375, 790, 25, 0,0,0,true)
  70. end
  71. end
  72. end
  73. --Comandos
  74. function eventChatCommand(name,command)
  75. function w()
  76. print("<bv> "..name.." <j>achou <vi>!"..command.."")
  77. end
  78. local args={}
  79. for argument in command:gmatch('[^%s]+') do
  80. table.insert(args,argument)
  81. end
  82. args[1] = string.lower(args[1])
  83. if args[1]=="jahdoiwhodiwhiduwhqdioqhdoiiqod" then
  84. if args[2] then
  85. local msg=""
  86. table.remove(args, 1)
  87. for i,v in pairs(args) do
  88. msg=msg.." "..v
  89. end
  90. local l=200+#msg*4
  91. local x = 400-l/2
  92. ui.addPopup(1, 0, "<p align='center'><font size='12' color='#D022D6'>[~"..type.." "..name.."]</font> <font size='12' color='#BABD2F'>"..msg.."</font></p>", nil, x, 200, l, true)
  93. end
  94. w()
  95. elseif args[1]==boneco then
  96. w()
  97. ui.addPopup(1,0,""..boneco1.."",name,1810,160,380,true)
  98. elseif args[1]==biscoito then
  99. w()
  100. ui.addPopup(1,0,""..biscoito1.."",name,1330,160,380,true)
  101. elseif args[1]==luzes then
  102. w()
  103. ui.addPopup(1,0,""..luzes1.."",name,2890,110,380,true)
  104. end
  105. end
  106. for index, command in ipairs({"boneco", "biscoito", "luzes"}) do
  107. system.disableChatCommandDisplay(command,true)
  108. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement