Ok it got strange, so it's working now with this code:
function onUse(cid, item, fromPosition, itemEx, toPosition, isHotkey)
local pillarTile = Tile(406, 705, 7)
local lever = 1945
if item.itemid == 1945 then
pillarTile:getPosition():sendMagicEffect(CONST_ME_POFF)...