[Minigame] Lua script PowerClass |
![]() ![]() « Citoyen » 1384675560000
| 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)]) |
![]() 1384680780000
| | ||
[Modéré par Bolinboy, raison : Spam.] |
![]() ![]() « Censeur » 1384692480000
| 0 | ||
This looks pretty much like Shamousey's code for FFA minigame in this thread Topic-457951 with some changed functions and added events. |
![]() 1384857960000
| | ||
[Modéré par Bolinboy, raison : Not english] |
![]() « Citoyen » 1384893900000
| 0 | ||
[Minigame] ? [Script] -,- |
![]() ![]() « Citoyen » 1385112060000
| 0 | ||
indonesian can do it |
![]() 1385116140000
| | ||
[Modéré par Takumisyn, raison : Apparently, your tribe wants to keep this private. Please talk to them about it.] |
![]() 1385182440000
| | ||
[Modéré par Takumisyn, raison : Response] |
![]() 1391909880000
| | ||
[Modéré par Bolinboy, raison : spam] |
![]() 1392214620000
| | ||
[Modéré par Bolinboy, raison : Spam.] |
![]() ![]() « Citoyen » 1392221280000
| 0 | ||
Amg wtc does this do? |
![]() 1397396040000
| | ||
[Modéré par Muffun, raison : Spam] |