×

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
  • /
  • Lua Snippets
« ‹ 21 / 33 › »
Lua Snippets
Epicshawty
« Citoyen »
1381086840000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#401
  0
@Basterfeild
Here
a dit :

tfm.exec.disableAutoNewGame(true)
maps={1,2}
tfm.exec.newGame(maps[math.random(#maps)])

function eventLoop(time,remaining)
if remaining<=0 then
tfm.exec.newGame(maps[math.random(#maps)])
end
end

This should work, if you wanna add a map change maps like this
a dit :

maps={@1000000,@4269212}

like that^
These are map rotations, use the other code if you want a specific P map rotation
Zutto
« Citoyen »
1381086960000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#402
  0
Someone can fix this script?
Bengalstar
« Citoyen »
1381093080000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#403
  0
for some reason all the items keep glitching all the time?
here's the code:
function eventEmotePlayed(playerName,emote)
if emote==8 then
tfm.exec.addShamanObject(19, tfm.get.room.playerList[playerName].x, tfm.get.room.playerList[playerName].y, 0, 0, 0, false)
elseif emote==9 then
tfm.exec.addShamanObject(20, tfm.get.room.playerList[playerName].x, tfm.get.room.playerList[playerName].y, 0, 0, 0, false)

end
end

--
please tell me what's wrong q.q
Shamousey
« Consul »
1381098360000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#404
  0
Bengalstar a dit :
please tell me what's wrong q.q

Could you clarify what you mean by "glitching"? It's working fine for me.
Tini
« Sénateur »
1381109760000
    • Tini#0015
    • Profil
    • Derniers messages
    • Tribu
#405
  0
Error?
a dit :
translations={
EN={
help={
"<font size='25'><bv>Introdução</bv></font><br><br>Este é o <b>Cannon Meep Racing</b><br><br>Aqui você poderá se divertir com seus amigos, você só precisa pegar o queijo e não ser morto pelo <b>MEEP</b><br><br><br>Pessas com nome em <font color='#eb1d51'>vermelho</font> são <b>devs</b>, você tem que respeitá-los",
"<font size='25'><vp>Mapas</vp></font><br><br><br>@381043<br>@286333<br>@229834<br>@1643157<br>@3535192<br><br>",
"<font size='25'><j>Comandos</j></font><br><br><br><b>!mort</b> <i>(bugado)</i> - Para se matar<br><b>!cheeseadmin</b> <i>(bugado)</i>- para dar queijo à uma pessoa (uso permitido somente para admins)",
"<font size='25'><g>Sugestões</g></font><br><br>Caso você tenha alguma sugestão para o nosso Minigame, você pode ir até o <b>Fórum da Tribo</b> e dê sua sugestão no tópico do Minigame.",
"<font size='25' color='#eb1d51'>Devs</font><br><br><br><b>Tinittee</b> - Criador do jogo<br><b>Dedavii</b> - Co-criador do jogo<br>",
"<font size='25'><ch>Bugs</ch></font><br><br><br><j>• !fromage (!cheeseadmin) bugado<br>• !mort bugado<br>• !report bugado</j><br><br><br><br>",
"<font size='25'><r>Change Logs</r></font><br><br><br><v>[28/09]</v>• Minigame criado<br><v>[29/09]</v>• Script editado<br><v>[29/09]</v>• <b>Doneky</b> agora é <font color='#eb1d51'>admin</font><br><v>[30/09]</v> • Doneky saiu da equipe<br><v>[06/10]</v> • Comando <i>!help</i> substituido por <i>!page</i>",
"<font size='25' color='#D3A979'>Códigos</font><br><br><br>A cada semana teremos novos novos códigos para terem acesso à sala (ver o mapa), e nesses códigos terão dicas da resposta.<br><br>Esta semana, a dica do código é:<br><br>•Usado no nosso Minigame<br>•Usado em survivor<br><br><b>Resposta:</b> <i>meep</i><br><br><br><br><br><br><br>Dicas do <b>próximo</b> código:<br><br>• Onde são anunciados as novidades<br>• Usado por vários da tribo<br>• Tem um cargo com o pré-fixo 'Se'",
}
}
}

players={}
system.disableChatCommandDisplay("help")

textarea=ui.addTextArea
function ui.addTextArea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha,emboss)
--if not backgroundColor then backgroundColor=0x324650 end
--if not borderColor then borderColor=0x000001 end
if emboss then
textarea(6969+id,"",targetPlayer,x,y+1,width,height,0x000001,0x000001,backgroundAlpha)
textarea(7979+id,"",targetPlayer,x,y-1,width,height,0x6A8FA2,0x6A8FA2,backgroundAlpha)
end
textarea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha)
end

function eventNewPlayer(name)
players[name]={helpid=1}
ui.addTextArea(0,"<p align='center'><a href='event:help'><b>?</b></a></p>",name,780,374,16,16,nil,0x324650,nil,true)
end

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

function trans(mes)
if translations[tfm.get.room.community] and translations[tfm.get.room.community][mes] then
return translations[tfm.get.room.community][mes]
else
return translations.EN[mes]
end
end

function eventChatCommand(name,command)
if command=="help" then
ui.addTextArea(1,trans("help")[players[name].helpid],name,250,50,300,300,nil,0x324650,nil,true)
ui.addTextArea(2,"<p align='center'><a href='event:previous'><b>←</b></a></p>",name,500,365,16,16,nil,0x324650,nil,true)
ui.addTextArea(3,"<p align='center'><a href='event:next'><b>→</b></a></p>",name,532,365,16,16,nil,0x324650,nil,true)
ui.addTextArea(4,"<p align='center'><a href='event:close'><b>x</b></a></p>",name,442,365,42,16,nil,0x324650,nil,true)
ui.addTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name,250,365,42,16,nil,0x324650,nil,true)
end
end

function eventTextAreaCallback(id,name,callback)
if callback=="help" then
eventChatCommand(name,callback)
elseif callback=="close" then
players[name].helpid=1
for id=1,5 do
ui.removeTextArea(id,name)
ui.removeTextArea(6969+id,name)
ui.removeTextArea(7979+id,name)
end
elseif callback=="next" and players[name].helpid<#trans("help") then
players[name].helpid=(players[name].helpid)+1
ui.updateTextArea(1,trans("help")[players[name].helpid],name)
ui.updateTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name)
elseif callback=="previous" and players[name].helpid>1 then
players[name].helpid=players[name].helpid-1
ui.updateTextArea(1,trans("help")[players[name].helpid],name)
ui.updateTextArea(5,"<p align='center'>"..players[name].helpid.."/"..#trans("help").."</p>",name)
end
end

Help-me
Rebornaddict
« Citoyen »
1381147980000
    • Rebornaddict#0000
    • Profil
    • Derniers messages
#406
  0
Shamousey a dit :
Could you clarify what you mean by "glitching"? It's working fine for me.

how you change ur pic sham ?
i mean ur apperance in the game like in transforcows
Mikuhl
« Citoyen »
1381147980000
    • Mikuhl#3311
    • Profil
    • Derniers messages
    • Tribu
#407
  0
Rebornaddict a dit :
how you change ur pic sham ?
i mean ur apperance in the game like in transforcows

tfm.exec.addImage, you cant use this unless you are a Lua Team member.
Rebornaddict
« Citoyen »
1381150920000
    • Rebornaddict#0000
    • Profil
    • Derniers messages
#408
  0
Jaackster a dit :
tfm.exec.addImage, you cant use this unless you are a Lua Team member.

how bout on tribe house ?
Shamousey
« Consul »
1381150920000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#409
  0
Rebornaddict a dit :
how bout on tribe house ?

You can't use it in the tribe house either - only people on the Lua Team can use that function, as Jaackster said.
Basterfeild
« Citoyen »
1381150920000
    • Basterfeild#0000
    • Profil
    • Derniers messages
#410
  0
In LUA, can I make /nue in tribe?
Shamousey
« Consul »
1381151220000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#411
  0
Basterfeild a dit :
In LUA, can I make /nue in tribe?

You can't, that's a clientside thing that the user can set in their options menu, not something controllable by Lua.
Basterfeild
« Citoyen »
1381151700000
    • Basterfeild#0000
    • Profil
    • Derniers messages
#412
  0
Okay. Soo can I get invisible comands?

!pomoc to invis
!help to invis
Shamousey
« Consul »
1381151820000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#413
  0
Basterfeild a dit :
Okay. Soo can I get invisible comands?

!pomoc to invis
!help to invis

system.disableChatCommandDisplay("help",true)
Basterfeild
« Citoyen »
1381152240000
    • Basterfeild#0000
    • Profil
    • Derniers messages
#414
  0
Thanks. :)

Game finished!
Rebornaddict
« Citoyen »
1381152480000
    • Rebornaddict#0000
    • Profil
    • Derniers messages
#415
  0
Shamousey a dit :
system.disableChatCommandDisplay("help",true)

hmm ok . thanks sham
Orb
« Censeur »
1381154640000
    • Orb#0095
    • Profil
    • Derniers messages
    • Tribu
#416
  0
tfm.exec.disableAllShamanSkills(false) --->> how can I put it in a !shaman command to activate the skills?
a dit :
if cmd == "shaman" then
if arg[1] then
tfm.exec.setShaman(arg[1])
tfm.exec.disableAllShamanSkills(false)
end

this is the part of my shaman command code
Shamousey
« Consul »
1381155060000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#417
  0
If you want to disable/enable shaman skills, you need to run that function before anyone is made a shaman. Anyone made a shaman through tfm.exec.setShaman() will not have skills though, you can't enable them.
Orb
« Censeur »
1381155060000
    • Orb#0095
    • Profil
    • Derniers messages
    • Tribu
#418
  0
Shamousey a dit :
If you want to disable/enable shaman skills, you need to run that function before anyone is made a shaman. Anyone made a shaman through tfm.exec.setShaman() will not have skills though, you can't enable them.

Ah, thanks!
Caspur
« Citoyen »
1381170540000
    • Caspur#2148
    • Profil
    • Derniers messages
#419
  0
How do you even become a Lua Team Member? e-e
Forblindmice
« Citoyen »
1381195260000
    • Forblindmice#0000
    • Profil
    • Derniers messages
    • Tribu
#420
  0
So if i understand this, Lua scripting is when the lua team members make new codes like /mort makes you die? If i write
for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name, true)
end

function eventMouse(name, x, y)
tfm.exec.addConjuration(x/10, y/10, 10000)
end
I can do conjuration in my tribehouse by writing it in my /lua box right?
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Lua Snippets
« ‹ 21 / 33 › »
© Atelier801 2018

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

Version 1.27