Server Totals
Mikona - (2)
Elysia - (1)
Wilderness - (1)
Ferrell - (0)
Le'Or - (0)
M'Chek - (0)
Deglos - (0)
Visimontium - (0)
Underdark - (0)
Total players: 4
Gallery

Links Menu

PC jumping with and without key.

Moderators: Nighthawk4, Dungeon Masters

PC jumping with and without key.

PostAuthor: 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
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

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


Return to NWN Scripting

Who is online

Registered users: Bing [Bot], Google [Bot]