Escolar Documentos
Profissional Documentos
Cultura Documentos
/*This script goes in the "valkaya" conversation file. Two goblin shamans appear
& cast magic at Valkaya. The 1st attack misses. Valkaya counters with her own
magic & kills 1st goblin. 2nd goblin hits Valkaya & she dies. Empty NPC moves
out of the way as goblin rushes the PC. PC regains control, which was lost upon
entering Valkaya's trigger.*/
void main()
{
//Defines PC, Empty Vessel, Valkaya & two goblins.
object oPC = GetFirstPC();
object oEmpty = GetObjectByTag("EMPTY_NPC");
object oValkaya = GetObjectByTag("VALKAYA");
object oGoblin1 = GetObjectByTag("GOBLIN_01");
object oGoblin2 = GetObjectByTag("GOBLIN_02");
//Defines waypoints.
object oEMark = GetWaypointByTag("WP_EMARK");
object oVMark = GetWaypointByTag("WP_VMARK");
object oGMark1 = GetWaypointByTag("WP_GMARK_01");
object oGMark2 = GetWaypointByTag("WP_GMARK_02");
object oMiss = GetWaypointByTag("WP_MISS");
object oRestoreBlue = GetWaypointByTag("WP_RESTORE_BLUE");
//Defines effect.
effect eDeath = EffectDeath();
//Valkaya's actions. Move, cast fake spell, die anim & scream sfx, destroy object.
DelayCommand(fV+=1.5, AssignCommand(oValkaya, ActionForceMoveToObject(oVMark, TRUE)));
DelayCommand(fV+=2.0, AssignCommand(oValkaya, ActionCastFakeSpellAtObject(SPELL_FIREBALL, oGoblin1)));
DelayCommand(fV+=1.0, AssignCommand(oValkaya, ActionPlayAnimation(ANIMATION_LOOPING_DEAD_BACK, 1.0, 3.0)));
DelayCommand(fV+=0.0, AssignCommand(oValkaya, PlaySound("as_pl_screamf2")));
DelayCommand(fV+=0.5, AssignCommand(oValkaya, ActionDoCommand(DestroyObject(oValkaya))));
//2nd goblin's actions. Move, cast fake spell & attack PC.
DelayCommand(fG2+=0.5, AssignCommand(oGoblin2, ActionForceMoveToObject(oGMark2, TRUE)));
DelayCommand(fG2+=3.5, AssignCommand(oGoblin2, ActionCastFakeSpellAtObject(SPELL_ICE_DAGGER, oValkaya)));
DelayCommand(fG2+=1.0, AssignCommand(oGoblin2, ActionAttack(oPC)));