| |
| « Consul » 1486722480000
| 0 | ||
| how to make 2 bind keyboard in one key ? |
| « Consul » 1486726680000
| 0 | ||
Kingkomand2o a dit : Maybe this can help Code Lua 1 2 3 4 local name = "Kingkomand2o" |
| 0 | ||
Unlocker001 a dit : Try this Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 --[[ Dernière modification le 1486750440000 |
| « Censeur » 1486747500000
| 0 | ||
| I need a code that will allow me to spawn a ground and when i step on it, it will turn me into sham. Idk if this is possble :/ Dernière modification le 1486747560000 |
| 0 | ||
Tukushii a dit : Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 local admin = {Onkei = true, Tukushii = true} Dernière modification le 1486750380000 |
| « Censeur » 1486755360000
| 0 | ||
Onkei a dit : Can you make it like a click so when you spawn it than you click on it? |
| 0 | ||
Tukushii a dit : I don't really understand what you mean, could you elaborate? |
| « Censeur » 1486761240000
| 0 | ||
Onkei a dit : I want the sham thing to appear when i click on the ground. |
| 0 | ||
Tukushii a dit : Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 local admin = {Onkei = true, Tukushii = true} |
| « Citoyen » 1486823100000
| 0 | ||
| Can i get a lua where i can throw 10 snowballs in front of me like in ratapult but with snowball while pressing "E" |
| 0 | ||
Yolohackers a dit : Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 local keys = {space = 32, left = 37, right = 39, a = 65, d = 68, e = 69, q = 81} |
| « Consul » 1486836480000
| 0 | ||
Dramatotala a dit : Please i need !! |
| « Citoyen » 1486843560000
| 0 | ||
a dit : please you can fix that for me i want when i shot you white snowball i make damage i use script but Health go down when i shot enemy i want when i shot enemy i make he's Health go down not me this is my script local defaultMaxHealth = 100 local defaultObjectDamage = 2 local players = {} function main() for n in pairs(tfm.get.room.playerList) do eventNewPlayer(n) end end function pythag(x1, y1, x2, y2, r) local x = x2 - x1 local y = y2 - y1 local r = r + r return x * x + y * y < r * r end function showHealthBar(n) local player = players[n] local healthLen = math.floor(tonumber(player.health) * (250 / defaultMaxHealth)) if healthLen < 80 then healthLen = 80 elseif healthLen > 250 then healthLen = 250 end ui.addTextArea(0, "", n, 10, 25, 250, 20, 0x324650, 0x89a7f5, 0.7, true) ui.addTextArea(1, "<p align='center'>"..player.health.." Health", n, 10, 25, healthLen, 20, 0x171918, 0x171918, 0.5, true) end function eventLoop() for i, object in pairs(tfm.get.room.objectList) do for n, data in pairs(tfm.get.room.playerList) do if pythag(object.x, object.y, data.x, data.y, 50) and (math.abs(object.vx) > 2 or math.abs(object.vy) > 2) then local player = players[n] if player then player.health = player.health - defaultObjectDamage -- player.health = player.health - math.abs(object.vx) - math.abs(object.vy) - defaultObjectDamage if player.health <= 0 then tfm.exec.killPlayer(n) end showHealthBar(n) end end end end end function eventNewGame() for n in pairs(tfm.get.room.playerList) do eventPlayerRespawn(n) end end function eventNewPlayer(n) if not players[n] then players[n] = {health = defaultMaxHealth} end showHealthBar(n) end function eventPlayerDied(n) players[n].health = 0 showHealthBar(n) end function eventPlayerRespawn(n) players[n].health = defaultMaxHealth showHealthBar(n) end main() local keys = {space = 32, left = 37, right = 39, a = 65, d = 68, e = 69, q = 81} local players = {} local settings = { throwKeys = {[keys.e] = true}, leftKeys = {[keys.left] = true, [keys.a] = true, [keys.q] = true}, rightKeys = {[keys.right] = true, [keys.d] = true}, } function main() for n in pairs(tfm.get.room.playerList) do eventNewPlayer(n) end end function setKeys(n) for i, key in pairs(keys) do tfm.exec.bindKeyboard(n, key, true, true) end end function eventKeyboard(n, key, down, x, y) local data = tfm.get.room.playerList[n] local player = players[n] if not data.isDead then if settings.rightKeys[key] then player.direction = 1 elseif settings.leftKeys[key] then player.direction = -1 elseif settings.throwKeys[key] then tfm.exec.addShamanObject(34, x + (20 * player.direction), y - 10, 0, math.random(8, 12) * player.direction, 0, false) end end end function eventNewPlayer(n) players[n] = {direction = 1} setKeys(n) end main() function eventPlayerDied(n) 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.setGameTime(5) tfm.exec.giveCheese(n) tfm.exec.playerVictory(n) tfm.exec.setUIShamanName("Get ready..") tfm.exec.setUIMapName("pow's wars") end end |
| 0 | ||
Haytam a dit : I didn't test this very much, so tell me if you're having issues Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 local defaultMaxHealth = 100 Dramatotala a dit : Lua can't discriminate between genders soo.... This script uses Hakureimouse's very old object spawner thingamabob that's no longer available. Here's the list of commands you can use from this script; !powers [n], !unpowers [n], !fly, !help, ![object name] [dimensions]. Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 local admin = {Onkei = true, Dramatotala = true, Kmaaz = true} Dernière modification le 1486905240000 |
| « Citoyen » 1486913940000
| 0 | ||
Onkei a dit : Thanks |
| « Citoyen » 1486914060000
| 0 | ||
| Can i get a script Where any mice or objects gets attracted to me like a magnet? |
| 0 | ||
Yolohackers a dit : This isn't very realistic but it does the trick Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 local magnet = "Yolohackers" Also this gave me an idea to make this simple mini-game Code Lua 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 local magnet = "" Dernière modification le 1486930680000 |
| « Citoyen » 1487372100000
| 0 | ||
| Hello, I need some help. I want the player to be able to use the !join command only once. So that if count = 3 and you already did !join then count still = 3 .... Here's the code: a dit : |
| 0 | ||
Heniyengui a dit : Code Lua 1 2 3 4 5 6 7 8 9 count = 0 |
| « Citoyen » 1487441760000
| 0 | ||
| Hello i wanna code that when some one say !help in chat text pop open i want to text visible only who say !help in chat |