×

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
  • /
  • [Pedidos e Exemplos] Mega Galeria LUA
« ‹ 11 / 30 › »
[Pedidos e Exemplos] Mega Galeria LUA
Ruphylin
« Citoyen »
1427834460000
    • Ruphylin#0000
    • Profil
    • Derniers messages
    • Tribu
#201
  0
Brenower a dit :
ruphylin a dit :
booleando a dit :
script q usa tonumber e tostring pf

Script

a, b= 666, "666";
main= print(type(a)) or print(type(tostring(a))) or print(type(b)) or print(type(tostring(b)));

tonumber faz a string virar número, desde que seja um número dentro de uma string (eu acho)
e tostring faz 1 numero virar string

é importante que o número só vai obter valor de string no momento, a menos que você redefina ele assim: a= tostring(a)
aí ele vai ser "666" pra sempre até que seja mudado de novo

Script legal

setmetatable(_G,{__index= function(t,i,v) return i; end})

print(Ola.._G[' ']..Galera.._G[' '].._G[69])

atenção, tem que usar o procedimento do espaço para pontuação e palavras com acento, o mesmo com número

ensina metatable

booleando a dit :
os bang de metatabela ai:

a={}
b={v=999}
b.__index=b
b.__add=
function(f1,f2)
return f1.v+f2.v
end

b.__mul=
function(f1,f2)
return f1.v*f2.v
end

b.__sub=
function(f1,f2)
return f1.v-f2.v
end

setmetatable(a,b)
print(a+b)
print(a*b)
print(a-b)

Brenower
« Censeur »
1427834700000
    • Brenower#0000
    • Profil
    • Derniers messages
    • Tribu
#202
  0
ruphylin a dit :
Brenower a dit :
ruphylin a dit :
booleando a dit :
script q usa tonumber e tostring pf

Script

a, b= 666, "666";
main= print(type(a)) or print(type(tostring(a))) or print(type(b)) or print(type(tostring(b)));

tonumber faz a string virar número, desde que seja um número dentro de uma string (eu acho)
e tostring faz 1 numero virar string

é importante que o número só vai obter valor de string no momento, a menos que você redefina ele assim: a= tostring(a)
aí ele vai ser "666" pra sempre até que seja mudado de novo

Script legal

setmetatable(_G,{__index= function(t,i,v) return i; end})

print(Ola.._G[' ']..Galera.._G[' '].._G[69])

atenção, tem que usar o procedimento do espaço para pontuação e palavras com acento, o mesmo com número

ensina metatable

booleando a dit :
os bang de metatabela ai:

a={}
b={v=999}
b.__index=b
b.__add=
function(f1,f2)
return f1.v+f2.v
end

b.__mul=
function(f1,f2)
return f1.v*f2.v
end

b.__sub=
function(f1,f2)
return f1.v-f2.v
end

setmetatable(a,b)
print(a+b)
print(a*b)
print(a-b)



interessante mas um pouco complicado
dps vou ver a bagaça do manual
Teyada
« Citoyen »
1427839920000
    • Teyada#0000
    • Profil
    • Derniers messages
#203
  0
Um script que o último rato vivo ganha :?
Ruphylin
« Citoyen »
1427840100000
    • Ruphylin#0000
    • Profil
    • Derniers messages
    • Tribu
#204
  0
Teyada a dit :
Um script que o último rato vivo ganha :?

ganha oq
Booleando
« Citoyen »
1427841300000
    • Booleando#0000
    • Profil
    • Derniers messages
    • Tribu
#205
  0
ruphylin a dit :
booleando a dit :
script q usa tonumber e tostring pf

Script

a, b= 666, "666";
main= print(type(a)) or print(type(tostring(a))) or print(type(b)) or print(type(tostring(b)));

tonumber faz a string virar número, desde que seja um número dentro de uma string (eu acho)
e tostring faz 1 numero virar string

é importante que o número só vai obter valor de string no momento, a menos que você redefina ele assim: a= tostring(a)
aí ele vai ser "666" pra sempre até que seja mudado de novo

Script legal

setmetatable(_G,{__index= function(t,i,v) return i; end})

print(Ola.._G[' ']..Galera.._G[' '].._G[69])

atenção, tem que usar o procedimento do espaço para pontuação e palavras com acento, o mesmo com número

mto dificil tonumber e tostring um dia eu aprendo

script mto mito esse seu
Teyada
« Citoyen »
1427848980000
    • Teyada#0000
    • Profil
    • Derniers messages
#206
  0
Ou melhor, o ultimo jogador vivo ganha queijo e-e
Matkywz
1428028980000
    • Matkywz#0000
    • Profil
    • Derniers messages
#207
[Modéré par Kinhusxd]
Stheblindd
« Citoyen »
1428104040000
    • Stheblindd#0000
    • Profil
    • Derniers messages
    • Tribu
#208
  0
Teyada a dit :
Ou melhor, o ultimo jogador vivo ganha queijo e-e

local c = {nil, 0}
table.foreach(tfm.get.room.playerList, function(a, b)
if not b.isDead then c = {a, c[2]+1} end
end)
if c[2] == 1 then
tfm.exec.giveCheese(c[1])
end
Booleando
« Citoyen »
1428108240000
    • Booleando#0000
    • Profil
    • Derniers messages
    • Tribu
#209
  0
Stheblindd a dit :
Teyada a dit :
Ou melhor, o ultimo jogador vivo ganha queijo e-e

local c = {nil, 0}
table.foreach(tfm.get.room.playerList, function(a, b)
if not b.isDead then c = {a, c[2]+1} end
end)
if c[2] == 1 then
tfm.exec.giveCheese(c[1])
end

table.foreach foi removido no lua 5.2 .-.
Stheblindd
« Citoyen »
1428108540000
    • Stheblindd#0000
    • Profil
    • Derniers messages
    • Tribu
#210
  0
booleando a dit :
Stheblindd a dit :
Teyada a dit :
Ou melhor, o ultimo jogador vivo ganha queijo e-e

local c = {nil, 0}
table.foreach(tfm.get.room.playerList, function(a, b)
if not b.isDead then c = {a, c[2]+1} end
end)
if c[2] == 1 then
tfm.exec.giveCheese(c[1])
end

table.foreach foi removido no lua 5.2 .-.

mas no mice tá funcionando
Booleando
« Citoyen »
1428108840000
    • Booleando#0000
    • Profil
    • Derniers messages
    • Tribu
#211
  0
vdd
mas n tava antes
Cripopular
« Citoyen »
1428192720000
    • Cripopular#0000
    • Profil
    • Derniers messages
    • Tribu
#212
  0
Qual o script que todos viram ovelha ? o.o
Racody
« Consul »
1428259680000
    • Racody#0000
    • Profil
    • Derniers messages
    • Tribu
#213
  0
http://thelua.zz.mu/raw.php?id=8d74ab

Alguem sabe como fazer p o "tfm.exec.movePlayer("Racody",120,100,false,1000,0,true)" ir para todos (o nil n vai)


e tb quero saber como q faz para quanto +1 vc pegar +pontos vc ganhar quando entrar na toca

Ex: peguei 1 +1, ganha 1 ponto, peguei 6 +1, ganhei 6 pontos
Booleando
« Citoyen »
1428274200000
    • Booleando#0000
    • Profil
    • Derniers messages
    • Tribu
#215
  0
Racody a dit :
http://thelua.zz.mu/raw.php?id=8d74ab

Alguem sabe como fazer p o "tfm.exec.movePlayer("Racody",120,100,false,1000,0,true)" ir para todos (o nil n vai)


e tb quero saber como q faz para quanto +1 vc pegar +pontos vc ganhar quando entrar na toca

Ex: peguei 1 +1, ganha 1 ponto, peguei 6 +1, ganhei 6 pontos

Só usar table.foreach,boa sorte :)
e outro é só vc verificar a posição dos jogadores no eventLoop

Dernière modification le 1428274800000
Racody
« Consul »
1428278160000
    • Racody#0000
    • Profil
    • Derniers messages
    • Tribu
#216
  0
booleando a dit :
Racody a dit :
http://thelua.zz.mu/raw.php?id=8d74ab

Alguem sabe como fazer p o "tfm.exec.movePlayer("Racody",120,100,false,1000,0,true)" ir para todos (o nil n vai)


e tb quero saber como q faz para quanto +1 vc pegar +pontos vc ganhar quando entrar na toca

Ex: peguei 1 +1, ganha 1 ponto, peguei 6 +1, ganhei 6 pontos

Só usar table.foreach,boa sorte :)
e outro é só vc verificar a posição dos jogadores no eventLoop

vc pode colocar p mim? (pelo menos o do table.foreach) eu tentei mas n consegui ;_;
se n puder tudo bem :/
Booleando
« Citoyen »
1428278520000
    • Booleando#0000
    • Profil
    • Derniers messages
    • Tribu
#217
  0
table.foreach(tfm.get.room.playerList,function(k) tfm.exec.movePlayer(k,120,100,false,1000,0,true) end)
Figoi
« Citoyen »
1428285540000
    • Figoi#0000
    • Profil
    • Derniers messages
    • Tribu
#219
  0
Alguem sabe um coamando para rodar xml no cafofo?

tfm.exec.newGame("xml")
não funciona
Fofinhoppp
« Consul »
1428321960000
    • Fofinhoppp#0000
    • Profil
    • Derniers messages
    • Tribu
#220
  0
Figoi a dit :
Alguem sabe um coamando para rodar xml no cafofo?

tfm.exec.newGame("xml")
não funciona

tfm.exec.newGame(''xml'')
coloca agr
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Seção Editor de Mapas e Modules
  • /
  • [Pedidos e Exemplos] Mega Galeria LUA
« ‹ 11 / 30 › »
© Atelier801 2018

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

Version 1.27