Script Requests |
0 | ||
wanted 10 seconds after somebody started the map turned vampire tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoScore(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.disableAfkDeath(true) time=2 time1=00 rodada=0 maps={"@3998605","@4592605","@4749271","@4160225","@4081184"} function eventPlayerDied(name) vivo=vivo-1 end function novaRodada() tfm.exec.newGame (maps[math.random(#maps)]) end novaRodada() function eventPlayerDied(p) tfm.exec.respawnPlayer(p) end function eventNewGame(p) timer=0; function eventLoop() timer=timer+0.5 if timer==10 then for p in pairs(tfm.get.room.playerList) do tfm.exec.setVampirePlayer(vampire.[math.random(#vampire)]) end end end vivo=0 rodada=rodada+1 end function eventLoop(tempoPassado, tempoFaltando) if tempoFaltando < 1000 then novaRodada() end end function eventNewPlayer(p) vivo=vivo+1 end function eventPlayerLeft(p) vivo=vivo-1 end Dernière modification le 1410666960000 |
Frozenjord « Citoyen » 1410680940000
| 0 | ||
Fierywarpath a dit : Ah well actually the teleport effect is possible for everyone, it uses tfm.exec.displayParticle. For one person: system.bindMouse("Shakewooz", true) function eventMouse(name, x, y) tfm.exec.movePlayer(name, x, y, false) tfm.exec.displayParticle(37,x,y,0,0,0,0,nil) end For everyone: for i,p in pairs(tfm.get.room.playerList) do system.bindMouse(i, true) end function eventMouse(name, x, y) tfm.exec.movePlayer(name, x, y, false) tfm.exec.displayParticle(37,x,y,0,0,0,0,nil) end However, avoid using this on scrolling maps as it does mess up a little. |
Shakewooz « Citoyen » 1410708900000
| 0 | ||
Jamesqwartz a dit : this doesn't seem to work?.. |
Cheetahkitty « Citoyen » 1410727800000
| 0 | ||
how do I do it so that when someone is sham you have to ask them a question and if they gust it right they get cheese and if they guess it wrong they die |
Drgenius « Citoyen » 1410905580000
| 0 | ||
cheetahkitty a dit : I'm not quite sure what you're asking for. Do you want there to be predefined questions that the shaman has to answer? Or do you want to ask the shaman questions that they have to answer? |
Leafileaf « Citoyen » 1411217400000
| 0 | ||
Drgenius a dit : Predefined questions: -- Call this function after you make someone shaman/the map creates a shaman. questions = { "How are you?" , "What is 1 + 1?" , "Are cookies delicious?" } answers = { "Fine" , "2" , "Yes" } function askQuestion() for n,p in pairs( tfm.get.room.playerList ) do if p.isShaman then chosenQuestionId = math.random(#questions) ui.addTextArea(1,questions[chosenQuestionId],n,5,25,790,17,nil,nil,1,true) ui.addPopup(2,2,"",n,5,50,790,true) end end end function eventPopupAnswer( _ , p , a ) if a == answers[chosenQuestionId] then tfm.exec.giveCheese( p ) else tfm.exec.killPlayer( p ) end end If you want to ask the shaman questions, there wouldn't be a "right" or "wrong" unless you somehow define it too. Jamesqwartz a dit : By the way, it won't mess up if you're standing still. However, the particles move along with your screen, and offscreen particles are not displayed. Therefore, the particle might not end up where it started off/might not be displayed. Jamesqwartz a dit : Also, you don't have to remove the @. tfm.exec.newGame also accepts "@codes" in the form of a string as an argument. However, the "@" is commonly stripped and a number passed in to save code space (3 characters per map is quite something especially when you have many maps) [edit] you should also test your scripts before posting x_x Dernière modification le 1411217820000 |
Frozenjord « Citoyen » 1411231980000
| 0 | ||
Leafileaf a dit : To be fair I realised that it does accept it as a string but just telling people to remove "@" seemed a lot simpler than telling them to enclose each custom map code in quotation marks. It just saves confusion especially as my example was formatted as an number as well. As for testing, I had just edited a working script of mine so it did not really seem necessary. |
Smgxxx « Citoyen » 1412005980000
| 0 | ||
How to create ground-water, where i can swim?) I write a dit : Result: Dernière modification le 1412605620000 |
0 | ||
How to get the player with the highest score? |
0 | ||
Skibi a dit : function getHighestScore() for k, v in pairs(tfm.get.room.playerList) do p = k end for k, v in pairs(tfm.get.room.playerList) do if v.score > tfm.get.room.playerList .score then |
Operop « Citoyen » 1412034900000
| 0 | ||
Skibi a dit : score={} for k,v in pairs(tfm.get.room.playerList) do table.insert(score,v.score) end table.sort(score) for k,v in pairs(tfm.get.room.playerList) do if v.score == score[#score] then print(p) end end Dernière modification le 1412034960000 |
Shamousey « Consul » 1412067540000
| 0 | ||
Skibi a dit : function getHighestScore() local scorer={name="*Souris",score=0} for n,p in pairs(tfm.get.room.playerList) do if p.score>=scorer.score then scorer={name=n,score=p.score} end end return scorer.name end Dernière modification le 1412067600000 |
Shakewooz « Citoyen » 1412378640000
| 0 | ||
A Script that i simply ask a question (for everyone in tribe).. and pop up 2 incorrect answers and 1 correct one just by clicking, i also can customise the question/answers in the lua bar. who ever click the incorrect answer dies. and who get the answer right gets to be in the hole |
Drgenius « Citoyen » 1412674260000
| 0 | ||
Shakewooz a dit : This could be much more efficient, but it gets the job done. As least I hope. Let me know if this isn't what you had in mind: Questions a dit : Dernière modification le 1412674380000 |
Kittencutez « Citoyen » 1412678280000
| 0 | ||
Can someone make a script that when you do an action, everyone will do the same action as you? Ya know, like the super star skill, but everyone in the room does it, you dance, everyone dances, you laugh everyone laughs ect. |
Cactusjack « Citoyen » 1412689920000
| 0 | ||
not possible (yet) |
Mousecrewz « Citoyen » 1412815020000
| 0 | ||
Someone please make me a system difficulties 1 to 5 and when the player enters the burrow and can choose the difficulty of the next map and it appearing on the top bar @Code | Difficulty: 1 - Very Easy | Time remaining: 02:00 | Mice: 1 @Code | Difficulty: 2 - Easy | Time remaining: 02:00 | Mice: 1 @Code | Difficulty: 3 - Medium | Remaining time: 02:00 | Mice: 1 @Code | Difficulty: 4 - Hard | Time remaining: 02:00 | Mice: 1 @Code | Difficulty: 5 - Very Hard | Time remaining: 02:00 | Mice: 1 |
Kittencutez « Citoyen » 1412836980000
| 0 | ||
Um okay, is it possible to create a script that makes you a magnet? Meaning all mice and dynamic objects will be dragged towards you? |
Drgenius « Citoyen » 1412981520000
| 0 | ||
kittencutez a dit : Ahhh, this one was fun to make. ^^ Magnet a dit : Edit: Here you go, Evilsantah :p Dernière modification le 1413608820000 |
Kittencutez « Citoyen » 1412984760000
| 0 | ||
Drgenius a dit : Thanks! :D Your script is absolutely amazing, your very good at coding ^-^ |