![]() |
![]() ![]() « Citoyen » 1417276140000
| 0 | ||
Olá ratos e ratas! Você precisa de algum código para implementar o seu mini-game? Está no lugar certo! Nesse tópico, vocês poderão fazer pedidos de fragmentos de códigos para auxiliá-los na criação dos seus mini-games e outros códigos LUA. Atentem-se a algumas regrinhas para evitar bagunça no tópico:
A postagem de exemplos de script está restrita apenas a códigos que sejam comuns em vários scripts, por exemplo: Adicionando administradores a dit : Lembrem-se de reportar qualquer usuário que descumpra as regras acima e qualquer outra regra da seção modules. Atenciosamente, Equipe de Sentinelas BR. |
![]() ![]() « Citoyen » 1417276680000
| 0 | ||
Arrasou! |
0 | ||
Arrasou sent bom!!! |
![]() 1417277760000
| | ||
[Modéré par Imaginemod] Dernière modification le 1417346340000 |
![]() ![]() « Citoyen » 1417284960000
| 0 | ||
muito obrigado! sent divo. primeira pag. |
![]() ![]() « Citoyen » 1417293780000
| 0 | ||
Vai ajudar muito! Firts page |
![]() ![]() « Citoyen » 1417294680000
| 0 | ||
zzmacth a dit : operop a dit : |
0 | ||
Rotaçao de mapa e alguem vira vamp aleatoriamente |
![]() ![]() « Citoyen » 1417317960000
| 0 | ||
Finalmente criaram esse tópico, era o que estava faltando na seção. |
![]() ![]() « Citoyen » 1417318680000
| 0 | ||
luanpow a dit : --VAMPIRO ALEATÓRIO function setPlayerList () players = {}; for p,_ in pairs (tfm.get.room.playerList) do table.insert(players, p); end return players; end function shuffle (t) local n = #t; while (n >= 2) do local k = math.random(n); t[n], t[k] = t[k], t[n]; n = n - 1; end return t; end shuffle(setPlayerList()); tfm.exec.setVampirePlayer(players[math.random(#players)]); --ROTAÇÃO DE MAPAS maps = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; mapCount = 0; function eventLoop (timePassed, timeLeft) if (timeLeft <= 0) then mapCount = mapCount + 1; if (mapCount > #maps) then mapCount = 0; end tfm.exec.newGame(maps[mapCount]); end end tfm.exec.disableAutoNewGame(true); tfm.exec.newGame(maps[mapCount]); Ta aí! ;) Dernière modification le 1417319340000 |
![]() ![]() « Citoyen » 1417340880000
| 0 | ||
Ruffles PR0. |
0 | ||
òtimo,como pedido, aqui estão os scripts do outro topico Voar utilizando tecla de espaço function eventNewPlayer(k) tfm.exec.bindKeyboard(k,32,true,true) end function eventKeyboard(k,key,down,posX,posY) if (key == 32) then tfm.exec.movePlayer(k,0,0,false,0,-50,false) end end for k,v in pairs(tfm.get.room.playerList) do tfm.exec.bindKeyboard(k,32,true,true) end Jogador morrer e virar vampiro function eventPlayerDied(k) if not tfm.get.room.playerList[k].isVampire then tfm.exec.respawnPlayer(k) tfm.exec.setVampirePlayer(k) end end Teleportar com clique de mouse function eventNewPlayer(k) system.bindMouse(k,true) end function eventMouse(k,posX,posY) tfm.exec.displayParticle(37,tfm.get.room.playerList[k].x,tfm.get.room.playerList[k].y,0,0,0,0) tfm.exec.movePlayer(k,posX,posY,false,0,0,false) tfm.exec.displayParticle(36,posX,posY,0,0,0,0) end for k,v in pairs(tfm.get.room.playerList) do system.bindMouse(k,true) end Pegar nome de jogador com clique do mouse function eventNewPlayer(k) system.bindMouse(k,true) end function eventMouse(k,posX,posY) for k,v in pairs(tfm.get.room.playerList) do if (v.x < posX+20 and v.x > posX-20 and v.y > posY-20 and v.y < posY+20) then print('Jogador: '..k) end end end for k,v in pairs(tfm.get.room.playerList) do system.bindMouse(k,true) end Cores aleatórias no nick function eventLoop() for k,v in pairs(tfm.get.room.playerList) do tfm.exec.setNameColor(k,'0x'..math.random(0x000000,0xFFFFFF)) end end Ao jogador beijar,varios corações aparecerem function eventEmotePlayed(k,id) if (id == 3) then for loop = 10,0,-1 do tfm.exec.displayParticle(5,tfm.get.room.playerList[k].x,tfm.get.room.playerList[k].y,math.random(-1,1),math.random(-1,1),math.random(-0.21,0.21),math.random(-0.21,0.21)) end end end Menu com textAreas function eventTextAreaCallback(id, player,callback) if (callback == 'fechar') then for k = 3,0,-1 do ui.removeTextArea(k,player) end end end function sendUi(title, text, player, x, y, width, height) ui.addTextArea(0, string.format("<font size='14' face='Verdana' color='#009D9D'><b>%s</font>",title), player, x+width/2, y-28, width+4, height, 0x27373f, 0x27373f, 1, true); ui.addTextArea(1, text, player, x+width/2+2, y, width, height-30, 0x324650, 0x324650, 1, true); ui.addTextArea(2, '', player, width+171, y-26, 15, 15, 0x009D9D, 0x009D9D, 1, true); ui.addTextArea(3, "<font color = '#324650' size='15'><B><a href='event:fechar'>X</a>", player, width+171, y-30, 15, nil, 0, 0, 1, true); end como usar: sendUi('<p align="center">Exemplo','Isto é um exemplo', nil, 0, 100, 370, 170, true) Fogos de artificio function eventLoop() x = math.random(0,800) y = math.random(0,400) r = 50 ids = {13,0,4,2,11,9,8} id = ids[math.random(#ids)] for i = 1, 360 do local angle = i * math.pi / 180 local ptx, pty = x + r * math.cos( angle ), y + r * math.sin( angle ) tfm.exec.displayParticle(id,ptx,pty,math.cos(angle),math.sin(angle),math.cos(angle),math.sin(angle)) end end |
![]() ![]() « Citoyen » 1417350180000
| 0 | ||
Eu queria um script como se fosse uma loja , Que você comprasse Algo como ( Queijo , Virar Vamp ) Com os pontos que acumulou. |
![]() ![]() « Citoyen » 1417351080000
| 0 | ||
Queria um script de morrer e vira esqueleto :) |
0 | ||
Ruffles me da um código que faça printar oi |
0 | ||
pylack a dit : Não têm como fazer isso na api lua. |
![]() ![]() « Censeur » 1417354020000
| 0 | ||
Partícula de chuva? |
0 | ||
apadrinhada a dit : function eventLoop() for k = 20,0,-1 do tfm.exec.displayParticle(14,math.random(0,800),math.random(50),0,math.random(1.1),0,math.random(0.22)) end end Têm esse aqui |
0 | ||
Um script tipo o !draw do utility? |
0 | ||
Rufflesdqjo a dit : vlw! |