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.
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
|
|
|
|
void main()
|
|
{
|
|
|
|
|
|
object oObject=OBJECT_SELF;
|
|
|
|
DelayCommand(180.0,AssignCommand(oObject,ActionCloseDoor(oObject)));
|
|
DelayCommand(180.5,AssignCommand(oObject,SetLocked(oObject,TRUE)));
|
|
|
|
|
|
object oZhent=GetObjectByTag("jw_new_zhent_wiz");
|
|
object oPC=GetClickingObject();
|
|
|
|
int nDisguised=0;
|
|
if (GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))=="jw_zhent_splint"||GetTag(GetItemInSlot(INVENTORY_SLOT_CHEST,oPC))=="jw_new_zh_robe")
|
|
{
|
|
nDisguised=1;
|
|
}
|
|
|
|
|
|
if (GetObjectSeen(oPC,oZhent)&&nDisguised==0)
|
|
{
|
|
//AssignCommand(oZhent,SetFacingPoint(GetPosition(oPC)));
|
|
AssignCommand(oZhent,SpeakString("Hey you - keep away from there!"));
|
|
SetIsTemporaryEnemy(oPC,oZhent);
|
|
AssignCommand(oZhent,ActionAttack(oPC));
|
|
location lTarget=GetLocation(OBJECT_SELF);
|
|
object oTarget = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE);
|
|
//Cycle through the targets within the spell shape until an invalid object is captured.
|
|
while (GetIsObjectValid(oTarget))
|
|
{
|
|
if (GetIsFriend(oTarget,oZhent))
|
|
{
|
|
SetIsTemporaryEnemy(oPC,oTarget);
|
|
AssignCommand(oTarget,ActionAttack(oPC));
|
|
}
|
|
|
|
//Select the next target within the shape.
|
|
oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTarget, TRUE, OBJECT_TYPE_CREATURE | OBJECT_TYPE_DOOR);
|
|
}
|
|
SetIsTemporaryEnemy(oPC,GetObjectByTag("jw_new_zh_ins1"));
|
|
SetIsTemporaryEnemy(oPC,GetObjectByTag("jw_new_zh_ins2"));
|
|
}
|
|
|
|
else
|
|
|
|
|
|
if ((!GetObjectSeen(oPC,oZhent))&&(!GetIsInCombat(oZhent)))
|
|
{
|
|
AssignCommand(oZhent,SetFacingPoint(GetPosition(oPC)));
|
|
AssignCommand(oZhent,SpeakString("Hmm . . ? Somebody coming out?"));
|
|
}
|
|
|
|
|
|
|
|
}
|