View Single Post
  #8  
Old 06-30-2009, 09:28 PM
realityincarnate
Developer
 
Join Date: Dec 2007
Posts: 122
Default

Ok, I got sidetracked over the weekend, but I finished up and committed the home city code tonight. Here's an overview of the things I added:

The binds[4] slot in the player profile now tracks the home city bind point for all newly created characters. The bind point is set to where the character is initially bound, so it works for entries in the start_zones table as well as SoFStartZoneID rules and startzone variables.

For older characters, the char select screen will attempt to assign a home city. It does this by first checking for a starting zone variable, then checking the start_zones table. If there is only one possible home city, it assigns it. Otherwise, it leaves it unassigned.

For characters that have more than one possible city, or for later changes, I added a couple of commands. The client /setstartcity command gives the player a list of possible starting zones (pulled from the start_zones table) and allows them to select one. GMs have a #setstartzone command which takes either a zone number of shortname as an argument. Using #setstartzone 0 (or #setstartzone reset) will clear the player's home city and let them set it themselves.

Finally, $client->GetStartZone() and $client->SetStartZone() are new perl commands. GetStartZone() returns the zone number of the player's home city. The format to set a zone is SetStartZone(zoneid, x, y, z). The x, y, and z coordinates are optional, but if you specify one, you need to give them all. If they are left off, the coordinates are the zone's safe point.

That was a mouthful. Let me know if I missed anything or if there are any problems.
Reply With Quote