From 4e39524c4cf2a209d56b4986bfe3cea64dfe2a68 Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Tue, 2 Apr 2024 14:10:25 -0300 Subject: [PATCH] Check ghost mode. --- data/scripts/talkactions/gm/afk.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/scripts/talkactions/gm/afk.lua b/data/scripts/talkactions/gm/afk.lua index 4285ec9b111..de10845191d 100644 --- a/data/scripts/talkactions/gm/afk.lua +++ b/data/scripts/talkactions/gm/afk.lua @@ -26,6 +26,9 @@ function afk.onSay(player, words, param) end table.insert(playersAFKs, { id = id, position = position }) + if player:isInGhostMode() then + player:setGhostMode(false) + end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are now AFK!") position:sendMagicEffect(CONST_ME_REDSMOKE) local spectators = Game.getSpectators(position, false, true, 8, 8, 8, 8)