×

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
  • /
  • Script Requests
« ‹ 3 / 160 › »
Script Requests
Shamousey
« Consul »
1381245180000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#41
  0
Grejfrutek a dit :
Can I have a list of more events and execs than on here? ; ;

edit: also would like a script like if a mouse is nearby something happens, just a snippet, T.Hanks

You could always check the official documentation Topic-451587 or if you want a full list, kikoo.formice.com has one.

Grejfrutek a dit :
also would like a script like if a mouse is nearby something happens, just a snippet, T.Hanks

If a mouse is nearby what, another mouse? You can compare their co-ordinates inside playerList to check if they're close to something.
Grejfrutek
« Citoyen »
1381245300000
    • Grejfrutek#0000
    • Profil
    • Derniers messages
    • Tribu
#42
  0
Shamousey a dit :
If a mouse is nearby what, another mouse? You can compare their co-ordinates inside playerList to check if they're close to something.

Yes, if a mouse is nearby to the player. I'm just a LUA newb. Actually, I meant, like if the player is touching another mouse.
Also, thanks!
Tini
« Sénateur »
1381274460000
    • Tini#0095
    • Profil
    • Derniers messages
    • Tribu
#43
  0
Cannon for all.
Doneky
« Citoyen »
1381275600000
    • Doneky#0000
    • Profil
    • Derniers messages
    • Tribu
#44
  0
Somebody can help me with this script:
a dit :
admins = {"Doneky","NickName2","NickName3","NickName4","NickName5"}

function eventChatCommand(admins, command)
for _,adm in pairs(admins) do
if(playerName == adm) then
if command == "t0" then
tfm.exec.setGameTime(63)
end
end
end
end

Is as in script, BUT i don't know if is this way. In other words:
I want a script in that JUST ADMINS can to use commands.
Jordy
« Consul »
1381276920000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#45
  0
Doneky a dit :
Somebody can help me with this script:

Is as in script, BUT i don't know if is this way. In other words:
I want a script in that JUST ADMINS can to use commands.

Okay.

[quote=Lua \o/]
admins = {Doneky = true, NickName2 = true, NickName3 = true, NickName4 = true, NickName5 = true}

function eventChatCommand(name, command)
if admins[name] == true then
if command == "t0" then
tfm.exec.setGameTime(63)
end
end
end
[/quote]

Try this.
Bengalstar
« Citoyen »
1381277040000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#46
  0
I'm too lazy to code for myself but can I please have a code that spawns a balloon every second around at ground-level of a map? ty
Doneky
« Citoyen »
1381277520000
    • Doneky#0000
    • Profil
    • Derniers messages
    • Tribu
#47
  0
Jordynl a dit :
Okay.
Try this.

Thank you so much.
I'm happy now. :D
Jordy
« Consul »
1381278960000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#48
  0
Bengalstar a dit :
I'm too lazy to code for myself but can I please have a code that spawns a balloon every second around at ground-level of a map? ty

I'l try.

Jordynl a dit :
function eventLoop (timeC, timeR)
tfm.exec.addShamanObject(28, math.random(5, 800), 370)
end

Like this?
Fluffyshine
« Citoyen »
1381279980000
    • Fluffyshine#0000
    • Profil
    • Derniers messages
    • Tribu
#49
  0
Jordynl a dit :
Okay.
Try this.

Or this:

a dit :

admins = {[[Fluffyshine]], [[Doneky]], [[name3]], [[name4]]}
function isAdmin(target)
for _,player in pairs (admins) do
if (player == target) then
return true;
end
end
return false;
end

function eventChatCommand(target, val)
if isAdmin(target) then
if (val == [[t0]]) then
tfm.exec.setGameTime(63);
end
end
end

~
Bengalstar
« Citoyen »
1381312500000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#50
  0
Jordynl a dit :
I'l try.
Like this?

yes that is perfect *-*
thanks again :D
Fluffyshine a dit :
Or this:

~

tyvm fluffy ^-^
Brainsneeze
« Citoyen »
1381326540000
    • Brainsneeze#0000
    • Profil
    • Derniers messages
#51
  0
Shamousey a dit :
An image could be displayed over it with tfm.exec.addImage(), but the animations wouldn't be there and it'd be a big pain. Tigrounette said we'll never get the ability to change a player's outfit in a room directly, though.

How to change mice to a picture?
Also what kind of link do you have to use?
Papero
« Citoyen »
1381326960000
    • Papero#9240
    • Profil
    • Derniers messages
    • Tribu
#52
  0
Brainsneeze a dit :
How to change mice to a picture?
Also what kind of link do you have to use?

cant be done in tribehouses, it uses imgurlinks though
Brainsneeze
« Citoyen »
1381327440000
    • Brainsneeze#0000
    • Profil
    • Derniers messages
#53
  0
Paperonaruto a dit :
cant be done in tribehouses, it uses imgurlinks though

oh bummer, why arent all features able to be used in tribehouse? Just wondering.
Papero
« Citoyen »
1381328880000
    • Papero#9240
    • Profil
    • Derniers messages
    • Tribu
#54
  0
Brainsneeze a dit :
oh bummer, why arent all features able to be used in tribehouse? Just wondering.

I think its due to some of these functions prone to cause crashing if used improperly. ouo but that isnt related to this topic...

Could anyone make a script that swaps mice holes with cheese and viceversa
Shinymew
« Citoyen »
1381343580000
    • Shinymew#0000
    • Profil
    • Derniers messages
#55
  0
Being able to fish. (not get cheese or items)
Shamousey
« Consul »
1381344240000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#56
  0
From something I wrote earlier, you might find this useful.

a dit :
Why are certain functions disabled in the tribe house?
While they're listed in the documentation, there are some functions that aren't available when using Lua in the tribe house.
• tfm.exec.chatMessage() is disabled to prevent impersonation, spamming people's chat, or otherwise ruining it.
• system.newTimer and system.removeTimer are disabled as timers can be heavy on server resources.
• system.saveFile and system.loadFile are disabled as they can take up a lot of storage space.
• tfm.exec.addImage() and tfm.exec.removeImage() are disabled due to potential abuse with inappropriate images.
• tfm.exec.setRoomMaxPlayers() doesn't give an error, but doesn't work in the tribe house to stop people from joining.

Shinymew, that's not possible without images.
Safwanrockz
« Censeur »
1381356240000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#57
  0
Mfw "• tfm.exec.chatMessage() is disabled to prevent impersonation, spamming people's chat, or otherwise ruining it." < isn't it available with the ui.addTextArea thingy? Or is this one different?
Shamousey
« Consul »
1381356360000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#58
  0
Safwanrockz a dit :
Mfw "• tfm.exec.chatMessage() is disabled to prevent impersonation, spamming people's chat, or otherwise ruining it." &lt; isn't it available with the ui.addTextArea thingy? Or is this one different?

Text Areas and Chat Messages are completely different.
Safwanrockz
« Censeur »
1381356540000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#59
  0
Shamousey a dit :
Text Areas and Chat Messages are completely different.

Oh well that explains, I didn't test any of these so yeah.
Tini
« Sénateur »
1381359720000
    • Tini#0095
    • Profil
    • Derniers messages
    • Tribu
#60
  0
Add Cannon for All in script, please.
Meep Cannon Racing script a dit :
tfm.exec.disableAutoShaman(true);
function eventLoop(timePassed, timeLeft)
if aliveMice == 0 or aliveMice < 0 or timeLeft < 1000 or timeLeft < 100 then pn = playerName
doNextMap();
end
end

function doNextMap()
tfm.exec.newGame(maplist[math.random(#maplist)]);
end

function eventNewGame()
aliveMice = 0
tfm.exec.setUIMapName("<vp>Meep<ch> Cannon <font color='#EB1D51'>Racing</font>");
tfm.exec.setUIShamanName("<ch>#<font color='#eb1d51'>Racing</font>");
for name,_pn in pairs(tfm.get.room.playerList) do
aliveMice = aliveMice+1
for player,name in pairs(tfm.get.room.playerList) do
tfm.exec.giveMeep(player)
end
end
end

function eventPlayerLeft(pn)
aliveMice = aliveMice-1
end

function eventPlayerDied(pn)
aliveMice = aliveMice-1
end

function eventPlayerWon(pn)
aliveMice = aliveMice-1
end

tfm.exec.disableAutoNewGame(true);
maplist = {"381043", "286333", "229834", "1643157", "3535192", };
doNextMap();
ui.addPopup(1, 0, "<i>Meep Cannon <font color='#eb1d51'>Racing</font></i> é um Minigame criado por <font color='#eb1d51'><b>Tinittee</b></font><br><br>Digite <font color='#2ecf73'><i>!help</i></font> para saber mais informações<br>Digite <font color='#2ECF73'><i>!report</i></font> para denunciar um usuário. (<i>bugado</i>)<br>Digite <font color='#2ECF73'><i>!mort</i></font> para se matar (<i>bugado</i>)<br><br><br>Dúvidas? clique na <b>interrogação</b> (<b>?</b>) no canto inferior à direita da sua tela<br><br><br> Scritp by: <b>Tinittee</b>", name, 200, 200, 500)
function eventPlayerDied(playerName)
end
tfm.exec.disableAutoShaman(true);
tfm.exec.disableAutoShaman(true);
tfm.exec.setNameColor("Tinittee", 0xeb1d51)
tfm.exec.setNameColor("Dedavii", 0xeb1d51)
tfm.exec.setNameColor("Doneky", 0xeb1d51)
function eventChatCommand(name,command)
if command == "help" then
ui.addPopup(1, 0, "O objetivo do jogo é pegar o queijo sem ser morto pelo <b>meep</b>.<br><br><br>Corra!", name, 280, 150, 270)
end
end

tfm.exec.disableAutoShaman(true);

function eventChatCommand(name, comando)
if comando=="report" then
ui.addPopup(0, 2, "Denúncia:<br>Digite o <b>nome</b> e o <b>motivo</b> da denúncia!")
end
end

function eventPopupAnswer(ID, playerName, answer)
print(playerName.."Denunciou o jogador: "..answer)
end
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> e nem pelo <b>CANNON</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><br>PS: Os mapas serão mudados, e você poderá enviar os seus, leia a página <b>8</b> e veja as novidades sobre o assunto",
"<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'>Novidade</font><br><br><br>Nós estamos mudando o nosso <b>Minigame</b>, e ele terá <b>cannon</b> (<i>canhão</i>) junto com o <b>meep</b>, assim, o nível de dificuldade irá crescer!<br><br>Você, a partir de hoje, poderá mandar o <b>teu</b> mapa para ser adicionado ao Minigame.<br><br>Outro tópico será criado na seção <b>Modules</b>",
}
}
}

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><font color='#EB1D51'>?</font></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>Close</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

Thank you.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 3 / 160 › »
© Atelier801 2018

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

Version 1.27