local counter = {}
function onThink(cid, interval)
if(isPlayerGhost(cid) or getPlayerGroupId(cid) > 1) then
return true
end
if not(getTileInfo(getCreaturePosition(cid)).protection) and getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid ~= 2173 then
if(not counter[cid]) then
counter[cid] = 0
end
counter[cid] = counter[cid] + 1
if(counter[cid] % 10 == 0)then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You are not using Amules of Loss, type !aol to buy one.")
end
end
return true
end