×

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
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 29 / 38 › »
Module API FAQ
Safwanrockz
« Censeur »
1388429520000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#561
  0
Laagaadoo a dit :
See:

.

The problem is most likely that tfm.get.room.xmlMapInfo.xml would be nil, if printed.
I tried this, doesn't seem to work:
a dit :

local xml=""

function eventNewGame()
if tfm.get.room.xmlMapInfo then
xml = tfm.get.room.xmlMapInfo.xml
end
end

function eventChatCommand(playerName, cmd)
local tXml = string.len(xml)

if(cmd == "xml1") then
if(playerName == "Safwanrockz") then
ui.addTextArea(0, xml:gsub("< >", "< >"))

end
end
end

 

@Abd, that's not relevant.
Issey
« Citoyen »
1388496600000
    • Issey#0000
    • Profil
    • Derniers messages
#562
  0
Laagaadoo a dit :
See:

.

a dit :
xml = ""

function eventNewGame()
xml = tfm.get.room.xmlMapInfo.xml
end

function eventChatCommand(playerName, cmd)
if(cmd == "xml") then
if(playerName == "Laagaadoo") then
xml=xml:gsub("<", "&lt;")
print(xml)
end
end
end

.
Laagaadoo
« Citoyen »
1388538840000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#563
  0
Issey a dit :
.

I will test it and I speak if worked. Worked.

How to color the name of a specific player in a table in actual time?
Safwanrockz
« Censeur »
1388576340000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#564
  0
Laagaadoo a dit :
I will test it and I speak if worked.

How to color the name of a specific player in a table in actual time?

a dit :

table = {"Laagaadoo","Safwanrockz"}
tfm.exec.setNameColor(table["Safwanrockz"],0xA160E9)

 
Fatihmilano
« Citoyen »
1388841060000
    • Fatihmilano#0000
    • Profil
    • Derniers messages
    • Tribu
#565
  0
Fatihmilano a dit :
Don't understand me. Look at the this topic(Jordynl): Topic-458983
So we have to deal particularly?
Also look at it:
Is it possible to do with it?

Hey!
Bushmeister
« Consul »
1389104220000
    • Bushmeister#0000
    • Profil
    • Derniers messages
    • Tribu
#566
  0
999 lines is the maximum length of the script?
Shamousey
« Consul »
1389104340000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#567
  0
Bushmeister a dit :
999 lines is the maximum length of the script?

No, there isn't a limit on the maximum number of lines. A couple of my scripts are upwards of 1500 lines, and run fine.
Lilyblol
« Citoyen »
1389126000000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#568
  0
Wondering if I could get help for a project? LUA team members needed!
Shamousey
« Consul »
1389126120000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#569
  0
Lilyblol a dit :
Wondering if I could get help for a project? LUA team members needed!

What sort of help do you need?
Lilyblol
« Citoyen »
1389126480000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#570
  0
Shamousey a dit :
What sort of help do you need?

Could you whisper me in-game?

Where could I go about getting a module approved?
Lilyblol
1389197400000
    • Lilyblol#4443
    • Profil
    • Derniers messages
    • Tribu
#571
[Modéré par Ramenfrog, raison : Double post.]
Safwanrockz
« Censeur »
1389200100000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#572
  0
Lilyblol a dit :
Where could I go about getting a module approved?

A brief explanatory is in the OP.
Shamousey a dit :

How can I get my module approved?
Only members of the Lua Team can manage an approved module. If you would like your module to be approved, you can either request to join the Lua Team or ask a member of the team to run it for you.

 
Abdeltif
« Citoyen »
1389286500000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#573
  0
Safwanrockz a dit :
A brief explanatory is in the OP.
 

the second quote, not true
no lua member run a module for anyone
Should be edited
Safwanrockz
« Censeur »
1389287400000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#574
  0
Abdeltif a dit :
the second quote, not true
no lua member run a module for anyone
Should be edited

Hmm? What do you mean.
Abdeltif
« Citoyen »
1389290580000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#575
  0
Safwanrockz a dit :
Hmm? What do you mean.

It says in the OP that lua members run codes for mice if they want it public
But it isn't true :p
Safwanrockz
« Censeur »
1389291600000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#576
  0
Abdeltif a dit :
It says in the OP that lua members run codes for mice if they want it public
But it isn't true :p

It is true; some unofficial modules are run by Lua devs and are led by normal players.
Zyx
« Censeur »
1389317100000
    • Zyx#8690
    • Profil
    • Derniers messages
#577
  0
Are there draw variables like

draw.setscreen and all that?
Safwanrockz
« Censeur »
1389317340000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#578
  0
Swirlfire a dit :
Are there draw variables like

draw.setscreen and all that?

No, but if you want a drawing on screen script just like in pictionary, I made one:
a dit :

for name,player in pairs(tfm.get.room.playerList) do
system.bindMouse(name,true)
end

id=0
color = "0xFFFFFF"
brush=1

function eventChatCommand(n,c)
local arg={}
for argument in c:gmatch("[^%s]+") do
table.insert(arg, argument)
end
if c=="clear" then
for i=1,id do
ui.removeTextArea(i)
end
elseif arg[1]=="setcolor" then
color="0x"..arg[2]
elseif arg[1]=="brush" and tonumber(arg[2])<=30 then
brush=arg[2]
end
end

function eventMouse(name,x,y)
id = id + 1
ui.addTextArea(id, "", nil, x, y, brush, brush, color, color)
end

!setcolor ColorCode for changing the brush color
!brush Size for changing the brush size
!clear for clearing the screen

a dit :
thanks to Shamousey somehow for the original idea v_v

 
Zyx
« Censeur »
1389320280000
    • Zyx#8690
    • Profil
    • Derniers messages
#579
  0
Safwanrockz a dit :
No, but if you want a drawing on screen script just like in pictionary, I made one:

!setcolor ColorCode for changing the brush color
!brush Size for changing the brush size
!clear for clearing the screen

 

Okay, thanks
Buchicat
1389367020000
    • Buchicat#0000
    • Profil
    • Derniers messages
    • Tribu
#580
[Modéré par Bolinboy, raison : spam]
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 29 / 38 › »
© Atelier801 2018

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

Version 1.27