Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA
Offline
I have worlds on my game. You have to setup a world field in most of your database tables, and when you go to the new world, all your world tables need to update to the new world.
Evilman, creating the world is just the beginning. You then have to populate the world with monsters and towns.
The short answer to your question is that you use the story table. There is a "Target World" field that, when the character meets the requirements for the story event, it will transport the character to that world.
1. Assume that a world exists with ID number 1. 2. Create a new world with ID number 2. 3. Make a new Story entry, with world=1, at whatever lat/lon you decide, with targetworld=2. 4. Profit!!!
---Jamin
_________________________
Diablo 3 Lead Designer Jay Wilson: “The development of a Blizzard game is sometimes a long affair. This is how long it took us to be ready.”
doquery("UPDATE <<users>> SET world='2',latitude='0',longitude='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1");
Like in explore.php:
Code:
if ($userrow["latitude"] == 1 && $userrow["longitude"] == 1 && $userrow["world"] == 1) {
$page = "You see a portal to world 2. <br />
<FORM METHOD=\"post\" ACTION=\"index.php?do=world2portal">
<INPUT TYPE=\"submit\" NAME=\"submit\" VALUE=\"Enter world 2\">
</FORM>
";
display("World 2 Portal", $page);
}
In index.php:
Code:
case "world2portal": include("town.php"); world2portal(); break;
And finally in town.php:
Code:
function world2portal() {
global $userrow;
if (isset($_POST["submit"])) {
doquery("UPDATE <<users>> SET world='2',latitude='0',longitude='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1");
die(header("Location: index.php"));
}
}