Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
62 lines
1.6 KiB
Plaintext
62 lines
1.6 KiB
Plaintext
//::///////////////////////////////////////////////
|
|
//:: Trap door that takes you to a waypoint that
|
|
//:: is stored into the Destination local string.
|
|
//:: FileName
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Robert Babiak
|
|
//:: Created On: June 25, 2002
|
|
//:://////////////////////////////////////////////
|
|
|
|
void main()
|
|
{
|
|
object oidUser;
|
|
object oidDest;
|
|
string sDest;
|
|
int nGotkey=0;
|
|
oidUser = GetLastUsedBy();
|
|
object oKey;
|
|
object oDoor=GetObjectByTag("jw_dung2silver_door");
|
|
|
|
if (!GetLocked(OBJECT_SELF) )
|
|
{
|
|
if ( GetIsOpen(OBJECT_SELF))
|
|
{
|
|
|
|
|
|
oidUser = GetLastUsedBy();
|
|
oidDest = GetObjectByTag(GetTag(OBJECT_SELF)+"_wp");
|
|
AssignCommand(oDoor,ActionOpenDoor(oDoor));
|
|
AssignCommand(oidUser, ActionJumpToObject(oidDest,FALSE));
|
|
// DelayCommand(300.0,PlayAnimation(ANIMATION_PLACEABLE_CLOSE ));
|
|
} else
|
|
{
|
|
PlayAnimation(ANIMATION_PLACEABLE_OPEN );
|
|
//DelayCommand(80.0,ActionDoCommand(PlayAnimation(ANIMATION_PLACEABLE_CLOSE )));
|
|
}
|
|
|
|
|
|
}
|
|
|
|
else
|
|
// this is what happens when it is locked
|
|
{
|
|
|
|
AssignCommand(oidUser,PlayAnimation(ANIMATION_LOOPING_GET_LOW,1.0,1.0));
|
|
|
|
|
|
DelayCommand(0.3,PlaySound("as_dr_locked3"));
|
|
FloatingTextStringOnCreature("*Magically sealed*",oidUser);
|
|
ActionCastSpellAtObject(SPELL_POWER_WORD_KILL,oidUser,METAMAGIC_ANY,TRUE,20);
|
|
ActionCastSpellAtObject(SPELL_INCENDIARY_CLOUD,oidUser,METAMAGIC_ANY,TRUE,20);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|