Advertisement
Guest User

Untitled

a guest
Nov 17th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. print("[Chains] v1.0")
  2.  
  3. minetest.register_node("chains:chain", {
  4. description = "Chain",
  5. walkable = false,
  6. climbable = true,
  7. sunlight_propagates = true,
  8. paramtype = "light",
  9. drops = "",
  10. tile_images = { "Chain.png" },
  11. drawtype = "plantlike",
  12. groups = {cracky=3},
  13. sounds = default.node_sound_stone_defaults(),
  14. })
  15. minetest.register_node("chains:chain_top", {
  16. description = "Chain Top",
  17. walkable = false,
  18. climbable = true,
  19. sunlight_propagates = true,
  20. paramtype = "light",
  21. drops = "",
  22. tile_images = { "Chain_top.png" },
  23. drawtype = "plantlike",
  24. groups = {cracky=3},
  25. sounds = default.node_sound_stone_defaults(),
  26. })
  27. minetest.register_node("chains:chandelier", {
  28. description = "Chandelier",
  29. paramtype = "light",
  30. walkable = false,
  31. light_source = LIGHT_MAX-2,
  32. climbable = true,
  33. sunlight_propagates = true,
  34. paramtype = "light",
  35. drops = "",
  36. tile_images = { {name="Chandelier.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}},
  37. drawtype = "plantlike",
  38. groups = {cracky=3},
  39. sounds = default.node_sound_stone_defaults(),
  40. })
  41. minetest.register_node("chains:roll", {
  42. description = "Roll of chains",
  43. inventory_image = "Chains_roll.png",
  44. on_construct = function(pos, node)
  45.  
  46. if node.name == "default:air" then
  47. minetest.env:add_node(pos.x,pos.y,pos.x,{name="chains:chaintop"})
  48. end
  49.  
  50. if minetest.env:get_node({pos.x, pos.y-1, pos.z}).name == "default:air" then
  51. minetest.env:add_node(pos.x,pos.y-1,pos.x,{name="chains:chain"})
  52. end
  53. if minetest.env:get_node({pos.x, pos.y-2, pos.z}).name == "default:air" then
  54. if node.name == "default:air" then
  55. minetest.env:add_node(pos.x,pos.y-2,pos.x ,{name="chains:chain"})
  56. end
  57. end
  58. })
  59.  
  60. Error is:
  61. init.lua:57: unexpected symbol near '}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement