Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Disable ]]--
- for _, v in next, {'AutoShaman', 'AutoNewGame', 'AutoTimeLeft', 'PhysicalConsumables', 'AfkDeath', 'AutoScore'} do
- tfm.exec['disable' .. v]()
- end
- tfm.exec.chatMessage = print
- --[[ Something ]]--
- newData = {}
- tempo = os.time()
- maps = {7472840,7472843,7472870,7472872,7472873,7472895}
- p = {}
- vivo = 0
- deleteObjects = {}
- --[[ bootoons ]]--
- ui.addTextArea(201, "<p align='center'><a href='event:profile'><B>P</B></a></p>", name, 9, 27, 29, 19, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(202, "<p align='center'><a href='event:shop'><B>S</B></a></p>", name, 51, 27, 29, 19, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(203, "<p align='center'><a href='event:help'><B>H</B></a></p>", name, 94, 27, 29, 19, 0x313a4a, 0x313a4a, 1, true)
- --[[ Translation ]]--
- translations = {
- br = {
- msg_welcome = "<VP>[•] Bem-vindo ao FullBall, sua missão aqui é encher a sala com bolas para que você seja o primeiro a chegar ao queijo. Você pode?",
- msg_upLevel = "Uau, você subiu um nível!",
- msg_beachball = "Praia",
- msg_pokeball = "PokeBola",
- msg_skullball = "crânio",
- msg_soon = "Em breve!!",
- msg_noCoins = "Você não tem moedas suficientes :(",
- msg_buyed = "Obrigado! Você está com um novo equipamento.",
- msg_playerWon = " Parabéns! Você adquiriu +10 XP e +5 moedas",
- msg_help = "<ROSE>Encha a sala com o máximo de bolas que você puder.\n• Level 0-20 Bola de praia\n• Level 21-30 Pokeball\n• Level +30 Bola de crânio",
- },
- en = {
- msg_welcome = "<VP>[•] Welcome to FullBall, your mission here is to fill the room with balls so that you can be the first to arrive at the cheese. You can?",
- msg_upLevel = "Wow, you went up one level!",
- msg_beachball = "Beach Ball",
- msg_pokeball = "Pokeball",
- msg_skullball = "Skullball",
- msg_soon = "COMING SOON",
- msg_noCoins = "You don't have enough coins :(",
- msg_buyed = "Thanks! You've the new booster.",
- msg_playerWon = "Hey! You have acquired +10 XP and +5 coins",
- msg_help = "<ROSE>Fill the room with as many balls as you can.\n• Level 0-20 Beach Ball\n• Level 21-30 Pokeball\n• Level +30 Skull Ball",
- }
- }
- --[[ Script data ]]--
- function eventNewPlayer(name)
- newData[name] = {
- Xp = 0,
- Team = "",
- XpLevel = 0,
- Level = 0,
- Life = 3,
- lang = "",
- ballLevel = 6,
- Coins = 50,
- ballName = "",
- tempo = os.time()
- }
- ui.setMapName("FullBall")
- newData[name].lang = translations[tfm.get.room.playerList[name].community] and tfm.get.room.playerList[name].community or 'en'
- --[[ new round ]]--
- function novaRodada()
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- --[[ envent die]]--
- function eventPlayerDied(name)
- vivo = vivo -1
- end
- --[[ event Loop ]]--
- function eventLoop(currentTime,timeRemaining)
- for _,obj in ipairs(deleteObjects) do
- if obj.time < os.time()-15000 then
- tfm.exec.removeObject(obj.id)
- table.remove(deleteObjects,_)
- end
- end
- if vivo == 0 or timeRemaining <= 0 then -- Verifica se A Variavel vivo Chegou a 0 Ou Se o Tempo Restante Do Mapa Chegou a 0
- novaRodada();
- end
- end
- --[[ new game ]]--
- function eventNewGame()
- vivo=0; -- A Variavel vivo Reseta
- for p in pairs(tfm.get.room.playerList) do -- Pra Todos Os Jogadores Da Sala
- vivo=vivo+1; -- Soma Da Variavel vivo
- end
- MoreLevel(name)
- tfm.exec.setGameTime(210)
- end
- --[[ new player ]]--
- function eventNewPlayer(name) -- The event happens when a player enters the room
- tfm.exec.chatMessage(""..translations[newData[name].lang].msg_welcome.."",name)
- end
- --[[ Play Won ]]--
- function eventPlayerWon(name) -- The event happens when a player enters the hole.
- newData[name].Xp = newData[name].Xp + 10
- newData[name].Coins = newData[name].Coins + 5
- MoreLevel(name)
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_playerWon.."",name)
- end
- --[[ Play LEVEL more one]]--
- function MoreLevel(name)
- if newData[name].Xp == 100 then
- newData[name].Xp = 0
- newData[name].Level = newData[name].Level + 1
- tfm.exec.chatMessage(""..translations[newData[name].lang].msg_upLevel.."",name)
- end
- end
- --[[ ball ]]--
- 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 os.time()-10000 then
- if key == 0 or key == 2 then
- facingLeft[name] = key == 0
- elseif key == 32 then
- if facingLeft[name] then
- obj_id = tfm.exec.addShamanObject(newData[name].ballLevel, x - 8, y - 5, 0, 20)
- else
- obj_id = tfm.exec.addShamanObject(newData[name].ballLevel, x + 8, y - 5, 0, 20)
- end
- table.insert(deleteObjects,{id=obj_id,time=os.time()})
- end
- end
- end
- --[[ TXT AREA ]]--
- function eventTextAreaCallback(t,p,link)
- if link == [[profile]] then
- ui.addTextArea(10, "", p, 266, 116, 267, 168, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(11, "<font size='20'><b>XP</font>", p, 266, 117, 79, 26, 0x324650, 0x000000, 0, true)
- ui.addTextArea(12, "<font size='14'><b>"..newData[p].Xp.."/100<font>", p, 268, 148, 86, 24, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(13, "<font size='20'><b>Level</font>", p, 364, 117, 79, 26, 0x324650, 0x000000, 0, true)
- ui.addTextArea(14, "<font size='14'><b>"..newData[p].Level.."<font>", p, 367, 148, 86, 24, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(15, "<font size='20'><b>Ball</font>", p, 269, 185, 79, 26, 0x324650, 0x000000, 0, true)
- ui.addTextArea(16, "<font size='14'><b>"..newData[p].ballName.."<font>", p, 268, 216, 86, 24, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(17, "<font size='15'><a href='event:closeprofile'><b><R>X</R></a>", p, 512, 117, 21, 27, 0x324650, 0x000000, 0, true)
- elseif link == [[closeprofile]] then
- for i = 10,17 do --
- ui.removeTextArea(i,p)
- end
- elseif link == [[shop]] then
- ui.addTextArea(50, "<font size='20'></font>", p, 244, 113, 311, 173, 0x313a4a, 0x313a4a, 1, true)
- ui.addTextArea(51, "<font size='15'><a href='event:closeshop'><b><R>X</R></a>", p, 532, 115, 21, 27, 0x324650, 0x000000, 0, true)
- ui.addTextArea(52, "<font size='20'><p align='center'>Boxes</p></font>\n<p align='center'><B>steampunk</p>\n", p, 257, 136, 77, 84, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(53, "<a href='event:buy1'><B>50 Coins</a>", p, 257, 233, 77, 16, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(54, "<font size='18'><p align='center'>Chicken</p><font>", p, 349, 136, 77, 84, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(55, "<a href='event:buy2'><B>75 Coins</a>", p, 349, 233, 77, 16, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(56, "<font size='20'><p align='center'>Bomb</p><font>", p, 442, 136, 77, 84, 0x314a4a, 0x313a4a, 1, true)
- ui.addTextArea(57, "<a href='event:buy3'><B>100 Coins</a>", p, 442, 233, 77, 16, 0x314a4a, 0x313a4a, 1, true)
- elseif link == [[closeshop]] then
- for i = 50,57 do --
- ui.removeTextArea(i,p)
- end
- elseif link == [[buy1]] then
- if newData[name].Coins >= 50 then
- newData[name].Coins = newData[name].Coins - 50
- newData[name].ballLevel = 202
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_buyed.."",p)
- else
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_noCoins.."",p)
- end
- elseif link == [[buy2]] then
- if newData[name].Coins >= 75 then
- newData[name].Coins = newData[name].Coins - 75
- newData[name].ballLevel = 33
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_buyed.."",p)
- else
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_noCoins.."",p)
- end
- elseif link == [[buy3]] then
- if newData[name].Coins >= 100 then
- newData[name].Coins = newData[name].Coins - 100
- newData[name].ballLevel = 3
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_buyed.."",p)
- else
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_noCoins.."",p)
- end
- elseif link == [[help]] then
- tfm.exec.chatMessage(""..translations[newData[p].lang].msg_help.."",p)
- end
- end
- end -- end eventnewplayer
- table.foreach(tfm.get.room.playerList,eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement