I used this code in a boss that when you kill it you get a gate :
{
//change the line below to the cords and map you want
Moongate gate = new Moongate( new Point3D( 6209, 2892, 0 ), Map.Felucca );
if( gate != null && !gate.Deleted && corpse != null && !corpse.Deleted )
{...