×

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
« ‹ 28 / 160 › »
Script Requests
Epicshawty
« Citoyen »
1385762640000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#541
  0
Shamousey a dit :
function eventChatCommand(playerName, command)
if command=="dajser" then
ui.addPopup(0, 2, "Podaj hasło. :D", playerName, 100, 100, 0) -- highlighted id goes under eventPopupAnswer
end
end

function eventPopupAnswer(id, playerName, callback)
if callback==":P" then
tfm.exec.giveCheese(playerName)
end
end

Wrong!

a dit :

function eventPopupAnswer(id, playerName, answer)
if id==0 then
tfm.exec.giveCheese(answer)
end
end

There's no callbacks on popups.
Safwanrockz
« Censeur »
1385762940000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#542
  0
Epicshawty a dit :
Wrong!


There's no callbacks on popups.

Actually shamo's script was for the eventPopupAnswer, not the eventTextAreaCallback, he just named the "answer" string as "callback", and added an if callback (answer) is ":P" then give cheese.
Epicshawty
« Citoyen »
1385763060000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#543
  0
Safwanrockz a dit :
Actually shamo's script was for the eventPopupAnswer, not the eventTextAreaCallback, he just named the "answer" string as "callback", and added an if callback (answer) is ":P" then give cheese.

But still, since the callback was not added in the command at all, it did not make sense to put a callback in the function.
Safwanrockz
« Censeur »
1385763420000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#544
  0
Epicshawty a dit :
But still, since the callback was not added in the command at all, it did not make sense to put a callback in the function.

Well yeah it didn't, but just changing a string name does not make any big deal. \o
Petrenrenpet
« Citoyen »
1385763840000
    • Petrenrenpet#0000
    • Profil
    • Derniers messages
    • Tribu
#545
  0
I want a script that reset all in 1 table...
Safwanrockz
« Censeur »
1385763960000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#546
  0
Petrenrenpet a dit :
I want a script that reset all in 1 table...

Um, as far as I could understand..
a dit :

players={}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players, name)
end

But why do you want that while you already have the tfm.get.room.playerList table?
Shamousey
« Consul »
1385764080000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#547
  0
Epicshawty a dit :
But still, since the callback was not added in the command at all, it did not make sense to put a callback in the function.

If you go by just the ID, then anything you put in will be valid. Judging by the script before, they only wanted ":P" to work to get the cheese.

Petrenrenpet a dit :
I want a script that reset all in 1 table...

Could you explain a little more what you mean by this?
Mikuhl
« Citoyen »
1385764560000
    • Mikuhl#3311
    • Profil
    • Derniers messages
    • Tribu
#548
  0
Safwanrockz a dit :
Um, as far as I could understand..

But why do you want that while you already have the tfm.get.room.playerList table?

You cant edit the playerList table, the custom table allows you to save variables relating to the player in it.
Epicshawty
« Citoyen »
1385766360000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#549
  0
Shamousey a dit :
If you go by just the ID, then anything you put in will be valid. Judging by the script before, they only wanted ":P" to work to get the cheese.
Could you explain a little more what you mean by this?

Hmm, he didn't elaborate enough so that's why I got confused and made it look wrong xD
Petrenrenpet
« Citoyen »
1385767680000
    • Petrenrenpet#0000
    • Profil
    • Derniers messages
    • Tribu
#550
  0
Shamousey a dit :
Could you explain a little more what you mean by this?

It's simple: It's a script that remove ALL of the table valors.

The table is "mago1" and 1 valor enter on table with a command...

edit: And remove ALL of the table valors with a command too.
Safwanrockz
« Censeur »
1385768040000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#551
  0
Petrenrenpet a dit :
It's simple: It's a script that remove ALL of the table valors.

The table is "mago1" and 1 valor enter on table with a command...

edit: And remove ALL of the table valors with a command too.

Just use table.remove(table)
Shamousey
« Consul »
1385769180000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#552
  0
If you want to remove everything as a table, just define it as a blank table again.

mago1={}
Bethdacat
« Consul »
1385773020000
    • Bethdacat#0000
    • Profil
    • Derniers messages
    • Tribu
#553
  0
Add a pop-up saying 'Welcome to [any name here]! [further details]' with the Continue button.
Pmcarpan
« Citoyen »
1385798760000
    • Pmcarpan#0000
    • Profil
    • Derniers messages
    • Tribu
#554
  0
Bethdacat a dit :
...

I made it such that it displays to everyone in the room and the new players.

some code a dit :


for name in pairs(tfm.get.room.playerList) do
ui.addTextArea(0,[[Welcome to ]]..name..[[! <a href="event:details"><J>Further details!</a>]],p)
end

function eventNewPlayer(p)
ui.addTextArea(0,[[Welcome to ]]..p..[[! <a href="event:details"><J>Further details!</a>]],p)
end

function eventTextAreaCallback(id,p_,cb)
if id==0 and cb=="details" then
ui.removeTextArea(0,p_)
ui.addTextArea(1,"Some nob details",p_)
--replace string with desired details
end
end

Abdeltif
« Citoyen »
1385838300000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#555
  0
a dit :
Stats = {[[<font color="#656499" size="23">]]..playerName..[[</font>]]}

Help , how can I make them seperated of each other , I wonna this :
[[word ]]..playerName..[[ word]]
Jordy
« Consul »
1385838420000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#556
  0
What about

a dit :

Stats = string.format("<font color='#656499' size='23'>%s</font>", playerName)

?
Abdeltif
« Citoyen »
1385838540000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#557
  0
Jordynl a dit :
What about
?

That is it ! :D
Thanks Jordy you are the best <3
Safwanrockz
« Censeur »
1385841000000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#558
  0
Abdeltif a dit :
Help , how can I make them seperated of each other , I wonna this :
[[word ]]..playerName..[[ word]]

You know you shouldn't have added the table brackets because that's not a table it's a string.
Bethdacat
« Consul »
1385847240000
    • Bethdacat#0000
    • Profil
    • Derniers messages
    • Tribu
#559
  0
Pmcarpan a dit :
I made it such that it displays to everyone in the room and the new players.

It says [Welcome to Bethdacat!] when I load it. I would like one like QuickCloud except a different detailed version of it.
Splashclaweh
« Citoyen »
1385869260000
    • Splashclaweh#0000
    • Profil
    • Derniers messages
    • Tribu
#560
  0
A script that instantly plays this youtube video http://www.youtube.com/watch?v=mWRsgZuwf_8 but won't play if there's already a video playing?
Not even sure if this is possible. Dx
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 28 / 160 › »
© Atelier801 2018

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

Version 1.27