- Code: Select all
minetest.clear_craft({
output = "moreblocks:wood_tile 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
}
})
minetest.clear_craft({
output = "moreblocks:wood_tile 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
}
})
local success, err = pcall(function() minetest.clear_craft(parameter_recipe) end)
minetest.register_on_killplayer(
function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
local player_name = hitter:get_player_name()
local inventory = hitter:get_inventory()
inventory:add_item("main",{name="default:gold_ingot"})
minetest.chat_send_player(player_name, '**You got gold!**')
end
})
ManElevation wrote:Need help, can someone one make this code work?
on kill give player gold.
minetest.register_on_punchplayer(function(player, hitter, _, _, _, damage)
if not (hitter and hitter:is_player()) then
return -- Punched by non-player
end
local hp = player:get_hp()
if hp - damage > 0 or hp <= 0 then
return -- Player is not dead yet or still dead
end
-- Player got killed by player 'hitter'
local hitter_name = hitter:get_player_name()
local player_name = player:get_player_name()
local inv = hitter:get_inventory()
inv:add_item("main", {name="default:gold_ingot"})
minetest.chat_send_player(hitter_name, "** You killed " .. player_name
.. ". Here, have a free gold ingot! **")
end)
local pos = player:getpos() ; pos.y = pos.y +1
local goal = {x=0, y=0, z=0}
local dir = vector.direction(pos, goal)
local dis = vector.distance(pos, goal)
minetest.add_particlespawner({
amount = 15*dis,
time = 1,
minpos = pos,
maxpos = pos,
minvel = dis,
maxvel = dis,
minacc = dir,
maxacc = dir,
minexptime = 1,
maxexptime = 1,
minsize = 15,
maxsize = 20,
collisiondetection = false,
vertical = false,
texture = "tnt_smoke.png"
})
ShallowDweller wrote:sorry if this is the wrong place to ask, but i couldn't find this information anywhere (i googled, browsed github, checked the wiki...).
some mods have other dependencies than "default", but i can't figure out where to download some of said dependencies and there are many mods with similar names, so it is hard to tell if i found the right one. and i don't know if the uploaders are active in the forums (nor if necrobumping is forbiden).
the dependencies i need are the following:
"wool", "flowers", "stairs", "dye", "bucket" and "farming"*
*i belive i may have THIS one, but i'm not sure and i'd like to confirm.
the mods requesting them are:
carpet3d, compost bin and inventorybags.
Lejo wrote:I tried to generate a trial of smoke from a player to another position.
- Code: Select all
local pos = player:getpos() ; pos.y = pos.y +1
local goal = {x=0, y=0, z=0}
local dir = vector.direction(pos, goal)
local dis = vector.distance(pos, goal)
minetest.add_particlespawner({
amount = 15*dis,
time = 1,
minpos = pos,
maxpos = pos,
minvel = dis,
maxvel = dis,
minacc = dir,
maxacc = dir,
minexptime = 1,
maxexptime = 1,
minsize = 15,
maxsize = 20,
collisiondetection = false,
vertical = false,
texture = "tnt_smoke.png"
})
The smoke should spawn at the player and disappears at position, but I don't know how to set minvel and maxvel.
Can someone help me?
Sires wrote:All this dependencies are included in the default Minetest Game subgame, if you are using another subgame that doesn't have them maybe the subgame was not made to have this mods or you would have to get this mods from the Minetest Game subgame
minetest.register_decoration({
deco_type = "simple",
place_on = "default:stone",
sidelen = 16,
--~ fill_ratio = 0.5,
noise_params = {
offset = 2,
scale = 0.01,
spread = {x = 200, y = 200, z = 200},
seed = 23454,
octaves = 5,
persist = 0.9
},
biomes = {"underground",},
decoration = "mapgen:cavefern1",
height = 1,
flags = {"all_floors","all_ceilings"},
})
Vansius wrote:Topic: How do I manage players and such?
Reason: I want to make a team manager that has a gui where users can join teams.
More Info: I believe not much of this is mentioned in the tutorial book.
christoferlevich wrote:Does anyone think its possible to enlarge the squares in the inventory formspec, even if it means making the quantity of the inventory smaller? The idea would be to make it easier for students to distinguish denominations of cash in the game. If I could enlarge the bills it would go a long way.
TumeniNodes wrote:it seems to be being affected by above ground biome paramters?
azekill_DIABLO wrote:christoferlevich wrote:Does anyone think its possible to enlarge the squares in the inventory formspec, even if it means making the quantity of the inventory smaller? The idea would be to make it easier for students to distinguish denominations of cash in the game. If I could enlarge the bills it would go a long way.
The place where the items are? i don't think it's possible, howver you can change gui_size to something bigger, it should maybe work. Or maybe it only works for menu.
Users browsing this forum: No registered users and 1 guest