its a simple code (put it in notepad):
function Teleporting_onUse (pUnit, Event, pMisc)
pMisc:Teleport (Map ID, X cord, Y cord, Z cord)
end
RegisterGameObjectEvent (Object id, 2, 'Teleporting_onUse')
then just save it as name.lua
(fill in the spots then copy and paste into navicat or w/e you use)
spawnid 22 7146 portal name 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0