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,24 @@
function onSay(player, words, param)
if not player:getGroup():getAccess() then
return true
end
local creature = Creature(param)
if not creature then
player:sendCancelMessage("A creature with that name could not be found.")
return false
end
local oldPosition = creature:getPosition()
local newPosition = creature:getClosestFreePosition(player:getPosition(), false)
if newPosition.x == 0 then
player:sendCancelMessage("You can not teleport " .. creature:getName() .. ".")
return false
elseif creature:teleportTo(newPosition) then
if not creature:isInGhostMode() then
oldPosition:sendMagicEffect(CONST_ME_POFF)
newPosition:sendMagicEffect(CONST_ME_TELEPORT)
end
end
return false
end