PC jumping with and without key.

Moderator: Event DM

Post Reply
User avatar
JollyOrc
Elder Sage
Posts: 3984
Joined: Fri Jan 17, 2003 11:41 am
Timezone: Europe, CE(S)T
Location: Germany
Contact:

PC jumping with and without key.

Post by JollyOrc » Fri Mar 05, 2004 2:19 pm

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)); 
  } 
}
User avatar
Sindol
Team Member; Retired with Honors
Posts: 6479
Joined: Mon Jan 06, 2003 4:23 pm
Location: Nijmegen - Netherlands (GMT+1)
Contact:

Post by Sindol » Fri Mar 05, 2004 2:23 pm

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.
So much fun,
yet so little time to enjoy it.
- Sindol
Post Reply