My module! |
Cheetahkitty « Citoyen » 1394317680000
| 0 | ||
Hello! i am not apart of the lua team but i have created a script it only works in tribe houses you can fly and you use YOUR SKILLS you earned by leveling up! there is also a skill you dont need to have all you do is press space and you FLY! you are shaman and its like shaman survivor! its also snowing heres the script if you wanna do it!! tfm.exec.newGame(4867614) tfm.exec.disableAutoNewGame(true) tfm.exec.setGameTime(120) for name,player in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) 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==1 then tfm.exec.giveCheese(n) tfm.exec.playerVictory(n) tfm.exec.setGameTime(5) end end print("<N> #shamanmatch <N> is a minigame where you have to survive other shamans last one alive wins!. Created by Cheetahkitty <N> ") function eventLoop() tfm.exec.addShamanObject(tfm.enum.shamanObject.cannon, math.random()*800, 30) end lights={1,2,4,9,11,13} delay=os.time() firework_x,firework_y=400,380 blast_x,blast_y=400,200 trail=0 divisions=0 done=false f=0 function eventNewPlayer(name) system.bindMouse(name,true) end for name in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventMouse(name,x,y) if first_person==nil and f==0 then first_person=name firework_x=x firework_y=y else local vx,vy blast_x=x blast_y=y trail_x=firework_x trail_y=firework_y divisions_x=(blast_x-firework_x)/10 divisions_y=(blast_y-firework_y)/10 if divisions_x<0 then divisions_x=0-(divisions_x) end if divisions_y<0 then divisions_y=0-(divisions_y) end divisions=divisions_x>divisions_y and divisions_y or divisions_x divisions=math.floor(divisions+0.5) if divisions%2==1 then divisions=divisions+1 end path_x=(blast_x-firework_x)/divisions path_y=(blast_y-firework_y)/divisions end end function eventLoop(ct,tr) if trail<divisions then for i=1,2 do for i=1,3 do vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],trail_x,trail_y,vx,vy,0,0) end trail_x=trail_x+path_x trail_y=trail_y+path_y trail=trail+1 end end if trail>0 and trail==divisions then done=true trail=0 divisions=0 end if done then for i=1,(math.random(20,100)) do local vx,vy vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],blast_x,blast_y,vx,vy,0,0) end done=false f=1 time=os.time() end if f==1 and time<os.time()-300 then local x,y,vx,vy for i=1,math.random(13) do x=blast_x+math.random(-40,40) y=blast_y+math.random(-40,40) for i=1,math.random(7) do vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],x,y,vx,vy,0,0) end end f=math.random(0,1) if f==0 then first_person=nil end end end function eventEmotePlayed(playerName,emote) if emote==3 then tfm.exec.giveCheese(playerName) end end for name,player in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) end tfm.exec.snow() local loopCount = 0 function eventLoop() if loopCount == 0 then tfm.exec.snow() tfm.exec.snow() end loopCount = (loopCount + 1) % 100 end red={} blue={} function makeTeams() local playerList={} for name,player in pairs(tfm.get.room.playerList) do table.insert(playerList,name) end for i=1,#playerList,1 do local index=math.random(#playerList) local name=playerList[index] if i%2==0 then table.insert(red,name) else table.insert(blue,name) end table.remove(playerList,index) end end function eventNewPlayer(name) tfm.exec.bindKeyboard(name,32,true,true) end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if key==32 then tfm.exec.movePlayer(name,0,0,true,0,-50,false) end end red={} blue={} function makeTeams() local playerList={} for name,player in pairs(tfm.get.room.playerList) do table.insert(playerList,name) end for i=1,#playerList,1 do local index=math.random(#playerList) local name=playerList[index] if i%2==0 then table.insert(red,name) else table.insert(blue,name) end table.remove(playerList,index) end end |
Cheetahkitty 1394317800000
| | ||
[Modéré par Bolinboy, raison : double post] |
Rebornaddict « Citoyen » 1394364780000
| 0 | ||
There is too much Ampampamp& |
Fireyone « Citoyen » 1396108500000
| 0 | ||
There is no point on adding tfm.exec.setGameTime(120) it's 2 minutes... if your on a regular room it is set to 2 minutes unless shaman skill have added time. |
0 | ||
Doesn't work because & |
Pathuis « Citoyen » 1396117980000
| 0 | ||
The correctly code is: tfm.exec.newGame(4867614) tfm.exec.disableAutoNewGame(true) tfm.exec.setGameTime(120) for name,player in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) 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==1 then tfm.exec.giveCheese(n) tfm.exec.playerVictory(n) tfm.exec.setGameTime(5) end end print("<N> #shamanmatch <N> is a minigame where you have to survive other shamans last one alive wins!. Created by Cheetahkitty &amp;<N> ") function eventLoop() tfm.exec.addShamanObject(tfm.enum.shamanObject.cannon, math.random()*800, 30) end lights={1,2,4,9,11,13} delay=os.time() firework_x,firework_y=400,380 blast_x,blast_y=400,200 trail=0 divisions=0 done=false f=0 function eventNewPlayer(name) system.bindMouse(name,true) end for name in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventMouse(name,x,y) if first_person==nil and f==0 then first_person=name firework_x=x firework_y=y else local vx,vy blast_x=x blast_y=y trail_x=firework_x trail_y=firework_y divisions_x=(blast_x-firework_x)/10 divisions_y=(blast_y-firework_y)/10 if divisions_x<0 then divisions_x=0-(divisions_x) end if divisions_y<0 then divisions_y=0-(divisions_y) end divisions=divisions_x>divisions_y and divisions_y or divisions_x divisions=math.floor(divisions+0.5) if divisions%2==1 then divisions=divisions+1 end path_x=(blast_x-firework_x)/divisions path_y=(blast_y-firework_y)/divisions end end function eventLoop(ct,tr) if trail<divisions then for i=1,2 do for i=1,3 do vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],trail_x,trail_y,vx,vy,0,0) end trail_x=trail_x+path_x trail_y=trail_y+path_y trail=trail+1 end end if trail>0 and trail==divisions then done=true trail=0 divisions=0 end if done then for i=1,(math.random(20,100)) do local vx,vy vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],blast_x,blast_y,vx,vy,0,0) end done=false f=1 time=os.time() end if f==1 and time<os.time()-300 then local x,y,vx,vy for i=1,math.random(13) do x=blast_x+math.random(-40,40) y=blast_y+math.random(-40,40) for i=1,math.random(7) do vx=math.random()+math.random(-1,1) vy=math.random()+math.random(-1,1) tfm.exec.displayParticle(lights[math.random(#lights)],x,y,vx,vy,0,0) end end f=math.random(0,1) if f==0 then first_person=nil end end end function eventEmotePlayed(playerName,emote) if emote==3 then tfm.exec.giveCheese(playerName) end end for name,player in pairs(tfm.get.room.playerList) do tfm.exec.setShaman(name) end tfm.exec.snow() local loopCount = 0 function eventLoop() if loopCount == 0 then tfm.exec.snow() tfm.exec.snow() end loopCount = (loopCount + 1) % 100 end red={} blue={} function makeTeams() local playerList={} for name,player in pairs(tfm.get.room.playerList) do table.insert(playerList,name) end for i=1,#playerList,1 do local index=math.random(#playerList) local name=playerList[index] if i%2==0 then table.insert(red,name) else table.insert(blue,name) end table.remove(playerList,index) end end function eventNewPlayer(name) tfm.exec.bindKeyboard(name,32,true,true) end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventKeyboard(name,key,down,x,y) if key==32 then tfm.exec.movePlayer(name,0,0,true,0,-50,false) end end red={} blue={} function makeTeams() local playerList={} for name,player in pairs(tfm.get.room.playerList) do table.insert(playerList,name) end for i=1,#playerList,1 do local index=math.random(#playerList) local name=playerList[index] if i%2==0 then table.insert(red,name) else table.insert(blue,name) end table.remove(playerList,index) end end |