Jaysyn904 7b9e44ebbb Initial upload
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.
2024-03-11 23:44:08 -04:00

52 lines
1.1 KiB
Plaintext

void main()
{
object oZhent1=GetObjectByTag("jw_new_zh_ins1");
object oZhent2=GetObjectByTag("jw_new_zh_ins2");
object oPC=GetClickingObject();
SpeakString("*This door is bolted tight from the other side and cannot be opened*");
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;
}
AssignCommand(oZhent1,SetFacingPoint(GetPosition(oPC)));
AssignCommand(oZhent2,SetFacingPoint(GetPosition(oPC)));
if (GetObjectSeen(oPC,oZhent1))
{
if (nDisguised==0)
{
SetIsTemporaryEnemy(oPC,oZhent1);
AssignCommand(oZhent1,ActionAttack(oPC));
}
}
else
{
AssignCommand(oZhent1,SpeakString("Someone there? Best start a search."));
AssignCommand(oZhent1,ActionUseSkill(SKILL_SEARCH,OBJECT_SELF));
}
if (GetObjectSeen(oPC,oZhent2))
{
if (nDisguised==0)
{
SetIsTemporaryEnemy(oPC,oZhent2);
AssignCommand(oZhent2,ActionAttack(oPC));
}
}
else
{
AssignCommand(oZhent2,SpeakString("What was that? Take a close look around."));
AssignCommand(oZhent2,ActionUseSkill(SKILL_SEARCH,OBJECT_SELF));
}
}