Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function treasure_chest_populate(rank, pos)
- for i = 1,24 do
- if rank == 1 then
- for _ = 1,math.random(1,3) do
- item = glooptest.R1_treasure_chest_items[math.random(1, #glooptest.R1_treasure_chest_items)]
- item_rarity = item[3]
- if item_rarity+math.random(1,3) == item_rarity+2 then
- item_name = item[1]
- item_stacksize = item[2]
- minetest.get_inventory(pos):set_stack("main", i, ItemStack({name=item_name,count=item_stacksize}))
- break
- else
- end
- end
- end
- if rank == 2 then
- end
- if rank == 3 then
- end
- if rank == 4 then
- end
- if rank == 5 then
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement