mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-04-29 17:19:20 +02:00
23 lines
554 B
Lua
23 lines
554 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 tile = Tile(position)
|
|
local house = tile and tile:getHouse()
|
|
if house == nil then
|
|
player:sendCancelMessage("You are not inside a house.")
|
|
position:sendMagicEffect(CONST_ME_POFF)
|
|
return false
|
|
end
|
|
|
|
house:setOwnerGuid(0)
|
|
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have successfully removed this house.")
|
|
return false
|
|
end
|