×

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
« ‹ 9 / 160 › »
Script Requests
Voke
« Citoyen »
1381866060000
    • Voke#0000
    • Profil
    • Derniers messages
    • Tribu
#161
  0
I made a minigame in a tribehouse where everyone is shaman with meep and its last-man standing. How can I make a five second despawn for cannons?
Mousechris
« Censeur »
1381875540000
    • Mousechris#0000
    • Profil
    • Derniers messages
    • Tribu
#162
  0
Baasbase a dit :
instead of making a static variable (the one popup) you should make a table and iterate through it each time it should move.

I have little clue as to what you mean
Jordy
« Consul »
1381911660000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#163
  0
Voke a dit :
I made a minigame in a tribehouse where everyone is shaman with meep and its last-man standing. How can I make a five second despawn for cannons?

I'm not sure how to get the ID's of the spawned canons yet but here is a timed function that gets called each 5 seconds.

Jordynl a dit :

timer = 0
timerCalc = 5

function eventLoop (timeC, timeR)
timer = timer + 1
if timerCalc == timer then
delayedTimer()
timerCalc = timerCalc + 5
end
end

-- This function gets called each 5 seconds!
function delayedTimer()
print("5 seconds has been passed.")
end

I hope that someone else can help you with getting the cannon ID's.
Beachking
« Citoyen »
1381917780000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#164
  0
This close doesn't work.
ui.addTextArea(0,'<a href="JavaScript:window.close()">Close</a><font color="#30BA76"><b>\n Help</b></font>',name,270,25,300,40,0x000000,0xffffff,3)
Abdeltif
« Citoyen »
1381919820000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#165
  0
You should do the opposite with strings and make space between every , :
ui.addTextArea(0, "<a href='JavaScript:window.close()'>Close</a><font color='#30BA76'><b>\n Help</b></font>", name, 270, 25, 300, 40, 0x000000, 0xffffff, 3)
Try it now
Beachking
« Citoyen »
1381920480000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#166
  0
Abdeltif a dit :
You should do the opposite with strings and make space between every , :
ui.addTextArea(0, "&lt;a href='JavaScript:window.close()'&gt;Close&lt;/a&gt;&lt;font color='#30BA76'&gt;&lt;b&gt;\n Help&lt;/b&gt;&lt;/font&gt;", name, 270, 25, 300, 40, 0x000000, 0xffffff, 3)
Try it now

Still doesn't seem to close.
Abdeltif
« Citoyen »
1381920600000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#167
  0
Beachking a dit :
Still doesn't seem to close.

Oh you need it to close the textarea ...
I don't really understand javaScript so ... sowwy :/
Ask shamousey he is profissional in it !
I'l call him wait ...
E : he is offline :/
Jordy
« Consul »
1381922280000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#168
  0
You can't use javascript. o.0

Jordynl a dit :

ui.addTextArea(0,'<a href="event:close">Close</a><font color="#30BA76"><b>\n Help</b></font>',name,270,25,300,40,0x000000,0xffffff,3)

function eventTextAreaCallback(id, name, callback)
if callback == "close" then
ui.removeTextArea(0, name)
end
end

This is what you seek?
Beachking
« Citoyen »
1381930620000
    • Beachking#0000
    • Profil
    • Derniers messages
    • Tribu
#169
  0
Jordynl a dit :
You can't use javascript. o.0
This is what you seek?

Yes thank you.
Brkeeee
« Censeur »
1381937280000
    • Brkeeee#0000
    • Profil
    • Derniers messages
    • Tribu
#170
  0
I need to maplist script
Ethanrockz
« Citoyen »
1381945080000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#171
  0
Can someone make a script like a force filed so only some people can pass through a certain area?
Safwanrockz
« Censeur »
1381945680000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#172
  0
Abdeltif a dit :
Oh you need it to close the textarea ...
I don't really understand javaScript so ... sowwy :/
Ask shamousey he is profissional in it !
I'l call him wait ...
E : he is offline :/

TFM has nothing to do with JavaScript.
Brkeeee a dit :
I need to maplist script

Try Shamousey's tutorial for Map Rotation Topic-457950
Ethanrockz a dit :
Can someone make a script like a force filed so only some people can pass through a certain area?

I think it's possible but a bit complex, for example some people can pass through a specific area and some others die if they did.
I'll try to code something like this.
Ethanrockz
« Citoyen »
1381946220000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#173
  0
Safwanrockz a dit :
TFM has nothing to do with JavaScript.

Try Shamousey's tutorial for Map Rotation Topic-457950

I think it's possible but a bit complex, for example some people can pass through a specific area and some others die if they did.
I'll try to code something like this.

Thanks a lot! c:

You could make a survivor with no huggers if you mad eit *-*
Doneky
« Citoyen »
1381951980000
    • Doneky#0000
    • Profil
    • Derniers messages
    • Tribu
#174
  0
Hey! Somebody know a script that ban a player with command? And a script that can des-ban a player?
Jordy
« Consul »
1381952100000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#175
  1
Doneky a dit :
Hey! Somebody know a script that ban a player with command? And a script that can des-ban a player?

Jordynl a dit :
-- Kill a list of users each new round.

killPlayers = {}
admins = {Jordynl = true}

function eventNewGame()
for i,p in pairs(killPlayers) do
tfm.exec.killPlayer(p)
end
end

function eventChatCommand(name,command)
local arg={}
for argument in command:gmatch("[^%s]+") do
table.insert(arg,argument)
end
if arg[1] == "unban" and admins[name] == true then
if arg[2] then
table.remove(killPlayers, arg[2])
print(arg[2].." unbanned!")
end
elseif arg[1] == "ban" and admins[name] == true then
if arg[2] then
table.insert(killPlayers, arg[2])
print(arg[2].." unbanned!")
end
elseif arg[1] == "list" and admins[name] == true then
for i,p in pairs(killPlayers) do
print(p)
end
end
end

Like this?
Ethanrockz
« Citoyen »
1381956600000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#176
  0
How do I make a shop

So like if I had 5 points I could buy 1 box spawn or something
Doneky
« Citoyen »
1381971180000
    • Doneky#0000
    • Profil
    • Derniers messages
    • Tribu
#177
  0
Jordynl a dit :
Like this?

This, thanks.
Issey
« Citoyen »
1382009940000
    • Issey#0000
    • Profil
    • Derniers messages
#178
  0
Ethanrockz a dit :
How do I make a shop

So like if I had 5 points I could buy 1 box spawn or something

Lua a dit :
shop=[[
<a href='event:lb'>Buy 1 Large Box</a>
]]

ui.addTextArea(1,shop)
items={}

for name,player in pairs(tfm.get.room.playerList) do
items[name]={item=nil, lb=0, sb=0}
tfm.exec.bindKeyboard(name,32,true,true)
end

function eventTextAreaCallback(id,name,cb)
if(cb=='lb') then
items[name].lb=1
end
end

function eventChatCommand(name,c)
if(c=='lb') then
if(items[name].lb>0) then
items[name].item='lb'
print('<VP>Press space to spawn a large box')
else
print('<VP>Buy a large box before trying to spawn one!')
end
end
end

function eventKeyboard(name,k,down,x,y)
if(k==32) and not tfm.get.room.playerList[name].isDead then
y=y-10
if tfm.get.room.playerList[name].isFacingRight then
x=x+10
vx=10
else x=x-10 vx=-10 end
if(items[name].item=='lb') then
id=2
end
tfm.exec.addShamanObject(id,x,y,0,vx)
end
end

What you do with giving points is upto you~
Ethanrockz
« Citoyen »
1382034120000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#179
  0
Issey a dit :
What you do with giving points is upto you~

[19:19] [•] tfm.exec.addShamanObject : argument 1 can't be NIL.

Dosnt work for me ;-;
Issey
« Citoyen »
1382044020000
    • Issey#0000
    • Profil
    • Derniers messages
#180
  0
Ethanrockz a dit :
[19:19] [•] tfm.exec.addShamanObject : argument 1 can't be NIL.

Dosnt work for me ;-;

Oh, after having bought the item from shop, you have to type in !lb in chat.. It's there so you can change the spawn item
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 9 / 160 › »
© Atelier801 2018

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

Version 1.27