Page 1 of 1

Server Portal

Posted: Tue Mar 30, 2004 11:32 am
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?

Posted: Tue Mar 30, 2004 11:38 am
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();

Posted: Tue Mar 30, 2004 3:17 pm
by Ferus
:D
worked like a charm
thanks!

Posted: Sat Jun 12, 2004 8:56 am
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