| |
| « Citoyen » 1443277980000
| 0 | ||
| Right, I can assure you it does work. Make sure YOUR username is in the script (on the 2nd line). Type /lua, paste and submit. Double clicking causes you to move towards the position you double-clicked. EDIT: Just use this script. interval = 2 data = { name = "Hpocks", clicked = true, timestamp = os.time() } system.bindMouse(data.name, true) function eventMouse(name, x, y) data.clicked = not data.clicked if data.clicked and data.timestamp < os.time()-500 then if x-tfm.get.room.playerList[data.name].x > 0 then tfm.exec.movePlayer(name, 0, 0, false, 85, 0, true) else tfm.exec.movePlayer(name, 0, 0, false, -85, 0, true) end data.timestamp = os.time() end end function eventLoop() if not data.clicked then interval = interval - 1 if interval == 0 then data.clicked = not data.clicked interval = 2 end end end Dernière modification le 1443278160000 |
| « Citoyen » 1443280440000
| 0 | ||
| How can you delete grounds that were made in the xml? Something like #crowdsurf. Been working around this for a few hours, I cant figure it out. |
| « Consul » 1443280860000
| 0 | ||
velspar a dit : You can't (unless the grounds use the lua="" attribute as described in the Module FAQ). What's more likely is they get the map's XML and then reload the map using addPhysicObject or something similar to put the grounds back under the module's control. |
| « Citoyen » 1443284280000
| 0 | ||
Shamousey a dit : But how can I reload the map without getting that 3 second error? For my particular situation, the best I could come up with is: Going through the xml, and taking the grounds I want off of the xml, then play the new xml. I have no idea how to get around that 3 second error. |
| « Citoyen » 1443292200000
| 0 | ||
| a script that does who has the title "X" wins cheese please I am using translator |
| « Citoyen » 1443293100000
| 0 | ||
fakedobyer a dit : This should work. The FAQ and Documentation thread doesnt give any ID's for titles, so I assume youll just need to put the title between the " "s. I never worked with titles, so I may be wrong on that. Script title = "X" for name, player in pairs(tfm.get.room.playerlist) do if player.title == title then tfm.exec.giveCheese(name) end end |
| « Citoyen » 1443294300000
| 0 | ||
| script for fake message in tribe house? (like: [Cake] i like trains) is it even possible |
| « Consul » 1443295080000
| 0 | ||
bibsho a dit : It's not possible to post messages to the regular chat with scripts in your tribe house. |
| « Citoyen » 1443295620000
| 0 | ||
Shamousey a dit : oh ok |
| « Citoyen » 1443313200000
| 0 | ||
| wouldnt that be cool if there was a script to make a certain player invisible? |
| « Citoyen » 1443357060000
| 0 | ||
| A script to wish someone happy birthday with fire works around the words? Dernière modification le 1443357120000 |
| « Citoyen » 1443369540000
| 0 | ||
Bloomfire a dit : I hope this is ok. Just mess around with the values if you want it different. *If you get confused after pasting, just select the text back till you see everything. Or press the 'home' button.* Script --What do you want to say? Make sure its between " " or ' 's local Text = "Happy Birthday!" --How big do you want the text to be? local Size = 50 --What color should the text be? Similar to outfits, just add the # in the beginning. Make sure its between " " or ' 's local Color = '#ee0000' --These are the amount of pixels from the left/top part of the screen. local PositionFromTheLeft = 150 local PositionFromTheTop = 150 --How many 'fireworks' should appear every second. local Fireworks = 5 --Below shouldnt be edited. ui.addTextArea(0, '<b><font color="'..Color..'" size="'..Size..'">'..Text..'</font></b>', nil, PositionFromTheLeft, PositionFromTheTop, 0, 0, 0x000000, 0x000000, 1, true) function eventLoop()for a=0,Fireworks,1 do local b={0,1,2,4,9,11,13}local c={x=PositionFromTheLeft+math.random(-Size,Size*10),y=PositionFromTheTop+math.random(-Size,Size*2)}for a=0,math.random(3,6),1 do tfm.exec.displayParticle(b[math.random(#b)],c.x,c.y,math.random(-1,1),math.random(-1,1),0,0,nil)end end end Dernière modification le 1443375120000 |
| « Citoyen » 1443371220000
| 0 | ||
Jamesqwartz a dit : I didnt ask for clicking, I meant tapping a button. So double tapping the right arrow springs you right, and vise versa. |
| « Citoyen » 1443375060000
| 0 | ||
hpocks a dit : Assuming you just want something to use. All you need to do is input your values. Use the /lua command in your tribe house, if you have 1000+ gathered cheese, and your tribe rank can use /np. Copy whats in the spoiler, and paste it in the box. *You cant spawn any tokens such as boosters, springs, +1s, skulls, etc. With the Module API.* Script --Name of the player using this boost. Make sure your name is in " " or ' 's, and first letter capped. local MasterName = 'Velspar' --The power of the boost. local BoostPower = 50 --Dont edit anything below. local a={last=0,count=0,rightKeys={39,68},leftKeys={37,65,81},timerP=0,timerC=0,boost=BoostPower}for b,c in pairs(a.leftKeys)do tfm.exec.bindKeyboard(MasterName,c,true,true)end;for b,c in pairs(a.rightKeys)do tfm.exec.bindKeyboard(MasterName,c,true,true)end;function eventLoop()a.timerC=a.timerC+0.5;a.timerP=a.timerP-0.5;if a.timerP<=0 then a.count=0 end end;function eventKeyboard(d,e,f,g,h)if a.timerC>=1 and a.timerP>0 and a.count==1 and e==a.last then tfm.exec.movePlayer(MasterName,0,0,true,boost,0,true)a.timerC=0 else a.last=e;a.timerP=0.5;a.count=1;for b,c in pairs(a.leftKeys)do if c==e then boost=-BoostPower end end;for b,c in pairs(a.rightKeys)do if c==e then boost=BoostPower end end end end |
| « Citoyen » 1443409620000
| 0 | ||
| I have no idea if this has anything do do with this thread but can anybody tell me how to say underlined text in the chat like M̷̲̲̲̲̲̲̲̲̲̲̿̿̿̿̿e̷̲̲̲̲̲̲̲̲̲̲̿̿̿̿̿r̷̲̲̲̲̲̲̲̲̲̲̿̿̿̿̿p̷̲̲̲̲̲̲̲̲̲̲̿̿̿̿̿ It looks cool but I have no idea how to do it :c |
| « Citoyen » 1443426360000
| 0 | ||
mlg9 a dit : Shamousey a dit : As Shamousey says, you cannot control the text on the chat with lua in your tribe house. Dernière modification le 1443496080000 |
| « Citoyen » 1443468060000
| 0 | ||
velspar a dit : Beautiful... Can it be possible to have a map rotation with this? (Of course ill give you the maps) And also, can it be possible so there are no shamans to prevent the double tap ability? And another, can you make the frame of time for hte doubletap shorter, so it doesnt get confused as much with adjusting the mouse and boosting (or just give me the factor for that and let me play around with it myself) EDIT: Even better than a map rotation, just a place to put a map in so it plays that map automatically with no shamans, just so you dont have to be complicated with things. EDIT2: Can I put multiple names in, or even better just make it so everyone in the room gets the ability, or is that just a module thing where you need to name the specific player/players (I dont know this stuff at all...) EDIT3: The boost lags a tiny bit, is this just another unpreventable lua thing? Its ok if this isnt readily available. Also, the token thing was just an idea of how to possibly do it. Thanks for the coding! Dernière modification le 1443468840000 |
| « Citoyen » 1443468600000
| 0 | ||
| Map rotation is very much so possible. Not sure what you mean by the shamans, but you can disable the game from setting one on its own. Or if dont you want the shaman to be able to get a boost? Idk, most likely its possible though. You can send a message to me if you want. Might be a few more back and forths for this. Just noticing those edits... The first one, great idea. The second one, yea we can do everyone. The third, not sure what you mean, it never lagged for me. Dernière modification le 1443469320000 |
| « Citoyen » 1443518160000
| 0 | ||
hpocks a dit : This would be what you want? All players in the room have the ability to boost themselves(Even someone who comes after you run the script). You can load a map by saying "!mapcode" in the chat. (e.g !12 for vanillas) (e.g !@500000) An arrow appears as a token when a player is boosted. here is the code. [spoiler] speed=50 --change this as you like players={} keyCodes={ [39]={v=speed, r=270}, [68]={v=speed, r=270}, [37]={v=-speed, r=90}, [65]={v=-speed, r=90}, [81]={v=-speed, r=90} --why... } function eventNewPlayer(name) players[name]={ lastTime=os.time(), flag=false } for i,code in pairs(keyCodes) do tfm.exec.bindKeyboard(name, i, true, true) end end function eventKeyboard(name,code,down,x,y) local p=players[name] local time=os.time() if p.lastKey==code and p.flag and os.difftime(time, p.lastTime)<400 then tfm.exec.addShamanObject(0,x,y-40, keyCodes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 .r) Dernière modification le 1443518520000 |
| « Citoyen » 1443529560000
| 0 | ||
| @Gekkeiju Was all worked out. I gotta learn to use os.time() more often though xP Noticed the --why next to key 81, I just learned about this. https://en.wikipedia.org/wiki/AZERTY Some of keys are switched around on other keyboards. The lag was just me not using os.time(), sometimes the eventLoop will update right in the middle of your double press, resetting everything. I never really used os.time, so its definitely a habit I need to break. For the sake of boredom... I revised the script we settled on... Script --Name of the player using this boost. local _MASTERNAME = 'Velspar' --The power of the boost. local _BOOSTPOWER = 100 --What map to load? local _MAP = '@6273323' --Dont edit anything below. tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoNewGame(true) tfm.exec.disableAutoShaman(true) tfm.exec.disableAutoTimeLeft(true) tfm.exec.newGame(_MAP) local playerList = {} local keys = { left = {37, 65, 81}, right = {39, 68} } function eventNewPlayer(playerName) for _i, key in pairs(keys.left) do tfm.exec.bindKeyboard(playerName, key, true, true) end for _i, key in pairs(keys.right) do tfm.exec.bindKeyboard(playerName, key, true, true) end playerList[playerName] = { last = 0, timer = os.time(), coolDown = os.time()+1000, boost = _BOOSTPOWER } end function eventPlayerDied(playerName) tfm.exec.respawnPlayer(playerName) end function eventPlayerWon(playerName, timeElapsed, timeElapsedSinceRespawn) tfm.exec.respawnPlayer(playerName) end function eventKeyboard(playerName, keyCode, down, xPlayerPosition, yPlayerPosition) local player = playerList[playerName] if player.timer > player.coolDown and player.timer > os.time()-500 and keyCode == player.last then tfm.exec.movePlayer(playerName, 0, 0, true, player.boost, 0, true) player.coolDown = os.time()+1000 else player.last = keyCode player.timer = os.time() for _i, key in pairs(keys.left) do if key == keyCode then player.boost = -_BOOSTPOWER end end for _i, key in pairs(keys.right) do if key == keyCode then player.boost = _BOOSTPOWER end end end end for name, _v in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end |