×

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
  • /
  • [Minigame] Lua script PowerClass
[Minigame] Lua script PowerClass
Afdhalpanuli
« Citoyen »
1384675560000
    • Afdhalpanuli#0000
    • Profil
    • Derniers messages
#1
  0
type /lua and copy this:


ui.addTextArea(1,"<p align='center'><a href='event:TITLE'><b><font color='#DE742E'>The Fairy Land</b></a></p>",name,10,30,150,16,nil,0x009D9D,nil,true)
ui.addTextArea(2,"<p align='center'><a href='event:peri alice'><b><font color='#7B8A93'>Peri Alice</b></a></p>",name,175,30,80,16,nil,0x009D9D,nil,true)
ui.addTextArea(3,"<p align='center'><a href='event:peri michan'><b><font color='#7B8A93'>Peri Michan</b></a></p>",name,275,30,80,16,nil,0x009D9D,nil,true)
ui.addTextArea(4,"<p align='center'><a href='event:peri lisa'><b><font color='#7B8A93'>Peri Lisa</b></a></p>",name,375,30,80,16,nil,0x009D9D,nil,true)
ui.addPopup(3,0," ini request mu!(ganti ini kalo mau)<br>pencet space pas peri alice(terbang)<br>pencet CTRL pas michan(keluarin box)<br>pencet SHIFT(buat shaman sihir) ",name,220,100,360);

players={}
toDespawn={}
maps={3,521255,4387463,0,100}

function eventNewPlayer(name)
players[name]={
timestamp=os.time(),
offsets={x=2, y=10}
}
end

function eventKeyboard(name,key,down,x,y)
if (key==32 or key==40 or key==83) and not tfm.get.room.playerList[name].isDead and started then
local id
if tfm.get.room.playerList[name].isFacingRight then
id=tfm.exec.movePlayer(name,0,0,true,0,-50,false)
else
id=tfm.exec.movePlayer(name,0,0,true,0,-50,false)
end
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
if (key==17) and not tfm.get.room.playerList[name].isDead and started then
local id
if tfm.get.room.playerList[name].isFacingRight then
id=tfm.exec.addShamanObject(57,x,y,true,0,-20,false)
else
id=tfm.exec.addShamanObject(57,x,y,true,0,-20,false)
end
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
if (key==16) and not tfm.get.room.playerList[name].isDead and started then
local id
if tfm.get.room.playerList[name].isFacingRight then
id=tfm.exec.addConjuration(x/10, y/10, 10000)
else
id=tfm.exec.addConjuration(x/10, y/10, 10000)
end
players[name].timestamp=os.time()
table.insert(toDespawn,{os.time(),id})
end
end


function eventChatCommand(name,command)
local arg={}
for argument in command:gmatch("[^%s]+") do
table.insert(arg,argument)
end
if arg[1]=="off" then
if tonumber(arg[2]) and tonumber(arg[3]) then
players[name].offsets.x=tonumber(arg[2])
players[name].offsets.y=tonumber(arg[3])
else
players[name].offsets.x=2
players[name].offsets.y=10
end
tfm.exec.chatMessage("Offsets changed to X:"..players[name].offsets.x.." Y:"..players[name].offsets.y,name)
end
end

function eventNewGame()
started=false
end

function eventLoop(time,remaining)
if time >= 3000 and not started then
started=true
end
if remaining<=0 then
tfm.exec.newGame(maps[math.random(#maps)])
end
for i,balloon in ipairs(toDespawn) do
if balloon[1] <= os.time()-30000000 then
tfm.exec.removeObject(balloon[2])
table.remove(toDespawn,i)
end
end
end

function eventPlayerDied(name)
local i=0
local n
for pname,player in pairs(tfm.get.room.playerList) do
if not player.isDead then
i=i+1
n=pname
end
end
if i==0 then
tfm.exec.newGame(maps[math.random(#maps)])
elseif i==1 then
tfm.exec.giveCheese(n)
tfm.exec.playerVictory(n)
tfm.exec.setGameTime(5)
end
end

function eventTextAreaCallback(id,name,callback)
if callback=="peri alice" then
for id=2,5 do
ui.removeTextArea(id,name)
ui.removeTextArea(6969+id,name)
ui.removeTextArea(7979+id,name)
for i,key in ipairs({32,40,83}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
end
end
if callback=="peri michan" then
for id=2,5 do
ui.removeTextArea(id,name)
ui.removeTextArea(6969+id,name)
ui.removeTextArea(7979+id,name)
for i,key in ipairs({17}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
end
end
if callback=="peri lisa" then
for id=2,5 do
ui.removeTextArea(id,name)
ui.removeTextArea(6969+id,name)
ui.removeTextArea(7979+id,name)
for i,key in ipairs({16}) do
tfm.exec.bindKeyboard(name,key,true,true)
end
end
end
end

for name,player in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

tfm.exec.newGame(maps[math.random(#maps)])
Gigaflower
1384680780000
    • Gigaflower#0000
    • Profil
    • Derniers messages
    • Tribu
#2
[Modéré par Bolinboy, raison : Spam.]
Safwanrockz
« Censeur »
1384692480000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#3
  0
This looks pretty much like Shamousey's code for FFA minigame in this thread Topic-457951 with some changed functions and added events.
Xpelem
1384857960000
    • Xpelem#0000
    • Profil
    • Derniers messages
    • Tribu
#4
[Modéré par Bolinboy, raison : Not english]
Hasannj
« Citoyen »
1384893900000
    • Hasannj#0000
    • Profil
    • Derniers messages
#5
  0
[Minigame] ? [Script] -,-
Jimmyjit
« Citoyen »
1385112060000
    • Jimmyjit#0000
    • Profil
    • Derniers messages
    • Tribu
#6
  0
indonesian can do it
Xpelem
1385116140000
    • Xpelem#0000
    • Profil
    • Derniers messages
    • Tribu
#7
[Modéré par Takumisyn, raison : Apparently, your tribe wants to keep this private. Please talk to them about it.]
Jimmyjit
1385182440000
    • Jimmyjit#0000
    • Profil
    • Derniers messages
    • Tribu
#8
[Modéré par Takumisyn, raison : Response]
Tiaratown
1391909880000
    • Tiaratown#0000
    • Profil
    • Derniers messages
    • Tribu
#9
[Modéré par Bolinboy, raison : spam]
Tiaratown
1392214620000
    • Tiaratown#0000
    • Profil
    • Derniers messages
    • Tribu
#10
[Modéré par Bolinboy, raison : Spam.]
Curlfeather
« Citoyen »
1392221280000
    • Curlfeather#0000
    • Profil
    • Derniers messages
#11
  0
Amg wtc does this do?
Petsum
1397396040000
    • Petsum#0000
    • Profil
    • Derniers messages
#12
[Modéré par Muffun, raison : Spam]
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Minigame] Lua script PowerClass
© Atelier801 2018

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

Version 1.27