Page 1 of 1

PC jumping with and without key.

Posted: Fri Mar 05, 2004 2:19 pm
by JollyOrc

Code: Select all

//:://///////////////////////////////////////////// 
//:: Name     jump_pc_2wp_xtra 
//:: FileName jump_pc_2wp_xtra.nss 
//:: Copyright (c) 2001 Bioware Corp. 
//::////////////////////////////////////////////// 
/*   When a PC uses the placeable, it teleports him to a destination waypoint 
with tag: WP_<tag of placeable> 
*/ 
//::////////////////////////////////////////////// 
//:: Created By: Mistcaller 
//:: Created On: November 11, 2003 
//::////////////////////////////////////////////// 

// Edited to include a test for possession of the appropriate key, 
// Last Edited by: Sindol, December 1, 2003 

// It gets the keytag from the name field of the target waypoint. 

#include "nw_i0_plot" 

void main() 
{ 
    object oPC=GetLastUsedBy(); 
    string sTempTag = GetTag(OBJECT_SELF); 
    object oTarget = GetObjectByTag("WP_"+ sTempTag); 
    if (GetIsObjectValid(oTarget)) 
    { 
        string sKeyTag = GetName(oTarget); 
        if (HasItem(oPC, sKeyTag)) 
        { 
            ClearAllActions(); 
            AssignCommand(oPC, JumpToObject(oTarget)); 
        } 
    } 
}

Code: Select all

//:: FileName : jump_pc_2wp.nss 
/*   When a PC uses the placeable, it teleports him to a destination waypoint with tag: WP_<tag of placeable> 
*/ 

void main() 
{ 
  object oPC=GetLastUsedBy(); 
  string sTempTag = GetTag(OBJECT_SELF); 
  object oTarget = GetObjectByTag("WP_"+ sTempTag); 

  if (GetIsObjectValid(oTarget)) 
{ 
     ClearAllActions(); 
     AssignCommand(oPC, JumpToObject(oTarget)); 
  } 
}

Posted: Fri Mar 05, 2004 2:23 pm
by Sindol
Note that these scripts are already used in some guildhouses on Avlis. Do not change the scripts or the names of the scripts if you plan to use them for anything that might make it to Avlis.

These scripts are not part of the standard housing scripts, so they will not be allowed in normal player housing. For permissions in guildhouses confer with the housing director Marauder.