Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Ser um balão
- -- Créditos:Brenower
- -- Tables
- data={};
- -- Inicio do script
- for i in pairs(tfm.get.room.playerList) do
- nD={
- ["id"]=id;
- ["c"]=fale;
- ["win"]=false;
- };
- data[i] = nD;
- id=tfm.exec.addShamanObject(28,0,0)
- data[i].id = id
- tfm.exec.bindKeyboard(i,32,false,true)
- tfm.exec.bindKeyboard(i,40,false,true)
- end
- -- Eventos do teclado
- function eventKeyboard(player,key,down,x,y)
- if y >= 0 and y <= 400 and x >= 0 and x <= 800 and data[player].win == false then
- if tfm.get.room.playerList[player].isDead then
- tfm.exec.respawnPlayer(player)
- tfm.exec.movePlayer(player,tfm.get.room.objectList[data[player].id].x,tfm.get.room.objectList[data[player].id].y)
- if data[player].c == true then
- tfm.exec.giveCheese(player)
- end
- end
- if not tfm.get.room.playerList[player].isDead then
- id=tfm.exec.addShamanObject(28,x,y,0,0,0,true)
- tfm.exec.removeObject(data[player].id)
- data[player].id = id;
- tfm.exec.killPlayer(player)
- end
- end
- end
- -- Jogador pega o queijo
- function eventPlayerGetCheese(player)
- data[player].c = true;
- end
- -- Jogador entra na toca
- function eventPlayerWon(player)
- data[player].win = true;
- end
Advertisement
Add Comment
Please, Sign In to add comment