• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

[TFS 1.0] Anti-Push Amulet

Red

Cyntara.org
Staff member
Global Moderator
Premium User
Joined
Aug 9, 2008
Messages
4,455
Solutions
2
Reaction score
921
Location
United States
Nothing really special, made it real fast.
data/events/scripts/player.lua

Code:
local antiPushId = 13531

function Player:onMoveCreature(creature, fromPosition, toPosition)
    if creature:isPlayer() then
        local amulet = creature:getSlotItem(CONST_SLOT_NECKLACE)
        if amulet and amulet:getId() == antiPushId then
            self:sendCancelMessage("You cannot push this player. They are wearing an anti-push amulet.")
            return false
        end
    end
    return true
end

Red
 
Last edited:
Back
Top