From cc1fd2ff7dda6df0fd2684103fc0f6dc8ea7b0a7 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 2 Dec 2023 18:53:58 -0300 Subject: [PATCH] Update temple_scroll.lua --- .../scripts/actions/other/temple_scroll.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data-otservbr-global/scripts/actions/other/temple_scroll.lua b/data-otservbr-global/scripts/actions/other/temple_scroll.lua index fdfeff177e1..1f170d72be9 100644 --- a/data-otservbr-global/scripts/actions/other/temple_scroll.lua +++ b/data-otservbr-global/scripts/actions/other/temple_scroll.lua @@ -4,12 +4,13 @@ function templeScroll.onUse(player, item, fromPosition, target, toPosition, isHo local inPz = player:getTile():hasFlag(TILESTATE_PROTECTIONZONE) local inFight = player:isPzLocked() or player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) if inPz or not inFight then - player:teleportTo(getTownTemplePosition(player:getTown():getId())) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + player:teleportTo(player:getTown():getTemplePosition()) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) item:remove() - Position(fromPosition):sendMagicEffect(CONST_ME_TELEPORT) else player:sendCancelMessage("You can't use this when you're in a fight.") - Position(fromPosition):sendMagicEffect(CONST_ME_POFF) + fromPosition:sendMagicEffect(CONST_ME_POFF) end return true end