Updated Release Archive. Fixed Mage-killer prereqs. Removed old LETO & ConvoCC related files. Added organized spell scroll store. Fixed Gloura spellbook. Various TLK fixes. Reorganized Repo. Removed invalid user folders. Added DocGen back in.
49 lines
1.5 KiB
Plaintext
49 lines
1.5 KiB
Plaintext
/*:://////////////////////////////////////////////
|
|
//:: Name Summon Monster - On Blocked
|
|
//:: FileName SMP_AI_Summ_Blk
|
|
//:://////////////////////////////////////////////
|
|
On Blocked. Will not use lockpicking skill, but will either bash the door
|
|
down, or open it if they have hands.
|
|
|
|
On Blocked can run for creatures or doors.
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Jasperre
|
|
//::////////////////////////////////////////////*/
|
|
|
|
#include "SMP_AI_INCLUDE"
|
|
|
|
void main()
|
|
{
|
|
// Get blocking door or creature.
|
|
object oDoor = GetBlockingDoor();
|
|
int nObjectType = GetObjectType(oDoor);
|
|
|
|
// Must be a door.
|
|
if(GetIsObjectValid(oDoor) && nObjectType == OBJECT_TYPE_DOOR)
|
|
{
|
|
// Check if we know it is trapped, we won't open it. Only will not open/
|
|
// bash if there is no trap known about
|
|
if(!GetIsTrapped(oDoor) || !GetTrapDetectedBy(oDoor, OBJECT_SELF))
|
|
{
|
|
if(SMPAI_GetSummonSetting(SMPAI_SUMMON_CANNOT_DOOR_OPEN) &&
|
|
GetIsDoorActionPossible(oDoor, DOOR_ACTION_OPEN))
|
|
{
|
|
DoDoorAction(oDoor, DOOR_ACTION_OPEN);
|
|
return;
|
|
}
|
|
else if(!SMPAI_GetSummonSetting(SMPAI_SUMMON_CANNOT_DOOR_BASH) &&
|
|
GetIsDoorActionPossible(oDoor, DOOR_ACTION_BASH))
|
|
{
|
|
DoDoorAction(oDoor, DOOR_ACTION_BASH);
|
|
return;
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
else if(nObjectType == OBJECT_TYPE_CREATURE)
|
|
{
|
|
// Do nothing
|
|
return;
|
|
}
|
|
}
|