Guest User

Untitled

a guest
Apr 10th, 2013
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local function MG(NAME, DESC, IMG, speed, jump, gravity)
  2.     minetest.register_tool(NAME, {
  3.         description = DESC,
  4.         inventory_image = IMG,
  5.         tool_capabilities = {
  6.             full_punch_interval = 1.0,
  7.             max_drop_level=0,
  8.             groupcaps={
  9.                 flamable = {uses=65, maxlevel=1},
  10.             }
  11.         },
  12.         on_use = function(itemstack, user, pointed_thing)
  13.             set_physics_override(speed, jump, gravity)
  14.         end,
  15.     })
  16. end
  17.  
  18. MG("magic:low_G", "Low Gravity", "magic_lg.png", 1, 1, .5)
  19. MG("magic:high_S", "High Speed", "magic_hs.png", 2, 1, 1)
  20. MG("magic:high_J", "High Jump", "magic_hj.png", 1, 2, 1)
  21. MG("magic:ninja", "Ninja Powers", "ninja_star.png", 2.5, 1.5, 1)
RAW Paste Data