diff --git a/data-otservbr-global/scripts/spells/house/kick.lua b/data-otservbr-global/scripts/spells/house/kick.lua index be7c7517a35..b4b583c1007 100644 --- a/data-otservbr-global/scripts/spells/house/kick.lua +++ b/data-otservbr-global/scripts/spells/house/kick.lua @@ -4,6 +4,13 @@ function spell.onCastSpell(player, variant) local targetPlayer = Player(variant:getString()) or player local guest = targetPlayer:getTile():getHouse() local owner = player:getTile():getHouse() + -- Owner kick yourself from house + if targetPlayer == player then + player:getPosition():sendMagicEffect(CONST_ME_POFF) + player:teleportTo(owner:getExitPosition()) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + return true + end if not owner or not guest or not guest:kickPlayer(player, targetPlayer) then player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) player:getPosition():sendMagicEffect(CONST_ME_POFF)