mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-30 09:39:20 +02:00
21 lines
480 B
Lua
21 lines
480 B
Lua
function onSay(player, words, param)
|
|
if not player:getGroup():getAccess() then
|
|
return true
|
|
end
|
|
|
|
if player:getAccountType() < ACCOUNT_TYPE_GOD then
|
|
return false
|
|
end
|
|
|
|
local position = player:getPosition()
|
|
local npc = Game.createNpc(param, position)
|
|
if npc ~= nil then
|
|
npc:setMasterPos(position)
|
|
position:sendMagicEffect(CONST_ME_MAGIC_RED)
|
|
else
|
|
player:sendCancelMessage("There is not enough room.")
|
|
position:sendMagicEffect(CONST_ME_POFF)
|
|
end
|
|
return false
|
|
end
|