Aller au contenu

Photo

Door Script Modification


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

#1
Birdman076

Birdman076
  • Members
  • 186 messages
I have this door script which works wonderfully for closing and locking and has some configuration for time delay to close the door. But i'd like to also have the ability to set an int on the door to have it lock at night (so I can enable or disable depending on the door), check for class (again variable driven so I can select which class for which door), and lastly alignment. I'm sure there are other additions that could be made to make this a singular robust door handler script that covers all or almost all bases, and be totally configured via variables set on the door in question. Thanks in advance for any help provided.


void main()
{
  object oDoor = OBJECT_SELF;
  float fClose;
  string sClose = GetLocalString( OBJECT_SELF, "sClose" );
  if( sClose == "" )
  {
    fClose = 15.0;
  }
  else if( sClose == "-1" )
  {
    return;
  }
  else
  {
    fClose = StringToFloat( sClose );
  }
  DelayCommand( fClose, ActionCloseDoor(oDoor) );
  if ( GetLockLockable( oDoor ) )
  {
    SetLocked( oDoor, TRUE );
  }
}


#2
Ulo Ironbeard

Ulo Ironbeard
  • Members
  • 13 messages
You can do what you want using the GetIsNight and GetIsDay functions. I use something like this in my module - remember though, that locked doors can be picked!

#3
Birdman076

Birdman076
  • Members
  • 186 messages
Yes, I know the functions but as I said in my post id like the ability to have the script configurable via variables that can be set on the door to do different things like if a variable DAY_NIGHT is set as true then the door will be unlocked during the day, locked at night. I'd rather have all door functionality in one script as opposed to 20 scripts to do each function of a door.

#4
Ulo Ironbeard

Ulo Ironbeard
  • Members
  • 13 messages
I don't know if this will do what you want (I'm not an expert), but I added a few lines to your script. Place it in the OnHeartbeat event of the door. It compiles, but I haven't tested it. Be sure to set the variable NIGHT_LOCKED on the door.



void main()

{

object oDoor = OBJECT_SELF;

//added this line

int nNightLocked = GetLocalInt(oDoor, "NIGHT_LOCKED");

//

float fClose;

string sClose = GetLocalString( OBJECT_SELF, "sClose" );

if( sClose == "" )

{

fClose = 15.0;

}

else if( sClose == "-1" )

{

return;

}

else

{

fClose = StringToFloat( sClose );

}

DelayCommand( fClose, ActionCloseDoor(oDoor) );



if ( GetLockLockable( oDoor ) )

{

SetLocked( oDoor, TRUE );

}

// Added Code

if(nNightLocked == 1)

{

if (GetIsNight()&&GetIsOpen(OBJECT_SELF))

{

ActionCloseDoor(OBJECT_SELF);

ActionDoCommand(SetLocked(OBJECT_SELF,TRUE));

}

else if(GetIsDawn()&&GetLocked(OBJECT_SELF))

{

SetLocked(OBJECT_SELF,FALSE);

}

}

}

#5
Birdman076

Birdman076
  • Members
  • 186 messages
That helps with the Day/Night scenario which is good but I'm really after an all inclusive door handler that covers all the bases so I only need one master door script to do everything.

#6
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
Here's an all inclusive example for you. If nothing else it can serve to steer you in a direction:

void main()
{
object oDoor = OBJECT_SELF;
float fClose;
string sClose = GetLocalString(OBJECT_SELF, "sClose");
if(sClose == "")
      {
      fClose = 15.0;
      }
else if(sClose == "-1") return;
else
      {
      fClose = StringToFloat( sClose );
      }
DelayCommand(fClose, ActionCloseDoor(oDoor));
if (GetLockLockable(oDoor))
      {
      SetLocked(oDoor, TRUE);
      }
 
//------------------ SET LOCK BASED ON DAY/NIGHT SETTING -------------------

// Set local string on door named "LOCKED" to decide when it is locked
// Applicable entries are "DAY" and "NIGHT"

string sLocked = GetLocalString(oDoor, "LOCKED");
if(sLocked == "NIGHT")
      {
      if(GetIsDay()) // Daytime, close and lock door
            {
            if(GetIsOpen(OBJECT_SELF))
            {
            ActionCloseDoor(OBJECT_SELF);
            }
       ActionDoCommand(SetLocked(OBJECT_SELF,TRUE));
       }
      else if(GetIsNight()) // Night time, unlock door
       {
       if(GetLocked(OBJECT_SELF))
             {
             SetLocked(OBJECT_SELF,FALSE);
             }
       }
 }
if(sLocked == "DAY")
      {
      if(GetIsNight()) // Night time, close and lock door
            {
            if(GetIsOpen(OBJECT_SELF))
                 {
                 ActionCloseDoor(OBJECT_SELF);
                 }
            ActionDoCommand(SetLocked(OBJECT_SELF,TRUE));
            }
      else if(GetIsDay()) // Day time, unlock door
           {
           if(GetLocked(OBJECT_SELF))
                {
                SetLocked(OBJECT_SELF,FALSE);
                 }
            }
      }
 
//------------------ SET LOCK BASED ON ALIGNMENT -------------------

// Set local string on door called "ALIGN GE" (Alignment Good/Evil)
// Set local string on door called "ALIGN LC" (Alignment Law/Chaos)
// Applicable entries are "GOOD" and "EVIL" for the first string
// Applicable entries are "LAW" and "CHAOS" for the second string

// Optional setting for allowing True Neutral PCs through
// Set Local Int on Door called "NEUTRAL"
// Set to 1 for allowing True Neutrals through
// To restrict True Neutrals and not allow through set to 0 or don't have the int at all

object oPC = GetClickingObject(); // Get the player object that clicked on the door
int nDoorGE;
int nDoorLC;
string sDoorGE = GetLocalString(oDoor, "ALIGN GE");
if(sDoorGE == "GOOD")
      {
      nDoorGE == 4;
      }
else if(sDoorGE == "EVIL")
      {
      nDoorGE == 5;
      }
 
string sDoorLC = GetLocalString(oDoor, "ALIGN LC");
if(sDoorLC == "LAW")
      {
      nDoorLC == 2;
      }
else if(sDoorLC == "CHAOS")
      {
      nDoorLC == 3;
       } 
 
// If door has an entry for "ALIGN GE" and/or "ALIGN LC" string variables
// Check to see if the PC's alignment matches the entry
// Unlock door if matched, else lock the door if no match

int nPCGE = GetAlignmentGoodEvil(oPC);
int nPCLC = GetAlignmentLawChaos(oPC); 

// Good/Evil check
if(sDoorGE != "" && nPCGE == nDoorGE)
      {
      if(GetLocked(OBJECT_SELF))
            {
            SetLocked(OBJECT_SELF,FALSE);
             }
      else
             {
             SetLocked(OBJECT_SELF,TRUE);
             }
       }
// Law/Chaos check
if(sDoorLC != "" && nPCLC == nDoorLC)
      {
       if(GetLocked(OBJECT_SELF))
            {
            SetLocked(OBJECT_SELF,FALSE);
            }
      else 
            {
            SetLocked(OBJECT_SELF,TRUE);
            }
      }
// Optional - allow True Neutrals through
if(GetLocalInt(oDoor, "NEUTRAL") == 1)
      {
      if(GetLocked(OBJECT_SELF))
            {
            SetLocked(OBJECT_SELF,FALSE);
             }
       }  
 
//------------------ SET LOCK BASED ON class -------------------

// Set a local int of the door called "class"
// Set it to the (constant) value of the class you want to be let through

// Get the PC's various classes
int nclass1 = GetclassByPosition(1, oPC);
int nclass2 = GetclassByPosition(2, oPC);
int nclass3 = GetclassByPosition(3, oPC);
int nclass4 = GetclassByPosition(4, oPC);

// Compare PC's classes to door int variable
// If matched, unlock door, else lock door
int nDoorclass = GetLocalInt(oDoor, "class");

if((nclass1 == nDoorclass) || (nclass2 == nDoorclass) ||
 (nclass3 == nDoorclass) || (nclass4 == nDoorclass))
      {
      if(GetLocked(OBJECT_SELF))
            {
            SetLocked(OBJECT_SELF,FALSE);
            }
      }
else 
      {
      SetLocked(OBJECT_SELF,TRUE);
       } 
}

If you leave either the "LAW/CHAOS" or the "GOOD/EVIL" strings blank (no entry value), it will not check those of the player. So, you can let in all good or all evil, all lawful or all chaotic (or all True Neutrals as an optional). Or you can set both values and let in only LAWFUL GOOD, only CHAOTIC EVIL, only CHAOTIC GOOD, etc.

You will need to look up the class constant number value.

Script should go in the OnClicked event of the door. It might keep locking/unlocking the door as different variables return true throughout the script. Hopefully it will end up correct at the end.

Script untested in game but should compile with no problems.

Also, note the forums here (for whatever reason) makes the letter "C" in the word "class" lower case. You will need to change them all to an upper case "C" if you do any sort of copy/paste.

Modifié par _Knightmare_, 17 décembre 2010 - 03:06 .


#7
Birdman076

Birdman076
  • Members
  • 186 messages
Thank you Knightmare, that looks like it covers all the bases!

#8
TSMDude

TSMDude
  • Members
  • 865 messages
Hey Knightmare stealing the script and adding it to our script resources.

#9
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
NP, please let me know if the script does in fact work as it should. I did not test it in game. If any problems show up I'll do my best to fix them. :)

#10
Tarot Redhand

Tarot Redhand
  • Members
  • 2 687 messages
@_Knightmare_ You need to change GetclassByPosition to GetClassByPosition otherwise it won't compile and you get the dreaded Error parsing variable list error.

TR

Modifié par Tarot Redhand, 15 décembre 2010 - 05:53 .


#11
Birdman076

Birdman076
  • Members
  • 186 messages

_Knightmare_ wrote...

Also, note the forums here (for whatever reason) makes the letter "C" in the word "class" lower case. You will need to change them all to an upper case "C" if you do any sort of copy/paste.



Image IPBImage IPB

Been a bit busy with other things haven't had a chance to test it just yet sorry.Image IPB

Modifié par Birdman076, 15 décembre 2010 - 11:38 .


#12
Tarot Redhand

Tarot Redhand
  • Members
  • 2 687 messages
@_Knightmare_ There is no OnClick event for doors - see here.



TR

#13
_Knightmare_

_Knightmare_
  • Members
  • 643 messages

Tarot Redhand wrote...

@_Knightmare_ There is no OnClick event for doors - see here.

TR


Hmmm, well that really stinks. I use NWN2 for everything and we have a full allotment of script slots for doors there (including all you listed in that linked post, plus OnClick, OnConversation, OnTrapTriggered, and OnDisarm). The scripting for both games is so similar I just try to also help people here.

The script should work if you can find an appropriate script slot for it to fire from... sorry about that.

#14
Tarot Redhand

Tarot Redhand
  • Members
  • 2 687 messages
Tell me about it. Your script that you posted inspired me to get back to scripting and I've developed a set of 4 for doors but without OnClick they are not any use for doors only placeables so I'll probably wait before I post them.



TR

#15
Greyfort

Greyfort
  • Members
  • 234 messages
NWN1 door scripts:

onAreaTransclick
onClose
onDamaged
onDeath
onFailToOpen
onHeartbeat
onLock
onPhysicalAttacked
onOpen
onSpellCastAt
onUnlock
onUserDefined

also for classes:
// Get the PC's various classes
int nclass1 = GetclassByPosition(1, oPC);
int nclass2 = GetclassByPosition(2, oPC);
int nclass3 = GetclassByPosition(3, oPC);
only those lines are valid there are not 4 class positions

in regaurds to :
Script should go in the OnClicked event of the door.
place in onFailToOpen script it calls the object oPC = GetClickingObject();

also you may have to divide the script up according to what you want. if you give a little more detail I can help you set up a nwn1 door useing script _Knightmare_ made it wont work as it is onFailToOpen we will have to break it up.

Edit add:  I forgot to ask did you want variables on the door or only created after door is interacted with?

Modifié par Greyfort, 18 décembre 2010 - 05:33 .


#16
Greyfort

Greyfort
  • Members
  • 234 messages
/////////////////////////////////////////////
//
// created by _Knightmare_
// 12.??.2010
//
// door_all
// Altered by: Greyfort
// 12.18.2010
//
// place script in onFailToOpen of door
//
// set variables on door from the advanced tab variables button
// set door plot, set door locked, door set relockable

//door int "sClose"
//------------------ SET CLOSE DOOR DELAY -------------------
// Set a local int of the door called "sClose"
// Set it to the value you want for delay
// Default 15 second delay


//door string "LOCKED",
//------------------ SET LOCK BASED ON DAY/NIGHT SETTING -------------------
// Set local string on door named "LOCKED" to decide when it is locked
// Applicable entries are "DAY"=locked day time and "NIGHT"=locked night time


//door string "ALIGN GE" , "ALIGN LC", "NEUTRAL" ,
//------------------ SET LOCK BASED ON ALIGNMENT -------------------
// Set local string on door called "ALIGN GE" (Alignment Good/Evil)
// Set local string on door called "ALIGN LC" (Alignment Law/Chaos)
// Applicable entries are "GOOD" and "EVIL" for the first string
// Applicable entries are "LAW" and "CHAOS" for the second string

// Optional setting for allowing True Neutral PCs through
// Set Local Int on Door called "NEUTRAL"
// Set to 1 for allowing True Neutrals through
// To restrict True Neutrals and not allow through set to 0 or don't have the int at all


//door int "class"
//------------------ SET LOCK BASED ON class -------------------
// Set a local int of the door called "class"
// Set it to the (constant) value of the class you want to be let through
// You can find class (constant) in lexicon

//door string"KEY"
//------------------ KEY UNLOCKED -------------------
// Set a local string of the door called "KEY"
// Set string value Tag of key item ie "castlekey"

////////////////////////////////////////////////////////////////////////////////
// Here's an all inclusive example for you.
// If nothing else it can serve to steer you in a direction:
////////////////////////////////////////////////////////////////////////////////
void main()
{
object oDoor = OBJECT_SELF;
object oPC = GetClickingObject(); // Get the player object that clicked on the door

//------------------ SET CLOSE DOOR DELAY -------------------
// Set a local int of the door called "sClose"
// Set it to the value you want for delay
// Default 15 second delay
float fClose;
string sClose = GetLocalString(OBJECT_SELF, "sClose");
if(sClose == "")
{
fClose = 15.0;
}
else if(sClose == "-1") return;
else
{
fClose = StringToFloat( sClose );
}
DelayCommand(fClose, ActionCloseDoor(oDoor));
if (GetLockLockable(oDoor))
{
SetLocked(oDoor, TRUE);
}

//------------------ SET LOCK BASED ON DAY/NIGHT SETTING -------------------

// Set local string on door named "LOCKED" to decide when it is locked
// Applicable entries are "DAY" and "NIGHT"

string sLocked = GetLocalString(oDoor, "LOCKED");
if(sLocked == "DAY")
{
if(GetIsDay()) // Daytime, close and lock door
{
if(GetIsOpen(OBJECT_SELF))
{
ActionCloseDoor(OBJECT_SELF);
}
ActionDoCommand(SetLocked(OBJECT_SELF,TRUE));
}
else if(GetIsNight()) // Night time, unlock door
{
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
}
}
}
if(sLocked == "NIGHT")
{
if(GetIsNight()) // Night time, close and lock door
{
if(GetIsOpen(OBJECT_SELF))
{
ActionCloseDoor(OBJECT_SELF);
}
ActionDoCommand(SetLocked(OBJECT_SELF,TRUE));
}
else if(GetIsDay()) // Day time, unlock door
{
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
}
}
}

//------------------ SET LOCK BASED ON ALIGNMENT -------------------

// Set local string on door called "ALIGN GE" (Alignment Good/Evil)
// Set local string on door called "ALIGN LC" (Alignment Law/Chaos)
// Applicable entries are "GOOD" and "EVIL" for the first string
// Applicable entries are "LAW" and "CHAOS" for the second string

// Optional setting for allowing True Neutral PCs through
// Set Local Int on Door called "NEUTRAL"
// Set to 1 for allowing True Neutrals through
// To restrict True Neutrals and not allow through set to 0 or don't have the int at all


int nDoorGE;
int nDoorLC;
string sDoorGE = GetLocalString(oDoor, "ALIGN GE");
if(sDoorGE == "GOOD")
{
nDoorGE == 4;
}
else if(sDoorGE == "EVIL")
{
nDoorGE == 5;
}

string sDoorLC = GetLocalString(oDoor, "ALIGN LC");
if(sDoorLC == "LAW")
{
nDoorLC == 2;
}
else if(sDoorLC == "CHAOS")
{
nDoorLC == 3;
}

// If door has an entry for "ALIGN GE" and/or "ALIGN LC" string variables
// Check to see if the PC's alignment matches the entry
// Unlock door if matched, else lock the door if no match

int nPCGE = GetAlignmentGoodEvil(oPC);
int nPCLC = GetAlignmentLawChaos(oPC);

// Good/Evil check
if(sDoorGE != "" && nPCGE == nDoorGE)
{
SendMessageToPC (oPC,"Good/Evil check door script fired");
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
ActionOpenDoor(OBJECT_SELF);
}
else
{
SetLocked(OBJECT_SELF,TRUE);
}
}
// Law/Chaos check
if(sDoorLC != "" && nPCLC == nDoorLC)
{
SendMessageToPC (oPC,"Law/Chaos check door script fired");
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
ActionOpenDoor(OBJECT_SELF);
}
else
{
SetLocked(OBJECT_SELF,TRUE);
}
}
// Optional - allow True Neutrals through
if(GetLocalInt(oDoor, "NEUTRAL") == 1)
{
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
ActionOpenDoor(OBJECT_SELF);
//DEBUG MESSAGING
SendMessageToPC (oPC,"NEUTRAL check door script fired");
}
}

//------------------ SET LOCK BASED ON class -------------------

// Set a local int of the door called "class"
// Set it to the (constant) value of the class you want to be let through

// Get the PC's various classes
int nclass1 = GetclassByPosition(1, oPC);
int nclass2 = GetclassByPosition(2, oPC);
int nclass3 = GetclassByPosition(3, oPC);
//int nclass4 = GetclassByPosition(4, oPC);

// Compare PC's classes to door int variable
// If matched, unlock door, else lock door
int nDoorclass = GetLocalInt(oDoor, "class");

if((nclass1 == nDoorclass) || (nclass2 == nDoorclass) || (nclass3 == nDoorclass) )//|| (nclass4 == nDoorclass))
{
if(GetLocked(OBJECT_SELF))
{
SetLocked(OBJECT_SELF,FALSE);
ActionOpenDoor(OBJECT_SELF);
//DEBUG MESSAGING
SendMessageToPC (oPC,"class door script fired");
}
}
else
{
SetLocked(OBJECT_SELF,TRUE);
}
/*
If you leave either the "LAW/CHAOS" or the "GOOD/EVIL" strings blank (no entry value),
it will not check those of the player. So, you can let in all good or all evil,
all lawful or all chaotic (or all True Neutrals as an optional).
Or you can set both values and let in only LAWFUL GOOD, only CHAOTIC EVIL,
only CHAOTIC GOOD, etc.

You will need to look up the class constant number value.


It might keep locking/unlocking the door as different variables return true
throughout the script. Hopefully it will end up correct at the end.
*/

//------------------ KEY UNLOCKED -------------------
// Set a local string of the door called "KEY"
// Set string value Tag of key item ie "castlekey"

object oKey=GetObjectByTag(GetLocalString(OBJECT_SELF,"KEY"));
if(GetItemPossessor(oKey)==oPC)
{
SetLocked(OBJECT_SELF,FALSE);
ActionOpenDoor(OBJECT_SELF);
//DEBUG MESSAGING
SendMessageToPC (oPC,"KEY check door script fired");
}
/*
Greyfort Notes:
*/
//end of script
}
WORKING NWN1 SCRIPT:  Based on what _Knightmare_ gave as a start.
Ive tested script in toolset works great.  If you have any questions just ask we are here to help. Great script Idea _Knightmare_ I enjoyed getting it to work for nwn1. 

Modifié par Greyfort, 19 décembre 2010 - 06:57 .


#17
_Knightmare_

_Knightmare_
  • Members
  • 643 messages
NP, glad somebody got it working for NWN1. :)



Thanks.

#18
Birdman076

Birdman076
  • Members
  • 186 messages
//-------------------------------- class Type Constants ------------------------
//::
//::                            Base classes
//::
//::    class_TYPE_BARBARIAN - 0      class_TYPE_PALADIN -  6
//::    class_TYPE_BARD -      1      class_TYPE_RANGER -   7
//::    class_TYPE_CLERIC -    2      class_TYPE_ROGUE -    8
//::    class_TYPE_DRUID -     3      class_TYPE_SORCERER - 9
//::    class_TYPE_FIGHTER -   4      class_TYPE_WIZARD -   10
//::    class_TYPE_MONK -      5
//::
//::                            Prestige classes
//::
//::    class_TYPE_SHADOWDANCER -     27
//::    class_TYPE_HARPER -           28
//::    class_TYPE_ARCANE_ARCHER -    29
//::    class_TYPE_ASSASSIN -         30
//::    class_TYPE_BLACKGUARD -       31
//::    class_TYPE_DIVINECHAMPION -   32 (Champion of Torm)
//::    class_TYPE_WEAPON_MASTER -    33
//::    class_TYPE_PALE_MASTER -      34
//::    class_TYPE_SHIFTER -          35
//::    class_TYPE_DWARVENDEFENDER -  36
//::    class_TYPE_DRAGONDISCIPLE -   37
//::
//------------------------------------------------------------------------------

Here are the class constants per the lexicon. Thank you for working on this and getting it to work it will come in very handy and help me eliminate a couple of handfuls of scripts from the PW I am working on. :)

Modifié par Birdman076, 19 décembre 2010 - 02:34 .


#19
Tarot Redhand

Tarot Redhand
  • Members
  • 2 687 messages
Inspired by _knightmare_ here are a couple more scripts for locking/unlocking doors.

//----------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------

//::///////////////////////////////////////////////
//:: Name Special Key
//:: FileName scr_special_key
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*

*/
//:://////////////////////////////////////////////
//:: Created By: Tarot Redhand
//:: Created On: 18th December 2010
//:://////////////////////////////////////////////

//#include needed for HasItem

#include "nw_i0_plot"

void SpecialKey(object oDoor, object oPC, string sKeyTag, string sFailMessage = "", int iDestroyItemOnSuccess = FALSE)

//simple routine to unlock a door oDoor if a specific item sKeyTag (tag of item) is carried by oPC
//if the item is not in oPC's inventory, oDoor "speaks" sFailMessage
//Note - oDoor is opened at the same time as it is unlocked
//Start with oDoor locked and call this from oDoor's OnFailToOpen event

{
if(HasItem(oPC, sKeyTag))
{
SetLocked(oDoor, FALSE);
if(iDestroyItemOnSuccess)
DestroyObject(GetObjectByTag(sKeyTag));
AssignCommand(oDoor, ActionOpenDoor(oDoor));
}
else
{
if(sFailMessage != "")
SpeakString(sFailMessage);
}
}

//----------------------------------------------------------------------------------------------------------------

void main()
{
//put call to SpecialKey here
}

//----------------------------------------------------------------------------------------------------------------
//next script
//----------------------------------------------------------------------------------------------------------------

/*
//:://////////////////////////////////////////////
//:: Name Unlocked By Spell
//:: FileName scr_unlok_by_spl
//:: Copyright © 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*

*/
//:://////////////////////////////////////////////
//:: Created By: Tarot Redhand
//:: Created On: 18th September 2010
//:://////////////////////////////////////////////

void UnlockedBySpell(object oDoor, int iTargetSpell = SPELL_DISPEL_MAGIC)

//very simple routine to unlock lockable object oDoor when a specific spell intTargetSpell
//is cast at it otherwise oDoor will be locked
//call this function from the void main() part of the script that services an OnSpellCastAt event

{
if(GetLastSpell() == iTargetSpell)
SetLocked(oDoor, FALSE);
else
SetLocked(oDoor, TRUE);
}

//----------------------------------------------------------------------------------------------------------------

void main()
{
//call UnlockedBySpell from here uncomment the next line to try
//UnlockedBySpell(OBJECT_SELF, SPELL_LIGHT);

}

//----------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------

TR

Modifié par Tarot Redhand, 19 décembre 2010 - 05:27 .