Here's the script, I tested it and works:
actions/scripts/other magicdoorkey.lua
function onUse(cid, item, frompos, item2, topos)
otherside = {x=241, y=143, z=7}
if item2.actionid == 3400 and item2.itemid == 1257 then
doTeleportThing(cid, otherside)...