×

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
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 10 / 133 › »
[Lua] Peça scripts aqui!
Pikachu
« Citoyen »
1492975620000
    • Pikachu#2676
    • Profil
    • Derniers messages
#181
  0
scrip de x1 de vanila
Lcemt
« Citoyen »
1492984140000
    • Lcemt#0000
    • Profil
    • Derniers messages
    • Tribu
#182
  0
Kpeladu a dit :
scrip de x1 de vanila

Isso seria sem shaman,certo?Só que alguns mapas precisam de shaman para serem completados.
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
--Editáveis
p1="jogador1"--Primeiro jogador
p2="jogador2"--Segundo jogador
max=5--Limite de pontuação(vencer o jogo)
-------------------------------
maps,score,winner={},{},""
score[p1]=0
score[p2]=0
scorebar_text,won="<p align='Center'>%s - %d X %d - %s\n","<p align='Center'>%s ganhou!\n"

function eventLoop(a,b)
local alive,UI=0,ui.setMapName
local txt1,txt2=scorebar_text:format(p1,score[p1],score[p2],p2),won:format(winner)
local txt=winner=="" and UI(txt1) or winner~="" and UI(txt2)
table.foreach(tfm.get.room.playerList, function(i,v) alive=not v.isDead and alive+1 or alive end)
alive=(alive==0 or b<=0) and tfm.exec.newGame(maps[math.random(#maps)])
end

function eventPlayerWon(p)
if p==p1 or p==p2 then
score[p]=score[p]+1
if score[p]==max then
winner=p
end
eventLoop(0,0)
end
end

for i=1,140 do
maps[i]=i
end

tfm.exec.disableAutoNewGame()
tfm.exec.disableAutoShaman()
eventLoop(0,0)
Mc_nandinhog
« Citoyen »
1493068860000
    • Mc_nandinhog#0000
    • Profil
    • Derniers messages
#183
  0
Flyingwr a dit :
Mc_nandinhog a dit :
Um script Que pode Se Teleportar pra Qualquer Lugar

Code Lua

1
2
3
eventMouse = table.foreach(tfm.get.room.playerList, function(k,v) system.bindMouse(k, true) end) or function(name, x, y)
tfm.exec.movePlayer(name, x, y)
end

vlw..
Thobolado
« Citoyen »
1493326920000
    • Thobolado#0000
    • Profil
    • Derniers messages
    • Tribu
#184
  0
Eu queria um scprit Baseado em Naruto e seus Jutsos Porfavor ;-;
Melph
« Sénateur »
1493328360000
    • Melph#7124
    • Profil
    • Derniers messages
    • Tribu
#185
  0
um simples script q qd se digita !help abra uma text area eh pq eu queria lembrar como usar chatcomand
Lcemt
« Citoyen »
1493329560000
    • Lcemt#0000
    • Profil
    • Derniers messages
    • Tribu
#186
  0
Twistzaok a dit :
um simples script q qd se digita !help abra uma text area eh pq eu queria lembrar como usar chatcomand

Code Lua

1
2
3
4
5
6
7
8
9
10
11
txt=[[k

ajuda

]]

eventChatCommand=function(p,c)
if c=="help" then
ui.addTextArea(0,txt,p)
end
end
Melph
« Sénateur »
1493331780000
    • Melph#7124
    • Profil
    • Derniers messages
    • Tribu
#187
  0
Lcemt a dit :
Twistzaok a dit :
um simples script q qd se digita !help abra uma text area eh pq eu queria lembrar como usar chatcomand

Code Lua

1
2
3
4
5
6
7
8
9
10
11
txt=[[k

ajuda

]]

eventChatCommand=function(p,c)
if c=="help" then
ui.addTextArea(0,txt,p)
end
end

vlw, mas como faz com admin?
Lcemt
« Citoyen »
1493341080000
    • Lcemt#0000
    • Profil
    • Derniers messages
    • Tribu
#188
  1
Twistzaok a dit :
Lcemt a dit :
Twistzaok a dit :
um simples script q qd se digita !help abra uma text area eh pq eu queria lembrar como usar chatcomand

Code Lua

1
2
3
4
5
6
7
8
9
10
11
txt=[[k

ajuda

]]

eventChatCommand=function(p,c)
if c=="help" then
ui.addTextArea(0,txt,p)
end
end

vlw, mas como faz com admin?

Crie uma tabela,coloque os índices com os nomes dos jogadores desejados e os valores devem ser algo diferente de false ou nil.Depois é só checar se o jogador pertence a tabela:
Code Lua

1
2
3
4
5
6
7
8
9
adm={
Twistzaok=1
}

eventChatCommand=function(p,c)
if adm[p] then
print(p.." digitou:"..c)
end
end
Feernandogameer
« Censeur »
1493343000000
    • Feernandogameer#2192
    • Profil
    • Derniers messages
#189
  0
Scripts De X1 De Vanilla Com Mais De 2 Jogadores E Em Times
Melph
« Sénateur »
1493386320000
    • Melph#7124
    • Profil
    • Derniers messages
    • Tribu
#190
  0
como poe o nome do jogador que morre no print?
Maxgoxtoso
« Citoyen »
1493392620000
    • Maxgoxtoso#0000
    • Profil
    • Derniers messages
#191
  0
eu quero um script que o shaman senta e vivo e deita e morto
Fly
« Citoyen »
1493393040000
    • Fly#8215
    • Profil
    • Derniers messages
    • Tribu
#192
  0
Twistzaok a dit :
como poe o nome do jogador que morre no print?

lucas?

Code Lua

1
function eventPlayerDied(name) print(name) end
Melph
« Sénateur »
1493400540000
    • Melph#7124
    • Profil
    • Derniers messages
    • Tribu
#193
  0
Flyingwr a dit :
Twistzaok a dit :
como poe o nome do jogador que morre no print?

lucas?

Code Lua

1
function eventPlayerDied(name) print(name) end

eu mesmo
vlw


tá mas tipo e se eu quiser escrever name + complemento?

Dernière modification le 1493401140000
Lcemt
« Citoyen »
1493414520000
    • Lcemt#0000
    • Profil
    • Derniers messages
    • Tribu
#194
  1
Twistzaok a dit :
Flyingwr a dit :
Twistzaok a dit :
como poe o nome do jogador que morre no print?

lucas?

Code Lua

1
function eventPlayerDied(name) print(name) end

eu mesmo
vlw


tá mas tipo e se eu quiser escrever name + complemento?

é só concatenar:
Code Lua

1
2
x="Jogador"
print(x.." morreu!")
ou usar o string.format:
Code Lua

1
2
3
txt="%s morreu!"
x="Jogador"
print(string.format(txt,x))
Travonrodfer
« Censeur »
1493429040000
    • Travonrodfer#0000
    • Profil
    • Derniers messages
    • Tribu
#195
  0
um script assim:
!baiacu o rato lança baiacus
!flecha o rato lança flechas
!galinha o rato lança flechas

depois de um tempo os itens devem sumir, e quando um estiver ligado o outro deverá estar desligado

Dernière modification le 1493434380000
Byontr
« Citoyen »
1493653020000
    • Byontr#0000
    • Profil
    • Derniers messages
    • Tribu
#196
  0
um script que se teleporte com comando do eventChatCommand
Byontr
« Citoyen »
1493653080000
    • Byontr#0000
    • Profil
    • Derniers messages
    • Tribu
#197
  0
Double acidental
Laagaadoo
« Citoyen »
1493663040000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#198
  0
Travonrodfer a dit :
um script assim:
!baiacu o rato lança baiacus
!flecha o rato lança flechas
!galinha o rato lança flechas

depois de um tempo os itens devem sumir, e quando um estiver ligado o outro deverá estar desligado

Aperta E para atirar
Individualmente

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
local pool = {}
local objs = {}

function eventChatCommand(name, cmd)
if cmd == 'baiacu' then
objs[name] = tfm.enum.shamanObject.balloonFish
elseif cmd == 'flecha' then
objs[name] = tfm.enum.shamanObject.cupidonArrow
elseif cmd == 'galinha' then
objs[name] = tfm.enum.shamanObject.chicken
end
end

function eventKeyboard(name, key, down, x, y)
if key == 69 and objs[name] then
local facingRight = tfm.get.room.playerList[name].isFacingRight
table.insert(pool, {tfm.exec.addShamanObject(objs[name], facingRight and x + 8 or x - 8, y - 7, 0, facingRight and 20 or -20), os.time()})
end
end

function eventLoop(el, rm)
for i,v in ipairs(pool) do
if v[2] < os.time() - 3000 then
tfm.exec.removeObject(v[1])
table.remove(pool, i)
end
end
end

function eventNewPlayer(name)
system.bindKeyboard(name, 69, false)
end

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

Geral

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
local pool = {}
local obj = -1

function eventChatCommand(name, cmd)
if cmd == 'baiacu' then
obj = tfm.enum.shamanObject.balloonFish
elseif cmd == 'flecha' then
obj = tfm.enum.shamanObject.cupidonArrow
elseif cmd == 'galinha' then
obj = tfm.enum.shamanObject.chicken
end
end

function eventKeyboard(name, key, down, x, y)
if key == 69 and obj ~= -1 then
local facingRight = tfm.get.room.playerList[name].isFacingRight
table.insert(pool, {tfm.exec.addShamanObject(obj, facingRight and x + 8 or x - 8, y - 7, 0, facingRight and 20 or -20), os.time()})
end
end

function eventLoop(el, rm)
for i,v in ipairs(pool) do
if v[2] < os.time() - 3000 then
tfm.exec.removeObject(v[1])
table.remove(pool, i)
end
end
end

function eventNewPlayer(name)
system.bindKeyboard(name, 69, false)
end

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

Byontr a dit :
um script que se teleporte com comando do eventChatCommand

Assim? !tp x y

Code Lua

1
2
3
4
5
6
7
8
9
10
11
12
13
function eventChatCommand(name, cmd)
local args = {}
for arg in cmd:gmatch('[^%s]+') do
table.insert(args, arg)
end

if args[1] == 'tp' then
local x, y = tonumber(args[2]), tonumber(args[3])
if x and y then
tfm.exec.movePlayer(name, x, y)
end
end
end
Luxmeuamo
« Citoyen »
1493854680000
    • Luxmeuamo#3679
    • Profil
    • Derniers messages
#199
  2
um script que o rato cuspa um bloco de lava
Feernandogameer
« Censeur »
1493913180000
    • Feernandogameer#2192
    • Profil
    • Derniers messages
#200
  0
scripts de x1 de vanilla com mais de 2 jogadores e em times
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Lua] Peça scripts aqui!
« ‹ 10 / 133 › »
© Atelier801 2018

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

Version 1.27