×

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
« ‹ 102 / 160 › »
Script Requests
Isnowking
« Citoyen »
1440354000000
    • Isnowking#0000
    • Profil
    • Derniers messages
#2021
  0
My request is something similar to the snake game (example http://patorjk.com/games/snake/) Each time you eat the cheese your mouse gets longer or something im not really sure how it could/would be done but this would be a great module to play with tribe members
Nox
« Citoyen »
1440441360000
    • Nox#2215
    • Profil
    • Derniers messages
    • Tribu
#2022
  0
When a player enters the room, I want the Welcoming popup to show for just them only. At the moment, whenever someone enters the room, it shows for everyone. And whenever someone types !help the Help popup shows for everyone. I just want both of those to show up for the player only. Thanks!
Undeadkitten
« Citoyen »
1440448560000
    • Undeadkitten#0000
    • Profil
    • Derniers messages
    • Tribu
#2023
  0
Bradmouser a dit :
When a player enters the room, I want the Welcoming popup to show for just them only. At the moment, whenever someone enters the room, it shows for everyone. And whenever someone types !help the Help popup shows for everyone. I just want both of those to show up for the player only. Thanks!

system.disableChatCommandDisplay("help")
tables={
help={
"<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>",
"<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>",
"<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>",
"<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>",
"<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>",
},
}
players={}
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 tbls(mes)
return tables[mes]
end
function eventNewPlayer(pname)
players[pname]={helpid=1}
ui.addTextArea(0,"<p align='center'><a href='event:help'><b>?</b></a></p>",pname,780,374,16,16,nil,0x324650,nil,true)
tfm.exec.respawnPlayer(pname)
ui.addTextArea(6,"<font size='18'><p align='center'><b>Welcome, <font color='#1177AA'>"..pname.."</font>!</b></p></font><p align='center'>Welcome to the tribe house.</p><p align='center'>You can use !help for a list of commands.</p>",pname,245,150,300,80,nil,0x324650,nil,true);
end
for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end
function eventChatCommand(pname,msg)
if msg=="help" then
ui.addTextArea(1,tbls("help")[players[pname].helpid],pname,250,50,300,300,nil,0x324650,nil,true)
ui.addTextArea(2,"<p align='center'><a href='event:previous'><</a></p>",pname,500,365,16,16,nil,0x324650,nil,true)
ui.addTextArea(3,"<p align='center'><a href='event:next'>></a></p>",pname,532,365,16,16,nil,0x324650,nil,true)
ui.addTextArea(4,"<p align='center'><a href='event:close'>Close</a></p>",pname,442,365,42,16,nil,0x324650,nil,true)
ui.addTextArea(5,"<p align='center'>"..players[pname].helpid.."/"..#tbls("help").."</p>",pname,250,365,42,16,nil,0x324650,nil,true)
end
end

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

This uses Shamousey's help menu. Hope it works for you, sorry if I didn't understand what you meant. :x

Dernière modification le 1440448740000
Nox
« Citoyen »
1440463380000
    • Nox#2215
    • Profil
    • Derniers messages
    • Tribu
#2024
  0
Sorry for being a bother. :x
How do I get the Welcome popup to go away without having to open the Help popup?
Supaelijah
« Citoyen »
1440478800000
    • Supaelijah#0000
    • Profil
    • Derniers messages
#2025
  0
i have a idea but im not good at lua but here it is

when someone does the confetti thing it could be...


function eventEmotePlayed(player, emote)
if emote==9 then
ui.addTextArea(0, player,, "Is happy! :D)





Yeah that was kinda my first lua thing please tell me if i did something wrong!
Cos
« Citoyen »
1440480660000
    • Cos#8400
    • Profil
    • Derniers messages
    • Tribu
#2026
  0
supaelijah a dit :
i have a idea but im not good at lua but here it is

when someone does the confetti thing it could be...


function eventEmotePlayed(player, emote)
if emote==9 then
ui.addTextArea(0, player,, "Is happy! :D)





Yeah that was kinda my first lua thing please tell me if i did something wrong!

timer = 0
despawnTime = 5
function eventEmotePlayed(player, emote)
if emote == 9 then
ui.addTextArea(0, player .. " is happy! :D*")
timer = 0
end
end
function eventLoop(curTime, timeR)
if timer == despawnTime * 2 then
ui.removeTextArea(0, NIL)
else
timer = timer + 1
end
end
Lionfanggeo
« Citoyen »
1440520800000
    • Lionfanggeo#0000
    • Profil
    • Derniers messages
    • Tribu
#2027
  0
Can Somone Help Make Me A Gmod Murder-like Minigame?

Here is What i want in it

There Are 3 Teams 1 Of Innocents That Run From The Killer

A Team Of 1 player as the sherrif (Has a gun/rune that can kill only the Killer)

A Team Of 1 player as the killer (Tries To Kill every player in the game)
-------------------------------------------------------------------------------------------------------
The murderer can be indentified if somones saw him killing a mice,the mices will tell in the chat who is the killer and the sherif will try to shot him

I want just one more thing (I hope i don't want to much xD)

If the sherif gets killed another mice will be selected as a sherif,until all the players are death (The gun can be made if u use duck a rune will shot and if touches the killer,the killer would die)

Thats all! Hope It Isn't Too much! xD

PS:Sorry for bad english
Nox
« Citoyen »
1440562500000
    • Nox#2215
    • Profil
    • Derniers messages
    • Tribu
#2028
  0
function eventChatCommand(player,c,pname)
if c:sub(0,4) == [[help]] then
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah");
end
end

Whenever one person types !help, it goes to all players. How do I fix this?
Cos
« Citoyen »
1440576240000
    • Cos#8400
    • Profil
    • Derniers messages
    • Tribu
#2029
  0
Bradmouser a dit :

function eventChatCommand(player,c,pname)
if c:sub(0,4) == [[help]] then
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",name,name);
end
end

Dernière modification le 1440576420000
Undeadkitten
« Citoyen »
1440594420000
    • Undeadkitten#0000
    • Profil
    • Derniers messages
    • Tribu
#2030
  0
Look at the script I posted, and compare the eventChatCommand section to yours. See that you have to add "pname" to ui.addPopup.
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",pname)
If pname is nil, it sends to all players.
Pastormario
« Citoyen »
1440687780000
    • Pastormario#0000
    • Profil
    • Derniers messages
    • Tribu
#2031
  0
There are 8 viprin-made cheeses,if a mouse touches all the cheeses will get the real cheese,like in bafflua.

Dernière modification le 1440689040000
Abdeltif
« Citoyen »
1440709140000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#2032
  0
Bradmouser a dit :
function eventChatCommand(player,c,pname)
if c:sub(0,4) == [[help]] then
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah");
end
end

Whenever one person types !help, it goes to all players. How do I fix this?

code a dit :
function eventChatCommand(player,c,pname)
if c:sub(0,4) == [[help]] then
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",player);
end
end


there is no 3rd argument in that event, so a less confusing code would be like this:
code a dit :

function eventChatCommand(pname,c)
if c:sub(0,4) == [[help]] then
ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",pname);
end
end

Dernière modification le 1440709260000
Drgenius
« Citoyen »
1440837720000
    • Drgenius#0000
    • Profil
    • Derniers messages
    • Tribu
#2033
  0
Eshkation a dit :
I need a script that removes the accentuation of player's input, in tfm when i type '!oí', it returns 'oᅢᆳ', is there a way to solve it?

This doesn't happen for me. Perhaps it's an issue with your computer's font?
Dianliar
« Citoyen »
1441904940000
    • Dianliar#0000
    • Profil
    • Derniers messages
    • Tribu
#2034
  0
How to kill someone who is near me (not a specific player)?
Akumariin
« Citoyen »
1442007600000
    • Akumariin#0000
    • Profil
    • Derniers messages
    • Tribu
#2035
  0
Removed

Dernière modification le 1442076000000
Gekkeiju
« Citoyen »
1442074860000
    • Gekkeiju#0000
    • Profil
    • Derniers messages
    • Tribu
#2036
  0
dianliar a dit :
How to kill someone who is near me (not a specific player)?

The following function kills the players near(distance is less than 60) you.

function killNear(yourname)
local range = 60^2 -- if "near me" means that the distance between you and another is less than 60
local you = tfm.get.room.playerList[yourname]
if you then
for name, player in pairs(tfm.get.room.playerList) do
if name~=yourname and (player.x - you.x)^2 + (player.y - you.y)^2 < range then
tfm.exec.killPlayer(name)
end
end
end
end

Dernière modification le 1442076540000
Dianliar
« Citoyen »
1442212980000
    • Dianliar#0000
    • Profil
    • Derniers messages
    • Tribu
#2037
  0
Thanks! :3
Hpocks
« Citoyen »
1442864220000
    • Hpocks#0000
    • Profil
    • Derniers messages
    • Tribu
#2038
  0
Can I have a code that when you double tap in a direction, a token spawns under you and allows you to boost in that direction with a .5 second cooldown.

Also a tiny guide on how to use the script for tribe house :P
Frozenjord
« Citoyen »
1443263040000
    • Frozenjord#0656
    • Profil
    • Derniers messages
    • Tribu
#2039
  0
[/quote]
hpocks a dit :
Can I have a code that when you double tap in a direction, a token spawns under you and allows you to boost in that direction with a .5 second cooldown.

Also a tiny guide on how to use the script for tribe house :P

Hey so I had to tweak the request a bit but I have made what you were essentially asking, just without the tokens due to the fact that (AFAIK) it's not possible.

interval = 2

data = {
name = "Jamesqwartz", -- Replace this with your username
clicked = true,
timestamp = os.time()
}

system.bindMouse(data.name, true)

function eventMouse(name, x, y)
data.clicked = not data.clicked
if data.clicked and data.timestamp < os.time()-500 then
if x-tfm.get.room.playerList[data.name].x > 0 then
tfm.exec.movePlayer(name, 0, 0, false, 85, 0, true)
else -- These values control power, (positive numbers for -->, negative numbers for <--). Change them to whatever you want!
tfm.exec.movePlayer(name, 0, 0, false, -85, 0, true)
end
data.timestamp = os.time()
end
end

function eventLoop()
if not data.clicked then
interval = interval - 1
if interval == 0 then
data.clicked = not data.clicked
interval = 2
end
end
end


As for how to use it, type /lua when you are in your tribehouse and paste the script above into the box that pops up, press submit and you're done.

Dernière modification le 1443263160000
Hpocks
« Citoyen »
1443275700000
    • Hpocks#0000
    • Profil
    • Derniers messages
    • Tribu
#2040
  0
Jamesqwartz a dit :

hpocks a dit :
Can I have a code that when you double tap in a direction, a token spawns under you and allows you to boost in that direction with a .5 second cooldown.

Also a tiny guide on how to use the script for tribe house :P

Hey so I had to tweak the request a bit but I have made what you were essentially asking, just without the tokens due to the fact that (AFAIK) it's not possible.

interval = 2

data = {
name = "Jamesqwartz", -- Replace this with your username
clicked = true,
timestamp = os.time()
}

system.bindMouse(data.name, true)

function eventMouse(name, x, y)
data.clicked = not data.clicked
if data.clicked and data.timestamp &lt; os.time()-500 then
if x-tfm.get.room.playerList[data.name].x &gt; 0 then
tfm.exec.movePlayer(name, 0, 0, false, 85, 0, true)
else -- These values control power, (positive numbers for --&gt;, negative numbers for &lt;--). Change them to whatever you want!
tfm.exec.movePlayer(name, 0, 0, false, -85, 0, true)
end
data.timestamp = os.time()
end
end

function eventLoop()
if not data.clicked then
interval = interval - 1
if interval == 0 then
data.clicked = not data.clicked
interval = 2
end
end
end


As for how to use it, type /lua when you are in your tribehouse and paste the script above into the box that pops up, press submit and you're done.[/quote]

Doesnt seem to be functioning at all...

Are there some variables I have to change? I dont understand that "These Values Control Power..". What are "these values"?
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 102 / 160 › »
© Atelier801 2018

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

Version 1.27