×

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
« ‹ 6 / 160 › »
Script Requests
Ordboka
« Citoyen »
1381585140000
    • Ordboka#0000
    • Profil
    • Derniers messages
    • Tribu
#101
  0
Livcorish a dit :
Would it be possible to make a script when my leader Bretjr enters the tribe house a message would say "Welcome to your palace Bretjr! *-*"

The message can play to the whole tribe house or just him.

Ordboka a dit :
for name,player in pairs(tfm.get.room.playerList) do
if name == "Bretjr" then
ui.addTextArea(1, "<p align='center'><font size='42'>Welcome to your palace Bretjr! *-*</font></p><br>", NIL, 0, 150, 800, 100, 0x1C3C41, 0x1C3C41, 0)
end
end

This will display the message, but it won't ever go away, so you might have to make that part yourself. I haven't tested the code, so if anything is wrong please tell me.
Issey
« Citoyen »
1381585380000
    • Issey#0000
    • Profil
    • Derniers messages
#102
  0
Bismuthinite a dit :
The most easy ./mort command for tribe house.

Lua a dit :
function eventChatCommand(name,c)
if(c=='mort') then
tfm.exec.killPlayer(name)
end
end

can't do /mort but can do !mort

Ordboka a dit :
This will display the message, but it won't ever go away, so you might have to make that part yourself. I haven't tested the code, so if anything is wrong please tell me.

better wrap Bretjr with quotations
Bushmeister
« Consul »
1381597440000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#103
  0
Issey a dit :
can't do /mort but can do !mort
better wrap Bretjr with quotations

Is it possible to make so that if you touched the shaman, then get the cheese?
"Bushmeister just stole the cheese! CATCH HER!"
And
how to use tfm.get.room.playerList [name]. look returns. and Clothing IDs?
Zyx
« Censeur »
1381597680000
    • Zyx#8690
    • Profil
    • Derniers messages
#104
  0
A script to be able to run faster.
Abdeltif
« Citoyen »
1381598160000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#105
  0
A script to despawn every object in da room when saying !despawn ofc
Mymicemy
« Citoyen »
1381600740000
    • Mymicemy#0000
    • Profil
    • Derniers messages
    • Tribu
#106
  0
a dit :
admins = {Mymicemy = true, Tiskeviciute = true}

function eventChatCommand(name,command)
if admins[name] == true then

if command == "time" then
tfm.exec.setGameTime(120)

elseif command=="win" then
tfm.exec.giveCheese(name)
tfm.exec.playerVictory(name)

elseif command=="vamp" then
tfm.exec.setVampirePlayer(name)

end
end
end

When I write !win twice, im dying. Why?
Abdeltif
« Citoyen »
1381600980000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#107
  0
Mymicemy a dit :
When I write !win twice, im dying. Why?

did you whrile !win after you got vampired ?
That's a big , when ur a vamp and you get cheese you *die*
Mymicemy
« Citoyen »
1381601100000
    • Mymicemy#0000
    • Profil
    • Derniers messages
    • Tribu
#108
  0
Abdeltif a dit :
did you whrile !win after you got vampired ?

Nope

Edit: all I need is reload... :D
Specagent
« Citoyen »
1381606140000
    • Specagent#0000
    • Profil
    • Derniers messages
    • Tribu
#109
  1
Please, can anybody write script, wich return xml code of current map?
I don't know why, but tfm.get.room.xmlMapInfo always return 'nil' and tfm.get.currentMap always return '0'
Sandermr
« Citoyen »
1381607400000
    • Sandermr#0000
    • Profil
    • Derniers messages
    • Tribu
#110
  0
Does anyone have the teamdeath match or team ffa or whatever you want to call code? If not could someone make me a code which

1) Divides the room into two teams
2) Then associates these two teams with colours blue and red (Eg Blue team will have blue names)
3) The last player(s) alive of the same team win (Eg If two red players are alive, they don't have to fight each for their team to win, the team automatically wins)

I think I can do the rest
Shamousey
« Consul »
1381608660000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#111
  1
Specagent a dit :
Please, can anybody write script, wich return xml code of current map?
I don't know why, but tfm.get.room.xmlMapInfo always return 'nil' and tfm.get.currentMap always return '0'

XML Sharing/Stealing has always been frowned upon, you probably won't find anyone that'll share how to do that. However, currentMap and xmlMapInfo only ever have content the round AFTER the module is loaded, and nothing on vanilla maps.

Sandermr a dit :
1) Divides the room into two teams
2) Then associates these two teams with colours blue and red (Eg Blue team will have blue names)
3) The last player(s) of the same team win (Eg If two red players are alive, they don't have to fight each for their team to win, the team automatically wins)

red={}
blue={}
function makeTeams()
local playerList={}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(playerList,name)
end
for i=1,#playerList,1 do
local index=math.random(#playerList)
local name=playerList[index]
if i%2==0 then
table.insert(red,name)
else
table.insert(blue,name)
end
table.remove(playerList,index)
end
end
Abdeltif
« Citoyen »
1381609800000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#112
  0
A script to despawn every object in da room when saying !despawn ofc
Please !!!
Shamousey
« Consul »
1381610460000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#113
  0
Abdeltif a dit :
A script to despawn every object in da room when saying !despawn ofc
Please !!!

Bearing in mind that you can't remove something from a table as you iterate through it, so here I created another temporary table and removed them from that with ipairs.

function eventChatCommand(name,command)
if command=="despawn" then
local objects={}
for k,v in pairs(tfm.get.room.objectList) do
table.insert(objects,k)
end
for i,object in ipairs(objects) do
tfm.exec.removeObject(object)
end
end
end
Bethdacat
« Consul »
1381610460000
    • Bethdacat#0000
    • Profil
    • Derniers messages
    • Tribu
#114
  0
A script to answer in chat like Cfm/Sourbot
Shamousey
« Consul »
1381610700000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#115
  0
Bethdacat a dit :
A script to answer in chat like Cfm/Sourbot

Do you mean to whisper something in the chat to a specific player? That can only be done with tfm.exec.chatMessage() which is disabled in the tribe house.
Issey
« Citoyen »
1381611600000
    • Issey#0000
    • Profil
    • Derniers messages
#116
  1
Bushmeister a dit :
Is it possible to make so that if you touched the shaman, then get the cheese?
"Bushmeister just stole the cheese! CATCH HER!"
And
how to use tfm.get.room.playerList [name]. look returns. and Clothing IDs?

Cheese Thief a dit :

function eventNewGame()
shaman=nil
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].isShaman) then
shaman=name
print(shaman.." just stole the cheese! CATCH HER!")
tfm.exec.giveCheese(shaman)
end
end
if(shaman==nil) then
print('No shaman found!')
end
end

function eventLoop(ct,cr)
if(shaman~=nil) and tfm.get.room.playerList[shaman].isDead==false then
local shamanx=tfm.get.room.playerList[shaman].x
local shamany=tfm.get.room.playerList[shaman].y
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].isShaman==false) then
x=tfm.get.room.playerList[name].x
y=tfm.get.room.playerList[name].y
if(x>shamanx-50) and x<shamanx+50 and y<shamany-50 and y>shamany+50 then
tfm.exec.giveCheese(name)
end
end
end
end
end
end

^untested

Looks a dit :

for name,player in pairs(tfm.get.room.playerList) do
look=tfm.get.room.playerList[name].look
print(name..' has '..look)
end

you can get the look id's from here Topic-465671

Swirlfire a dit :
A script to be able to run faster.

Speed a dit :
function eventLoop(ct,tr)
for name,player in pairs(tfm.get.room.playerList) do
if(tfm.get.room.playerList[name].movingLeft) then
tfm.exec.movePlayer(name,nil,nil,false,-100,nil,false)
else if(tfm.get.room.playerList[name].movingRight) then
tfm.exec.movePlayer(name,nil,nil,false,100,nil,false)
end
end
end
end

not very perfect but it works
Safwanrockz
« Censeur »
1381613640000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#117
  0
Bethdacat a dit :
A script to answer in chat like Cfm/Sourbot

Shamousey a dit :
Do you mean to whisper something in the chat to a specific player? That can only be done with tfm.exec.chatMessage() which is disabled in the tribe house.

Or just normal commands where it prints what you want after a specific command? (i.e: !leaders command gives you the list of tribe leaders, !recruiters gives you the list of recruiters, etc)
Sandermr
« Citoyen »
1381615980000
    • Sandermr#0000
    • Profil
    • Derniers messages
    • Tribu
#118
  0
Does anyone have the code for a poup with arrows (>>) to switch pages? The same in the utility mini-game.
Shamousey
« Consul »
1381617000000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#119
  0
Sandermr a dit :
Does anyone have the code for a poup with arrows (&gt;&gt;) to switch pages? The same in the utility mini-game.

I posted it here. Topic-451991
Livcorish
« Citoyen »
1381619160000
    • Livcorish#0000
    • Profil
    • Derniers messages
#120
  0
Ordboka a dit :
This will display the message, but it won't ever go away, so you might have to make that part yourself. I haven't tested the code, so if anything is wrong please tell me.

Thanks so much! It's not working though, it dosen't show up.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 6 / 160 › »
© Atelier801 2018

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

Version 1.27