×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Hilos pasados
  • /
  • ¡Comparte tus códigos /lua!
« ‹ 18 / 19 › »
¡Comparte tus códigos /lua!
Sufurs
« Citoyen »
1426339200000
    • Sufurs#0000
    • Profil
    • Derniers messages
#341
  0
y como se cargan los codicos??
solo poniendolos en el chat o hay que poner algo antes?
-----------------------------------------------
#pole
-----------------------------------------------
aaaaaaaaaaah ya entendi, primero hay que poner /lua

Dernière modification le 1426339440000
Magurv
« Citoyen »
1426356540000
    • Magurv#0000
    • Profil
    • Derniers messages
#342
  0
Sufurs a dit :
y como se cargan los codicos??
solo poniendolos en el chat o hay que poner algo antes?
-----------------------------------------------
#pole
-----------------------------------------------
aaaaaaaaaaah ya entendi, primero hay que poner /lua

Lol

Debes poner /lua y en el cuadro poner el código, le das enviar y ya xD
Tocutoeltuco
« Censeur »
1426955160000
    • Tocutoeltuco#0000
    • Profil
    • Derniers messages
#343
  0
Estaba aburrido, y como soy tan noob, hice un lector de cuantas veces alguien ha sido chamán, solo lo pone cuando es chamán el usuario.
Le agregué un "efecto" de que cuando es un mapa doble chamán ponga el chamán rosado en rosa y el chamán celeste en celeste
raton = {}
chamanes = 0

function eventNewPlayer(n)
if not raton[n] then
raton[n] = {
chaman = 0
}
end
end

for name in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function isShaman(name)
if tfm.get.room.playerList[name].isShaman==true then
chamanes = chamanes + 1
raton[name].chaman = raton[name].chaman + 1
if chamanes==1 then
print("<CH>El chamán actual ("..name..") ha sido chamán "..raton[name].chaman.." veces.")
end
if chamanes==2 then
print("<rose>El chamán actual ("..name..") ha sido chamán "..raton[name].chaman.." veces.")
end
end
end

function eventNewGame()
chamanes = 0
for name in pairs(tfm.get.room.playerList) do
isShaman(name)
end
end
Santyagoj
1434180660000
    • Santyagoj#0000
    • Profil
    • Derniers messages
    • Tribu
#344
[Modéré par Yunowears, raison : Spam]
Luciadoseas
« Censeur »
1437856800000
    • Luciadoseas#0000
    • Profil
    • Derniers messages
#345
  0
Pues Bien este lo hice hace, bastante a base de varios scripts :v

Consiste en una guerra de bolas de nieve, el ultimo en pie gana aunque hay "2" con colores que se supone serian los mejores (no es cierto), tiene meep, cae nieve de fondo y los mapas los diseñe yo, por cierto tiene cada uno de sus bugs arreglados cualquier cosa me dicen si no les anda (es practicamente un minijuego)

local settings = {
map = "@5994868",
ammo = 10,
force = 100,
recoil = 10,
maxObjects = 30,
ammoTicks = 3,
}

local players = {}
local objects = {}

function main()
objects = queue.new()
tfm.exec.disableAutoScore(false)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.newGame(settings.map)
end

function eventNewGame()
tfm.exec.setGameTime(0, true)
players = {}
for name in pairs(tfm.get.room.playerList) do
initPlayer(name)
end
end

function initPlayer(name)
players[name] = {ammo = 0}
ui.addTextArea(0, "", name, 10, 30, settings.ammo * 15, 20, 0x010101, 0x000000, 0.5)
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
local player = players[name]
if player and player.ammo > 0 then
-- remove one ammo
ui.removeTextArea(player.ammo * 2 - 1, name)
ui.removeTextArea(player.ammo * 2, name)
player.ammo = player.ammo - 1

local roomPlayer = tfm.get.room.playerList[name]

-- calculate angle between player and click
local dx = x - roomPlayer.x
local dy = y - roomPlayer.y
local angle = math.atan2(dy, dx)

-- calculate speeds to direct arrow and always have the same total speed
local vx = math.cos(angle)
local vy = math.sin(angle)

-- spawn arrow and add to queue
queue.insert(objects, tfm.exec.addShamanObject(34, roomPlayer.x + 20 * vx, roomPlayer.y + 20 * vy, angle*180/math.pi, settings.force * vx, settings.force * vy, false))

local recoil = -vx * settings.recoil
-- workaround to avoid argument exception bug
if recoil <= -1 or recoil >= 1 then
tfm.exec.movePlayer(name, 0, 0, true, recoil, 0, true)
end

-- remove first arrow when there are too many
if objects.size > settings.maxObjects then
tfm.exec.removeObject(queue.remove(objects))
end
end
end

local loopCount = 0
function eventLoop()
-- loopCount resets after a certain amount
if loopCount == 0 then
ammo()
end
loopCount = (loopCount + 1) % settings.ammoTicks
end

function ammo()
for name, player in pairs(players) do
local ammo = player.ammo
if ammo < settings.ammo then
-- add one ammo
player.ammo = ammo + 1
ui.addTextArea(ammo * 2 + 1, "", name, 14 + ammo * 15, 39, 3, 3, 0x990000, 0x990000, 1)
ui.addTextArea(ammo * 2 + 2, "", name, 15 + ammo * 15, 40, 1, 1, 0xff0000, 0xcc0000, 1)
end
end
end

-- simple queue for performance, much faster than system table queues, can contain nils
queue = {}
function queue.new()
return {
tail = nil,
head = nil,
size = 0
}
end
function queue.insert(self, v)
local i = {
value = v,
next = nil
}
if self.tail and self.head then
self.tail.next = i
else
self.head = i
end
self.tail = i
self.size = self.size + 1
end
function queue.peek(self)
if self.head then
return self.head.value
else
error("queue is empty")
end
end
function queue.remove(self)
local r = queue.peek(self)
self.head = self.head.next
if not self.head then
tail = nil
end
self.size = self.size - 1
return r
end

main()
tfm.exec.snow()
for name,player in pairs(tfm.get.room.playerList) do
tfm.exec.giveMeep(name)
end

Red={}
Blue={}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(Blue,name)
end

for name,player in pairs(tfm.get.room.playerList) do
table.insert(Red,name)
end

tfm.exec.setNameColor(Red[math.random(#Red)], 0xFF0000)
tfm.exec.setNameColor(Blue[math.random(#Blue)], 0x0000FF)

function eventPlayerDied(name)
local i=0
local n
for pname,player in pairs(tfm.get.room.playerList) do
if not player.isDead then
i=i+1
n=pname
end
end
if i==0 then
tfm.exec.newGame(maps[math.random(#maps)])
elseif i==1 then
tfm.exec.giveCheese(n)
tfm.exec.playerVictory(n)
tfm.exec.setGameTime(5)
end
end


Mapa Secundario: @5994933


Además De Este hice otros scripts
Este Por ej
Consiste en pasarse los mapas normales (sin chaman) pero cada raton tiene el poder de invocar una chispa con el boton ↓ o S

tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
players={}
toDespawn={}
maps={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50}

function eventNewPlayer(name)
for i,key in ipairs({32,40,83}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
players[name]={
timestamp=os.time(),
offsets={x=2, y=10}
}
end

function eventKeyboard(name,key,down,x,y)
if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started then
if players[name].timestamp < os.time()-1000 then
local id=tfm.exec.addShamanObject(24, x+(tfm.get.room.playerList[name].isFacingRight and players[name].offsets.x or -players[name].offsets.x), y+players[name].offsets.y, tfm.get.room.playerList[name].isFacingRight and 90 or 270)
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
end
end

function eventChatCommand(name,command)
local arg={}
for argument in command:gmatch("[^%s]+") do
table.insert(arg,argument)
end
if arg[1]=="off" then
if tonumber(arg[2]) and tonumber(arg[3]) then
players[name].offsets.x=tonumber(arg[2])
players[name].offsets.y=tonumber(arg[3])
else
players[name].offsets.x=2
players[name].offsets.y=10
end
tfm.exec.chatMessage("Offsets changed to X:"..players[name].offsets.x.." Y:"..players[name].offsets.y,name)
end
end

function eventNewGame()
started=false
end

function eventLoop(time,remaining)
if time >= 3000 and not started then
started=true
end
if remaining<=0 then
tfm.exec.newGame(maps[math.random(#maps)])
end
for i,cannon in ipairs(toDespawn) do
if cannon[1] <= os.time()-3000 then
tfm.exec.removeObject(cannon[2])
table.remove(toDespawn,i)
end
end
end


for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

tfm.exec.newGame(maps[math.random(#maps)])





y por último un codigo basado en el de "Que no te toque" De Agustiiiina y Quesoyquesos

local admins = {"luciadoseas"}
local banlist = {}
local objects = {61, 1, 3, 10};


local maps = {"@4068382"}

function main()
tfm.exec.disableAutoNewGame (true)
tfm.exec.disableAutoTimeLeft (true)
startNewGame();
end

function startNewGame()
tfm.exec.disableAutoShaman(true)
tfm.exec.newGame (maps[math.random(#maps)]);
tfm.exec.setGameTime (60);
tfm.exec.setUIMapName("<CH>Caida de objetos - @0<>")
end

function eventLoop (a, timeLeft)
if timeLeft <= 0 then
startNewGame();
end
end

function eventPlayerDied (playerName)
local playersAlive = 0;
local winner;

for player in pairs(tfm.get.room.playerList) do
if not tfm.get.room.playerList[player].isDead then
playersAlive = playersAlive + 1;
winner = player;
end
end

if (playersAlive ==0) then
startNewGame();
end
end

main();

function isBanned (playerName)
for _,bannedName in pairs(banlist) do
if playerName == bannedName then return true end
end
return false
end

function isAdmin (playerName)
for _,adminName in pairs(admins) do
if playerName == adminName then return true end
end
return false
end

function eventChatCommand (playerName, command)
if isBanned(playerName) then return end

args = {}
for arg in command:gmatch ("[^%s]+") do
table.insert (args, arg)
end

if args[1] == "ban" and tfm.get.room.playerList[args[2]] then
if isAdmin (playerName) then
if isBanned(args[2]) then
ui.addPopup (0, 0, "Error: "..args[2].." ya está banead@.", playerName, 350, 200, 100)
elseif isAdmin(args[2]) then
ui.addPopup (0, 0, "Error: "..args[2].." es un admin.", playerName, 350, 200, 100)
else
table.insert (banlist, args[2])
tfm.exec.killPlayer(args[2]);
ui.addPopup (0, 0, "¡Has sido banead@! ", args[2], 350, 200, 100)
ui.addPopup (1, 0, "¡"..args[2].." ha sido banead@!", playerName, 350, 200, 100)
end
else
ui.addPopup (0, 0, "Error: solo los admins pueden usar este comando", playerName, 350, 200, 100)
end
elseif args[1] == "desban" and tfm.get.room.playerList[args[2]] then
if isAdmin (playerName) then
if not isBanned(args[2]) then
ui.addPopup (0, 0, "Error: "..args[2].." no está baneado.", playerName, 350, 200, 100)
else
for i,bannedName in pairs(banlist) do
if args[2] == bannedName then
table.remove (banlist, i)
break
end
end
ui.addPopup (0, 0, "¡Has sido desbaneado!", args[2], 350, 200, 100)
ui.addPopup (1, 0, "¡"..args[2].." ha sido desbaneado! :):)", playerName, 350, 200, 100)
end
else
ui.addPopup (0, 0, "Solo los administradores pueden usar este comando", playerName, 350, 200, 100)
end

elseif command == "help" then
ui.addPopup (0,0,"Random objects are falling from the sky! Look out!", playerName, 200, 100, 400)

elseif command=="mensaje" then
ui.addPopup(999,2,"<p align='center'>Escribe tu mensaje en el siguiente cuadro</p>",playerName,300,200,200);
end
end
function eventNewGame (playerName)
for _,playerName in pairs(banlist) do
tfm.exec.killPlayer(playerName);
end
end

function eventNewPlayer (playerName)
if isBanned(playerName) then
tfm.exec.killPlayer(playerName);
end
end

function eventPlayerRespawn (playerName)
if isBanned(playerName) then
tfm.exec.killPlayer(playerName);
end
end


function eventPopupAnswer(Id,Name,answer)
if Id==999 then
ui.addPopup(0,0,"<font color='#ED67EA'><b>[Moderacion]</b></font> "..answer.."",p,300,200,150)
end
end
function eventLoop (a,b)
for i=1,math.random(1,3) do
tfm.exec.addShamanObject (objects[math.random(#objects)],
math.random(800), math.random(-400,-100),
math.random(360));
end
end

function eventPlayerDied(name)
local i=0
local n
for pname,player in pairs(tfm.get.room.playerList) do
if not player.isDead then
i=i+1
n=pname
end
end
if i==0 then
tfm.exec.newGame(maps[math.random(#maps)])
elseif i==1 then
tfm.exec.giveCheese(n)
tfm.exec.playerVictory(n)
tfm.exec.setGameTime(5)
end
end


Mapas Alternativos: (Es Una Recopilación Ya que hay algo parecido a esto hecho por shamousey para el bafflua) @4068382, @4084024, @4059785, @4027367


y estoy tratando de hacer otro más si les interesa susurrenmen

Dernière modification le 1437857460000
Fointdemg
« Citoyen »
1438888620000
    • Fointdemg#0000
    • Profil
    • Derniers messages
#346
  0
Hay codigo para poner Deatmatch?
Keltcon
« Citoyen »
1438890060000
    • Keltcon#0000
    • Profil
    • Derniers messages
    • Tribu
#347
  0
fointdemg a dit :
Hay codigo para poner Deatmatch?

/module #deathmatch
Luciadoseas
« Censeur »
1438893420000
    • Luciadoseas#0000
    • Profil
    • Derniers messages
#348
  0
a dit :
Hay codigo para poner Deatmatch?

Acá tenes el código para deathmatch este no es mio (por cierto no tenes nada de lo que son los menús)
por otra parte tu pregunta va en la sección "Pedidos De Scripts" y No Acá

tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
players={}
toDespawn={}
maps={521833,401421,541917,541928,541936,541943,527935,559634,559644,888052,878047,885641,770600,770656,772172,891472,589736,589800,589708,900012,901062,754380,901337,901411,907870,910078,1190467,1252043,1124380,1016258,1252299,1255902,1256808,986790,1285380,1271249,1255944,1255983,1085344,1273114,1276664,1279258,1286824,1280135,1280342,1284861,1287556,1057753,1196679,1288489,1292983,1298164,1298521,1293189,1296949,1308378,1311136,1314419,1314982,1318248,1312411,1312589,1312845,1312933,1313969,1338762,1339474,1349878,1297154,644588,1351237,1354040,1354375,1362386,1283234,1370578,1306592,1360889,1362753,1408124,1407949,1407849,1343986,1408028,1441370,1443416,1389255,1427349,1450527,1424739,869836,1459902,1392993,1426457,1542824,1533474,1561467,1563534,1566991,1587241,1416119,1596270,1601580,1525751,1582146,1558167,1420943,1466487,1642575,1648013,1646094,1393097,1643446,1545219,1583484,1613092,1627981,1633374,1633277,1633251,1585138,1624034,1616785,1625916,1667582,1666996,1675013,1675316,1531316,1665413,1681719,1699880,1688696,623770,1727243,1531329,1683915,1689533,1738601,3756146,912118,3326933,3722005,3566478,1456622,1357994,1985670,1884075,1708065,1700322,2124484,3699046,2965313,4057963,4019126,3335202,2050466}

function eventNewPlayer(name)
for i,key in ipairs({32,40,83}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
players[name]={
timestamp=os.time(),
offsets={x=2, y=10}
}
end

function eventKeyboard(name,key,down,x,y)
if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started then
if players[name].timestamp < os.time()-1000 then
local id=tfm.exec.addShamanObject(17, x+(tfm.get.room.playerList[name].isFacingRight and players[name].offsets.x or -players[name].offsets.x), y+players[name].offsets.y, tfm.get.room.playerList[name].isFacingRight and 90 or 270)
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
end
end

function eventChatCommand(name,command)
local arg={}
for argument in command:gmatch("[^%s]+") do
table.insert(arg,argument)
end
if arg[1]=="off" then
if tonumber(arg[2]) and tonumber(arg[3]) then
players[name].offsets.x=tonumber(arg[2])
players[name].offsets.y=tonumber(arg[3])
else
players[name].offsets.x=2
players[name].offsets.y=10
end
tfm.exec.chatMessage("Offsets changed to X:"..players[name].offsets.x.." Y:"..players[name].offsets.y,name)
end
end

function eventNewGame()
started=false
end

function eventLoop(time,remaining)
if time >= 3000 and not started then
started=true
end
if remaining<=0 then
tfm.exec.newGame(maps[math.random(#maps)])
end
for i,cannon in ipairs(toDespawn) do
if cannon[1] <= os.time()-3000 then
tfm.exec.removeObject(cannon[2])
table.remove(toDespawn,i)
end
end
end

function eventPlayerDied(name)
local i=0
local n
for pname,player in pairs(tfm.get.room.playerList) do
if not player.isDead then
i=i+1
n=pname
end
end
if i==0 then
tfm.exec.newGame(maps[math.random(#maps)])
elseif i==1 then
tfm.exec.giveCheese(n)
tfm.exec.playerVictory(n)
tfm.exec.setGameTime(5)
end
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

tfm.exec.newGame(maps[math.random(#maps)])
Keltines
« Citoyen »
1442731560000
    • Keltines#0000
    • Profil
    • Derniers messages
    • Tribu
#349
  0
Hice un pequeño detector de emociones. Al hacer una acción se cambiará el texto de la barra superior del mapa diciendo la acción que has usado ¡Que lo disfruten! :3

http://pastebin.com/SeFYxDDv

-Keltines-

Eliaseeg
« Citoyen »
1446243360000
    • Eliaseeg#0000
    • Profil
    • Derniers messages
#350
  0
GUI changer

Básicamente este es más un utilitario ya que tiene las bases para que otra persona puede hacer lo que desee con 2 variables. Es una forma eficiente y cómoda de cambiar los colores de la interfaz que vayas a usar en tu minijuego (las personas podrán escoger su propio color!!)
Tocutoeltuco
« Censeur »
1446249780000
    • Tocutoeltuco#0000
    • Profil
    • Derniers messages
#351
  0
invisible("Tocutoeltuco") <- cambia Tocutoeltuco por tu nombre de usuario.

Click
Keltines
« Citoyen »
1446520440000
    • Keltines#0000
    • Profil
    • Derniers messages
    • Tribu
#352
  0
Basado en ese scrip de "disco".

¡Todos hacen emociones locas!
Al ponerlo en /lua todos los ratones harán emociones aleatorias continuamente.
Papelio
« Consul »
1446569220000
    • Papelio#0000
    • Profil
    • Derniers messages
    • Tribu
#353
  0
Alguien puede pasar un Lua del evento de Halloween de los vampiros voladores( del años pasado) y que funcione, molaria :D
Keltines
« Citoyen »
1447545780000
    • Keltines#0000
    • Profil
    • Derniers messages
    • Tribu
#354
  0
Script de Argentina.

Clic aquí
Circuit88
« Citoyen »
1448756640000
    • Circuit88#0000
    • Profil
    • Derniers messages
    • Tribu
#355
  0
hay un script para que: todos sean vampiros, el que toque un suelo muere, todos vuelen y la rotacion de mapas UNIDOS
Electra
« Citoyen »
1448921100000
    • Electra#2694
    • Profil
    • Derniers messages
    • Tribu
#356
  0
circuit88 a dit :
hay un script para que: todos sean vampiros, el que toque un suelo muere, todos vuelen y la rotacion de mapas UNIDOS

Para que todos sean vampiros si, el que toque el suelo muere creo que no, y que todos vuelen si y la rotación de mapas unidos también. Pero deberías crear los mapas tu, si tienes al menos 2 mapas pasame sus codigos y puedo hacer el script con todo, pero no puedo hacer que los ratones al tocar el suelo mueran. Si quieres que lo haga mándame un mensaje con los códigos de los mapas.

Dernière modification le 1450749360000
Haku
« Sénateur »
1448993160000
    • Haku#0807
    • Profil
    • Derniers messages
#357
  0
Y bueno, un ejemplo más simple de colorPicker:
http://pastebin.com/BWuSXX2P
Worthless
« Citoyen »
1452837300000
    • Worthless#6172
    • Profil
    • Derniers messages
    • Tribu
#358
  0
NO ENTIENDO NADA :(
Jow
« Consul »
1453410120000
    • Jow#4884
    • Profil
    • Derniers messages
#359
  0
Me gusta mucho scripts.
Comandoflaz
« Citoyen »
1455803100000
    • Comandoflaz#0000
    • Profil
    • Derniers messages
    • Tribu
#360
  0
alguien me pasaria el del perro dobge? porfavor
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Hilos pasados
  • /
  • ¡Comparte tus códigos /lua!
« ‹ 18 / 19 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27