Server Portal

Forum for scripters of NWN material and third party applications.
Post Reply
Ferus
World Leader: Mystara
Posts: 85
Joined: Thu Nov 13, 2003 6:31 pm
Location: Rockhome
Contact:

Server Portal

Post by Ferus »

portaling between server mods is been testing my meddle as of late

Code: Select all

void ActivatePortal(
    object oTarget,
    string sIPaddress = "",
    string sPassword = "",
    string sWaypointTag = "",
    int bSeamless = FALSE
);

Code: Select all

// In the OnUsed of a statue
// Sends the using PC to another (fictional) server
// with player password "mumb0Jumb0", and has
// the PC appear at waypoint "ISK_WP_PORTAL". The
// player will not be notified that they've moved server.
#include "nw_i0_generic"
void main() 
{
     object oPC = GetLastUsedBy();
     if (!GetIsPC( oPC )) return;
     ActivatePortal(oPC, "nwn.iskander.tv:5432", "mumb0Jumb0", "ISK_WP_PORTAL", TRUE);
}
this is what i got from the Lexicon. and to no availe it hasnt worked,
does anyone out there have a working script?
[url=http://www.theknownworld.org]Lands of Mystara[/url]
Orleron
Multiverse Scholar
Posts: 1247
Joined: Mon Nov 10, 2003 11:15 am
Location: Avlis
Contact:

Post by Orleron »

What kind of object are you using to make them portal? If it's a portal placeable, then you would use the code above. But if it's a trigger, then you would use a different line for oPC:

object oPC = GetClickingObject();
Avlis: http://www.avlis.org

"My name is Orleron...a dungeonmaster...two years ago I got shot through a game client...I'm in a distant part of the internet aboard these servers of escaped mental patients...my players. I've made enemies, stupid, and annoying...now all I want to do is make CoPaP a reality, to warn Earth...Look inward(to your monitor) and share the newbies I've seen..."
Ferus
World Leader: Mystara
Posts: 85
Joined: Thu Nov 13, 2003 6:31 pm
Location: Rockhome
Contact:

Post by Ferus »

:D
worked like a charm
thanks!
[url=http://www.theknownworld.org]Lands of Mystara[/url]
Ferus
World Leader: Mystara
Posts: 85
Joined: Thu Nov 13, 2003 6:31 pm
Location: Rockhome
Contact:

Post by Ferus »

In a small update, here is a script I use for a template

Code: Select all

#include "aps_include"
#include "portal_include"
//#include "nw_i0_generic"
void main()
{
     //Clickable Trigger
     //object oTarget =GetClickingObject();
     //In Conversation
     object oTarget = GetPCSpeaker();
     //On a Portal Placeable
     //object oTarget = GetLastUsedBy();
     if (!GetIsPC( oTarget )) return;
//vaultSTER! system
     PortalPlayer(oTarget, "modname", "WAYPOINTINCAPS");
//for old Bioware system  
//true makes it non seemless, ie no picking the pc once you enter the server   
//ActivatePortal(oPC, "server:port", "playerpass", "WAYPOINTINCAPS", TRUE);
}


hope this helps anyone else attempting inner server porting

Ferus
[url=http://www.theknownworld.org]Lands of Mystara[/url]
Post Reply