Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- system.disableChatCommandDisplay("lua")
- newData={}
- function eventNewPlayer(name)
- newData[name]={
- linhas=9
- }
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function lua(name)
- codigo1='event_title = <font color="#C4763E">"Turing Mouse"</font>\n<font color="#B163D8">if</font> <font color="#B163D8">not</font> tfm.get.room.playerList[<font color="#C4763E">"'..name..'"</font>].hasCheese <font color="#B163D8">then</font>\ntfm.exec.giveCheese(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">end</font>\ntfm.exec.playerVictory(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">function</font> eventPlayerWon(playerName)\nsystem.giveEventGift(playerName,event_title)\n<font color="#B163D8">end</font>'
- codigo2='event_title = <font color="#C4763E">"Turing Mouse"</font>\n<font color="#B163D8">if</font> tfm.get.room.playerList[<font color="#C4763E">"'..name..'"</font>].hasCheese <font color="#B163D8">then</font>\ntfm.exec.killPlayer(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">else</font>\ntfm.exec.giveCheese(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">end</font>\n<font color="#B163D8">function</font> eventPlayerGetCheese(playerName)\nsystem.giveEventGift(playerName,event_title)\n<font color="#B163D8">end</font>'
- codigo3='event_title = <font color="#C4763E">"Turing Mouse"</font>\n<font color="#B163D8">function</font> eventPlayerVampire(playerName)\ntfm.exec.killPlayer(<font color="#C4763E">"'..name..'"</font>)\ntfm.exe.respawnPlayer(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">end</font>\n<font color="#B163D8">if</font> <font color="#B163D8">not</font> tfm.get.room.playerList[<font color="#C4763E">"'..name..'"</font>].isVampire <font color="#B163D8">then</font>\ntfm.exec.setVampirePlayer(<font color="#C4763E">"'..name..'"</font>)\n<font color="#B163D8">end</font>\n<font color="#B163D8">function</font> eventPlayerRespawn(playerName)\nsystem.giveEventGift(playerName,event_title)\n<font color="#B163D8">end</font>'
- ui.addTextArea(1,"",name,105,45,590,340,0x272834,0x272834,1,true)
- ui.addTextArea(2,"",name,135,50,556,270,0x425B68,0x425B68,1,true)
- ui.addTextArea(3,"",name,136,51,554,268,0x272834,0x272834,1,true)
- ui.addTextArea(4,"<font color='#6C77C0' size='13'>1\n2\n3\n4\n5\n6\n7\n8\n9",name,116,42,0,0,1,1,0,true)
- ui.addTextArea(5,"<font color='#6C77C0' size='13'>10\n11\n12\n13\n14\n15\n16\n17",name,110,185,0,0,1,1,0,true)
- ui.addTextArea(6,"",name,110,364,579,11,0x5D7D90,0x5D7D90,1,true)
- ui.addTextArea(7,"",name,110,366,581,11,0x11171C,0x11171C,1,true)
- ui.addTextArea(8,"",name,110,365,580,11,0x3C5064,0x3C5064,1,true)
- ui.addTextArea(9,"<p align='center'><b><font size='11'><a href='event:fechar'>Fechar ",name,110,361,580,0,0x3C5064,0x3C5064,0,true)
- ui.addTextArea(10,"",name,110,339,579,11,0x5D7D90,0x5D7D90,1,true)
- ui.addTextArea(11,"",name,110,341,581,11,0x11171C,0x11171C,1,true)
- ui.addTextArea(12,"",name,110,340,580,11,0x3C5064,0x3C5064,1,true)
- ui.addTextArea(13,"<p align='center'><b><font size='11'><a href='event:enviar'>Enviar ",name,110,337,580,0,0x3C5064,0x3C5064,0,true)
- ui.addTextArea(14,'<font size="13">'..codigo2,name,131,43,552,266,1,1,0,true)
- ui.addTextArea(15,"<font size='14'><a href='event:menospag'>←</a> "..newData[name].linhas.." Linhas <a href='event:maispag'>→</a>",name,580,300,0,0,1,1,0,true)
- end
- function eventTextAreaCallback(id,playerName,link)
- if link == "fechar" then
- for i = 1,15 do
- ui.removeTextArea(i,playerName)
- end
- newData[playerName].linhas = 9
- end
- if link == "maispag" then
- if newData[playerName].linhas == 9 then
- newData[playerName].linhas = 11
- ui.addTextArea(14,'<font size="13">'..codigo3,playerName,131,43,552,266,1,1,0,true)
- ui.addTextArea(15,"<font size='14'><a href='event:menospag'>←</a> "..newData[playerName].linhas.." Linhas <a href='event:maispag'>→</a>",playerName,580,300,0,0,1,1,0,true)
- end
- if newData[playerName].linhas == 8 then
- newData[playerName].linhas = 9
- ui.addTextArea(14,'<font size="13">'..codigo2,playerName,131,43,552,266,1,1,0,true)
- ui.addTextArea(15,"<font size='14'><a href='event:menospag'>←</a> "..newData[playerName].linhas.." Linhas <a href='event:maispag'>→</a>",playerName,580,300,0,0,1,1,0,true)
- end
- end
- if link == "menospag" then
- if newData[playerName].linhas == 9 then
- newData[playerName].linhas = 8
- ui.addTextArea(14,'<font size="13">'..codigo1,playerName,131,43,552,266,1,1,0,true)
- ui.addTextArea(15,"<font size='14'><a href='event:menospag'>←</a> "..newData[playerName].linhas.." Linhas <a href='event:maispag'>→</a>",playerName,580,300,0,0,1,1,0,true)
- end
- if newData[playerName].linhas == 11 then
- newData[playerName].linhas = 9
- ui.addTextArea(14,'<font size="13">'..codigo2,playerName,131,43,552,266,1,1,0,true)
- ui.addTextArea(15,"<font size='14'><a href='event:menospag'>←</a> "..newData[playerName].linhas.." Linhas <a href='event:maispag'>→</a>",playerName,580,300,0,0,1,1,0,true)
- end
- end
- end
- function eventChatCommand(name,command)
- if command == "lua" then
- lua(name)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement