Full Distribution

This commit is contained in:
rasanpedromujica
2019-01-16 17:16:38 -05:00
commit 009a571331
1258 changed files with 185603 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
local dead_human = {
4240, 4241, 4242, 4247, 4248
}
local removalLimit = 10
function onCastSpell(creature, variant)
local position = variant:getPosition()
local tile = Tile(position)
if tile then
local items = tile:getItems()
if items then
for i, item in ipairs(items) do
if item:getType():isMovable() and item:getActionId() == 0 and not table.contains(dead_human, item:getId()) then
item:remove()
end
if i == removalLimit then
break
end
end
end
end
position:sendMagicEffect(CONST_ME_POFF)
return true
end