[Script] Cage In The House - block yourself in four ground |
Bennynovice « Citoyen » 1408263300000
| 0 | ||
Hi, everyone. I wrote a little script. You can use this in your tribe house. As the title, you can use the script to make someone to the block themselves. When someone in the tribe house press 'down' button(or 's' button), a cage made by four normal ground will appear. Anyone press down button again the cage will change to that player. Escape From The Cage: When someone use kiss emotion, the cage will turn into cloud ground. And here is the script: http://pastebin.com/xQ5vitKc --------------------------------- Now I wrote a multi-ppl version, you can change the cage size and color in this one. The script is here: http://pastebin.com/T124SQqk Change 'cageSize' in the script to change the size. Use command '!color 0xffffff' to change the color (white color for example). You can also use the word of the color like '!color blue' to change the color. The words are listed below. You can change this table in the script. Use '!color default' to set to the wood ground. colors = { red = "0xFF0000", pink = "0xFFC0CB", purple = "0x800080", chocolate = "0xD2691E", orangered = "0xFF4500", tomato = "0xFF6347", gold = "0xFFD700", yellow = "0xFFFF00", lightyellow = "0xFFFFE0", olive = "0x808000", darkgreen = "0x006400", forestgreen = "0x228B22", lightseagreen = "0x20B2AA", lime = "0x00FF00", aquamarine = "0x7FFFD4", blue = "0x0000FF", cyan = "0x00FFFF", black = "0x000000", gray = "0x808080", white = "0xFFFFFF" } Dernière modification le 1408857480000 |
Cheetahkitty « Citoyen » 1408291620000
| 0 | ||
Cool script and when I use it I can move kind of like a Hamster in a Ball Good script :3 But, You can easily get out by the mouse in the Cage does the kiss emote |
Laidsid « Citoyen » 1408476360000
| 0 | ||
NVM IT WORKS! Dernière modification le 1408476420000 |
0 | ||
Super awesome,but man do you can set it for a single player,not for all? |
Frozenjord « Citoyen » 1408546380000
| 0 | ||
Cucsmardul a dit : At the beginning of the script where you see this: function eventNewPlayer(name) for i,key in ipairs({40,83}) do tfm.exec.bindKeyboard(name,key,true,true) end end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end Replace all of it with just this: for i,key in ipairs({40,83}) do tfm.exec.bindKeyboard("Insert name here",key,true,true) end Where it says "Insert name here" type your username. |
Crazysushi « Citoyen » 1408552920000
| 0 | ||
Is it possible to have 2 people trapped in a box? Because my friend and I want to have a box race *^* |
Bennynovice « Citoyen » 1408693560000
| 0 | ||
Crazysushi a dit : Two people version: name1="aaa" name2="bbb" for i,key in ipairs({40,83}) do tfm.exec.bindKeyboard(name1,key,true,true) tfm.exec.bindKeyboard(name2,key,true,true) end name1ID = 1 name2ID = 5 ground = { name1 = { downx=0, downy=0, leftx=0, lefty=0, rightx=0, righty=0, upx=0, upy=0 }, name2 = { downx=0, downy=0, leftx=0, lefty=0, rightx=0, righty=0, upx=0, upy=0 } } bodyDef = { type = 0, width = 60, height = 10, foreground = false, friction = 0.3, restitution = 0.2, angle = 0, miceCollision = true, groundCollision = false, dynamic = false, fixedRotation = true, mass = 0, linearDamping = 0, angularDamping = 0 } function eventKeyboard(name,key,down,x,y) local id = name1ID local nameid = "name1" if name==name2 then id = name2ID nameid = "name2" end -- up and down ground tfm.exec.removePhysicObject(id) bodyDef.type=0 bodyDef.width=60 bodyDef.height=10 bodyDef.miceCollision = true test = tfm.exec.addPhysicObject(id, x, y+20, bodyDef) ground[nameid].downx=x ground[nameid].downy=y+20 tfm.exec.removePhysicObject(id+1) test = tfm.exec.addPhysicObject(id+1, x, y-30, bodyDef) ground[nameid].upx=x ground[nameid].upy=y-30 -- left and right ground tfm.exec.removePhysicObject(id+2) bodyDef.type=0 bodyDef.width=10 bodyDef.height=60 bodyDef.miceCollision = true test = tfm.exec.addPhysicObject(id+2, x-25, y-5, bodyDef) ground[nameid].leftx=x-25 ground[nameid].lefty=y-5 tfm.exec.removePhysicObject(id+3) test = tfm.exec.addPhysicObject(id+3, x+25, y-5, bodyDef) ground[nameid].rightx=x+25 ground[nameid].righty=y-5 end function eventEmotePlayed(playerName,emote) local id = name1ID local nameid = "name1" if playerName==name2 then id = name2ID nameid = "name2" end if emote==3 and playerName==name1 or playerName==name2 then -- up and down ground tfm.exec.removePhysicObject(id) bodyDef.type=8 bodyDef.width=60 bodyDef.height=10 bodyDef.miceCollision = false test = tfm.exec.addPhysicObject(id, ground[nameid].downx, ground[nameid].downy, bodyDef) tfm.exec.removePhysicObject(id+1) test = tfm.exec.addPhysicObject(id+1, ground[nameid].upx, ground[nameid].upy, bodyDef) -- left and right ground tfm.exec.removePhysicObject(id+2) bodyDef.type=8 bodyDef.width=10 bodyDef.height=60 bodyDef.miceCollision = false test = tfm.exec.addPhysicObject(id+2, ground[nameid].leftx, ground[nameid].lefty, bodyDef) tfm.exec.removePhysicObject(id+3) test = tfm.exec.addPhysicObject(id+3, ground[nameid].rightx, ground[nameid].righty, bodyDef) end end Replace "aaa" and "bbb" Dernière modification le 1408710420000 |
Cutylilian « Citoyen » 1408707540000
| 0 | ||
Pastebin please? |
0 | ||
Omg, I love this. ♥ Is possible for 3 or 4 people to be trapped in the box? Or been trapped in a bigger box? Dernière modification le 1408840080000 |
Mipmippp « Citoyen » 1409787720000
| 0 | ||
Uifer a dit : You can change the size of the box, at this script when it says: --Cage In The House (multi-ppl version) --change the size of the cage cageSize=60 players = {} nextGroundID = 1001 you can change that number to the number you want. |
Camila_cabello « Citoyen » 1416697380000
| 0 | ||
It Doesn't Work for me :C |
Dreamingmous « Citoyen » 1416770700000
| 0 | ||
I played with my friend and we found out that !color can make invisible cages! :DDDDD btw nice script *-* Dernière modification le 1416770760000 |
0 | ||
Great scripts. |
Camila_cabello « Citoyen » 1416892680000
| 0 | ||
how do u do it, it wont let me |
Animaljamvid « Citoyen » 1416957120000
| 0 | ||
it wont work help please ive tried dozens of times but nothing happens Dernière modification le 1416957780000 |