×

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
« ‹ 26 / 160 › »
Script Requests
Safwanrockz
« Censeur »
1384883160000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#501
  0
Abdeltif a dit :
Does not work either .

I sometimes hate how lua is case sensitive though x__x
a dit :
ui.addTextArea(0, "<a href='event:close'>X</a>", nil)
function eventTextAreaCallback(id,name,cb)
if cb=="close" then
ui.removeTextArea(0)
end
end

 
Abdeltif
« Citoyen »
1384883580000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#502
  0
Safwanrockz a dit :
I sometimes hate how lua is case sensitive though x__x
 

SINCSINCSINC I WANT IT TO WORK NOT REPEATING THE SAME SCRIPT !
Safwanrockz
« Censeur »
1384883580000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#503
  0
Abdeltif a dit :
SINCSINCSINC I WANT IT TO WORK NOT REPEATING THE SAME SCRIPT !

Just copy the code in my previous post lol. It's not the same script though, I changed the uppercase B in the function name.
Bushmeister
« Consul »
1385112780000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#504
  0
q a dit :
blue={}

for player in pairs(tfm.get.room.playerList) do
if not red then
red=player
else
table.insert(blue,player)
end
end

How to give the cheese to those in the table (blue)?
Pmcarpan
« Citoyen »
1385113560000
    • Pmcarpan#0000
    • Profil
    • Derniers messages
    • Tribu
#505
  0
Bushmeister a dit :
How to give the cheese to those in the table (blue)?

Standard procedure would be to loop through the table blue and then give cheese to each of the players.
But in the above case, you can directly use tfm.exec.giveCheese(player) after table.insert, although I'm not sure what you're doing with the variable red. (For teams you need another table red={})
Zutto
« Citoyen »
1385137740000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#506
  0
Aleatory vampire?
Bushmeister
« Consul »
1385138520000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#507
  0
Aritxy a dit :
Aleatory vampire?

players = {}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players,name)
end
tfm.exec.setVampirePlayer(players[math.random(#players)])
Zutto
« Citoyen »
1385139840000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#508
  0
Bushmeister a dit :
players = {}
for name,player in pairs(tfm.get.room.playerList) do
table.insert(players,name)
end
tfm.exec.setVampirePlayer(players[math.random(#players)])

ty
Abdeltif
« Citoyen »
1385145960000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#509
  0
a dit :

function Eleminate(type)
if (type == 1) then
ui.addTextArea(0, "Found")
elseif (type=>0) then
ui.addTextArea(0, type)
end
end

[•] Init Error : [string "transformice.lua"]:4: ')' expected
Safwanrockz
« Censeur »
1385148660000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#510
  0
Abdeltif a dit :
[•] Init Error : [string "transformice.lua"]:4: ')' expected

a dit :

function Eleminate(type)
if (type == 1) then
ui.addTextArea(0, "Found")
elseif (type>=0) then
ui.addTextArea(0, type)
end
end

>= means greater than or equal to, not =>
Larenwa
« Citoyen »
1385164140000
    • Larenwa#0000
    • Profil
    • Derniers messages
#511
  0
Making players be able to draw
Zyx
« Censeur »
1385179860000
    • Zyx#8690
    • Profil
    • Derniers messages
#512
  0
Larenwa a dit :
Making players be able to draw

That's able to do in utility.

./room *#utility0Yourname
Orb
« Censeur »
1385287680000
    • Orb#0095
    • Profil
    • Derniers messages
    • Tribu
#513
  0
Is it possible to make a script where if you touch for example a little box, you win the round?
Abdeltif
« Citoyen »
1385290620000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#514
  0
Magicalorb a dit :
Is it possible to make a script where if you touch for example a little box, you win the round?

Nope :(
But there is a way using cordinates that I dunno how .
a dit :

List = [[
<font color="#ff4444"><a href="event:admin">test</a></font>
]]

ui.addTextArea(0, "<a href='event:click'>StaffTeam</a>", nil)


function eventTextAreaCallback(id,name,cb)
if cb=="click" then
ui.updateTextArea(0, name, List)
end
end
Hophipmice
« Citoyen »
1385296500000
    • Hophipmice#0000
    • Profil
    • Derniers messages
    • Tribu
#515
  0
Abdeltif a dit :
Nope :(
But there is a way using cordinates that I dunno how .

Use addTextarea
Safwanrockz
« Censeur »
1385322480000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#516
  0
Magicalorb a dit :
Is it possible to make a script where if you touch for example a little box, you win the round?

a dit :

firstx=0
secondx=400
firsty=400
secondy=200


function eventLoop(time, remaining)
for name,player in pairs(tfm.get.room.playerList) do
x=tfm.get.room.playerList[name].x
y=tfm.get.room.playerList[name].y
if(x>firstx and x<secondx and y<firsty and y>secondy) then
tfm.exec.giveCheese(name)
tfm.exec.playerVictory(name)
end
end
end

This will let you win the round when you're in the 400x200 box at the lower-left area of the map. Just like in this image:

http://i.imgur.com/bvNBNCP.png
Bushmeister
« Consul »
1385489280000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#517
  0
How to develop a stats, that isn't resetting when leaving game? That is, if you managed to go into burrow, then Cheese stats is incremented by 1. Thereafter, player leaves game and, some time after, logs in and contiunes to play and improve that stat (not from zero)
Safwanrockz
« Censeur »
1385494860000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#518
  0
Bushmeister a dit :
How to develop a stats, that isn't resetting when leaving game? That is, if you managed to go into burrow, then Cheese stats is incremented by 1. Thereafter, player leaves game and, some time after, logs in and contiunes to play and improve that stat (not from zero)

As far as I could understand, you want to make a script that keeps running even after leaving the tribe house/game? Well that's impossible, you can't keep running a script after leaving the tribe house/game.
Pmcarpan
« Citoyen »
1385525760000
    • Pmcarpan#0000
    • Profil
    • Derniers messages
    • Tribu
#519
  0
Bushmeister a dit :
...

As Saf said. Also, since we can't keep a script running, the permanent stats which you seem to mean, is not currently possible. It has been suggested though, and hopefully it will be implemented soon.
Shamousey
« Consul »
1385526480000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#520
  0
Pmcarpan a dit :
As Saf said. Also, since we can't keep a script running, the permanent stats which you seem to mean, is not currently possible. It has been suggested though, and hopefully it will be implemented soon.

Even if stats for modules is implemented, it'll only be for approved modules most likely.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 26 / 160 › »
© Atelier801 2018

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

Version 1.27