Yes, you can use the source code of TMW to make your own game, provided that you also release it under the
GPL (version 2 or later). Read that license for full details. Basically it says you should allow people this same freedom with derived stuff you release.
The server we current use is eAthena, which is another project. However, the version of eAthena that we're using (a very old, modified, version) is available at
Creating a TMW server.
With eAthena, you have to define portals (warps) and spawn points using scripts. See the server-data directory in Subversion for some examples. Our own server will be able to extract this information from map files, and allows this information to be edited in Tiled, the map editor that we use.