Guest User

lua code for minetest

a guest
Sep 5th, 2012
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. minetest.register_on_punchnode(function (pos, node, puncher)
  2.     if string.find(, "jumping:trampoline") then
  3.         local id = string.sub(, --get number
  4.         local name = puncher:get_player_name() --get puncher's name
  5.         id = id + 1
  6.         if id == 7 then id = 1 end
  7.         minetest.env:add_node(pos, {name = string.sub(, 1, - 1)})
  8.         minetest.chat_send_player(name, "Setting: " --tell the puncher what setting the trampoline is
  9.     end
  10. end)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add to your ad blocker whitelist or disable your adblocking software.