Aantioch_Infernum/_module/nss/hen_settrloc_at.nss
EpicValor 07f4ebed49 Added henchman rental
Many areas, items, and creatures were adjusted for balance and aesthetics.
2023-08-24 15:20:50 -05:00

49 lines
1.7 KiB
Plaintext

//::///////////////////////////////////////////////
//:: Name hen_settrloc_at
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
"Very well. Stand back!"
*/
//:://////////////////////////////////////////////
//:: Created By: nereng
//:: Created On: 03.05.06
//:://////////////////////////////////////////////
#include "x0_i0_assoc"
void DoCreateTrapAtLocation()
{
string sTag = "HenchmanTrap"; // Tag of the trap
string sDisarmed = ""; // script to run on disarmed
string sTriggered = ""; // script to run on triggered
location lLoc = GetLocation(GetMaster()); // The PC Master's location
float fSize = GetLocalFloat(OBJECT_SELF, "TRAP_SIZE");
int nFaction = STANDARD_FACTION_MERCHANT; // faction of the trap
int nTrapType = GetLocalInt(OBJECT_SELF, "TRAP_BASE_NUMBER"); // type of trap
CreateTrapAtLocation(nTrapType, lLoc, fSize, sTag, nFaction, sDisarmed, sTriggered);
}
void main()
{
//int nTrapType = GetLocalInt(OBJECT_SELF, "TRAP_BASE_NUMBER"); // type of trap
object oTrapkit = GetLocalObject(OBJECT_SELF, "TRAP_TO_SET");
// precaution against tricky players!
if (GetIsObjectValid(oTrapkit) == FALSE)
{
SpeakString("Huh?! I wonder where that kit has gone?");
return;
}
DestroyObject(oTrapkit);
DeleteLocalObject(OBJECT_SELF, "TRAP_TO_SET");
SetAssociateState(NW_ASC_IS_BUSY, TRUE);
ActionMoveToObject(GetMaster());
ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, 1.0, 3.0);
ActionDoCommand(DoCreateTrapAtLocation());
ActionDoCommand(PlaySound("gui_traparm"));
ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY, FALSE));
//ActionDoCommand(PlayVoiceChat(VOICE_CHAT_TASKCOMPLETE));
}