Aller au contenu

Photo

Module/Server Link Help


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
Warington Admin

Warington Admin
  • Members
  • 11 messages
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)
}

#2
ehye_khandee

ehye_khandee
  • Members
  • 855 messages
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.




#3
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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 .


#4
Warington Admin

Warington Admin
  • Members
  • 11 messages
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?

#5
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
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 .


#6
Warington Admin

Warington Admin
  • Members
  • 11 messages
Thank you very much!

#7
Warington Admin

Warington Admin
  • Members
  • 11 messages
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.

#8
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

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. 

#9
Warington Admin

Warington Admin
  • Members
  • 11 messages
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.

#10
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
lol



Doh. I just now Read your name.

Yes, Ill try and drop by this weekend.



L8