Here's the code, link() isn't seamless as promised.
#define ADDRESS world.internet_address
area
server_transfer
var/server
icon = '_portal.dmi'
var/loc_tag = "" as text
layer = TURF_LAYER + 1
Entered(atom/movable/a)
if(istype(a, /mob))
var/mob/m = a
m.go_to_server(server, loc_tag)
mob/Write(savefile/F)
..()
F["icon"] << null
F["overlays"] << null
F["underlays"] << null
mob/var/last_x
mob/var/last_y
mob/var/loc_tag
mob/proc/go_to_server(t as text, loc_tag = "")
src.last_x = x
src.last_y = y
src.loc_tag = loc_tag
world << "[last_x],[last_y]"
var/savefile/F = new("players/[ckey].sav")
F << src
var/result = world.Export("byond://[ADDRESS]:[t]?ping")
world << "result was [result]"
if(result)
world.Export("byond://[ADDRESS]:[t]?transfer", F)
src << link("byond://[ADDRESS]:[t]")
else
src << "[ADDRESS]:[t] is not alive"
src << "The server you are on is [world.address]:[world.port]"
world/Topic(T, addr)
if(T == "transfer")
world.log << "importing a mob!"
var/savefile/F = new(world.Import())
var/mob/m = new
F >> m
return ..()
mob/Login()
..()
world << "[src] logs in"
if(last_x)
src.x = last_x
if(last_y)
src.y = last_y
if(loc_tag)
w = 0
a = 0
s = 0
d = 0
src.Transfer(locate(loc_tag))
mob/Logout()
world << "[src] logs out"
del(src)
..()
create portals with ports, host servers with said ports
Just change #define ADDRESS in realms.dm
Then host two servers, one with port 6505, and another with port 6506 and join the 6505 server. You must use these port numbers for the test to work properly.