Lankhmar_PRC8/_module/nss/ac_karlcomm.nss

44 lines
1.0 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 12:54:47 -04:00
void main()
{
object oPC;
if (!GetIsPC(GetItemActivatedTarget())
){
SendMessageToPC(GetItemActivator(), "Improper use of item!");
return;}
object oTarget;
object oSpawn;
location lTarget;
oPC = GetItemActivator();
oTarget = oPC;
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "karl", lTarget);
//The PC will technically start a conversation with himself
//You should add some odd little sound to the first line in the
//conversation file, or the PC will give his normal voicegreeting.
oTarget = oSpawn;
//AssignCommand(oTarget, ActionStartConversation(oPC, ""));
//Visual effects can't be applied to waypoints, so if it is a WP
//the VFX will be applied to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BREACH), oTarget));
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_BREACH), GetLocation(oTarget)));
}