Author Topic: Module/Server Link Help  (Read 325 times)

Legacy_Warington Admin

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Module/Server Link Help
« on: February 17, 2011, 04:52:20 am »


               I'm trying to link two, or more, servers/modules together via portals.

I'm not very good at scripting, tho I am still trying, and I have a basic script I found, but I need it to compile as well as work. Here is what I have and would appreciate the help getting this thing working:

void main()
{
void ActivatePortal(object oTarget, string sIPaddress="192.168.1.105:5122", string sPassword="password", string sWaypointTag="WP_namehere", int bSeemless=FALSE)
}
               
               

               
            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
Module/Server Link Help
« Reply #1 on: February 17, 2011, 06:11:55 am »


               Try this (untested)




void main()
{
  ActivatePortal(GetObjectByTag("TAG_OF_OBJECT_HERE"), "192.168.1.105:5122","password_here", "destination_tag_here",FALSE);
}



You'll have to fill in the parts in quotes with the correct data but I think that should get you there.



               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Module/Server Link Help
« Reply #2 on: February 17, 2011, 09:07:29 am »


               Just a couple things to keep in mind:

Lexicon wrote...
Known Bugs

- Waypoint tags must be all upper-case for the waypoint jump to work on arrival.

- Leaving a trigger by ActivatePortal does not fire its OnExit event. An Area's OnExit is (correctly) fired.


               
               

               


                     Modifié par GhostOfGod, 17 février 2011 - 09:08 .
                     
                  


            

Legacy_Warington Admin

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Module/Server Link Help
« Reply #3 on: February 18, 2011, 12:16:46 am »


               Thanks GhostOfGod. That info helps.



The script compiled but I can't seem to get it to work. I think it is the GetObjectByTag Wouldn't that be something like GetLast... or Something to do with oPC?
               
               

               
            

Legacy_GhostOfGod

  • Hero Member
  • *****
  • Posts: 1490
  • Karma: +0/-0
Module/Server Link Help
« Reply #4 on: February 19, 2011, 06:02:43 pm »


               The "GetObjectByTag" part should be the player or oPC.

So your script might look like so(This is an example from the Lexicon):

// 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", "password", "TAG OF WP", TRUE);
}


Hope that helps.
               
               

               


                     Modifié par GhostOfGod, 19 février 2011 - 06:04 .
                     
                  


            

Legacy_Warington Admin

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Module/Server Link Help
« Reply #5 on: February 19, 2011, 09:19:27 pm »


               Thank you very much!
               
               

               
            

Legacy_Warington Admin

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Module/Server Link Help
« Reply #6 on: February 25, 2011, 03:30:44 am »


               I've been racking my brains and going through the Lexicon for days. Here is the scripts I am using to go from module 1 to module 2:



void ActivatePortal(

object oTarget,

string sIPaddress = "",

string sPassword = "",

string sWaypointTag = "",

int bSeamless = FALSE

);



#include "nw_i0_generic"

void main()

{

object oPC = GetLastUsedBy();

if (!GetIsPC( oPC )) return;

ActivatePortal(oPC, "192.168.1.105:5122", "password", "WP_EPICSERVER1", FALSE);

}



This goes on enter of the trigger on module 1, module 2 has the waypoint WP_EPCISERVER1 on its tag.



I am using the same server/machine to run both modules. This way I don't have to mess with the server vault. This is still not working. What am I doing wrong, or not doing? Thanks.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Module/Server Link Help
« Reply #7 on: February 25, 2011, 05:09:14 am »


               

Warington Admin wrote...

#include "nw_i0_generic"
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC( oPC )) return;
ActivatePortal(oPC, "192.168.1.105:5122", "password", "WP_EPICSERVER1", FALSE);
}

.


The Ip address you are useing is a address that is only good on a local network.  The only people who will be able to use that address to connect to the the server are people who are on your local network.  If you are trying to connect to the server from an external IP address you will need the external Ip address.  Easiest way to find your external address for the server would be to find the game listed on game spy then click the server detials button. 
               
               

               
            

Legacy_Warington Admin

  • Newbie
  • *
  • Posts: 22
  • Karma: +0/-0
Module/Server Link Help
« Reply #8 on: February 25, 2011, 05:21:17 am »


               Doh! I should have thought of that. Must be old age catching up with me.



Thanks Lightfoot, hope to see you in game sometime soon.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Module/Server Link Help
« Reply #9 on: February 25, 2011, 06:13:16 am »


               lol



Doh.  I just now Read your name.  

Yes,  Ill try and drop by this weekend.  



L8