Page 1 of 1

Need help (=

PostPosted: Tue May 14, 2013 21:34
by chase programer
can someone give me the code for a pickaxe,shovel and sword

If you can thx you (=

PostPosted: Tue May 14, 2013 22:26
by doyousketch2
find your minetest directory, wherever it's located
you'll want to scroll to this file:

minetest/games/common/mods/default/init.lua

you'll need to look for the part that defines the item

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("default:pick_wood", {
    description = "Wooden Pickaxe",
    inventory_image = "default_tool_woodpick.png",
    tool_capabilities = {
        full_punch_interval = 1.2,
        max_drop_level=0,
        groupcaps={
            cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
        },
        damage_groups = {fleshy=2},
    },
})


plus the part that registers the craft

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_craft({
    output = 'default:pick_wood',
    recipe = {
        {'group:wood', 'group:wood', 'group:wood'},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})


you'll find the pickaxes, shovels and swords all in there.

PostPosted: Tue May 14, 2013 22:38
by chase programer
doyousketch2 wrote:find your minetest directory, wherever it's located
you'll want to scroll to this file:

minetest/games/common/mods/default/init.lua

you'll need to look for the part that defines the item

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("default:pick_wood", {
    description = "Wooden Pickaxe",
    inventory_image = "default_tool_woodpick.png",
    tool_capabilities = {
        full_punch_interval = 1.2,
        max_drop_level=0,
        groupcaps={
            cracky = {times={[3]=1.60}, uses=10, maxlevel=1},
        },
        damage_groups = {fleshy=2},
    },
})


plus the part that registers the craft

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_craft({
    output = 'default:pick_wood',
    recipe = {
        {'group:wood', 'group:wood', 'group:wood'},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''},
    }
})


you'll find the pickaxes, shovels and swords all in there.


thx