se7enet purgatorio

Page 1 of 1 1
Topic Options
Rate This Topic
#17869 - 08/02/08 09:44 PM World switching
Evilman
Grape Nuts


Registered: 06/15/08
Posts: 46

Offline
I've created a new world using Sephiroth's Admin Panel. Now I'm wondering, how does my hero access the new world? Is there a Portal of some kind?
Top
#17870 - 08/03/08 09:27 AM Re: World switching [Re: Evilman]
Fayt
Crunchberries
***

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.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17886 - 08/07/08 08:09 AM Re: World switching [Re: Fayt]
Whiz
Cheerios


Registered: 10/28/07
Posts: 129

Offline
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.
_________________________
View my mod "index" at

http://timedg.freehostia.com/forum/download.php

Visit my writing workshop site at http://slushpile.freehostia.com

Top
#17887 - 08/07/08 08:51 AM Re: World switching [Re: Whiz]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
You can make up an item to switch between worlds by using it. For like admin use.
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17888 - 08/07/08 06:50 PM Re: World switching [Re: Fayt]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
A script that changes a users Realm in the user table, changes their world. That is it.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#17889 - 08/08/08 08:08 AM Re: World switching [Re: AnmanIndustries]
Fayt
Crunchberries
***

Registered: 11/08/05
Posts: 1131
Loc: My Computer, USA

Offline
Yep
_________________________
MasterFayt - Amara 5 - Manas - Banar

Top
#17890 - 08/08/08 11:36 PM Re: World switching [Re: Fayt]
Jamin Administrator
Cookie Crisp
****

Registered: 02/25/05
Posts: 2649
Loc: Texas

Offline
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.”

Top
#17900 - 08/12/08 10:04 PM Re: World switching [Re: Jamin]
AnmanIndustries
Cookie Crisp
*****

Registered: 03/21/05
Posts: 2876
Loc: Planet Stupid, AKA Earth

Offline
Profit comes during the blank stage.
_________________________
If you want me to punch you in the nuts go to:
http://www.AnmanIndustries.com

I'll do it for free too. Enjoy.

Top
#18591 - 10/28/08 08:54 AM Re: World switching [Re: AnmanIndustries]
gamefreak888
Rice Krispies


Registered: 09/06/07
Posts: 215

Offline
Or add this code somewhere:

 Code:
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"));
}
}


Of course you can add text/errors yourself.


Edited by basleijser (10/28/08 08:55 AM)

Top
Page 1 of 1 1


Hop to:

se7enet

Barack Obama Logo