×

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
  • /
  • Modules
  • /
  • Códigos útiles de LUA.
« ‹ 4 / 4
Códigos útiles de LUA.
Midoriya
« Citoyen »
1568257380000
    • Midoriya#2232
    • Profil
    • Derniers messages
#61
  1
quien me da codigos porfa
Mabel
« Citoyen »
1586354520000
    • Mabel#4194
    • Profil
    • Derniers messages
    • Tribu
#62
  0
Cual es el Comando del sorteos :V
Hector
« Citoyen »
1589795520000
    • Hector#1014
    • Profil
    • Derniers messages
    • Tribu
#63
  0
Quien me puede decir el LUA para los sorteos que se me quito al cambiarme de tribu
Goyeta
« Citoyen »
1590712200000
    • Goyeta#3887
    • Profil
    • Derniers messages
#64
  0
Mabel a dit :
Cual es el Comando del sorteos :V

lo encontraste?
Factral
« Citoyen »
1609008000000
    • Factral#0000
    • Profil
    • Derniers messages
    • Tribu
#65
  3
dejo aqui un pequeño script en el que he re-hecho dodge un minijuego hecho en lua :3

link: https://pastebin.com/raw/X0EXywLv

para copiar dale Ctrl + a
Jefazo
« Citoyen »
1635219240000
    • Jefazo#7616
    • Profil
    • Derniers messages
#66
  0
Hola, disculpen, no hay algo para hacer a los ratones transparentes? Me estorban un poco al momento de jugar
Shalon
« Consul »
1635369060000
    • Shalon#0839
    • Profil
    • Derniers messages
#67
  1
Hola disculpen cuáles comandos.
Shalon
« Consul »
1635369060000
    • Shalon#0839
    • Profil
    • Derniers messages
#68
  1
???????
Blalolko
« Citoyen »
1637904000000
    • Blalolko#8166
    • Profil
    • Derniers messages
    • Tribu
#69
  0
Jefazo a dit :
Hola, disculpen, no hay algo para hacer a los ratones transparentes? Me estorban un poco al momento de jugar

Puedes usar el comando /watch [Nombre#tag] (Pones tu nombre y tu tag)
Aysla
« Citoyen »
1639470900000
    • Aysla#1979
    • Profil
    • Derniers messages
#70
  0
thx :)
Asaf0202
« Citoyen »
1656803160000
    • Asaf0202#0000
    • Profil
    • Derniers messages
#71
  0
Cómo hacer 2 llaves? editar: y también cómo activar habilidades en modo cham
Deletedaccount
« Citoyen »
1656807240000
    • Deletedaccount#6153
    • Profil
    • Derniers messages
    • Tribu
#72
  0
Asaf0202 a dit :
Cómo hacer 2 llaves? editar: y también cómo activar habilidades en modo cham

Necesitaré más detalle para atender tu primera petición ^^

Respecto a la segunda, actualmente no es posible activar o desactivar habilidades específicas para el chamán, sin embargo, puedes (des)habilitar TODAS las habilidades del chamán con la función tfm.exec.disableAllShamanSkills(). Puede encontrar más detalles en la documentación.
Asaf0202
« Citoyen »
1656855300000
    • Asaf0202#0000
    • Profil
    • Derniers messages
#73
  0
Indexinel a dit :
Asaf0202 a dit :
Cómo hacer 2 llaves? editar: y también cómo activar habilidades en modo cham

Necesitaré más detalle para atender tu primera petición ^^

Respecto a la segunda, actualmente no es posible activar o desactivar habilidades específicas para el chamán, sin embargo, puedes (des)habilitar TODAS las habilidades del chamán con la función tfm.exec.disableAllShamanSkills(). Puede encontrar más detalles en la documentación.

Gracias por la respuesta necesaria. Todavía puede obtener ayuda del hilo de discusión y ayuda de Lua. Le permito hacer preguntas sobre el tema, pero esto es colaborativo.
Popet5
« Citoyen »
1725647340000
    • Popet5#0000
    • Profil
    • Derniers messages
    • Tribu
#74
  0
algun codigo para matar o quitar del mapa a un jugador o jugadores?
Illuminet
1727100720000
    • Illuminet#0000
    • Profil
    • Derniers messages
#75
[Modéré par Stargazing, raison : Código hecho con Inteligencia Artificial.]

Dernière modification le 1727101080000
Nezushin
« Citoyen »
1727403180000
    • Nezushin#9359
    • Profil
    • Derniers messages
    • Tribu
#76
  0
Illuminet a dit :




El de sorteo que pedían más arriba algo complejo pero dejo la explicación de cada cosa del script

Nunca va a ejecutar. Las funciones no existen, tiene error de sintáxis y un bucle infinito.

Dernière modification le 1727711460000
Jefedelsol
« Citoyen »
1742778180000
    • Jefedelsol#0000
    • Profil
    • Derniers messages
    • Tribu
#77
  0
hice como un pequeño minijuego, que trata que en el mapa se van generando (+1) (de defilante), y cada vez que agarras uno, te puede tocar un objeto: yunque, globo, nube, caja pequeña o caja grande, y ese objeto lo puedes invocar haciendo clic en el mapa con el propósito de pasarlo, aún no lo he probado con más personas

imagen
https://i.imgur.com/Px0LJ9o.png


código lua

Code Lua

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
tfm.exec.newGame("@7966524", 0)
tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAllShamanSkills(true)
tfm.exec.setGameTime(0, 1)
local max_bonus = 15
local bonus_c = 0

local codigos = { [1] = "Y", [2] = "N", [3] = "CP", [4] = "CG", [5] = "G", }

math.randomseed(os.time()) -- Números aleatorios
local i = 0
local jugadores = {}

function actualizarTexto(name)
ui.addTextArea(1, "<b><a href='event:example'>Yunques: "..jugadores[name]["Y"].."</a></b>", name, 10, 30, 90, 20, 0x6d2db5, 0x212F36, 0, true)
ui.addTextArea(2, "<b><a href='event:example'>Nubes: "..jugadores[name]["N"].."</a></b>", name, 100, 30, 70, 20, 0x6d2db5, 0x212F36, 0, true)
ui.addTextArea(3, "<b><a href='event:example'>Cajas pequeñas: "..jugadores[name]["CP"].."</a></b>", name, 180, 30, 130, 20, 0x6d2db5, 0x212F36, 0, true)
ui.addTextArea(4, "<b><a href='event:example'>Cajas grandes: "..jugadores[name]["CG"].."</a></b>", name, 320, 30, 130, 20, 0x6d2db5, 0x212F36, 0, true)
ui.addTextArea(5, "<b><a href='event:example'>Globos: "..jugadores[name]["G"].."</a></b>", name, 460, 30, 80, 20, 0x6d2db5, 0x212F36, 0, true)
end

function inicializarPartida(name)
-- N = Nube, Y = Yunque, CP = Caja Pequeña, CG = Caja Grande, G = Globo
jugadores[name] = {N=0,Y=0,CP=0,CG=0,G=0,S="Y"}
system.bindMouse(name, true)
ui.addTextArea(6, "", name, 10, 30, 520, 20, 0x6d2db5, 0x212F36, 1, true)
ui.addTextArea(7, "<b>S: ".. jugadores[name]["S"].."</b>", name, 10, 60, 40, 20, 0x6d2db5, 0x212F36, 1, true)
actualizarTexto(name)
tfm.exec.setShaman(name, false)
end

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

function eventNewPlayer(name)
inicializarPartida(name)
end

function eventPlayerBonusGrabbed(playerName, bonusId)
bonus_c = bonus_c - 1
local str = seleccionarObjetoChaman()
print(str)
jugadores[playerName][str] = jugadores[playerName][str] + 1
actualizarTexto(playerName)
end

function eventMouse(playerName, xMousePosition, yMousePosition)
local obj = jugadores[playerName]["S"]

if (jugadores[playerName][obj] < 1) then
--No le quedan puntos
else
jugadores[playerName][obj] = jugadores[playerName][obj] - 1
actualizarTexto(playerName)
local obj_id = seleccionarObjetoChamanID(obj)
tfm.exec.addShamanObject(obj_id, xMousePosition, yMousePosition, 0, 0, 0, false)
end
end

function seleccionarObjetoChaman()
local random_no = math.random(1,5)
return codigos[random_no]
end

function seleccionarObjetoChamanID(nombre)
if(nombre == "CP") then
return 1
elseif(nombre == "CG") then
return 2
elseif(nombre == "Y") then
return 10
elseif(nombre == "G") then
return math.random(28,31)
elseif(nombre == "N") then
return 57
end
end

local x = 0
local pos_x = 0
local pos_y = 0

function eventLoop(timeRemaining, timeRemaining)
if (x < 5) then
x = x + 1
elseif (x == 5) then
if(bonus_c < max_bonus) then -- colocar primero este(?
local select_area = math.random(1,2)
if (select_area == 1) then
pos_x = math.random(50,400)
pos_y = math.random(100,200)
elseif (select_area == 2) then
pos_x = math.random(600,1000)
pos_y = math.random(50,200)
end
bonus_c = bonus_c + 1
tfm.exec.addBonus(0, pos_x, pos_y, 10, 0, true)
x=0
end
end
end

function eventTextAreaCallback(textAreaID, playerName, callback)
if (codigos[textAreaID]) then
jugadores[playerName]["S"] = codigos[textAreaID]
end

ui.addTextArea(7, "<b>S: ".. jugadores[playerName]["S"].."</b>", playerName, 10, 60, 40, 20, 0x6d2db5, 0x212F36, 1, true)
end

function eventPlayerDied(playerName)
tfm.exec.respawnPlayer(playerName)
end
Flora
« Citoyen »
1746869820000
    • Flora#9543
    • Profil
    • Derniers messages
    • Tribu
#78
  0
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
27
28
29
30
31
32
33
34
35
36
37
38
local maps = {}

function eventLoop(elapsedTime, timeRemaining)
if elapsedTime >= 3000 then
tfm.exec.newGame("#38")
end
end

function eventNewGame()
maps[tfm.get.room.currentMap] = false

local xmlInfo = tfm.get.room.xmlMapInfo
if not xmlInfo or not xmlInfo.xml then
return
end

local xml = xmlInfo.xml
for tag in xml:gmatch("<S.->") do
local p = tag:match('P="([^"]+)"')
if p then
local values = {}
for v in p:gmatch("[^,]+") do
table.insert(values, tonumber(v))
end

local friction = values[3]
if friction == 0.01 then
print("<V>" .. tfm.get.room.currentMap .. "</V> - <ROSE>".. tfm.get.room.xmlMapInfo.author .."</ROSE>")
maps[tfm.get.room.currentMap] = true
return
end
end
end
end

tfm.exec.disableAfkDeath(true)
tfm.exec.disableAutoNewGame(true)
tfm.exec.disableAutoTimeLeft(true)
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Códigos útiles de LUA.
« ‹ 4 / 4
© Atelier801 2018

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

Version 1.27