52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
//::///////////////////////////////////////////////
 | 
						|
//:: qst_tribitz_end1.nss
 | 
						|
//:: Copyright (c) 2022 Project RATDOG
 | 
						|
//:://////////////////////////////////////////////
 | 
						|
/*
 | 
						|
    Finishes the "Quests of Tribitz" quest with
 | 
						|
    Tribitz dead & cleans up NPCs.
 | 
						|
*/
 | 
						|
//:://////////////////////////////////////////////
 | 
						|
//:: Created By: Tolen
 | 
						|
//:: Created On: 8/24/2005 9:08:28 PM
 | 
						|
//:://////////////////////////////////////////////
 | 
						|
 | 
						|
#include "pqj_inc"
 | 
						|
#include "nw_i0_tool"
 | 
						|
 | 
						|
void main()
 | 
						|
{
 | 
						|
//:: Declare major variables
 | 
						|
    object oPC = GetPCSpeaker();
 | 
						|
    object oTarget = OBJECT_SELF;
 | 
						|
    object oSpawn;
 | 
						|
    location lTarget;
 | 
						|
    int nInt = GetObjectType(oTarget);
 | 
						|
 | 
						|
//:: Set Tribitz to destroyable.
 | 
						|
SetIsDestroyable( TRUE, FALSE, FALSE );
 | 
						|
 | 
						|
//:: Flamestrike Tribitz.
 | 
						|
//:: Visual effects can't be applied to waypoints, so if it is a WP apply to the WP's location instead.
 | 
						|
    if (nInt != OBJECT_TYPE_WAYPOINT)
 | 
						|
        ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), oTarget);
 | 
						|
 | 
						|
    else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DIVINE_STRIKE_FIRE), GetLocation(oTarget));
 | 
						|
 | 
						|
//:: Destroy Tribitz.
 | 
						|
    DestroyObject(oTarget, 3.0);
 | 
						|
 | 
						|
//:: Change target to Herzord's waypoint & get it's location.
 | 
						|
    oTarget = GetWaypointByTag("herz1");
 | 
						|
    lTarget = GetLocation(oTarget);
 | 
						|
 | 
						|
//:: Create new Hezord (Not sure why this is needed.  Should have just been another starting conditional in Herzord's dialog?)
 | 
						|
    oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "herzord001", lTarget);
 | 
						|
 | 
						|
//:: Destroy old Herzord
 | 
						|
    oTarget = GetObjectByTag("herzord");
 | 
						|
    SetIsDestroyable( TRUE, FALSE, FALSE );
 | 
						|
    DestroyObject(oTarget, 0.0);
 | 
						|
 | 
						|
}
 |